mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-08 00:19:42 +02:00
fix: forward hook event data to notifications
The server was dropping the `data` field from hook-event POST requests, so notifications always showed generic messages. Now forwards tool name, command, question text, and reason to the frontend. Notifications now show: - permission_prompt: "Bash: docker push prod:latest" - elicitation_dialog: "Merge PR #42 to main?" - idle_prompt: custom message if provided - stop: reason if provided Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1135,7 +1135,7 @@ class ClaudemanApp {
|
||||
sessionId: data.sessionId,
|
||||
sessionName: session?.name || data.sessionId,
|
||||
title: 'Waiting for Input',
|
||||
message: 'Claude is idle and waiting for a prompt',
|
||||
message: data.message || 'Claude is idle and waiting for a prompt',
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1146,13 +1146,14 @@ class ClaudemanApp {
|
||||
this.tabAlerts.set(data.sessionId, 'action');
|
||||
this.renderSessionTabs();
|
||||
}
|
||||
const toolInfo = data.tool ? `${data.tool}${data.command ? ': ' + data.command : data.file ? ': ' + data.file : ''}` : '';
|
||||
this.notificationManager?.notify({
|
||||
urgency: 'critical',
|
||||
category: 'hook-permission',
|
||||
sessionId: data.sessionId,
|
||||
sessionName: session?.name || data.sessionId,
|
||||
title: 'Permission Required',
|
||||
message: 'Claude needs tool approval to continue',
|
||||
message: toolInfo || 'Claude needs tool approval to continue',
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1169,7 +1170,7 @@ class ClaudemanApp {
|
||||
sessionId: data.sessionId,
|
||||
sessionName: session?.name || data.sessionId,
|
||||
title: 'Question Asked',
|
||||
message: 'Claude is asking a question and waiting for your answer',
|
||||
message: data.question || 'Claude is asking a question and waiting for your answer',
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1182,7 +1183,7 @@ class ClaudemanApp {
|
||||
sessionId: data.sessionId,
|
||||
sessionName: session?.name || data.sessionId,
|
||||
title: 'Response Complete',
|
||||
message: 'Claude has finished responding',
|
||||
message: data.reason || 'Claude has finished responding',
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user