mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-12 02:37:45 +08:00
Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -69,6 +69,8 @@ function handleNotification(data) {
|
||||
case 'PLAN_UPDATED':
|
||||
case 'REVIEW_UPDATED':
|
||||
case 'CONTENT_WRITTEN':
|
||||
case 'FILE_DELETED':
|
||||
case 'DIRECTORY_CREATED':
|
||||
// Route to state reducer for granular updates
|
||||
if (typeof handleWorkflowEvent === 'function') {
|
||||
handleWorkflowEvent({ type, ...payload });
|
||||
|
||||
@@ -177,6 +177,16 @@ function handleWorkflowEvent(event) {
|
||||
// Generic content write - just log for debugging
|
||||
console.log(`[State] Content written: ${event.contentType} for ${sessionId}`);
|
||||
break;
|
||||
|
||||
case 'FILE_DELETED':
|
||||
// File deleted from session - log and trigger refresh
|
||||
console.log(`[State] File deleted: ${payload?.file_path || payload?.deleted} from ${sessionId}`);
|
||||
break;
|
||||
|
||||
case 'DIRECTORY_CREATED':
|
||||
// Directory created in session - log and trigger refresh
|
||||
console.log(`[State] Directory created: ${payload?.directories?.join(', ') || 'unknown'} in ${sessionId}`);
|
||||
break;
|
||||
}
|
||||
|
||||
// Trigger UI updates
|
||||
|
||||
Reference in New Issue
Block a user