feat: add experimental support for AST parsing and static graph indexing

- Introduced CLI options for using AST grep parsers and enabling static graph relationships during indexing.
- Updated configuration management to load new settings for AST parsing and static graph types.
- Enhanced AST grep processor to handle imports with aliases and improve relationship tracking.
- Modified TreeSitter parsers to support synthetic module scopes for better static graph persistence.
- Implemented global relationship updates in the incremental indexer for static graph expansion.
- Added new ArtifactTag and FloatingFileBrowser components to the frontend for improved terminal dashboard functionality.
- Created utility functions for detecting CCW artifacts in terminal output with associated tests.
This commit is contained in:
catlog22
2026-02-15 23:12:06 +08:00
parent 48a6a1f2aa
commit 8938c47f88
39 changed files with 2956 additions and 297 deletions

View File

@@ -8,6 +8,7 @@ import { homedir } from 'os';
import { spawn } from 'child_process';
import type { RouteContext } from './types.js';
import { a2uiWebSocketHandler } from '../a2ui/A2UIWebSocketHandler.js';
interface HooksRouteContext extends RouteContext {
extractSessionIdFromPath: (filePath: string) => string | null;
@@ -313,6 +314,20 @@ export async function handleHooksRoutes(ctx: HooksRouteContext): Promise<boolean
}
};
// When an A2UI surface is forwarded from the MCP process, initialize
// selection tracking on the Dashboard so that submit actions resolve
// to the correct value type (single-select string vs multi-select array).
if (type === 'a2ui-surface' && extraData?.initialState) {
const initState = extraData.initialState as Record<string, unknown>;
const questionId = initState.questionId as string | undefined;
const questionType = initState.questionType as string | undefined;
if (questionId && questionType === 'select') {
a2uiWebSocketHandler.initSingleSelect(questionId);
} else if (questionId && questionType === 'multi-select') {
a2uiWebSocketHandler.initMultiSelect(questionId);
}
}
broadcastToClients(notification);
return { success: true, notification };