agentgui 1.0.736 → 1.0.738
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/database.js +18 -0
- package/package.json +1 -1
- package/server.js +12 -5
- package/static/index.html +1 -1
- package/static/js/client.js +1 -1
package/database.js
CHANGED
|
@@ -1151,6 +1151,24 @@ export const queries = {
|
|
|
1151
1151
|
});
|
|
1152
1152
|
|
|
1153
1153
|
deleteAllStmt();
|
|
1154
|
+
const projectsDir = path.join(os.homedir(), '.claude', 'projects');
|
|
1155
|
+
if (fs.existsSync(projectsDir)) {
|
|
1156
|
+
for (const project of fs.readdirSync(projectsDir)) {
|
|
1157
|
+
const pdir = path.join(projectsDir, project);
|
|
1158
|
+
try {
|
|
1159
|
+
if (!fs.statSync(pdir).isDirectory()) continue;
|
|
1160
|
+
for (const entry of fs.readdirSync(pdir, { withFileTypes: true })) {
|
|
1161
|
+
if (entry.isFile() && entry.name.endsWith('.jsonl')) {
|
|
1162
|
+
fs.unlinkSync(path.join(pdir, entry.name));
|
|
1163
|
+
} else if (entry.isDirectory()) {
|
|
1164
|
+
fs.rmSync(path.join(pdir, entry.name), { recursive: true, force: true });
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
} catch (err) {
|
|
1168
|
+
console.error('[deleteAllConversations] Failed to clean project dir:', pdir, err.message);
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1154
1172
|
console.log('[deleteAllConversations] Deleted all conversations and associated Claude Code files');
|
|
1155
1173
|
return true;
|
|
1156
1174
|
} catch (err) {
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -1712,11 +1712,18 @@ const server = http.createServer(async (req, res) => {
|
|
|
1712
1712
|
|
|
1713
1713
|
const url = new URL(req.url, 'http://localhost');
|
|
1714
1714
|
const since = parseInt(url.searchParams.get('since') || '0');
|
|
1715
|
-
|
|
1716
|
-
const
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1715
|
+
const all = url.searchParams.get('all') === 'true';
|
|
1716
|
+
const totalChunks = queries.getConversationChunkCount(conversationId);
|
|
1717
|
+
let chunks;
|
|
1718
|
+
if (since > 0) {
|
|
1719
|
+
chunks = queries.getConversationChunksSince(conversationId, since);
|
|
1720
|
+
} else if (all) {
|
|
1721
|
+
chunks = queries.getConversationChunks(conversationId);
|
|
1722
|
+
} else {
|
|
1723
|
+
chunks = queries.getRecentConversationChunks(conversationId, 500);
|
|
1724
|
+
}
|
|
1725
|
+
debugLog(`[chunks] Conv ${conversationId}: ${chunks.length} chunks (total: ${totalChunks})`);
|
|
1726
|
+
sendJSON(req, res, 200, { ok: true, chunks, totalChunks });
|
|
1720
1727
|
return;
|
|
1721
1728
|
}
|
|
1722
1729
|
|
package/static/index.html
CHANGED
|
@@ -3307,7 +3307,6 @@
|
|
|
3307
3307
|
var _escHtmlRe = /[&<>"']/g;
|
|
3308
3308
|
window._escHtml = function(t) { return t.replace(_escHtmlRe, function(c) { return _escHtmlMap[c]; }); };
|
|
3309
3309
|
</script>
|
|
3310
|
-
<script defer src="/gm/js/conversations.js"></script>
|
|
3311
3310
|
<script defer src="/gm/js/event-processor.js"></script>
|
|
3312
3311
|
<script defer src="/gm/js/streaming-renderer.js"></script>
|
|
3313
3312
|
<script defer src="/gm/js/image-loader.js"></script>
|
|
@@ -3319,6 +3318,7 @@
|
|
|
3319
3318
|
<script defer src="/gm/js/voice-machine.js"></script>
|
|
3320
3319
|
<script defer src="/gm/js/conv-list-machine.js"></script>
|
|
3321
3320
|
<script defer src="/gm/js/prompt-machine.js"></script>
|
|
3321
|
+
<script defer src="/gm/js/conversations.js"></script>
|
|
3322
3322
|
<script defer src="/gm/lib/msgpackr.min.js"></script>
|
|
3323
3323
|
<script defer src="/gm/js/websocket-manager.js"></script>
|
|
3324
3324
|
<script defer src="/gm/js/ws-client.js"></script>
|
package/static/js/client.js
CHANGED
|
@@ -2741,7 +2741,7 @@ class AgentGUIClient {
|
|
|
2741
2741
|
isActivelyStreaming: false,
|
|
2742
2742
|
latestSession: null,
|
|
2743
2743
|
chunks: chunksData.chunks || [],
|
|
2744
|
-
totalChunks: (chunksData.chunks || []).length,
|
|
2744
|
+
totalChunks: chunksData.totalChunks || (chunksData.chunks || []).length,
|
|
2745
2745
|
messages: msgsData.messages || []
|
|
2746
2746
|
};
|
|
2747
2747
|
if (convSignal.aborted) return;
|