Gateway: show subagent requests on the parent's card, and settle threads
This commit is contained in:
1 parent
a8b6375afe
commit
a4754b65b0
7 files changed
+183
-21
No files matched your search
+9
-1
@@ -232,7 +232,7 @@ export function createRoutes({ db, hub, cache, pusher, startedAt, log = () => {}
|
||||
"/v1/threads/:hostId/:threadId": {
|
||||
GET: authed<"/v1/threads/:hostId/:threadId">(async (req) => {
|
||||
const { host, thread } = findThread(req.params.hostId, req.params.threadId);
|
||||
return json(await buildThreadDetail(host, thread, cache));
|
||||
return json(await buildThreadDetail(host, thread, cache, hub.list()));
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -277,6 +277,14 @@ export function createRoutes({ db, hub, cache, pusher, startedAt, log = () => {}
|
||||
}),
|
||||
},
|
||||
|
||||
"/v1/threads/:hostId/:threadId/settle": {
|
||||
POST: authed<"/v1/threads/:hostId/:threadId/settle">(async (req) => {
|
||||
const { host, thread } = findThread(req.params.hostId, req.params.threadId);
|
||||
await host.dispatch({ type: "thread.settle", commandId: crypto.randomUUID(), threadId: thread.id });
|
||||
return accepted();
|
||||
}),
|
||||
},
|
||||
|
||||
"/v1/threads/:hostId/:threadId/stop": {
|
||||
POST: authed<"/v1/threads/:hostId/:threadId/stop">(async (req) => {
|
||||
const { host, thread } = findThread(req.params.hostId, req.params.threadId);
|
||||
|
||||
Reference in new issue
Block a user