agentgui 1.0.781 → 1.0.782
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/jsonl-watcher.js +2 -2
- package/lib/ws-handlers-run.js +2 -3
- package/package.json +1 -1
- package/server.js +1 -1
package/lib/jsonl-watcher.js
CHANGED
|
@@ -124,8 +124,8 @@ export class JsonlWatcher {
|
|
|
124
124
|
const cwd = e.cwd || process.cwd();
|
|
125
125
|
const branch = e.gitBranch || '';
|
|
126
126
|
const base = path.basename(cwd);
|
|
127
|
-
const title = branch ?
|
|
128
|
-
const conv = this._q.createConversation('
|
|
127
|
+
const title = branch ? `${branch} @ ${base}` : base;
|
|
128
|
+
const conv = this._q.createConversation('claude-code', title, cwd);
|
|
129
129
|
this._q.setClaudeSessionId(conv.id, sid);
|
|
130
130
|
this._convMap.set(sid, conv.id);
|
|
131
131
|
this._bc({ type: 'conversation_created', conversation: conv, timestamp: Date.now() });
|
package/lib/ws-handlers-run.js
CHANGED
|
@@ -2,7 +2,7 @@ function err(code, message) { const e = new Error(message); e.code = code; throw
|
|
|
2
2
|
function need(p, key) { if (!p[key]) err(400, `Missing required param: ${key}`); return p[key]; }
|
|
3
3
|
|
|
4
4
|
function register(router, deps) {
|
|
5
|
-
const { queries, discoveredAgents, activeExecutions, activeProcessesByRunId, broadcastSync, processMessageWithStreaming } = deps;
|
|
5
|
+
const { queries, discoveredAgents, activeExecutions, activeProcessesByRunId, broadcastSync, processMessageWithStreaming, cleanupExecution } = deps;
|
|
6
6
|
|
|
7
7
|
function findAgent(id) { const a = discoveredAgents.find(x => x.id === id); if (!a) err(404, 'Agent not found'); return a; }
|
|
8
8
|
function getRunOrThrow(id) { const r = queries.getRun(id); if (!r) err(404, 'Run not found'); return r; }
|
|
@@ -15,9 +15,8 @@ function register(router, deps) {
|
|
|
15
15
|
setTimeout(() => { try { process.kill(-ex.pid, 'SIGKILL'); } catch { try { process.kill(ex.pid, 'SIGKILL'); } catch {} } }, 3000);
|
|
16
16
|
}
|
|
17
17
|
if (ex?.sessionId) queries.updateSession(ex.sessionId, { status: 'error', error: 'Cancelled by user', completed_at: Date.now() });
|
|
18
|
-
|
|
18
|
+
cleanupExecution(threadId);
|
|
19
19
|
activeProcessesByRunId.delete(runId);
|
|
20
|
-
queries.setIsStreaming(threadId, false);
|
|
21
20
|
return ex;
|
|
22
21
|
}
|
|
23
22
|
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -2627,7 +2627,7 @@ debugLog('[INIT] registerSessionHandlers completed');
|
|
|
2627
2627
|
|
|
2628
2628
|
registerRunHandlers(wsRouter, {
|
|
2629
2629
|
queries, discoveredAgents, activeExecutions, activeProcessesByRunId,
|
|
2630
|
-
broadcastSync, processMessageWithStreaming
|
|
2630
|
+
broadcastSync, processMessageWithStreaming, cleanupExecution
|
|
2631
2631
|
});
|
|
2632
2632
|
|
|
2633
2633
|
registerUtilHandlers(wsRouter, {
|