mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-20 19:03:51 +08:00
feat: Implement DeepWiki generator and CLI integration
- Added `deepwiki_generator.py` for generating documentation from source code. - Integrated symbol extraction and markdown generation for supported file types. - Implemented database migration for legacy timestamp formats in DeepWikiStore. - Enhanced debug logging for better traceability during conversation and store operations. - Updated dependencies in `PKG-INFO` and `requires.txt` for compatibility. - Added new tests for the DeepWiki generator and storage functionalities. - Refactored existing code for improved readability and maintainability.
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
deleteExecutionAsync,
|
||||
batchDeleteExecutionsAsync,
|
||||
executeCliTool,
|
||||
generateExecutionId,
|
||||
getNativeSessionContent,
|
||||
getFormattedNativeConversation,
|
||||
getEnrichedConversation,
|
||||
@@ -940,7 +941,7 @@ export async function handleCliRoutes(ctx: RouteContext): Promise<boolean> {
|
||||
}
|
||||
}
|
||||
|
||||
const executionId = `${Date.now()}-${tool}`;
|
||||
const executionId = generateExecutionId(tool);
|
||||
|
||||
// Store active execution for state recovery
|
||||
// Check map size limit before creating new execution
|
||||
|
||||
@@ -11,13 +11,22 @@
|
||||
|
||||
import type { RouteContext } from './types.js';
|
||||
import { getDeepWikiService } from '../../services/deepwiki-service.js';
|
||||
import { handleDeepWikiRoutes as handleDeepWikiPostRoutes } from '../../services/deepwiki-service.js';
|
||||
|
||||
/**
|
||||
* Handle DeepWiki routes
|
||||
* @returns true if route was handled, false otherwise
|
||||
*/
|
||||
export async function handleDeepWikiRoutes(ctx: RouteContext): Promise<boolean> {
|
||||
const { pathname, url, res } = ctx;
|
||||
const { pathname, url, res, req } = ctx;
|
||||
|
||||
// POST endpoints implemented in the DeepWiki service module.
|
||||
if (
|
||||
(pathname === '/api/deepwiki/symbols-for-paths' || pathname === '/api/deepwiki/stale-files') &&
|
||||
req.method === 'POST'
|
||||
) {
|
||||
return handleDeepWikiPostRoutes({ pathname, req, res });
|
||||
}
|
||||
|
||||
// GET /api/deepwiki/files - List all documented files
|
||||
if (pathname === '/api/deepwiki/files') {
|
||||
|
||||
@@ -17,6 +17,7 @@ import { getLaunchConfig } from './cli-launch-registry.js';
|
||||
import { assembleInstruction, type InstructionType } from './cli-instruction-assembler.js';
|
||||
import { loadEndpointSettings } from '../../config/cli-settings-manager.js';
|
||||
import { getToolConfig } from '../../tools/claude-cli-tools.js';
|
||||
import { generateExecutionId } from '../../tools/cli-executor.js';
|
||||
|
||||
export interface CliSession {
|
||||
sessionKey: string;
|
||||
@@ -532,7 +533,7 @@ export class CliSessionManager {
|
||||
|
||||
const executionId = resumeKey
|
||||
? `${resumeKey}-${Date.now()}`
|
||||
: `exec-${Date.now()}-${randomBytes(3).toString('hex')}`;
|
||||
: generateExecutionId(options.tool);
|
||||
|
||||
let command: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user