feat: prepare self-contained open-source release

This commit is contained in:
luckyyzh
2026-07-31 03:18:50 +08:00
parent 7392ab9dd7
commit 6c2f88e44a
33 changed files with 1304 additions and 135 deletions
+6
View File
@@ -466,6 +466,12 @@ export function useAgentSession(opts: UseAgentSessionOptions) {
try {
const stateRes = await fetch(`/api/sessions/${encodeURIComponent(sid)}/state`);
if (stateRes.status === 404) {
if (sessionIdRef.current === sid) {
setQueuedMessages({ steering: [], followUp: [] });
}
return { running: false };
}
if (!stateRes.ok) throw new Error(`HTTP ${stateRes.status}`);
const agentState = await stateRes.json() as { running: boolean; state?: AgentStateResponse };
if (sessionIdRef.current !== sid) return null;