dal-code 1.0.11 → 1.0.13

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 (109) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/core/keybindings.d.ts +1 -1
  3. package/dist/core/keybindings.d.ts.map +1 -1
  4. package/dist/core/keybindings.js +1 -1
  5. package/dist/core/keybindings.js.map +1 -1
  6. package/dist/core/settings-manager.d.ts +3 -0
  7. package/dist/core/settings-manager.d.ts.map +1 -1
  8. package/dist/core/settings-manager.js +8 -0
  9. package/dist/core/settings-manager.js.map +1 -1
  10. package/dist/dal/builtins.d.ts.map +1 -1
  11. package/dist/dal/builtins.js +1 -0
  12. package/dist/dal/builtins.js.map +1 -1
  13. package/dist/modes/interactive/components/bash-execution.d.ts +1 -0
  14. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  15. package/dist/modes/interactive/components/bash-execution.js +7 -4
  16. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  17. package/dist/modes/interactive/components/settings-selector.d.ts +2 -0
  18. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  19. package/dist/modes/interactive/components/settings-selector.js +9 -0
  20. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  21. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  22. package/dist/modes/interactive/external-editor.js +9 -2
  23. package/dist/modes/interactive/external-editor.js.map +1 -1
  24. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  25. package/dist/modes/interactive/interactive-mode.js +13 -12
  26. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  27. package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
  28. package/dist/node_modules/@dalcode/dal-bridge/src/client.ts +2 -2
  29. package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
  30. package/dist/node_modules/@dalcode/dal-gateway/src/index.ts +35 -7
  31. package/dist/node_modules/@dalcode/dal-guard/package.json +4 -4
  32. package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
  33. package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
  34. package/dist/node_modules/@dalcode/dal-lsp/package.json +3 -3
  35. package/dist/node_modules/@dalcode/dal-lsp/src/client.ts +14 -0
  36. package/dist/node_modules/@dalcode/dal-mcp/package.json +5 -5
  37. package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
  38. package/dist/node_modules/@dalcode/dal-office/src/render/docx.ts +12 -1
  39. package/dist/node_modules/@dalcode/dal-office/src/render/xlsx.ts +31 -2
  40. package/dist/node_modules/@dalcode/dal-office/src/tools/chart-generate.ts +9 -0
  41. package/dist/node_modules/@dalcode/dal-office/src/tools/ppt-generate.ts +10 -6
  42. package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.d.ts.map +1 -1
  43. package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +31 -2
  44. package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js.map +1 -1
  45. package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
  46. package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.ts +35 -3
  47. package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
  48. package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
  49. package/dist/node_modules/@dalcode/dal-subagent/src/index.ts +14 -1
  50. package/dist/node_modules/@dalcode/dal-telemetry/package.json +2 -2
  51. package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
  52. package/dist/node_modules/@dalcode/deepailab/src/oidc.ts +1 -1
  53. package/dist/node_modules/@earendil-works/chord/package.json +1 -1
  54. package/dist/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  55. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  56. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  57. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
  58. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  59. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  60. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  61. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  62. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  63. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  64. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  65. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
  66. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
  67. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
  68. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
  69. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
  70. package/dist/node_modules/@earendil-works/pi-ai/package.json +2 -2
  71. package/dist/node_modules/@earendil-works/pi-client/package.json +2 -2
  72. package/dist/node_modules/@earendil-works/pi-protocol/package.json +2 -2
  73. package/dist/node_modules/@earendil-works/pi-server/package.json +3 -3
  74. package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/package.json +3 -3
  75. package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  76. package/dist/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
  77. package/dist/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +1 -1
  78. package/dist/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
  79. package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  80. package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.js +3 -1
  81. package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  82. package/dist/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +1 -0
  83. package/dist/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
  84. package/dist/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +12 -1
  85. package/dist/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
  86. package/dist/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.d.ts.map +1 -1
  87. package/dist/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +3 -1
  88. package/dist/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js.map +1 -1
  89. package/dist/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  90. package/dist/node_modules/@earendil-works/pi-tui/dist/utils.js +43 -6
  91. package/dist/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  92. package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
  93. package/dist/utils/clipboard.d.ts.map +1 -1
  94. package/dist/utils/clipboard.js +25 -2
  95. package/dist/utils/clipboard.js.map +1 -1
  96. package/dist/utils/shell.d.ts.map +1 -1
  97. package/dist/utils/shell.js +9 -1
  98. package/dist/utils/shell.js.map +1 -1
  99. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  100. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  101. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  102. package/examples/extensions/gondolin/package-lock.json +2 -2
  103. package/examples/extensions/gondolin/package.json +1 -1
  104. package/examples/extensions/sandbox/package-lock.json +2 -2
  105. package/examples/extensions/sandbox/package.json +1 -1
  106. package/examples/extensions/with-deps/package-lock.json +2 -2
  107. package/examples/extensions/with-deps/package.json +1 -1
  108. package/npm-shrinkwrap.json +2 -2
  109. package/package.json +1 -1
@@ -139,9 +139,14 @@ function isAnthropicSubscriptionAuthKey(apiKey) {
139
139
  return typeof apiKey === "string" && apiKey.startsWith("sk-ant-oat");
140
140
  }
