Prepare self-contained open-source release (#1)

* feat: prepare self-contained open-source release

* fix: canonicalize missing managed paths

---------

Co-authored-by: luckyyzh <luckyyzh@users.noreply.github.com>
This commit is contained in:
Zihao Yang
2026-07-31 03:39:54 +08:00
committed by GitHub
co-authored by luckyyzh
parent 7392ab9dd7
commit 5c9c6631f5
34 changed files with 1310 additions and 137 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;