agentgui 1.0.736 → 1.0.737

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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.736",
3
+ "version": "1.0.737",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",
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 allChunks = queries.getConversationChunks(conversationId);
1717
- debugLog(`[chunks] Conv ${conversationId}: ${allChunks.length} total chunks`);
1718
- const chunks = since > 0 ? allChunks.filter(c => c.created_at > since) : allChunks;
1719
- sendJSON(req, res, 200, { ok: true, chunks });
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
 
@@ -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;