feat: Implement DeepWiki documentation generation tools

- Added `__init__.py` in `codexlens/tools` for documentation generation.
- Created `deepwiki_generator.py` to handle symbol extraction and markdown generation.
- Introduced `MockMarkdownGenerator` for testing purposes.
- Implemented `DeepWikiGenerator` class for managing documentation generation and file processing.
- Added unit tests for `DeepWikiStore` to ensure proper functionality and error handling.
- Created tests for DeepWiki TypeScript types matching.
This commit is contained in:
catlog22
2026-03-05 18:30:56 +08:00
parent 0bfae3fd1a
commit fb4f6e718e
62 changed files with 7500 additions and 68 deletions

View File

@@ -35,7 +35,7 @@ import {
isStdioMcpServer,
isHttpMcpServer,
} from '@/lib/api';
import { mcpServersKeys, useMcpTemplates } from '@/hooks';
import { mcpServersKeys, useMcpTemplates, useNotifications } from '@/hooks';
import { cn } from '@/lib/utils';
import { ConfigTypeToggle, type McpConfigType } from './ConfigTypeToggle';
import { useWorkflowStore, selectProjectPath } from '@/stores/workflowStore';
@@ -212,6 +212,7 @@ export function McpServerDialog({
const { formatMessage } = useIntl();
const queryClient = useQueryClient();
const projectPath = useWorkflowStore(selectProjectPath);
const { error: showError } = useNotifications();
// Fetch templates from backend
const { templates, isLoading: templatesLoading } = useMcpTemplates();
@@ -544,7 +545,8 @@ export function McpServerDialog({
env: Object.keys(formData.env).length > 0 ? formData.env : undefined,
},
});
} catch {
} catch (err) {
showError(formatMessage({ id: 'mcp.templates.feedback.saveError' }), err instanceof Error ? err.message : String(err));
// Template save failure should not block server creation
}
}