deepseeker-code 1.0.43 → 1.0.46

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 (3) hide show
  1. package/README.md +4 -0
  2. package/dist/cli.mjs +32 -13
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -70,12 +70,16 @@ deepseeker-code --plan
70
70
  | `/lang <zh\|en>` | 切换语言 |
71
71
  | `/output-style <名称>` | 切换输出风格(人格) |
72
72
  | `/sessions` | 列出并续接历史会话 |
73
+ | `/fork` | 从当前会话某轮回复处分叉出新会话 |
73
74
  | `/clear` | 新会话 |
74
75
  | `/status` / `/usage` / `/context` | 查看状态 / 用量 / 上下文 |
75
76
  | `/permissions` / `/mcp` / `/hooks` | 查看已加载的权限规则 / MCP / Hooks |
77
+ | `/trust` | 管理已信任目录(列出 / 撤销) |
76
78
  | `/debug` | 调试信息 |
77
79
  | `/exit` / `/quit` | 退出 |
78
80
 
81
+ > 菜单超出屏高时随选中项滚动(底栏显示 `n/m 条`);`commands/` 目录下的自定义命令引擎就绪后自动并入菜单。启动时界面先行渲染,引擎(MCP/skills/命令)后台加载,首次提交前自动等待就绪。
82
+
79
83
  **快捷键**:`Ctrl+C` 退出 · `Esc` 中止/清输入 · `Ctrl+G` 中止当前轮 · `Ctrl+T` 展开/收起思考 · 模态/菜单 `↑↓ Enter`。
80
84
 
81
85
  ---
