Add LocalChat component using useLocalChat hook that communicates with the Hub via IPC (no Gateway required). Fix streamId extraction to use event.message.id matching Hub behavior. Fix history to return raw AgentMessageItem[] instead of flattened strings. Add exec approval forwarding over IPC. Use conditional rendering for LocalChat to prevent event leaking from remote sessions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
13 lines
294 B
TypeScript
13 lines
294 B
TypeScript
import { create } from "zustand"
|
|
|
|
export type ChatMode = "select" | "local" | "remote"
|
|
|
|
interface ChatModeStore {
|
|
mode: ChatMode
|
|
setMode: (mode: ChatMode) => void
|
|
}
|
|
|
|
export const useChatModeStore = create<ChatModeStore>((set) => ({
|
|
mode: "select",
|
|
setMode: (mode) => set({ mode }),
|
|
}))
|