paseo-acp-agy 1.2.8 → 1.2.9

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.
@@ -31,7 +31,7 @@ export function loadNativeAntigravitySessions(cwd) {
31
31
  .prepare(`SELECT conversation_id, title, preview, last_modified_time, workspace_uris
32
32
  FROM conversation_summaries
33
33
  ORDER BY last_modified_time DESC
34
- LIMIT 200`)
34
+ LIMIT 100`)
35
35
  .all();
36
36
  for (const row of rows) {
37
37
  if (!row.conversation_id)
@@ -77,34 +77,40 @@ export function loadNativeAntigravitySessions(cwd) {
77
77
  }
78
78
  }
79
79
  }
80
- // Fallback: Also scan brainDir for any conversation not in DB
81
- try {
82
- const brainDir = path.join(appDataDir, "brain");
83
- if (fs.existsSync(brainDir)) {
84
- const entries = fs.readdirSync(brainDir, { withFileTypes: true });
85
- for (const entry of entries) {
86
- if (!entry.isDirectory())
87
- continue;
88
- const convId = entry.name;
89
- if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(convId)) {
90
- continue;
91
- }
92
- if (results.some((r) => r.sessionId === convId))
93
- continue;
94
- const transcriptPath = path.join(brainDir, convId, ".system_generated", "logs", "transcript.jsonl");
95
- if (fs.existsSync(transcriptPath)) {
96
- const stat = fs.statSync(transcriptPath);
97
- results.push({
98
- sessionId: convId,
99
- cwd: process.cwd(),
100
- title: "Antigravity Session",
101
- updatedAt: stat.mtime.toISOString(),
102
- });
80
+ // Fallback: Only scan brainDir if no conversations were found in DB
81
+ if (results.length === 0) {
82
+ try {
83
+ const brainDir = path.join(appDataDir, "brain");
84
+ if (fs.existsSync(brainDir)) {
85
+ const entries = fs.readdirSync(brainDir, { withFileTypes: true });
86
+ for (const entry of entries) {
87
+ if (!entry.isDirectory())
88
+ continue;
89
+ const convId = entry.name;
90
+ if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(convId)) {
91
+ continue;
92
+ }
93
+ if (results.some((r) => r.sessionId === convId))
94
+ continue;
95
+ const transcriptPath = path.join(brainDir, convId, ".system_generated", "logs", "transcript.jsonl");
96
+ if (fs.existsSync(transcriptPath)) {
97
+ const stat = fs.statSync(transcriptPath);
98
+ if (stat.size > 0) {
99
+ results.push({
100
+ sessionId: convId,
101
+ cwd: process.cwd(),
102
+ title: "Antigravity Session",
103
+ updatedAt: stat.mtime.toISOString(),
104
+ });
105
+ if (results.length >= 50)
106
+ break;
107
+ }
108
+ }
103
109
  }
104
110
  }
105
111
  }
112
+ catch { }
106
113
  }
107
- catch { }
108
114
  return results;
109
115
  }
110
116
  export function getNativeAntigravitySession(conversationId) {
@@ -116,6 +116,13 @@ export class SessionStore {
116
116
  const parsed = JSON.parse(content);
117
117
  if (!parsed.sessionId)
118
118
  continue;
119
+ // Skip untitled placeholder sessions that have neither conversationId nor any recorded usage
120
+ const hasTitle = Boolean(parsed.title && parsed.title.trim());
121
+ const hasConv = Boolean(parsed.conversationId);
122
+ const hasUsage = Boolean(parsed.usage && (parsed.usage.totalTokens > 0 || parsed.usage.inputTokens > 0));
123
+ if (!hasTitle && !hasConv && !hasUsage) {
124
+ continue;
125
+ }
119
126
  if (normalizedTargetCwd && parsed.cwd) {
120
127
  const sessionCwd = path.resolve(parsed.cwd).toLowerCase();
121
128
  if (sessionCwd !== normalizedTargetCwd)
package/dist/session.js CHANGED
@@ -327,6 +327,11 @@ export class SessionManager {
327
327
  if (targetCwd !== activeCwd)
328
328
  continue;
329
329
  }
330
+ const hasTitle = Boolean(active.title && active.title.trim());
331
+ const hasConv = Boolean(active.process.currentConversationId);
332
+ const hasUsage = Boolean(active.usage && active.usage.totalTokens > 0);
333
+ if (!hasTitle && !hasConv && !hasUsage)
334
+ continue;
330
335
  const existing = sessionMap.get(active.id);
331
336
  sessionMap.set(active.id, {
332
337
  sessionId: active.id,
@@ -341,6 +346,6 @@ export class SessionManager {
341
346
  const timeB = b.updatedAt ? new Date(b.updatedAt).getTime() : 0;
342
347
  return timeB - timeA;
343
348
  });
344
- return list;
349
+ return list.slice(0, 100);
345
350
  }
346
351
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paseo-acp-agy",
3
- "version": "1.2.8",
3
+ "version": "1.2.9",
4
4
  "description": "ACP (Agent Client Protocol) provider for Google Antigravity in Paseo and Zed",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",