agentgui 1.0.858 → 1.0.860
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/db-queries.js +1 -0
- package/lib/jsonl-parser.js +1 -1
- package/lib/jsonl-watcher.js +0 -13
- package/lib/routes-tools.js +1 -1
- package/package.json +1 -1
package/lib/db-queries.js
CHANGED
|
@@ -62,6 +62,7 @@ export function createQueries(db, prep, generateId) {
|
|
|
62
62
|
prep('UPDATE conversations SET claudeSessionId = ?, updated_at = ? WHERE id = ?').run(claudeSessionId, Date.now(), conversationId);
|
|
63
63
|
if (sessionId) prep('UPDATE sessions SET claudeSessionId = ? WHERE id = ?').run(claudeSessionId, sessionId);
|
|
64
64
|
},
|
|
65
|
+
getConversationByClaudeSessionId(claudeSessionId) { return prep('SELECT * FROM conversations WHERE claudeSessionId = ? AND status NOT IN (?, ?) LIMIT 1').get(claudeSessionId, 'deleted', 'archived') || null; },
|
|
65
66
|
getClaudeSessionId(conversationId) { const row = prep('SELECT claudeSessionId FROM conversations WHERE id = ?').get(conversationId); return row?.claudeSessionId || null; },
|
|
66
67
|
setIsStreaming(conversationId, isStreaming) { prep('UPDATE conversations SET isStreaming = ?, updated_at = ? WHERE id = ?').run(isStreaming ? 1 : 0, Date.now(), conversationId); },
|
|
67
68
|
getIsStreaming(conversationId) { const row = prep('SELECT isStreaming FROM conversations WHERE id = ?').get(conversationId); return row?.isStreaming === 1; },
|
package/lib/jsonl-parser.js
CHANGED
|
@@ -44,7 +44,7 @@ export class JsonlParser {
|
|
|
44
44
|
|
|
45
45
|
_conv(sid, e, fp) {
|
|
46
46
|
if (this._convMap.has(sid)) return this._convMap.get(sid);
|
|
47
|
-
const found = this._q.
|
|
47
|
+
const found = this._q.getConversationByClaudeSessionId(sid);
|
|
48
48
|
if (found) { this._convMap.set(sid, found.id); return found.id; }
|
|
49
49
|
if (e.type === 'queue-operation' || e.type === 'last-prompt') return null;
|
|
50
50
|
if (e.type === 'user' && e.isMeta) return null;
|
package/lib/jsonl-watcher.js
CHANGED
|
@@ -3,11 +3,6 @@ import { JsonlWatcher as CCFWatcher } from 'ccfollow';
|
|
|
3
3
|
import { JsonlParser } from './jsonl-parser.js';
|
|
4
4
|
|
|
5
5
|
export class JsonlWatcher extends CCFWatcher {
|
|
6
|
-
<<<<<<< HEAD
|
|
7
|
-
constructor({ broadcastSync, queries, ownedSessionIds }) {
|
|
8
|
-
super();
|
|
9
|
-
this._parser = new JsonlParser({ broadcastSync, queries, ownedSessionIds });
|
|
10
|
-
=======
|
|
11
6
|
constructor({ broadcastSync, queries }) {
|
|
12
7
|
super();
|
|
13
8
|
this._parser = new JsonlParser({ broadcastSync, queries });
|
|
@@ -19,7 +14,6 @@ export class JsonlWatcher extends CCFWatcher {
|
|
|
19
14
|
this._currentFp = fp;
|
|
20
15
|
super._read(fp);
|
|
21
16
|
this._currentFp = null;
|
|
22
|
-
>>>>>>> 6bfde951cbeb65ec72b73da9c23b9c8c0ba0bbc1
|
|
23
17
|
}
|
|
24
18
|
|
|
25
19
|
_line(line) {
|
|
@@ -28,12 +22,6 @@ export class JsonlWatcher extends CCFWatcher {
|
|
|
28
22
|
let e;
|
|
29
23
|
try { e = JSON.parse(line); } catch (_) { return; }
|
|
30
24
|
if (!e || !e.sessionId) return;
|
|
31
|
-
<<<<<<< HEAD
|
|
32
|
-
const cid = this._parser._conv(e.sessionId, e);
|
|
33
|
-
if (cid) this._parser._route(cid, e.sessionId, e);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
=======
|
|
37
25
|
const cid = this._parser._conv(e.sessionId, e, this._currentFp);
|
|
38
26
|
if (cid) this._parser._route(cid, e.sessionId, e);
|
|
39
27
|
}
|
|
@@ -47,7 +35,6 @@ export class JsonlWatcher extends CCFWatcher {
|
|
|
47
35
|
this._parser.registerSession(claudeSessionId, convId, dbSessionId);
|
|
48
36
|
}
|
|
49
37
|
|
|
50
|
-
>>>>>>> 6bfde951cbeb65ec72b73da9c23b9c8c0ba0bbc1
|
|
51
38
|
stop() {
|
|
52
39
|
super.stop();
|
|
53
40
|
this._parser.endAllStreaming();
|
package/lib/routes-tools.js
CHANGED
|
@@ -33,7 +33,7 @@ export function register(deps) {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
routes['POST /api/tools/update'] = async (req, res) => {
|
|
36
|
-
const allToolIds = ['cli-claude', 'cli-opencode', 'cli-gemini', 'cli-kilo', 'cli-codex', 'gm-cc', 'gm-oc', 'gm-gc', 'gm-kilo'];
|
|
36
|
+
const allToolIds = ['cli-claude', 'cli-opencode', 'cli-gemini', 'cli-kilo', 'cli-codex', 'cli-agent-browser', 'gm-cc', 'gm-oc', 'gm-gc', 'gm-kilo', 'gm-codex'];
|
|
37
37
|
sendJSON(req, res, 200, { updating: true, toolCount: allToolIds.length });
|
|
38
38
|
broadcastSync({ type: 'tools_update_started', tools: allToolIds });
|
|
39
39
|
setImmediate(async () => {
|