jinzd-ai-cli 0.4.200 → 0.4.202

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 (66) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +435 -435
  3. package/README.zh-CN.md +450 -450
  4. package/dist/agent-client-6GX6QQDU.js +0 -0
  5. package/dist/auth-FSTAKSYF.js +0 -0
  6. package/dist/{batch-5N4CXARG.js → batch-UF4EWYFD.js} +2 -2
  7. package/dist/chat-index-FDSGKWQV.js +0 -0
  8. package/dist/{chunk-JP6ESDV7.js → chunk-2NINHXEZ.js} +13 -1
  9. package/dist/{chunk-FQF6YJ6F.js → chunk-2YLYDFEX.js} +55 -14
  10. package/dist/chunk-4BKXL7SM.js +0 -0
  11. package/dist/chunk-5UR6ZOF4.js +0 -0
  12. package/dist/{chunk-HUTS2F6Y.js → chunk-75SUTNYY.js} +1 -1
  13. package/dist/chunk-A4GUGWEY.js +0 -0
  14. package/dist/chunk-BXP6YZ2P.js +0 -0
  15. package/dist/chunk-CITDVXXM.js +0 -0
  16. package/dist/chunk-CKH4KQ4E.js +0 -0
  17. package/dist/chunk-E44DTERW.js +0 -0
  18. package/dist/{chunk-JZCXULOJ.js → chunk-GOKVKOG3.js} +1 -1
  19. package/dist/chunk-HLWUDRBO.js +0 -0
  20. package/dist/chunk-HOSJZMQS.js +0 -0
  21. package/dist/{chunk-IDMCBIYZ.js → chunk-HZKC424D.js} +1 -1
  22. package/dist/chunk-IW3Q7AE5.js +0 -0
  23. package/dist/{chunk-NULOZSFA.js → chunk-JCY7RQIA.js} +1 -1
  24. package/dist/chunk-JVKAL5Q3.js +0 -0
  25. package/dist/chunk-KHYD3WXE.js +0 -0
  26. package/dist/chunk-MC34ISJU.js +0 -0
  27. package/dist/chunk-NZ4X6GUC.js +0 -0
  28. package/dist/chunk-O6UFCEUZ.js +0 -0
  29. package/dist/chunk-OJL3PY36.js +0 -0
  30. package/dist/{chunk-5SA7IACI.js → chunk-Q2MBPMTW.js} +2 -2
  31. package/dist/chunk-Q3ZUDA6S.js +0 -0
  32. package/dist/{chunk-2G62CKDL.js → chunk-SB77W6XS.js} +1 -1
  33. package/dist/chunk-SLSWPBK3.js +0 -0
  34. package/dist/chunk-T2NL5ZIA.js +0 -0
  35. package/dist/chunk-TB4W4Y4T.js +0 -0
  36. package/dist/chunk-TZQHYZKT.js +0 -0
  37. package/dist/{chunk-TBGVHRCL.js → chunk-Y6U6FMVV.js} +1 -1
  38. package/dist/{ci-2ZSBYWJE.js → ci-YOJTTP4J.js} +3 -3
  39. package/dist/{constants-GMPGZM4D.js → constants-VP7TYJL7.js} +1 -1
  40. package/dist/{doctor-cli-PG52ECBH.js → doctor-cli-PCIKXTNV.js} +5 -5
  41. package/dist/electron-server.js +67 -14
  42. package/dist/file-checkpoint-NKBHGC7L.js +0 -0
  43. package/dist/git-context-EXOEHQSF.js +0 -0
  44. package/dist/{hub-AI4ICH5E.js → hub-N2ZRAXRO.js} +1 -1
  45. package/dist/hub-server-LJ2JSKZ2.js +0 -0
  46. package/dist/index.js +17 -17
  47. package/dist/indexer-AKWMYNJI.js +0 -0
  48. package/dist/persist-L54DPLI7.js +0 -0
  49. package/dist/project-trust-NKYHL3VZ.js +0 -0
  50. package/dist/{run-tests-G2MCAQJL.js → run-tests-AXPZOPX7.js} +1 -1
  51. package/dist/{run-tests-NUWLWMHZ.js → run-tests-RNU733RF.js} +2 -2
  52. package/dist/semantic-PK7AUOJT.js +0 -0
  53. package/dist/{server-Y3XEAXTC.js → server-SLFGYGBO.js} +8 -8
  54. package/dist/{server-74PZ2PDM.js → server-YIBPZJ34.js} +28 -11
  55. package/dist/store-MWNHVGJT.js +0 -0
  56. package/dist/{task-orchestrator-IF3XCVZ7.js → task-orchestrator-FM4EXIBZ.js} +4 -4
  57. package/dist/{usage-7BAT3772.js → usage-QFW2XPF3.js} +2 -2
  58. package/dist/vector-store-BBDXB5IQ.js +0 -0
  59. package/dist/wasm/web-tree-sitter.wasm +0 -0
  60. package/dist/web/client/app.js +3351 -3351
  61. package/dist/web/client/icon.svg +22 -22
  62. package/dist/web/client/index.html +360 -360
  63. package/dist/web/client/manifest.json +15 -15
  64. package/dist/web/client/style.css +991 -991
  65. package/dist/web/client/sw.js +86 -86
  66. package/package.json +1 -1