141
141
  function quoteIfNeeded(value) {
142
- if (value.length > 0 && !/[^a-zA-Z0-9_\-./~:@]/.test(value)) {
142
+ if (value.length > 0 && !/[^a-zA-Z0-9_\-./~:@\\]/.test(value)) {
143
143
  return value;
144
144
  }
145
+ // cmd.exe does not honor single quotes; hand Windows a double-quoted form
146
+ // (node's own argv parsing understands \" escapes). POSIX keeps sh quoting.
147
+ if (process.platform === "win32") {
148
+ return `"${value.replace(/"/g, '\\"')}"`;
149
+ }
145
150
  return `'${value.replace(/'/g, `'\\''`)}'`;
146
151
  }
147
152
  export function formatResumeCommand(sessionManager) {
@@ -3579,7 +3584,7 @@ export class InteractiveMode {
3579
3584
  this.showStatus(t("没有可恢复的排队消息"));
3580
3585
  }
3581
3586
  else {
3582
- this.showStatus(`Restored ${restored} queued message${restored > 1 ? "s" : ""} to editor`);
3587
+ this.showStatus(t("已恢复 {count} 条排队消息到编辑器").replace("{count}", String(restored)));
3583
3588
  }
3584
3589
  }
3585
3590
  updateEditorBorderColor() {
@@ -3721,7 +3726,7 @@ export class InteractiveMode {
3721
3726
  // full repaint is already unavoidable and folding only the tail would
3722
3727
  // leave the rest of the history in the wrong state.
3723
3728
  foldQuietToolStreak(this.chatContainer.children, "all");
3724
- this.showStatus(`Tool output: ${expanded ? "expanded" : "collapsed"}`);
3729
+ this.showStatus(expanded ? t("工具输出:已展开") : t("工具输出:已折叠"));
3725
3730
  }
3726
3731
  /** Update rendered assistant messages without rebuilding live tool components. */
3727
3732
  updateThinkingBlockVisibility() {
@@ -3736,7 +3741,7 @@ export class InteractiveMode {
3736
3741
  this.hideThinkingBlock = !this.hideThinkingBlock;
3737
3742
  this.settingsManager.setHideThinkingBlock(this.hideThinkingBlock);
3738
3743
  this.updateThinkingBlockVisibility();
3739
- this.showStatus(`Thinking blocks: ${this.hideThinkingBlock ? "hidden" : "visible"}`);
3744
+ this.showStatus(this.hideThinkingBlock ? t("思考块:已隐藏") : t("思考块:已显示"));
3740
3745
  }
3741
3746
  async handleOpenExternalEditor() {
3742
3747
  const editorCmd = this.settingsManager.getExternalEditorCommand();
@@ -4042,6 +4047,7 @@ export class InteractiveMode {
4042
4047
  autoResizeImages: this.settingsManager.getImageAutoResize(),
4043
4048
  blockImages: this.settingsManager.getBlockImages(),
4044
4049
  enableSkillCommands: this.settingsManager.getEnableSkillCommands(),
4050
+ factoryEnabled: this.settingsManager.getFactoryEnabled(),
4045
4051
  steeringMode: this.session.steeringMode,
4046
4052
  followUpMode: this.session.followUpMode,
4047
4053
  transport: this.settingsManager.getTransport(),
@@ -4103,6 +4109,9 @@ export class InteractiveMode {
4103
4109
  this.settingsManager.setEnableSkillCommands(enabled);
4104
4110
  this.setupAutocompleteProvider();
4105
4111
  },
4112
+ onFactoryEnabledChange: (enabled) => {
4113
+ this.settingsManager.setFactoryEnabled(enabled);
4114
+ },
4106
4115
  onSteeringModeChange: (mode) => {
4107
4116
  this.session.setSteeringMode(mode);
4108
4117
  },
@@ -5579,10 +5588,6 @@ export class InteractiveMode {
5579
5588
  const changelogPath = getChangelogPath();
5580
5589
  const entries = parseChangelog(changelogPath);
5581
5590
  const productEntries = getProductEntries(entries, VERSION);
5582
- // Pi sections stay in the shipped CHANGELOG.md for attribution and
5583
- // upgrade archaeology; they are just not what "What's New" means to a
5584
- // DAL user. Say where they went instead of silently dropping them.
5585
- const inheritedCount = entries.filter((entry) => entry.upstream).length;
5586
5591
  const changelogMarkdown = productEntries.length > 0
5587
5592
  ? productEntries.map((e) => normalizeChangelogLinks(e.content, e)).join("\n\n")
5588
5593
  : t("没有找到更新记录。");
@@ -5591,10 +5596,6 @@ export class InteractiveMode {
5591
5596
  this.chatContainer.addChild(new Text(theme.bold(theme.fg("accent", "What's New")), 1, 0));
5592
5597
  this.chatContainer.addChild(new Spacer(1));
5593
5598
  this.chatContainer.addChild(new Markdown(changelogMarkdown, 1, 1, this.getMarkdownThemeWithSettings()));
5594
- if (inheritedCount > 0) {
5595
- this.chatContainer.addChild(new Spacer(1));
5596
- this.chatContainer.addChild(new Text(theme.fg("dim", `${t("另有 ")}${inheritedCount}${t(" 段继承自上游 Pi 的历史记录,仅保留在随包发出的 CHANGELOG.md 中,此处不列出。")}`), 1, 0));
5597
- }
5598
5599
  this.chatContainer.addChild(new DynamicBorder());
5599
5600
  this.ui.requestRender();
5600
5601
  }