zen-code 3.0.0 → 3.0.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.
@@ -1,7 +1,7 @@
1
1
  import { K as T } from "./kysely-Bchvsze0.mjs";
2
2
  import { F as r } from "./sql-CJsUpKEQ.mjs";
3
- import { B as f, T as l, c as y, m } from "./app-DBEp0HbC.mjs";
4
- import "./graphBuilder-BttmR-dZ.mjs";
3
+ import { B as f, T as l, c as y, m } from "./app-BENrPmmM.mjs";
4
+ import "./graphBuilder-BIhxVliV.mjs";
5
5
  const g = ["source", "step", "parents"];
6
6
  const E = g;
7
7
  class w extends f {
@@ -1,5 +1,5 @@
1
- import { T as l, B as N, W as k, m as y } from "./app-DBEp0HbC.mjs";
2
- import "./graphBuilder-BttmR-dZ.mjs";
1
+ import { T as l, B as N, W as k, m as y } from "./app-BENrPmmM.mjs";
2
+ import "./graphBuilder-BIhxVliV.mjs";
3
3
  import w from "pg";
4
4
  const S = (h) => [
5
5
  "checkpoints",
@@ -499,7 +499,7 @@ function nr({
499
499
  }), d(M);
500
500
  }
501
501
  } else {
502
- const o = e.lines[e.cursorLine], f = o.slice(0, e.cursorColumn) + _ + (o?.slice(e.cursorColumn) || ""), i = [...e.lines];
502
+ const o = e.lines[e.cursorLine], f = (o?.slice(0, e.cursorColumn) || "") + _ + (o?.slice(e.cursorColumn) || ""), i = [...e.lines];
503
503
  i[e.cursorLine] = f, g({
504
504
  ...e,
505
505
  lines: i,
@@ -47786,7 +47786,8 @@ class eg {
47786
47786
  * 获取所有 MCP 工具(带缓存)
47787
47787
  */
47788
47788
  async getAllTools() {
47789
- this.client || await this.initialize();
47789
+ if (this.client || await this.initialize(), !this.client)
47790
+ return [];
47790
47791
  const e = await this.client.getTools();
47791
47792
  return this.cacheTools = e, e;
47792
47793
  }
@@ -1,4 +1,4 @@
1
- import { r as P, u as d, p as _ } from "./graphBuilder-BttmR-dZ.mjs";
1
+ import { r as P, u as d, p as _ } from "./graphBuilder-BIhxVliV.mjs";
2
2
  var v, m, g = 0, O = 0;
3
3
  function h(r, e, n) {
4
4
  var f = 0, t = e || new Array(16);
@@ -1,6 +1,6 @@
1
- import { u as C } from "./id-C3QYmEcI.mjs";
2
- import { B as v, c as x, T as $, m as I } from "./app-DBEp0HbC.mjs";
3
- import "./graphBuilder-BttmR-dZ.mjs";
1
+ import { u as C } from "./id-DSgIWJsu.mjs";
2
+ import { B as v, c as x, T as $, m as I } from "./app-BENrPmmM.mjs";
3
+ import "./graphBuilder-BIhxVliV.mjs";
4
4
  import { createClient as O, createCluster as N } from "redis";
5
5
  const W = [
6
6
  {
@@ -1,5 +1,5 @@
1
1
  import { HumanMessage as c } from "langchain";
2
- import { g as m } from "./graphBuilder-BttmR-dZ.mjs";
2
+ import { g as m } from "./graphBuilder-BIhxVliV.mjs";
3
3
  import "@langchain/langgraph";
4
4
  import "zod";
5
5
  import "@langchain/openai";
@@ -1,4 +1,4 @@
1
- import { a as h, C as u } from "./app-DBEp0HbC.mjs";
1
+ import { a as h, C as u } from "./app-BENrPmmM.mjs";
2
2
  import { createClient as c } from "redis";
3
3
  class n extends h {
4
4
  constructor(s, e = !0, i = 300) {
@@ -1,6 +1,6 @@
1
- import { u as $ } from "./id-C3QYmEcI.mjs";
2
- import { B as g } from "./app-DBEp0HbC.mjs";
3
- import "./graphBuilder-BttmR-dZ.mjs";
1
+ import { u as $ } from "./id-DSgIWJsu.mjs";
2
+ import { B as g } from "./app-BENrPmmM.mjs";
3
+ import "./graphBuilder-BIhxVliV.mjs";
4
4
  import { createClient as T } from "redis";
5
5
  function k(u) {
6
6
  if (u === null || typeof u != "object") return JSON.stringify(u);
@@ -2,7 +2,7 @@ import "lowdb";
2
2
  import "lowdb/node";
3
3
  import "yaml";
4
4
  import "./index-P-c4tqBO.mjs";
5
- import { T as a } from "./graphBuilder-BttmR-dZ.mjs";
5
+ import { T as a } from "./graphBuilder-BIhxVliV.mjs";
6
6
  class r {
7
7
  store = null;
8
8
  projectRoot;
package/dist/zen-code.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import "./use-input-1eSjZocJ.mjs";
2
2
  import "chalk";
3
- import "./app-DBEp0HbC.mjs";
3
+ import "./app-BENrPmmM.mjs";
package/dist/zen-init.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as t, j as e, B as o, T as r, r as U } from "./use-input-1eSjZocJ.mjs";
2
2
  import "chalk";
3
- import { u as A, S as O, M as T, a as B, b as R, g as K } from "./get_allowed_models-I8bki8ev.mjs";
3
+ import { u as A, S as O, M as T, a as B, b as R, g as K } from "./get_allowed_models-CHQu5hlT.mjs";
4
4
  import { c as M, u as v, i as L } from "./index-P-c4tqBO.mjs";
5
5
  const N = ({ onNext: l, onExit: i }) => {
6
6
  A((c, p) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-code",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "",
5
5
  "main": "./dist/cli.mjs",
6
6
  "bin": "./dist/cli.mjs",
@@ -40,6 +40,8 @@
40
40
  "@langchain/mcp-adapters": "^1.1.1",
41
41
  "@langgraph-js/sdk": "^4.4.0",
42
42
  "@nanostores/react": "^1.0.0",
43
+ "@testing-library/react": "^16.3.2",
44
+ "@testing-library/user-event": "^14.6.1",
43
45
  "@types/diff-match-patch": "^1.0.36",
44
46
  "@types/fs-extra": "^11.0.4",
45
47
  "@types/marked-terminal": "^6.1.1",
@@ -48,6 +50,7 @@
48
50
  "@vitejs/plugin-react": "^5.1.2",
49
51
  "comlink": "^4.4.2",
50
52
  "diff-match-patch": "^1.0.5",
53
+ "happy-dom": "^20.3.9",
51
54
  "ink": "^6.6.0",
52
55
  "ink-markdown": "^1.0.4",
53
56
  "ink-spinner": "^5.0.0",
@@ -57,9 +60,10 @@
57
60
  "vite": "^7.3.1",
58
61
  "vite-bundle-analyzer": "^1.3.2",
59
62
  "vite-plugin-static-copy": "^3.1.4",
60
- "@codegraph/config": "1.0.0",
63
+ "vitest": "^4.0.18",
64
+ "@codegraph/agent": "1.0.0",
61
65
  "@codegraph/union-client": "1.0.0",
62
- "@codegraph/agent": "1.0.0"
66
+ "@codegraph/config": "1.0.0"
63
67
  },
64
68
  "babel": {
65
69
  "presets": [
@@ -69,6 +73,9 @@
69
73
  "scripts": {
70
74
  "dev": "bun run src/app.tsx",
71
75
  "build": "vite build",
72
- "prepublish": "pnpm build"
76
+ "prepublish": "pnpm build",
77
+ "test": "vitest",
78
+ "test:ui": "vitest --ui",
79
+ "test:coverage": "vitest --coverage"
73
80
  }
74
81
  }