@@ -1,86 +1,86 @@
1
- /**
2
- * ai-cli PWA Service Worker
3
- * Caches app shell (HTML/CSS/JS/icons) for fast startup.
4
- * API calls and WebSocket are always network-first.
5
- */
6
-
7
- // v0.4.159: self-updating SW. Bumped to v3. The old v1/v2 service workers kept
8
- // serving a stale index.html/app.js (no Hub tab, broken Light theme) because a
9
- // new SW only "waits" — it never told the page to reload. Now: install →
10
- // skipWaiting (take over immediately), activate → evict old caches + claim +
11
- // postMessage('reload') so every open tab refreshes once onto the new version.
12
- // index.html / app.js are NEVER cached (always network), so a plain refresh
13
- // after upgrade is enough even before the SW turns over.
14
- const CACHE_NAME = 'aicli-v3';
15
-
16
- // HTML/JS that must always be fresh — never served from the SW cache, so an
17
- // upgraded server is reflected on the very next load. Other assets (vendored
18
- // CSS/JS, icons) are large + content-stable and fine to cache.
19
- const NEVER_CACHE = new Set(['/', '/index.html', '/app.js']);
20
-
21
- // App shell to precache (offline-capable startup). Deliberately EXCLUDES the
22
- // always-fresh HTML/JS in NEVER_CACHE — only large content-stable assets.
23
- const APP_SHELL = [
24
- '/style.css',
25
- '/manifest.json',
26
- '/icon.svg',
27
- '/icon-192.png',
28
- '/icon-512.png',
29
- '/vendor/daisyui-full.min.css',
30
- '/vendor/tailwind.js',
31
- '/vendor/marked.min.js',
32
- '/vendor/highlight.min.js',
33
- '/vendor/github-dark.min.css',
34
- '/vendor/github.min.css',
35
- ];
36
-
37
- self.addEventListener('install', (event) => {
38
- // Take over immediately rather than waiting for all old tabs to close.
39
- event.waitUntil(
40
- caches.open(CACHE_NAME)
41
- .then(cache => cache.addAll(APP_SHELL))
42
- .then(() => self.skipWaiting())
43
- );
44
- });
45
-
46
- self.addEventListener('activate', (event) => {
47
- event.waitUntil(
48
- caches.keys()
49
- .then(keys => Promise.all(keys.filter(k => k !== CACHE_NAME).map(k => caches.delete(k))))
50
- .then(() => self.clients.claim())
51
- .then(async () => {
52
- // Tell every open tab a new version is live so it can reload once.
53
- const clients = await self.clients.matchAll({ type: 'window' });
54
- for (const c of clients) c.postMessage({ type: 'sw-updated' });
55
- })
56
- );
57
- });
58
-
59
- self.addEventListener('fetch', (event) => {
60
- const url = new URL(event.request.url);
61
-
62
- // Never intercept API calls or WebSocket upgrades.
63
- if (url.pathname.startsWith('/api/') || event.request.headers.get('upgrade') === 'websocket') {
64
- return;
65
- }
66
-
67
- // Always-fresh HTML/JS: network-only, never touch the cache. Guarantees an
68
- // upgraded server shows up on the next load even if the SW hasn't turned over.
69
- if (NEVER_CACHE.has(url.pathname)) {
70
- event.respondWith(fetch(event.request).catch(() => caches.match(event.request)));
71
- return;
72
- }
73
-
74
- // Everything else: network-first with cache fallback (offline support).
75
- event.respondWith(
76
- fetch(event.request)
77
- .then(response => {
78
- if (response.ok) {
79
- const clone = response.clone();
80
- caches.open(CACHE_NAME).then(cache => cache.put(event.request, clone));
81
- }
82
- return response;
83
- })
84
- .catch(() => caches.match(event.request))
85
- );
86
- });
1
+ /**
2
+ * ai-cli PWA Service Worker
3
+ * Caches app shell (HTML/CSS/JS/icons) for fast startup.
4
+ * API calls and WebSocket are always network-first.
5
+ */
6
+
7
+ // v0.4.159: self-updating SW. Bumped to v3. The old v1/v2 service workers kept
8
+ // serving a stale index.html/app.js (no Hub tab, broken Light theme) because a
9
+ // new SW only "waits" — it never told the page to reload. Now: install →
10
+ // skipWaiting (take over immediately), activate → evict old caches + claim +
11
+ // postMessage('reload') so every open tab refreshes once onto the new version.
12
+ // index.html / app.js are NEVER cached (always network), so a plain refresh
13
+ // after upgrade is enough even before the SW turns over.
14
+ const CACHE_NAME = 'aicli-v3';
15
+
16
+ // HTML/JS that must always be fresh — never served from the SW cache, so an
17
+ // upgraded server is reflected on the very next load. Other assets (vendored
18
+ // CSS/JS, icons) are large + content-stable and fine to cache.
19
+ const NEVER_CACHE = new Set(['/', '/index.html', '/app.js']);
20
+
21
+ // App shell to precache (offline-capable startup). Deliberately EXCLUDES the
22
+ // always-fresh HTML/JS in NEVER_CACHE — only large content-stable assets.
23
+ const APP_SHELL = [
24
+ '/style.css',
25
+ '/manifest.json',
26
+ '/icon.svg',
27
+ '/icon-192.png',
28
+ '/icon-512.png',
29
+ '/vendor/daisyui-full.min.css',
30
+ '/vendor/tailwind.js',
31
+ '/vendor/marked.min.js',
32
+ '/vendor/highlight.min.js',
33
+ '/vendor/github-dark.min.css',
34
+ '/vendor/github.min.css',
35
+ ];
36
+
37
+ self.addEventListener('install', (event) => {
38
+ // Take over immediately rather than waiting for all old tabs to close.
39
+ event.waitUntil(
40
+ caches.open(CACHE_NAME)
41
+ .then(cache => cache.addAll(APP_SHELL))
42
+ .then(() => self.skipWaiting())
43
+ );
44
+ });
45
+
46
+ self.addEventListener('activate', (event) => {
47
+ event.waitUntil(
48
+ caches.keys()
49
+ .then(keys => Promise.all(keys.filter(k => k !== CACHE_NAME).map(k => caches.delete(k))))
50
+ .then(() => self.clients.claim())
51
+ .then(async () => {
52
+ // Tell every open tab a new version is live so it can reload once.
53
+ const clients = await self.clients.matchAll({ type: 'window' });
54
+ for (const c of clients) c.postMessage({ type: 'sw-updated' });
55
+ })
56
+ );
57
+ });
58
+
59
+ self.addEventListener('fetch', (event) => {
60
+ const url = new URL(event.request.url);
61
+
62
+ // Never intercept API calls or WebSocket upgrades.
63
+ if (url.pathname.startsWith('/api/') || event.request.headers.get('upgrade') === 'websocket') {
64
+ return;
65
+ }
66
+
67
+ // Always-fresh HTML/JS: network-only, never touch the cache. Guarantees an
68
+ // upgraded server shows up on the next load even if the SW hasn't turned over.
69
+ if (NEVER_CACHE.has(url.pathname)) {
70
+ event.respondWith(fetch(event.request).catch(() => caches.match(event.request)));
71
+ return;
72
+ }
73
+
74
+ // Everything else: network-first with cache fallback (offline support).
75
+ event.respondWith(
76
+ fetch(event.request)
77
+ .then(response => {
78
+ if (response.ok) {
79
+ const clone = response.clone();
80
+ caches.open(CACHE_NAME).then(cache => cache.put(event.request, clone));
81
+ }
82
+ return response;
83
+ })
84
+ .catch(() => caches.match(event.request))
85
+ );
86
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jinzd-ai-cli",
3
- "version": "0.4.200",
3
+ "version": "0.4.202",
4
4
  "description": "Cross-platform REPL-style AI CLI with multi-provider support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",