feat: Add slash commands and help dialog
- Restore slash command autocomplete (type "/" to see suggestions) - Add /compact command to trigger context compaction - Add /clear command to clear chat history - Add /help command with styled modal dialog - Add HelpDialog component with command list - Add system event handler for context warnings - Add debug logging for all Claude events to /tmp/claude-events-debug.jsonl TODO: Parse context warning from Claude events when identified 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -423,9 +423,12 @@ export function useClaudeSession() {
|
||||
isCompacting: false,
|
||||
}));
|
||||
}
|
||||
// Detect compacting
|
||||
if (event.message.includes('compact')) {
|
||||
// Detect compacting start/end from Claude's system messages
|
||||
const msg = event.message.toLowerCase();
|
||||
if (msg.includes('compacting') || msg.includes('summarizing conversation')) {
|
||||
setSessionStats(prev => ({ ...prev, isCompacting: true }));
|
||||
} else if (msg.includes('compacted') || msg.includes('summarized')) {
|
||||
setSessionStats(prev => ({ ...prev, isCompacting: false }));
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
@@ -657,6 +660,7 @@ export function useClaudeSession() {
|
||||
changePermissionMode,
|
||||
respondToPermission,
|
||||
setError,
|
||||
setMessages
|
||||
setMessages,
|
||||
setCompacting: (value) => setSessionStats(prev => ({ ...prev, isCompacting: value })),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user