+
+
工作
+
任务 · 日历 · 提醒 · 文档产出
+
+
+
+ {[
+ ["任务", String(items.filter((i) => !i.done).length)],
+ ["日历", "今日 2"],
+ ["提醒", "1 条"],
+ ["文档", "4 篇"],
+ ].map(([k, v]) => (
+
+ {k}
+ {v}
+
+ ))}
+
+
+
+
任务清单
+
+ setTitle(e.target.value)}
+ onKeyDown={(e) => e.key === "Enter" && add()}
+ placeholder="新增任务…"
+ className="flex-1 rounded-[var(--mu-radius)] bg-[var(--mu-surface-2)] px-3 py-2 text-sm outline-none placeholder:text-[var(--mu-text-lo)]"
+ />
+
+
+ {items.length === 0 ? (
+
+ ) : (
+
+ {items.map((it) => (
+
+
+
+ {it.title}
+
+ {it.due ? {it.due} : null}
+
+ ))}
+
+ )}
+
+
+
+
提醒
+
+
+
+ );
+}
diff --git a/frontend/web/src/store/useAppStore.ts b/frontend/web/src/store/useAppStore.ts
new file mode 100644
index 0000000..e07351e
--- /dev/null
+++ b/frontend/web/src/store/useAppStore.ts
@@ -0,0 +1,219 @@
+import { create } from "zustand";
+import { persist } from "zustand/middleware";
+import type {
+ AgentInfo,
+ BackthinkItem,
+ ChatMessage,
+ FlowGraph,
+ ToolUsed,
+ WsStatus,
+} from "../lib/types";
+import { now, uid } from "../lib/util";
+
+interface ChatContext {
+ topic?: string;
+ lastAgentMode?: string;
+ notes?: string[];
+}
+
+export interface AppStore {
+ sessionId: string;
+ wsStatus: WsStatus;
+ messages: ChatMessage[];
+ mood: string | null;
+ context: ChatContext;
+ agents: AgentInfo[];
+ backthink: BackthinkItem[];
+ flowGraph: FlowGraph | null;
+ deviceUpdates: string[];
+
+ setWsStatus: (status: WsStatus) => void;
+ setSessionId: (id: string) => void;
+ setContext: (patch: Partial