mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-11 17:21:03 +08:00
Refactor multi-CLI planning documentation, enhance analyze-with-file skill, and implement timeout for DeepWiki API requests
- Updated SKILL.md for workflow-multi-cli-plan to streamline sections, clarify processes, and improve user decision points. - Enhanced analyze-with-file skill to include hypothesis impact in key findings and refined recording principles for better documentation. - Added fetchWithTimeout function to DeepWiki API calls to handle request timeouts, ensuring more robust error handling. - Introduced new DeepWiki routes in server.ts to manage API requests effectively. - Updated tsconfig.tsbuildinfo to reflect recent changes in the codebase structure.
This commit is contained in:
@@ -578,6 +578,11 @@ export async function startServer(options: ServerOptions = {}): Promise<http.Ser
|
||||
if (await handleMcpRoutes(routeContext)) return;
|
||||
}
|
||||
|
||||
// DeepWiki routes (/api/deepwiki/*)
|
||||
if (pathname.startsWith('/api/deepwiki')) {
|
||||
if (await handleDeepWikiRoutes(routeContext)) return;
|
||||
}
|
||||
|
||||
// Hooks routes (/api/hooks, /api/hook)
|
||||
if (pathname.startsWith('/api/hook')) {
|
||||
if (await handleHooksRoutes(routeContext)) return;
|
||||
|
||||
@@ -250,6 +250,35 @@ export class DeepWikiService {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get storage statistics
|
||||
* @returns Statistics object with counts
|
||||
*/
|
||||
public getStats(): { files: number; symbols: number; docs: number; filesNeedingDocs: number; dbPath: string } {
|
||||
const db = this.getConnection();
|
||||
if (!db) {
|
||||
return { files: 0, symbols: 0, docs: 0, filesNeedingDocs: 0, dbPath: this.dbPath };
|
||||
}
|
||||
|
||||
try {
|
||||
const files = db.prepare('SELECT COUNT(*) as count FROM deepwiki_files').get() as { count: number };
|
||||
const symbols = db.prepare('SELECT COUNT(*) as count FROM deepwiki_symbols').get() as { count: number };
|
||||
const docs = db.prepare('SELECT COUNT(*) as count FROM deepwiki_docs').get() as { count: number };
|
||||
const filesNeedingDocs = db.prepare('SELECT COUNT(*) as count FROM deepwiki_files WHERE docs_generated = 0').get() as { count: number };
|
||||
|
||||
return {
|
||||
files: files?.count || 0,
|
||||
symbols: symbols?.count || 0,
|
||||
docs: docs?.count || 0,
|
||||
filesNeedingDocs: filesNeedingDocs?.count || 0,
|
||||
dbPath: this.dbPath
|
||||
};
|
||||
} catch (error) {
|
||||
console.error('[DeepWiki] Error getting stats:', error);
|
||||
return { files: 0, symbols: 0, docs: 0, filesNeedingDocs: 0, dbPath: this.dbPath };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Singleton instance
|
||||
|
||||
Reference in New Issue
Block a user