zidane-gui 8.0.4 → 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.
Files changed (30) hide show
  1. package/README.md +43 -37
  2. package/out/main/chunks/history-pager-Bd5PUapJ.js +191 -0
  3. package/out/main/chunks/{remote-hosts-CdVisI0d.js → remote-hosts-DlvE2ELX.js} +2 -1
  4. package/out/main/chunks/usage-sql-C2Tg1u44.js +81 -0
  5. package/out/main/history-worker.js +20 -0
  6. package/out/main/index.js +5961 -3881
  7. package/out/main/lsp-host.js +671 -104
  8. package/out/main/usage-worker.js +1 -1
  9. package/out/preload/index.mjs +82 -12
  10. package/out/renderer/assets/{ghostty-web-DPKNHpFa.js → ghostty-web-BCAZYtuA.js} +1 -1
  11. package/out/renderer/assets/index-CBxNp5Xb.css +6324 -0
  12. package/out/renderer/assets/{index-rup1hjNH.js → index-CPTV1As9.js} +168933 -143574
  13. package/out/renderer/index.html +6 -3
  14. package/package.json +13 -5
  15. package/resources/app-icons/cobalt-blue.png +0 -0
  16. package/resources/app-icons/holographic-chrome.png +0 -0
  17. package/resources/app-icons/light.png +0 -0
  18. package/resources/app-icons/midnight-blue-grainy.png +0 -0
  19. package/resources/app-icons/modern.png +0 -0
  20. package/resources/app-icons/smooth-chrome-sticker.png +0 -0
  21. package/resources/app-icons/smooth-chrome.png +0 -0
  22. package/resources/app-icons/smooth-holographic-chrome-sticker.png +0 -0
  23. package/resources/app-icons/smooth-holographic-chrome.png +0 -0
  24. package/resources/icon-macos.png +0 -0
  25. package/resources/icon.png +0 -0
  26. package/scripts/app-installer.mjs +8 -12
  27. package/scripts/postinstall.mjs +1 -2
  28. package/out/main/chunks/usage-sql-CqAEudo_.js +0 -58
  29. package/out/renderer/assets/index-miPiOG60.css +0 -4096
  30. /package/out/renderer/assets/{shiki-html.worker-gURcNJD7.js → highlight.worker-gURcNJD7.js} +0 -0
@@ -77,7 +77,10 @@
77
77
  z-index: 2147483647;
78
78
  background: var(--zg-bg, #0d1013);
79
79
  opacity: 1;
80
- transition: opacity 180ms cubic-bezier(0.23, 1, 0.32, 1);
80
+ /* The `fade-out` motion; the fallback covers the frames before the
81
+ design-system stylesheet lands (this runs before React). */
82
+ transition: opacity var(--zg-motion-fade-out-duration, 140ms)
83
+ var(--zg-motion-fade-out-ease, cubic-bezier(0.33, 1, 0.68, 1));
81
84
  }
82
85
 
83
86
  html.zg-ready .zg-loading {
@@ -85,8 +88,8 @@
85
88
  pointer-events: none;
86
89
  }
87
90
  </style>
88
- <script type="module" crossorigin src="./assets/index-rup1hjNH.js"></script>
89
- <link rel="stylesheet" crossorigin href="./assets/index-miPiOG60.css">
91
+ <script type="module" crossorigin src="./assets/index-CPTV1As9.js"></script>
92
+ <link rel="stylesheet" crossorigin href="./assets/index-CBxNp5Xb.css">
90
93
  </head>
91
94
  <body>
92
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.0.4",
4
+ "version": "8.2.1",
5
5
  "description": "Zidane Desktop",
6
6
  "author": "StackBlitz",
7
7
  "type": "module",
@@ -23,8 +23,10 @@
23
23
  "start": "electron-vite preview",
24
24
  "link:zidane": "node -e \"const fs=require('fs'),p='node_modules/zidane';fs.rmSync(p,{recursive:true,force:true});fs.symlinkSync('../..',p,'dir')\"",
25
25
  "postinstall": "node scripts/postinstall.mjs",
26
+ "icons:macos": "electron scripts/render-macos-icons.mjs",
26
27
  "prepack": "electron-vite build",
