mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-03 15:43:11 +08:00
Refactor and optimize various components and files
- Removed deprecated `ccw-contentPattern-optimization-summary.md` and related files. - Updated `A2UIPopupCard.tsx` to clarify comments on interaction handling. - Enhanced `QueueListColumn.tsx` and `QueuePanel.tsx` to handle potential undefined values for `config`. - Added `useEffect` in `QueuePanel.tsx` to load scheduler state on mount. - Improved `SchedulerPanel.tsx` to handle potential undefined values for `sessionPool`. - Introduced auto-initialization logic in `queueSchedulerStore.ts` to prevent multiple initialization calls. - Updated `A2UIWebSocketHandler.ts` to refine selection handling logic. - Enhanced `hooks-routes.ts` to support multi-question surfaces. - Added submit and cancel buttons in `ask-question.ts` for better user interaction. - Deleted `codex_prompt.md` and `contentPattern-library-options.md` as part of cleanup. - Removed `status-reference.md` to streamline documentation.
This commit is contained in:
@@ -343,7 +343,19 @@ export async function handleHooksRoutes(ctx: HooksRouteContext): Promise<boolean
|
||||
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') {
|
||||
|
||||
// Handle multi-question surfaces (multi-page): initialize tracking for each page
|
||||
if (questionType === 'multi-question' && Array.isArray(initState.pages)) {
|
||||
const pages = initState.pages as Array<{ questionId: string; type: string }>;
|
||||
for (const page of pages) {
|
||||
if (page.type === 'multi-select') {
|
||||
a2uiWebSocketHandler.initMultiSelect(page.questionId);
|
||||
} else if (page.type === 'select') {
|
||||
a2uiWebSocketHandler.initSingleSelect(page.questionId);
|
||||
}
|
||||
}
|
||||
} else if (questionId && questionType === 'select') {
|
||||
// Single-question surface: initialize based on question type
|
||||
a2uiWebSocketHandler.initSingleSelect(questionId);
|
||||
} else if (questionId && questionType === 'multi-select') {
|
||||
a2uiWebSocketHandler.initMultiSelect(questionId);
|
||||
|
||||
Reference in New Issue
Block a user