getaimeter 0.11.0 → 0.11.1
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/config.js +6 -7
- package/package.json +1 -1
- package/watcher.js +11 -0
package/config.js
CHANGED
|
@@ -68,13 +68,12 @@ function getWatchPaths() {
|
|
|
68
68
|
}
|
|
69
69
|
if (fs.existsSync(desktopSessions)) paths.push(desktopSessions);
|
|
70
70
|
|
|
71
|
-
// 3. OpenAI Codex CLI
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (fs.existsSync(codexHistory) && !paths.includes(codexHistory)) paths.push(codexHistory);
|
|
71
|
+
// 3. OpenAI Codex CLI — watch the root ~/.codex dir so findJsonlFiles recurses
|
|
72
|
+
// into both sessions/ (per-session UUIDs) and history.jsonl (single flat file).
|
|
73
|
+
// Previously both ~/.codex and ~/.codex/sessions were added separately, causing
|
|
74
|
+
// the same files to be discovered twice per poll cycle.
|
|
75
|
+
const codexDir = path.join(os.homedir(), '.codex');
|
|
76
|
+
if (fs.existsSync(codexDir)) paths.push(codexDir);
|
|
78
77
|
|
|
79
78
|
// 4. GitHub Copilot CLI sessions
|
|
80
79
|
const copilotSessions = path.join(os.homedir(), '.copilot', 'session-state');
|
package/package.json
CHANGED
package/watcher.js
CHANGED
|
@@ -162,6 +162,17 @@ function getConversationMeta(filePath) {
|
|
|
162
162
|
// Conversation ID = file basename without extension
|
|
163
163
|
let conversationId = path.basename(filePath, '.jsonl');
|
|
164
164
|
|
|
165
|
+
// Copilot stores sessions as <session-UUID>/events.jsonl — all files are named
|
|
166
|
+
// "events.jsonl", so the basename is always "events" which collides across sessions.
|
|
167
|
+
// Use the parent directory UUID as the conversation ID instead.
|
|
168
|
+
if (conversationId === 'events') {
|
|
169
|
+
const parentDir = path.basename(path.dirname(filePath));
|
|
170
|
+
// Only override if parent looks like a UUID (avoids false positives)
|
|
171
|
+
if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(parentDir)) {
|
|
172
|
+
conversationId = parentDir;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
165
176
|
// For subagent files, use the parent session UUID as conversation ID
|
|
166
177
|
const subagentMatch = normalized.match(/\/([^/]+)\/subagents\//);
|
|
167
178
|
if (subagentMatch) {
|