27
- "typecheck": "bun --cwd=.. run build && tsc --noEmit -p tsconfig.node.json && tsc --noEmit -p tsconfig.web.json",
28
+ "typecheck": "bun --cwd=.. run build && bun check -p tsconfig.node.json && bun check -p tsconfig.web.json",
29
+ "typecheck:tsc": "tsc --noEmit -p tsconfig.node.json && tsc --noEmit -p tsconfig.web.json",
28
30
  "format": "prettier --write .",
29
31
  "format:check": "prettier --check .",
30
32
  "pretest": "bun --cwd=.. run build",
@@ -45,7 +47,6 @@
45
47
  "@pierre/diffs": "^1.5.2",
46
48
  "@pierre/trees": "^1.0.0-beta.6",
47
49
  "@radix-ui/react-dropdown-menu": "^2.1.25",
48
- "@radix-ui/react-tooltip": "^1.3.0",
49
50
  "@tahul/ghostty-web": "^0.6.0",
50
51
  "@tiptap/core": "^3.31.4",
51
52
  "@tiptap/extension-mention": "^3.31.4",
@@ -57,6 +58,7 @@
57
58
  "dotenv": "^17.4.2",
58
59
  "electron": "^41.10.7",
59
60
  "motion": "^13.5.1",
61
+ "quickjs-wasi": "3.6.2",
60
62
  "react": "^19.3.0",
61
63
  "react-dom": "^19.3.0",
62
64
  "react-markdown": "^10.1.0",
@@ -64,7 +66,7 @@
64
66
  "shiki": "^4.5.0",
65
67
  "tippy.js": "^6.3.7",
66
68
  "typescript-language-server": "^6.0.1",
67
- "zidane": "8.0.4",
69
+ "zidane": "8.2.1",
68
70
  "zod": "^4.6.5"
69
71
  },
70
72
  "devDependencies": {
@@ -88,5 +90,11 @@
88
90
  "trustedDependencies": [
89
91
  "electron",
90
92
  "esbuild"
91
- ]
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
+ }
92
100
  }
Binary file
Binary file
Binary file
Binary file
@@ -132,10 +132,10 @@ function tryRun(cmd, args) {
132
132
  }
133
133
 
134
134
  /**
135
- * Render resources/icon.png (1024×1024) into a .icns via the sips +
135
+ * Render a 1024×1024 PNG (resources/icon-macos.png) into a .icns via the sips +
136
136
  * iconutil tools that ship with macOS. Returns the icns path or null.
137
137
  */
138
- function buildIcns(iconPng, outDir) {
138
+ export function buildIcns(iconPng, outDir) {
139
139
  const iconset = join(mkdtempSync(join(tmpdir(), 'zidane-icon-')), 'Zidane.iconset');
140
140
  mkdirSync(iconset, { recursive: true });
141
141
  for (const size of [16, 32, 64, 128, 256, 512, 1024]) {
@@ -179,7 +179,8 @@ function installMacApp(pkgDir, electron) {
179
179
  run('plutil', ['-replace', key, '-string', value, plist]);
180
180
  }
181
181
 
182
- const icns = buildIcns(join(pkgDir, 'resources/icon.png'), resources);
182
+ // The icon on Apple's grid, the size of every other app's (`src/main/macos-icon.ts`).
183
+ const icns = buildIcns(join(pkgDir, 'resources/icon-macos.png'), resources);
183
184
  if (icns) {
184
185
  tryRun('plutil', ['-replace', 'CFBundleIconFile', '-string', APP_NAME, plist]);
185
186
  }
@@ -222,16 +223,11 @@ function installLinuxApp(pkgDir, electron) {
222
223
  }
223
224
 
224
225
  /**
225
- * resolveElectron, but if the binary is missing because electron's own
226
- * postinstall (which downloads it) hasn't run yet, run it ourselves.
227
- * npm gives no ordering guarantee between our postinstall and electron's
228
- * — observed: ours ran first on `npm install -g <tarball>`. electron's
229
- * install.js is idempotent (skips when dist/ is already populated), so
230
- * its later run becomes a no-op.
231
- */
232
- /**
233
- * 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
234
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
235
231
  * runs a package's postinstall CONCURRENTLY with its dependencies' (observed
236
232
  * in the npm debug log), so during `npm i -g zidane-gui` Electron's own
237
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
- };