zidane-gui 8.1.0 → 8.2.2

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.
@@ -88,8 +88,8 @@
88
88
  pointer-events: none;
89
89
  }
90
90
  </style>
91
- <script type="module" crossorigin src="./assets/index-DlEFfgBI.js"></script>
92
- <link rel="stylesheet" crossorigin href="./assets/index-u9t9fsPc.css">
91
+ <script type="module" crossorigin src="./assets/index-BGEXnnpi.js"></script>
92
+ <link rel="stylesheet" crossorigin href="./assets/index-Cp6Qu5JQ.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.0",
4
+ "version": "8.2.2",
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.0",
69
+ "zidane": "8.2.2",
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, but if the binary is missing because electron's own
227
- * postinstall (which downloads it) hasn't run yet, run it ourselves.
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
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * npm postinstall — branches on context:
3
3
  *
4
- * dev checkout (src/ present, not shipped in `files`): keep the historical
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
- };