Complete Zustand migration: fix component access to session APIs
Finalizes the pure Zustand refactor by ensuring all components properly access both session state and imperative methods through useDaemonSession. Moves CLAUDE.md to root and ignores local overrides. Changes: - Fix useDaemonSession to return stable combined state + methods object - Update components to use useDaemonSession instead of direct context - Fix realtime context to work with session state only - Move CLAUDE.md to root, ignore CLAUDE.local.md for local config - Add proper null checks and type safety throughout 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -492,6 +492,12 @@ class ClaudeAgentSession implements AgentSession {
|
||||
permissionMode: this.currentMode,
|
||||
agents: this.defaults?.agents,
|
||||
canUseTool: this.handlePermissionRequest,
|
||||
// Use Claude Code preset system prompt and load CLAUDE.md files
|
||||
systemPrompt: {
|
||||
type: "preset",
|
||||
preset: "claude_code",
|
||||
},
|
||||
settingSources: ["project", "user"],
|
||||
stderr: (data: string) => {
|
||||
console.error("[ClaudeAgentSDK]", data.trim());
|
||||
},
|
||||
|
||||
@@ -104,8 +104,8 @@ export class VoiceAssistantWebSocketServer {
|
||||
})`
|
||||
);
|
||||
|
||||
// Send initial session state (global agents and commands)
|
||||
await session.sendInitialState();
|
||||
// Don't send initial state here - client will request it via load_conversation_request
|
||||
// This avoids race condition where message arrives before client sets up listeners
|
||||
|
||||
// Set up message handler
|
||||
ws.on("message", (data) => {
|
||||
|
||||
Reference in New Issue
Block a user