package/dist/cli.mjs CHANGED
@@ -13804,13 +13804,13 @@ var init_SlashMenu = __esm({
13804
13804
  init_theme();
13805
13805
  MAX_ROWS = 10;
13806
13806
  SlashMenu = ({ entries, selectedIndex, cols }) => {
13807
- const visible = entries.slice(0, MAX_ROWS);
13808
- const more = entries.length > MAX_ROWS;
13807
+ const start = entries.length <= MAX_ROWS ? 0 : Math.max(0, Math.min(selectedIndex - MAX_ROWS + 1, selectedIndex, entries.length - MAX_ROWS));
13808
+ const visible = entries.slice(start, start + MAX_ROWS);
13809
13809
  const cmdW = Math.min(22, Math.max(8, ...visible.map((e) => e.name.length)) + 1);
13810
13810
  const descMax = Math.max(12, cols - cmdW - 6);
13811
13811
  return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", borderStyle: "round", borderColor: THEME.coral, paddingX: 1, paddingY: 0, marginTop: 1, children: [
13812
13812
  visible.map((e, i) => {
13813
- const active = i === selectedIndex;
13813
+ const active = i + start === selectedIndex;
13814
13814
  const desc = e.description.length > descMax ? `${e.description.slice(0, descMax - 1)}\u2026` : e.description;
13815
13815
  const gap = Math.max(1, cmdW - e.name.length);
13816
13816
  return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "row", children: [
@@ -13823,9 +13823,11 @@ var init_SlashMenu = __esm({
13823
13823
  /* @__PURE__ */ jsx14(Text14, { color: active ? THEME.gray : THEME.grayDim, children: desc })
13824
13824
  ] }, e.name);
13825
13825
  }),
13826
- more ? /* @__PURE__ */ jsxs12(Text14, { color: THEME.coralMuted, children: [
13827
- "\u2026 \u8FD8\u6709 ",
13828
- entries.length - MAX_ROWS,
13826
+ entries.length > MAX_ROWS ? /* @__PURE__ */ jsxs12(Text14, { color: THEME.coralMuted, children: [
13827
+ "\u2191\u2193 \u6EDA\u52A8 \xB7 ",
13828
+ selectedIndex + 1,
13829
+ "/",
13830
+ entries.length,
13829
13831
  " \u6761"
13830
13832
  ] }) : null
13831
13833
  ] });
@@ -13921,11 +13923,11 @@ var init_TopPanel = __esm({
13921
13923
  }
13922
13924
  });
13923
13925
 
13924
- // src/inspect.ts
13926
+ // ../core/src/observability/inspect.ts
13925
13927
  import fs39 from "fs";
13926
13928
  var CWD, fmt, readTrace, inspectUsage, inspectContext, inspectPermissions, inspectMcp, inspectHooks, inspectDebug;
13927
13929
  var init_inspect = __esm({
13928
- "src/inspect.ts"() {
13930
+ "../core/src/observability/inspect.ts"() {
13929
13931
  "use strict";
13930
13932
  init_config();
13931
13933
  init_permissions();
@@ -14110,7 +14112,7 @@ var init_App = __esm({
14110
14112
  return /* @__PURE__ */ jsx17(MessageBlock, { row, wrapW, streamTail });
14111
14113
  };
14112
14114
  isDynamicRow = (r) => r.kind === "assistant" && !!r.streaming || r.kind === "thinking" && !!r.streaming || r.kind === "tool" && r.status === "running" || r.kind === "todos" && !!r.active;
14113
- App = ({ resumeSessionId, initialPlanMode, initialAutoMode, initialIncludeProject }) => {
14115
+ App = ({ resumeSessionId, initialPlanMode, initialAutoMode, initialIncludeProject, engineReady }) => {
14114
14116
  const state = useChatState(resumeSessionId, initialPlanMode, initialAutoMode);
14115
14117
  const { exit } = useApp();
14116
14118
  const { stdout } = useStdout();
@@ -14122,6 +14124,16 @@ var init_App = __esm({
14122
14124
  const [selectIdx, setSelectIdx] = useState4(0);
14123
14125
  const [modelDisplay, setModelDisplay] = useState4(MODEL_NAME);
14124
14126
  const [tick, setTick] = useState4(0);
14127
+ const [engineReadyFlag, setEngineReadyFlag] = useState4(false);
14128
+ useEffect4(() => {
14129
+ let alive = true;
14130
+ void engineReady.then(() => {
14131
+ if (alive) setEngineReadyFlag(true);
14132
+ });
14133
+ return () => {
14134
+ alive = false;
14135
+ };
14136
+ }, [engineReady]);
14125
14137
  const [planEditing, setPlanEditing] = useState4(false);
14126
14138
  const [planDraft, setPlanDraft] = useState4("");
14127
14139
  const [planCursor, setPlanCursor] = useState4(0);
@@ -14235,7 +14247,7 @@ var init_App = __esm({
14235
14247
  for (const name of LOCAL_COMMAND_NAMES) map.set(name, { name, description: descOf(name) });
14236
14248
  for (const c of listCommands()) if (!map.has(c.name)) map.set(c.name, { name: c.name, description: c.description });
14237
14249
  return [...map.values()];
14238
- }, [tick]);
14250
+ }, [tick, engineReadyFlag]);
14239
14251
  const filteredCommands = useMemo(() => {
14240
14252
  if (!input.startsWith("/")) return [];
14241
14253
  const q = input.slice(1).toLowerCase();
@@ -14399,12 +14411,18 @@ ${listText}`);
14399
14411
  return false;
14400
14412
  }
14401
14413
  };
14414
+ const ensureEngine = async () => {
14415
+ if (engineReadyFlag) return;
14416
+ state.pushInfo("\u23F3 \u5F15\u64CE\u52A0\u8F7D\u4E2D\uFF08MCP/skills/commands\uFF09\u2026");
14417
+ await engineReady;
14418
+ };
14402
14419
  const executeSlash = async (fullText) => {
14403
14420
  const text = fullText.trim();
14404
14421
  if (!text.startsWith("/")) {
14405
14422
  await state.submit(text);
14406
14423
  return;
14407
14424
  }
14425
+ await ensureEngine();
14408
14426
  if (await runLocalSlash(text)) return;
14409
14427
  const name = text.slice(1).split(/\s+/)[0] ?? "";
14410
14428
  if (listCommands().some((c) => c.name === name)) {
@@ -14431,6 +14449,7 @@ ${listText}`);
14431
14449
  await executeSlash(v);
14432
14450
  return;
14433
14451
  }
14452
+ await ensureEngine();
14434
14453
  await state.submit(v);
14435
14454
  };
14436
14455
  const confirmPlanEdit = () => {
@@ -14800,9 +14819,9 @@ var main = async () => {
14800
14819
  Promise.resolve().then(() => (init_App(), App_exports)),
14801
14820
  Promise.resolve().then(() => (init_config(), config_exports))
14802
14821
  ]);
14803
- const dispose = await initEngine2(agentTools2, { includeProject });
14822
+ const engineReady = initEngine2(agentTools2, { includeProject });
14804
14823
  const onExit = () => {
14805
- dispose();
14824
+ void engineReady.then((dispose) => dispose());
14806
14825
  };
14807
14826
  process.on("SIGINT", () => {
14808
14827
  onExit();
@@ -14834,7 +14853,7 @@ var main = async () => {
14834
14853
  resumeId = await getMostRecentSessionId2() ?? void 0;
14835
14854
  }
14836
14855
  const { waitUntilExit } = render(
14837
- /* @__PURE__ */ jsx18(App2, { resumeSessionId: resumeId, initialPlanMode: args.plan, initialAutoMode: args.auto, initialIncludeProject: includeProject }),
14856
+ /* @__PURE__ */ jsx18(App2, { resumeSessionId: resumeId, initialPlanMode: args.plan, initialAutoMode: args.auto, initialIncludeProject: includeProject, engineReady }),
14838
14857
  // exitOnCtrlC:false:Ctrl+C 交由 App useInput 处理(统一退出/中止语义);
14839
14858
  // patchConsole:false:避免 console 劫持与全屏重绘叠加闪屏。
14840
14859
  { exitOnCtrlC: false, patchConsole: false }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepseeker-code",
3
- "version": "1.0.43",
3
+ "version": "1.0.46",
4
4
  "description": "DeepSeeker-Code 终端客户端(React Ink,in-process 直驱 runAgent)",
5
5
  "homepage": "https://github.com/xknk/deepSeekCode#readme",
6
6
  "repository": {