zidane-gui 8.1.0 → 8.2.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/README.md +31 -25
- package/out/main/chunks/history-pager-Bd5PUapJ.js +191 -0
- package/out/main/chunks/{remote-hosts-CdVisI0d.js → remote-hosts-DlvE2ELX.js} +2 -1
- package/out/main/chunks/usage-sql-C2Tg1u44.js +81 -0
- package/out/main/history-worker.js +20 -0
- package/out/main/index.js +7382 -7649
- package/out/main/lsp-host.js +591 -109
- package/out/main/usage-worker.js +1 -1
- package/out/preload/index.mjs +34 -4
- package/out/renderer/assets/{ghostty-web-92tSV0lR.js → ghostty-web-BCAZYtuA.js} +1 -1
- package/out/renderer/assets/{index-u9t9fsPc.css → index-CBxNp5Xb.css} +1393 -85
- package/out/renderer/assets/{index-DlEFfgBI.js → index-CPTV1As9.js} +23186 -13992
- package/out/renderer/index.html +2 -2
- package/package.json +9 -3
- package/scripts/app-installer.mjs +4 -9
- package/scripts/postinstall.mjs +1 -2
- package/out/main/chunks/usage-sql-CqAEudo_.js +0 -58
package/out/renderer/index.html
CHANGED
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
pointer-events: none;
|
|
89
89
|
}
|
|
90
90
|
</style>
|
|
91
|
-
<script type="module" crossorigin src="./assets/index-
|
|
92
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
91
|
+
<script type="module" crossorigin src="./assets/index-CPTV1As9.js"></script>
|
|
92
|
+
<link rel="stylesheet" crossorigin href="./assets/index-CBxNp5Xb.css">
|
|
93
93
|
</head>
|
|
94
94
|
<body>
|
|
95
95
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zidane-gui",
|
|
3
3
|
"productName": "Zidane",
|
|
4
|
-
"version": "8.1
|
|
4
|
+
"version": "8.2.1",
|
|
5
5
|
"description": "Zidane Desktop",
|
|
6
6
|
"author": "StackBlitz",
|
|
7
7
|
"type": "module",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"shiki": "^4.5.0",
|
|
67
67
|
"tippy.js": "^6.3.7",
|
|
68
68
|
"typescript-language-server": "^6.0.1",
|
|
69
|
-
"zidane": "8.1
|
|
69
|
+
"zidane": "8.2.1",
|
|
70
70
|
"zod": "^4.6.5"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
@@ -90,5 +90,11 @@
|
|
|
90
90
|
"trustedDependencies": [
|
|
91
91
|
"electron",
|
|
92
92
|
"esbuild"
|
|
93
|
-
]
|
|
93
|
+
],
|
|
94
|
+
"overrides": {
|
|
95
|
+
"@earendil-works/pi-ai": "1.3.0"
|
|
96
|
+
},
|
|
97
|
+
"patchedDependencies": {
|
|
98
|
+
"@earendil-works/pi-ai@1.3.0": "../patches/@earendil-works%2Fpi-ai@1.3.0.patch"
|
|
99
|
+
}
|
|
94
100
|
}
|
|
@@ -223,16 +223,11 @@ function installLinuxApp(pkgDir, electron) {
|
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
|
-
* resolveElectron
|
|
227
|
-
*
|
|
228
|
-
* npm gives no ordering guarantee between our postinstall and electron's
|
|
229
|
-
* — observed: ours ran first on `npm install -g <tarball>`. electron's
|
|
230
|
-
* install.js is idempotent (skips when dist/ is already populated), so
|
|
231
|
-
* its later run becomes a no-op.
|
|
232
|
-
*/
|
|
233
|
-
/**
|
|
234
|
-
* Download the Electron binary by running its own `install.js`. ONLY for the
|
|
226
|
+
* `resolveElectron`, but when the binary is missing it downloads Electron by
|
|
227
|
+
* running its own `install.js`. ONLY for the
|
|
235
228
|
* CLI (`zidane-gui`, `zidane-gui install-app`), never from postinstall: npm
|
|
229
|
+
* gives no ordering guarantee between our postinstall and electron's (ours ran
|
|
230
|
+
* first on `npm install -g <tarball>`), and npm
|
|
236
231
|
* runs a package's postinstall CONCURRENTLY with its dependencies' (observed
|
|
237
232
|
* in the npm debug log), so during `npm i -g zidane-gui` Electron's own
|
|
238
233
|
* install.js is already extracting. Spawning a second one races it in the
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* npm postinstall — branches on context:
|
|
3
3
|
*
|
|
4
|
-
* dev checkout (src/ present, not shipped in `files`):
|
|
5
|
-
* behavior — symlink node_modules/zidane to the repo root and rebrand the
|
|
4
|
+
* dev checkout (src/ present, not shipped in `files`): symlink node_modules/zidane to the repo root and rebrand the
|
|
6
5
|
* dev Electron.app. Both go through bun, which every dev here has.
|
|
7
6
|
*
|
|
8
7
|
* published install (global or dependency): install the launcher app so
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
const PARENT_USER_TURN = `t.role = 'user' AND json_valid(t.data) AND NOT EXISTS (
|
|
2
|
-
SELECT 1 FROM runs r
|
|
3
|
-
WHERE r.session_id = t.session_id
|
|
4
|
-
AND r.run_id = json_extract(t.data, '$.runId')
|
|
5
|
-
AND (json_extract(r.data, '$.depth') > 0 OR json_extract(r.data, '$.parentRunId') IS NOT NULL)
|
|
6
|
-
)`;
|
|
7
|
-
const DAY_OF_CREATED_AT = "date(json_extract(t.data, '$.createdAt') / 1000, 'unixepoch', 'localtime')";
|
|
8
|
-
function usageAssistantDaily(database) {
|
|
9
|
-
return database.prepare(
|
|
10
|
-
`SELECT ${DAY_OF_CREATED_AT} AS day,
|
|
11
|
-
COALESCE(json_extract(t.data, '$.usage.modelId'), 'unknown') AS model,
|
|
12
|
-
COUNT(*) AS turns,
|
|
13
|
-
SUM(COALESCE(json_extract(t.data, '$.usage.input'), 0)) AS input,
|
|
14
|
-
SUM(COALESCE(json_extract(t.data, '$.usage.output'), 0)) AS output,
|
|
15
|
-
SUM(COALESCE(json_extract(t.data, '$.usage.cacheRead'), 0)) AS cacheRead,
|
|
16
|
-
SUM(COALESCE(json_extract(t.data, '$.usage.cacheCreation'), 0)) AS cacheCreation,
|
|
17
|
-
SUM(COALESCE(json_extract(t.data, '$.usage.cost'), 0)) AS cost
|
|
18
|
-
FROM turns t
|
|
19
|
-
WHERE t.role = 'assistant' AND json_valid(t.data)
|
|
20
|
-
GROUP BY day, model
|
|
21
|
-
HAVING day IS NOT NULL
|
|
22
|
-
ORDER BY day`
|
|
23
|
-
).all();
|
|
24
|
-
}
|
|
25
|
-
function usageUserDaily(database) {
|
|
26
|
-
return database.prepare(
|
|
27
|
-
`SELECT ${DAY_OF_CREATED_AT} AS day,
|
|
28
|
-
CAST(strftime('%H', json_extract(t.data, '$.createdAt') / 1000, 'unixepoch', 'localtime') AS INTEGER) AS hour,
|
|
29
|
-
COUNT(*) AS messages
|
|
30
|
-
FROM turns t
|
|
31
|
-
WHERE ${PARENT_USER_TURN}
|
|
32
|
-
GROUP BY day, hour
|
|
33
|
-
HAVING day IS NOT NULL
|
|
34
|
-
ORDER BY day`
|
|
35
|
-
).all();
|
|
36
|
-
}
|
|
37
|
-
function usageSessionDaily(database) {
|
|
38
|
-
return database.prepare(
|
|
39
|
-
`SELECT date(created_at / 1000, 'unixepoch', 'localtime') AS day, COUNT(*) AS sessions
|
|
40
|
-
FROM sessions
|
|
41
|
-
GROUP BY day
|
|
42
|
-
HAVING day IS NOT NULL
|
|
43
|
-
ORDER BY day`
|
|
44
|
-
).all();
|
|
45
|
-
}
|
|
46
|
-
function runUsageAggregates(database) {
|
|
47
|
-
return {
|
|
48
|
-
assistant: usageAssistantDaily(database),
|
|
49
|
-
user: usageUserDaily(database),
|
|
50
|
-
sessions: usageSessionDaily(database)
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
export {
|
|
54
|
-
usageUserDaily as a,
|
|
55
|
-
usageSessionDaily as b,
|
|
56
|
-
runUsageAggregates as r,
|
|
57
|
-
usageAssistantDaily as u
|
|
58
|
-
};
|