mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 15:03:57 +08:00
Add comprehensive tests for ast-grep and tree-sitter relationship extraction
- Introduced test suite for AstGrepPythonProcessor covering pattern definitions, parsing, and relationship extraction. - Added comparison tests between tree-sitter and ast-grep for consistency in relationship extraction. - Implemented tests for ast-grep binding module to verify functionality and availability. - Ensured tests cover various scenarios including inheritance, function calls, and imports.
This commit is contained in:
@@ -17,6 +17,7 @@ import type {
|
||||
} from '../core/a2ui/A2UITypes.js';
|
||||
import http from 'http';
|
||||
import { a2uiWebSocketHandler } from '../core/a2ui/A2UIWebSocketHandler.js';
|
||||
import { remoteNotificationService } from '../core/services/remote-notification-service.js';
|
||||
|
||||
const DASHBOARD_PORT = Number(process.env.CCW_PORT || 3456);
|
||||
const POLL_INTERVAL_MS = 1000;
|
||||
@@ -466,6 +467,14 @@ export async function execute(params: AskQuestionParams): Promise<ToolResult<Ask
|
||||
const a2uiSurface = generateQuestionSurface(question, surfaceId);
|
||||
const sentCount = a2uiWebSocketHandler.sendSurface(a2uiSurface.surfaceUpdate);
|
||||
|
||||
// Trigger remote notification for ask-user-question event (if enabled)
|
||||
if (remoteNotificationService.shouldNotify('ask-user-question')) {
|
||||
remoteNotificationService.sendNotification('ask-user-question', {
|
||||
sessionId: surfaceId,
|
||||
questionText: question.title,
|
||||
});
|
||||
}
|
||||
|
||||
// If no local WS clients, start HTTP polling for answer from Dashboard
|
||||
if (sentCount === 0) {
|
||||
startAnswerPolling(question.id);
|
||||
@@ -1064,6 +1073,15 @@ async function executeSimpleFormat(
|
||||
// Send the surface
|
||||
const sentCount = a2uiWebSocketHandler.sendSurface(surfaceUpdate);
|
||||
|
||||
// Trigger remote notification for ask-user-question event (if enabled)
|
||||
if (remoteNotificationService.shouldNotify('ask-user-question')) {
|
||||
const questionTexts = questions.map(q => q.question).join('\n');
|
||||
remoteNotificationService.sendNotification('ask-user-question', {
|
||||
sessionId: compositeId,
|
||||
questionText: questionTexts,
|
||||
});
|
||||
}
|
||||
|
||||
// If no local WS clients, start HTTP polling for answer from Dashboard
|
||||
if (sentCount === 0) {
|
||||
startAnswerPolling(compositeId, true);
|
||||
|
||||
Reference in New Issue
Block a user