agentgui 1.0.881 → 1.0.883

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/test.js CHANGED
@@ -178,5 +178,21 @@ section('agent-registry: hermes registered as stdio ACP', async () => {
178
178
  assert.ok(h.supportedFeatures.includes('acp-protocol'));
179
179
  });
180
180
 
181
+ section('delete-all: soft-deletes conv rows + wipes related data', () => {
182
+ const { db, prep, gid } = inMemDb();
183
+ const q = createQueries(db, prep, gid);
184
+ const c1 = q.createConversation('claude-code', 'A');
185
+ q.createConversation('claude-code', 'B');
186
+ q.createSession(c1.id);
187
+ q.createMessage(c1.id, 'user', 'hello');
188
+ const origLog = console.log; console.log = () => {};
189
+ try { q.deleteAllConversations(); } finally { console.log = origLog; }
190
+ const rows = db.prepare('SELECT status, count(*) as c FROM conversations GROUP BY status').all();
191
+ assert.deepEqual(rows, [{ status: 'deleted', c: 2 }]);
192
+ assert.equal(db.prepare('SELECT count(*) as c FROM messages').get().c, 0);
193
+ assert.equal(db.prepare('SELECT count(*) as c FROM sessions').get().c, 0);
194
+ assert.equal(q.getConversationsList().length, 0);
195
+ });
196
+
181
197
  console.log(`\n${passed} passed, ${failed} failed`);
182
198
  process.exit(failed === 0 ? 0 : 1);