getaimeter 0.7.7 → 0.7.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.
- package/package.json +1 -1
- package/tray.ps1 +1 -1
- package/watcher.js +18 -2
package/package.json
CHANGED
package/tray.ps1
CHANGED
|
@@ -125,7 +125,7 @@ $checkUpdateItem.Add_Click({
|
|
|
125
125
|
# Update and auto-restart: stop watcher, update npm, restart watcher
|
|
126
126
|
$nodePath = (Get-Command node -ErrorAction SilentlyContinue).Source
|
|
127
127
|
$aimeter = (Get-Command aimeter -ErrorAction SilentlyContinue).Source
|
|
128
|
-
Start-Process "cmd.exe" -ArgumentList "/k echo Updating AIMeter... && npm install -g getaimeter@latest && echo. && echo
|
|
128
|
+
Start-Process "cmd.exe" -ArgumentList "/k echo Updating AIMeter... && npm install -g getaimeter@latest && echo. && echo Reinstalling shortcuts... && aimeter install && echo. && echo Updated to latest version! This window can be closed. && echo."
|
|
129
129
|
|
|
130
130
|
# Give the cmd window time to stop us, then exit this tray
|
|
131
131
|
Start-Sleep -Seconds 3
|
package/watcher.js
CHANGED
|
@@ -75,8 +75,24 @@ function detectSource(filePath) {
|
|
|
75
75
|
return 'gemini_cli';
|
|
76
76
|
}
|
|
77
77
|
if (normalized.includes('.codex/') || normalized.includes('/codex/')) {
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
// Codex sessions may come from CLI or VS Code extension.
|
|
79
|
+
// Read session_meta to check originator/source field.
|
|
80
|
+
let codexSource = 'codex_cli';
|
|
81
|
+
try {
|
|
82
|
+
const fd = fs.openSync(filePath, 'r');
|
|
83
|
+
const buf = Buffer.alloc(Math.min(2048, fs.fstatSync(fd).size));
|
|
84
|
+
fs.readSync(fd, buf, 0, buf.length, 0);
|
|
85
|
+
fs.closeSync(fd);
|
|
86
|
+
const firstLine = buf.toString('utf8').split('\n')[0];
|
|
87
|
+
const meta = JSON.parse(firstLine);
|
|
88
|
+
if (meta.type === 'session_meta' && meta.payload) {
|
|
89
|
+
if (meta.payload.source === 'vscode' || meta.payload.originator === 'codex_vscode') {
|
|
90
|
+
codexSource = 'codex_vscode';
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
} catch {}
|
|
94
|
+
_sourceCache.set(filePath, codexSource);
|
|
95
|
+
return codexSource;
|
|
80
96
|
}
|
|
81
97
|
if (normalized.includes('/Cursor/') || normalized.includes('/cursor/') || normalized.includes('.cursor/')) {
|
|
82
98
|
_sourceCache.set(filePath, 'cursor');
|