@chatcode/chatcode-cli 3.0.2-rc.4 → 3.0.2-rc.5

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 (32) hide show
  1. package/README.i18n.yaml +4 -4
  2. package/README.md +4 -0
  3. package/README.zh.md +4 -0
  4. package/lib/{command-errors-uo0j5Wi8.js → command-errors-B-jCwfLt.js} +12 -12
  5. package/lib/{command-trees-D4SZ2sGk.js → command-trees-CdgUsoW4.js} +2 -2
  6. package/lib/{component-identity-C02l24iT.js → component-identity-ax93NpoH.js} +3 -3
  7. package/lib/{extension-events-D6DbIdnG.js → extension-events-DJTP1cCG.js} +20 -20
  8. package/lib/{host-access-BdqThvw7.js → host-access-D3lpiaUY.js} +1 -1
  9. package/lib/{keymap-DFoC50J1.js → keymap-DAr6MX8m.js} +2 -2
  10. package/lib/{plugin-B37GhsdI.js → plugin-BGw2QmPK.js} +1243 -524
  11. package/lib/{scenes-Dk6DYkO9.js → scenes-BeuL5ow2.js} +3 -3
  12. package/lib/{settings-sections-D4Ozrymr.js → settings-sections-dGk8gNU7.js} +3 -3
  13. package/lib/{themes-DDI83rNa.js → themes-O-UQAfC7.js} +12 -12
  14. package/lib/tui-compat-command-trees.js +1 -1
  15. package/lib/tui-compat-extensions.js +3 -3
  16. package/lib/tui-compat-plugin-host.js +5 -5
  17. package/lib/tui-compat-scenes.js +1 -1
  18. package/lib/tui-compat-settings-sections.js +1 -1
  19. package/lib/tui-compat-working-activity.js +1 -1
  20. package/lib/tui-compat-workspaces.js +1 -1
  21. package/lib/tui-compat.js +41 -9
  22. package/lib/{tuiDisplayPrefs-CJ9aBVkB.js → tuiDisplayPrefs-DdU4O_sF.js} +44 -2
  23. package/lib/types/tui-compat.d.ts +2 -0
  24. package/lib/{workspaces-Dt_J35P0.js → workspaces-CE18wA21.js} +2 -2
  25. package/package.json +25 -25
  26. package/runtime/manifest.json +1 -1
  27. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
  28. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  29. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  30. package/runtime/node_modules/@deepseek-ai/dsh-compaction-basic/lib/index.js +84 -8
  31. package/runtime/node_modules/@deepseek-ai/dsh-compaction-basic/lib/types/region.d.ts +9 -0
  32. package/runtime/node_modules/@deepseek-ai/dsh-compaction-basic/lib/types/summarizer.d.ts +7 -0
@@ -1,14 +1,14 @@
1
1
  import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./rolldown-runtime-2rV9d50f.js";
2
- import { a as getPageMarginSetting, c as normalizeScrollGutter, d as parsePageMarginSpec, f as resolvePageMargin, i as formatContextUsage, l as normalizeStatusBar, n as DEFAULT_STATUS_BAR, o as isPageMarginMode, p as subscribePageMargin, r as applyPageMargin, s as normalizePageMargin, u as normalizeToolBackground } from "./tuiDisplayPrefs-CJ9aBVkB.js";
3
- import { a as draftComboConflicts, d as setKeymapOverrides, f as isMod, h as modLabel, l as parseComboDraft, m as isPlainReturnInput, n as actionMatches, o as effectiveComboString, p as isPlainReturn, t as SHORTCUT_ACTIONS } from "./keymap-DFoC50J1.js";
4
- import { c as withHostRootCapability } from "./host-access-BdqThvw7.js";
5
- import { i as getHostWorkspaceRuntime, r as createLocalWorkspaceRuntime } from "./workspaces-Dt_J35P0.js";
6
- import { n as getHostCommandTrees } from "./command-trees-D4SZ2sGk.js";
7
- import { a as isReservedCredentialRef, n as getHostSettingsSections, r as getLocalSettingsSectionsHost } from "./settings-sections-D4Ozrymr.js";
8
- import { n as getHostSceneRuntime } from "./scenes-Dk6DYkO9.js";
9
- import { A as tuiEnvName, C as LEGACY_DATA_DIR, D as homeDir, E as detectLegacyEnv, J as parseManifest, M as loadSpecData, O as readTuiEnv, S as DATA_DIR, T as RENAMED_ENV, Y as projectManifest, _ as stripAnsi$1, a as normalizeCancelDecision, b as isWide, c as installDecisionGuard, d as capCells, f as cleanRenderText, g as getGraphemeSegmenter, h as stringWidth$1, i as dispatchTuiNotification, k as resolveChatCodeCliHome, m as flattenInline, p as cleanScalarText, r as dispatchTuiDecision, v as eastAsianWidth, w as PRE_DSH_TUI_DATA_DIR, x as readGrantStore, y as isFullWidth } from "./extension-events-D6DbIdnG.js";
10
- import { A as validatePlugin, D as buildHostDescriptor, O as negotiate, _ as getHostMessageObserver, a as commandOwner, k as createContractIndex, n as hasCommandErrorCode, r as mapCommandError, w as EFFECT_LEDGER_FILE } from "./command-errors-uo0j5Wi8.js";
11
- import { D as getHostStatusStore, E as TuiStatusStore, M as getHostDialogStore, S as getHostShortcuts, a as listCustomThemes, b as getHostRenderers, c as THEME_NAMES, d as getTheme, f as isLightThemeActive, g as setAutoThemeBase, h as setActiveThemeName, i as isSafeThemeName, j as TuiDialogStore, l as getActiveTheme, m as registerCustomThemeResolver, n as getHostThemes, o as resolveCustomTheme, p as isThemeAvailable, r as buildTheme, s as AUTO_THEME_NAME, u as getAutoThemeBase, v as getHostToastStore } from "./themes-DDI83rNa.js";
2
+ import { a as getPageMarginSetting, c as normalizeScrollGutter, d as parsePageMarginSpec, f as resolvePageMargin, g as settingsValue, i as formatContextUsage, l as normalizeStatusBar, m as displaySettingsScope, n as DEFAULT_STATUS_BAR, o as isPageMarginMode, p as subscribePageMargin, r as applyPageMargin, s as normalizePageMargin, u as normalizeToolBackground } from "./tuiDisplayPrefs-DdU4O_sF.js";
3
+ import { a as draftComboConflicts, d as setKeymapOverrides, f as isMod, h as modLabel, l as parseComboDraft, m as isPlainReturnInput, n as actionMatches, o as effectiveComboString, p as isPlainReturn, t as SHORTCUT_ACTIONS } from "./keymap-DAr6MX8m.js";
4
+ import { c as withHostRootCapability } from "./host-access-D3lpiaUY.js";
5
+ import { i as getHostWorkspaceRuntime, r as createLocalWorkspaceRuntime } from "./workspaces-CE18wA21.js";
6
+ import { n as getHostCommandTrees } from "./command-trees-CdgUsoW4.js";
7
+ import { a as isReservedCredentialRef, n as getHostSettingsSections, r as getLocalSettingsSectionsHost } from "./settings-sections-dGk8gNU7.js";
8
+ import { n as getHostSceneRuntime } from "./scenes-BeuL5ow2.js";
9
+ import { A as tuiEnvName, C as LEGACY_DATA_DIR, D as homeDir, E as detectLegacyEnv, J as parseManifest, M as loadSpecData, O as readTuiEnv, S as DATA_DIR, T as RENAMED_ENV, Y as projectManifest, _ as stripAnsi$1, a as normalizeCancelDecision, b as isWide, c as installDecisionGuard, d as capCells, f as cleanRenderText, g as getGraphemeSegmenter, h as stringWidth$1, i as dispatchTuiNotification, k as resolveChatCodeCliHome, m as flattenInline, p as cleanScalarText, r as dispatchTuiDecision, v as eastAsianWidth, w as PRE_DSH_TUI_DATA_DIR, x as readGrantStore, y as isFullWidth } from "./extension-events-DJTP1cCG.js";
10
+ import { A as validatePlugin, D as buildHostDescriptor, O as negotiate, _ as getHostMessageObserver, a as commandOwner, k as createContractIndex, n as hasCommandErrorCode, r as mapCommandError, w as EFFECT_LEDGER_FILE } from "./command-errors-B-jCwfLt.js";
11
+ import { D as getHostStatusStore, E as TuiStatusStore, M as getHostDialogStore, S as getHostShortcuts, a as listCustomThemes, b as getHostRenderers, c as THEME_NAMES, d as getTheme, f as isLightThemeActive, g as setAutoThemeBase, h as setActiveThemeName, i as isSafeThemeName, j as TuiDialogStore, l as getActiveTheme, m as registerCustomThemeResolver, n as getHostThemes, o as resolveCustomTheme, p as isThemeAvailable, r as buildTheme, s as AUTO_THEME_NAME, u as getAutoThemeBase, v as getHostToastStore } from "./themes-O-UQAfC7.js";
12
12
  import { a as resolvePreset, i as isPresetName, n as FRAME_PRESETS, o as ActivityTracker, r as PRESET_NAMES, t as DEFAULT_PRESET } from "./frames-7PAg0Q9b.js";
13
13
  import { n as require_has_flag, t as require_supports_color } from "./supports-color-CcW-FGjr.js";
14
14
  import { createRequire } from "node:module";
@@ -23,7 +23,7 @@ import { assembleContextFor, installModelSelection } from "@deepseek-ai/dsh-agen
23
23
  import { BlockAssembler, MessageId, ReasoningEffortId, createUserMessage, isAgentLoopRequest } from "@deepseek-ai/dsh-llm";
24
24
  import * as dshSession from "@deepseek-ai/dsh-session";
25
25
  import { SessionId } from "@deepseek-ai/dsh-session";
26
- import { writeFileAtomic } from "@deepseek-ai/dsh-atomic-write";
26
+ import { withFileLock, writeFileAtomic } from "@deepseek-ai/dsh-atomic-write";
27
27
  import UserQuestionService, { UserQuestionError } from "@deepseek-ai/dsh-user-questions";
28
28
  import * as toolAskUser from "@deepseek-ai/dsh-tool-ask-user";
29
29
  import { isModelInvocable, isUserInvocable, renderSkillContent } from "@deepseek-ai/dsh-skill";
@@ -1198,7 +1198,7 @@ var require_react = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1198
1198
  else module.exports = require_react_development();
1199
1199
  }));
1200
1200
  //#endregion
1201
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sideQuestion.js
1201
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sideQuestion.js
1202
1202
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
1203
1203
  /**
1204
1204
  * Side Question (`/btw`) — CC's btw.tsx/sideQuestion.ts semantics on the
@@ -1268,7 +1268,7 @@ async function runSideQuestion(params) {
1268
1268
  return { answer };
1269
1269
  }
1270
1270
  //#endregion
1271
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/recap.js
1271
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/recap.js
1272
1272
  /**
1273
1273
  * Session recap (`/recap`, pi-recap semantics): a single TOOL-LESS LLM
1274
1274
  * call that summarizes the session's RECENT activity into one line and
@@ -1381,7 +1381,7 @@ function parseRecapResponse(raw) {
1381
1381
  return { summary: raw.trim() };
1382
1382
  }
1383
1383
  //#endregion
1384
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/log.js
1384
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/log.js
1385
1385
  /**
1386
1386
  * Error logger for the ported Ink core. Always writes to stderr (an Ink
1387
1387
  * renderer failure must never pass silently).
@@ -1392,7 +1392,7 @@ function logError(error) {
1392
1392
  process.stderr.write(`[ChatCode CLI TUI] ${text}\n`);
1393
1393
  }
1394
1394
  //#endregion
1395
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/update-overflow-guard.js
1395
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/update-overflow-guard.js
1396
1396
  /**
1397
1397
  * Self-healing guard for React's nested-update overflow — Minified React
1398
1398
  * error #185 ("Maximum update depth exceeded").
@@ -1535,7 +1535,7 @@ function installNestedUpdateOverflowProcessGuard() {
1535
1535
  });
1536
1536
  }
1537
1537
  //#endregion
1538
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/sessionColors.js
1538
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/sessionColors.js
1539
1539
  /**
1540
1540
  * Session accent colors for `/color` (CC's /color semantics): a small
1541
1541
  * named palette that overrides the prompt-input border (and its session
@@ -1576,7 +1576,7 @@ function sessionColorHex(name) {
1576
1576
  return isValidSessionColor(name) ? SESSION_COLORS[name] : void 0;
1577
1577
  }
1578
1578
  //#endregion
1579
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/deepseekPricing.js
1579
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/deepseekPricing.js
1580
1580
  /**
1581
1581
  * DeepSeek 官方定价与"本会话花费"估算(人民币口径)。
1582
1582
  *
@@ -1701,7 +1701,7 @@ function estimateSessionCostCny(tokens, model) {
1701
1701
  return estimateSessionCostSplitCny(tokens, model)?.total;
1702
1702
  }
1703
1703
  //#endregion
1704
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/i18n.js
1704
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/i18n.js
1705
1705
  /**
1706
1706
  * dsh-tui localization — UI strings for Chinese (`zh`, the default) and
1707
1707
  * English (`en`).
@@ -5369,12 +5369,12 @@ const dict = {
5369
5369
  en: "↑/↓ select · Enter run · Esc back to model list"
5370
5370
  },
5371
5371
  "model-config-landing-footer": {
5372
- zh: "内置模型始终显示;元景开启时显示平台接口模型。",
5373
- en: "Built-in models are always shown; Yuanjing models appear when Yuanjing is on."
5372
+ zh: "自定义模型保存在 ~/.chatcode-cli/settings.json;内置模型始终显示,元景开启时显示平台模型。",
5373
+ en: "Custom models are stored in ~/.chatcode-cli/settings.json; built-in models are always shown, and Yuanjing models appear when enabled."
5374
5374
  },
5375
5375
  "model-config-maas-row": {
5376
- zh: "元景",
5377
- en: "Yuanjing"
5376
+ zh: "启用元景模型",
5377
+ en: "Enable Yuanjing models"
5378
5378
  },
5379
5379
  "model-config-state-on": {
5380
5380
  zh: "开",
@@ -5424,18 +5424,14 @@ const dict = {
5424
5424
  zh: "保持未配置",
5425
5425
  en: "Keep unconfigured"
5426
5426
  },
5427
- "model-config-key-env-readonly": {
5428
- zh: "API Key 由启动环境提供,请在启动 dsh 的终端中修改环境变量。",
5429
- en: "The API key comes from the launch environment; change the environment variable in the shell that starts dsh."
5430
- },
5431
- "model-config-key-env-configured": {
5432
- zh: "已由环境变量配置",
5433
- en: "Configured by environment variable"
5434
- },
5435
5427
  "model-config-opt-add": {
5436
5428
  zh: "手动添加自定义模型",
5437
5429
  en: "Manually add a custom model"
5438
5430
  },
5431
+ "model-config-enter-add": {
5432
+ zh: "Enter 添加",
5433
+ en: "Enter to add"
5434
+ },
5439
5435
  "model-config-maas-unavailable": {
5440
5436
  zh: "元景模型服务不可用",
5441
5437
  en: "Yuanjing model service is unavailable"
@@ -5452,6 +5448,10 @@ const dict = {
5452
5448
  zh: "元景",
5453
5449
  en: "Yuanjing"
5454
5450
  },
5451
+ "model-config-custom-provider-label": {
5452
+ zh: "自定义模型",
5453
+ en: "Custom model"
5454
+ },
5455
5455
  "model-config-maas-models-failed": {
5456
5456
  zh: "元景模型列表加载失败 · {{{err}}}",
5457
5457
  en: "Failed to load Yuanjing models · {{{err}}}"
@@ -5468,10 +5468,6 @@ const dict = {
5468
5468
  zh: "API 协议",
5469
5469
  en: "API protocol"
5470
5470
  },
5471
- "model-config-q-provider": {
5472
- zh: "供应商",
5473
- en: "Provider"
5474
- },
5475
5471
  "model-config-q-model": {
5476
5472
  zh: "模型名称 / ID",
5477
5473
  en: "Model name / ID"
@@ -5485,8 +5481,8 @@ const dict = {
5485
5481
  en: "API Key"
5486
5482
  },
5487
5483
  "model-config-q-apikey-detail": {
5488
- zh: "输入内容会隐藏;密钥只写入 ~/.chatcode-cli/.credentials.yaml,不写入 settings.yaml",
5489
- en: "Input is masked; the key is stored only in ~/.chatcode-cli/.credentials.yaml, never settings.yaml"
5484
+ zh: "输入内容会隐藏;密钥将写入 ~/.chatcode-cli/settings.json 的对应 customModels 条目,请妥善保护该文件",
5485
+ en: "Input is masked; the key is stored in the matching customModels entry in ~/.chatcode-cli/settings.json, so protect that file."
5490
5486
  },
5491
5487
  "model-config-q-description": {
5492
5488
  zh: "描述 / 显示名称",
@@ -5536,10 +5532,6 @@ const dict = {
5536
5532
  zh: "删除配置",
5537
5533
  en: "Delete configuration"
5538
5534
  },
5539
- "model-config-opt-clear-current-key": {
5540
- zh: "清除当前 API Key",
5541
- en: "Clear current API key"
5542
- },
5543
5535
  "model-config-already-current": {
5544
5536
  zh: "该模型已经是当前模型",
5545
5537
  en: "This is already the current model"
@@ -5549,8 +5541,8 @@ const dict = {
5549
5541
  en: "Cannot rename the current model ID; set another model as current first"
5550
5542
  },
5551
5543
  "model-config-current-delete-blocked": {
5552
- zh: "不能删除当前模型:请先将其他模型设为当前模型",
5553
- en: "Cannot delete the current model; set another model as current first"
5544
+ zh: "当前模型正在使用,不可删除;请先切换到其他模型",
5545
+ en: "The current model is in use and cannot be deleted; switch to another model first."
5554
5546
  },
5555
5547
  "model-config-opt-keep": {
5556
5548
  zh: "保持当前值",
@@ -5588,26 +5580,14 @@ const dict = {
5588
5580
  zh: "模型 {{model}} 配置已更新",
5589
5581
  en: "Model {{model}} configuration updated"
5590
5582
  },
5591
- "model-config-duplicate-model": {
5592
- zh: "同一供应商下已有模型 {{model}}",
5593
- en: "Model {{model}} already exists under this provider"
5583
+ "model-config-restart-required": {
5584
+ zh: "配置已写入 ~/.chatcode-cli/settings.json,重启 CLI 后模型列表生效",
5585
+ en: "Saved to ~/.chatcode-cli/settings.json; restart the CLI to refresh the model list."
5594
5586
  },
5595
5587
  "model-config-test-running": {
5596
5588
  zh: "正在测试 {{model}} 的连接…",
5597
5589
  en: "Testing the connection for {{model}}…"
5598
5590
  },
5599
- "model-config-test-success": {
5600
- zh: "连接成功,端点已返回模型 {{model}}",
5601
- en: "Connection succeeded and the endpoint advertised {{model}}"
5602
- },
5603
- "model-config-test-model-missing": {
5604
- zh: "已连接端点,但返回的列表中没有 {{model}}",
5605
- en: "The endpoint responded, but {{model}} was not in its model list"
5606
- },
5607
- "model-config-test-failed": {
5608
- zh: "连接测试失败 · {{{err}}}",
5609
- en: "Connection test failed · {{{err}}}"
5610
- },
5611
5591
  "model-config-test-prompt": {
5612
5592
  zh: "这是一条连接测试消息。请用一句简短的话回复,表示你已成功收到消息。",
5613
5593
  en: "This is a connection test. Reply briefly to confirm that you received this message."
@@ -5618,7 +5598,7 @@ const dict = {
5618
5598
  },
5619
5599
  "model-config-test-response": {
5620
5600
  zh: "模型回复:{{{response}}}",
5621
- en: "Model response: {{{response}}}"
5601
+ en: "Model response: {{{response}}"
5622
5602
  },
5623
5603
  "model-config-test-message-success": {
5624
5604
  zh: "模型 {{model}} 测试成功",
@@ -5640,10 +5620,6 @@ const dict = {
5640
5620
  zh: "模型 {{model}} 已删除",
5641
5621
  en: "Model {{model}} deleted"
5642
5622
  },
5643
- "model-config-key-cleanup-failed": {
5644
- zh: "模型已删除,但密钥 {{ref}} 清理失败,请检查 ~/.chatcode-cli/.credentials.yaml",
5645
- en: "The model was deleted, but key {{ref}} could not be removed; check ~/.chatcode-cli/.credentials.yaml"
5646
- },
5647
5623
  "model-config-line-provider": {
5648
5624
  zh: "供应商:{{provider}}(路由 {{route}})",
5649
5625
  en: "Provider: {{provider}} (route {{route}})"
@@ -5680,10 +5656,6 @@ const dict = {
5680
5656
  zh: "协议:{{api}}",
5681
5657
  en: "Protocol: {{api}}"
5682
5658
  },
5683
- "model-config-detail-provider": {
5684
- zh: "供应商:{{provider}}",
5685
- en: "Provider: {{provider}}"
5686
- },
5687
5659
  "model-config-detail-baseurl": {
5688
5660
  zh: "Base URL:{{url}}",
5689
5661
  en: "Base URL: {{url}}"
@@ -5708,10 +5680,6 @@ const dict = {
5708
5680
  zh: "请选择有效的 API 协议",
5709
5681
  en: "Choose a valid API protocol"
5710
5682
  },
5711
- "model-config-invalid-provider": {
5712
- zh: "供应商不能为空",
5713
- en: "Provider cannot be empty"
5714
- },
5715
5683
  "model-config-invalid-model": {
5716
5684
  zh: "模型名称 / ID 不能为空",
5717
5685
  en: "Model name / ID cannot be empty"
@@ -6229,7 +6197,7 @@ const dict = {
6229
6197
  "cmd-desc-color": { zh: "设置当前会话强调色(输入框边框与会话标签)" },
6230
6198
  "cmd-desc-lang": { zh: "切换界面语言(en / zh)" },
6231
6199
  "cmd-desc-model": { zh: "查看当前模型" },
6232
- "cmd-desc-model-config": { zh: "配置元景并选择平台模型" },
6200
+ "cmd-desc-model-config": { zh: "管理自定义模型、配置元景并选择平台模型" },
6233
6201
  "cmd-desc-thinking": { zh: "显示或隐藏思考过程" },
6234
6202
  "cmd-desc-tokens": { zh: "查看会话 token 与当前上下文用量" },
6235
6203
  "cmd-desc-provider": { zh: "添加、编辑或删除模型提供方(内置目录或自定义 API 端点)" },
@@ -6505,7 +6473,7 @@ function resolveStartupLang(dir = PREFS_DIR$6, env = process.env) {
6505
6473
  return readLangPref(dir) ?? "zh";
6506
6474
  }
6507
6475
  //#endregion
6508
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/commands.js
6476
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/commands.js
6509
6477
  /**
6510
6478
  * Local slash commands for the dsh-tui TUI. Claude Code's command system is
6511
6479
  * deeply wired into its engine; dsh-tui ships a small built-in set with the
@@ -6752,7 +6720,7 @@ const LOCAL_COMMANDS = [
6752
6720
  },
6753
6721
  {
6754
6722
  name: "model-config",
6755
- description: "Configure Yuanjing and choose platform models"
6723
+ description: "Configure custom models and Yuanjing"
6756
6724
  },
6757
6725
  {
6758
6726
  name: "effort",
@@ -6962,7 +6930,7 @@ function matchingCompletionToken(candidate, prefix) {
6962
6930
  return candidate.aliases?.find((alias) => alias.toLowerCase().startsWith(prefix));
6963
6931
  }
6964
6932
  //#endregion
6965
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/sessionHistory.js
6933
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/sessionHistory.js
6966
6934
  /**
6967
6935
  * Launcher contract for `dsh-tui --resume`: the TUI writes the chosen session
6968
6936
  * id to `<CHATCODE_CLI_HOME>/tui/resume.txt`, and the launcher feeds it back as
@@ -7131,7 +7099,7 @@ function forgetAgentViewSession(sessionId) {
7131
7099
  } catch {}
7132
7100
  }
7133
7101
  //#endregion
7134
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/sessionTags.js
7102
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/sessionTags.js
7135
7103
  /**
7136
7104
  * One searchable local tag per persisted session.
7137
7105
  *
@@ -7281,7 +7249,7 @@ function forgetSessionTag(sessionId, dir = DATA_DIR) {
7281
7249
  return setSessionTag(sessionId, void 0, dir).ok;
7282
7250
  }
7283
7251
  //#endregion
7284
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/compat/liveSession.js
7252
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/compat/liveSession.js
7285
7253
  /**
7286
7254
  * Live Session compatibility facade.
7287
7255
  *
@@ -7443,7 +7411,7 @@ function liveSessionCreateOptions(request) {
7443
7411
  };
7444
7412
  }
7445
7413
  //#endregion
7446
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/compat/sessionLog.js
7414
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/compat/sessionLog.js
7447
7415
  /**
7448
7416
  * Legacy third-party session-event types the TUI vouches for as ephemeral
7449
7417
  * UI frames — safe for the strict read path to accept and skip. Exported
@@ -8157,7 +8125,7 @@ function deleteSessionLog(sessionId) {
8157
8125
  }
8158
8126
  }
8159
8127
  //#endregion
8160
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/compat/sessionEvent.js
8128
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/compat/sessionEvent.js
8161
8129
  /** Narrow an unknown/session event to the retired durable chunk envelope. */
8162
8130
  function legacyAssistantChunkOf(event) {
8163
8131
  if (event === null || typeof event !== "object") return void 0;
@@ -8171,7 +8139,18 @@ function legacyAssistantChunkOf(event) {
8171
8139
  return event;
8172
8140
  }
8173
8141
  //#endregion
8174
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessionTree.js
8142
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/compaction.js
8143
+ /**
8144
+ * Recognize both the current checkpoint source and the legacy plugin marker.
8145
+ * Harness session format v4 migrated `plugin/compact` to the dedicated
8146
+ * `compact-checkpoint` source, while older persisted sessions retain the
8147
+ * original marker.
8148
+ */
8149
+ function isCompactionCheckpointSource(source) {
8150
+ return source.kind === "compact-checkpoint" || source.kind === "plugin" && source.plugin === "compact";
8151
+ }
8152
+ //#endregion
8153
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessionTree.js
8175
8154
  const TREE_FILTERS = [
8176
8155
  "default",
8177
8156
  "no-tools",
@@ -8475,7 +8454,7 @@ function extractEntries(sessionId, events) {
8475
8454
  switch (event.type) {
8476
8455
  case "user/message": {
8477
8456
  const source = event.data.source;
8478
- if (source.kind === "plugin" && source.plugin === "compact") {
8457
+ if (isCompactionCheckpointSource(source)) {
8479
8458
  const summary = textOf(event.data.content);
8480
8459
  push({
8481
8460
  seq: event.seq,
@@ -10327,7 +10306,7 @@ var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10327
10306
  module.exports = subset;
10328
10307
  }));
10329
10308
  //#endregion
10330
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/shellQuote.js
10309
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/shellQuote.js
10331
10310
  var import_semver = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
10332
10311
  const internalRe = require_re();
10333
10312
  const constants = require_constants$1();
@@ -10420,7 +10399,7 @@ function cmdEscapeArgument(arg, doubleEscapeMetaChars = false) {
10420
10399
  return out;
10421
10400
  }
10422
10401
  //#endregion
10423
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/update.js
10402
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/update.js
10424
10403
  const PACKAGE_NAME = "@chatcode/cco-tui";
10425
10404
  const DEFAULT_REGISTRY = "https://registry.npmjs.org";
10426
10405
  const GITHUB_REPO = "ccch1mneyyy/dsh-TUI";
@@ -10566,7 +10545,7 @@ function isBootDeadlockTarget(version) {
10566
10545
  const v = (0, import_semver.valid)(version);
10567
10546
  return v !== null && (0, import_semver.gte)(v, "0.7.0") && (0, import_semver.lt)(v, "0.7.2");
10568
10547
  }
10569
- function isRecord$2(value) {
10548
+ function isRecord$3(value) {
10570
10549
  return value !== null && typeof value === "object" && !Array.isArray(value);
10571
10550
  }
10572
10551
  /** Fetch `latest` from a registry; undefined on any failure. */
@@ -10580,7 +10559,7 @@ async function fetchLatestVersion(registryBase) {
10580
10559
  });
10581
10560
  if (!response.ok) return void 0;
10582
10561
  const payload = await response.json();
10583
- return (isRecord$2(payload) && typeof payload.version === "string" ? (0, import_semver.valid)(payload.version) : null) ?? void 0;
10562
+ return (isRecord$3(payload) && typeof payload.version === "string" ? (0, import_semver.valid)(payload.version) : null) ?? void 0;
10584
10563
  } catch {
10585
10564
  return;
10586
10565
  } finally {
@@ -10633,7 +10612,7 @@ function getLegacyStandaloneAssetName(platform = process.platform, arch = proces
10633
10612
  * publishes none (the transition-period warning path).
10634
10613
  */
10635
10614
  function findChecksumAssetUrl(assets, assetName) {
10636
- const urlOf = (a) => isRecord$2(a) && typeof a.name === "string" && typeof a.browser_download_url === "string";
10615
+ const urlOf = (a) => isRecord$3(a) && typeof a.name === "string" && typeof a.browser_download_url === "string";
10637
10616
  const byName = (name) => assets.find((a) => urlOf(a) && a.name === name);
10638
10617
  const sums = byName("SHA256SUMS");
10639
10618
  if (sums !== void 0) return sums.browser_download_url;
@@ -10695,17 +10674,17 @@ async function fetchGithubLatestRelease(options = {}) {
10695
10674
  });
10696
10675
  if (!response.ok) return void 0;
10697
10676
  const payload = await response.json();
10698
- if (!isRecord$2(payload) || typeof payload.tag_name !== "string") return void 0;
10677
+ if (!isRecord$3(payload) || typeof payload.tag_name !== "string") return void 0;
10699
10678
  const version = (0, import_semver.valid)(payload.tag_name.replace(/^v/, ""));
10700
10679
  if (version === null) return void 0;
10701
10680
  let assetName = getStandaloneAssetName();
10702
10681
  let downloadUrl;
10703
10682
  let checksumUrl;
10704
10683
  if (Array.isArray(payload.assets)) {
10705
- let asset = payload.assets.find((a) => isRecord$2(a) && a.name === assetName && typeof a.browser_download_url === "string");
10684
+ let asset = payload.assets.find((a) => isRecord$3(a) && a.name === assetName && typeof a.browser_download_url === "string");
10706
10685
  if (asset === void 0) {
10707
10686
  const legacyAssetName = getLegacyStandaloneAssetName();
10708
- asset = payload.assets.find((a) => isRecord$2(a) && a.name === legacyAssetName && typeof a.browser_download_url === "string");
10687
+ asset = payload.assets.find((a) => isRecord$3(a) && a.name === legacyAssetName && typeof a.browser_download_url === "string");
10709
10688
  if (asset !== void 0) assetName = legacyAssetName;
10710
10689
  }
10711
10690
  if (asset !== void 0 && typeof asset.browser_download_url === "string") downloadUrl = asset.browser_download_url;
@@ -11771,7 +11750,7 @@ async function restartTui(sessionId, options = {}) {
11771
11750
  });
11772
11751
  }
11773
11752
  //#endregion
11774
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessions/header.js
11753
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessions/header.js
11775
11754
  /** A finite number, or undefined for anything else (NaN and ±Infinity included). */
11776
11755
  function finiteNumber(value) {
11777
11756
  return typeof value === "number" && Number.isFinite(value) ? value : void 0;
@@ -11845,7 +11824,7 @@ function classify(header) {
11845
11824
  return { kind: "root" };
11846
11825
  }
11847
11826
  //#endregion
11848
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessions/frames.js
11827
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessions/frames.js
11849
11828
  /**
11850
11829
  * Bounded reads over the JSONL backend's concatenated-Zstandard session logs.
11851
11830
  *
@@ -12091,7 +12070,7 @@ function decodeTail(window) {
12091
12070
  return decodeFrames(window.buffer, window.whole ? walkFrames(window.buffer) : resyncFrames(window.buffer));
12092
12071
  }
12093
12072
  //#endregion
12094
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessions/digest.js
12073
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessions/digest.js
12095
12074
  /**
12096
12075
  * What a bounded read can learn about a session log.
12097
12076
  *
@@ -12555,7 +12534,7 @@ function previewSession(path, limit) {
12555
12534
  return entries.slice(-limit);
12556
12535
  }
12557
12536
  //#endregion
12558
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessions/artifact.js
12537
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessions/artifact.js
12559
12538
  /** Read-only artifact lookup for session summaries and previews. */
12560
12539
  /** Highest published compressed generation; temporary migration files are ignored. */
12561
12540
  function inDirectory(directory) {
@@ -12608,7 +12587,7 @@ function findSessionArtifact(sessionId, target) {
12608
12587
  }
12609
12588
  }
12610
12589
  //#endregion
12611
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessions/store.js
12590
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessions/store.js
12612
12591
  /**
12613
12592
  * The session index — a local cache keyed by the backend's own change token.
12614
12593
  *
@@ -12771,7 +12750,7 @@ function noteBranch(sessionId, branch) {
12771
12750
  writeIndex(index);
12772
12751
  }
12773
12752
  //#endregion
12774
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessions/list.js
12753
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/sessions/list.js
12775
12754
  /**
12776
12755
  * Building the session list.
12777
12756
  *
@@ -12841,7 +12820,7 @@ async function enumerate(source, signal) {
12841
12820
  * A backend that stores no per-session artifact (SQLite) answers neither, and
12842
12821
  * its sessions are summarized from their headers alone.
12843
12822
  */
12844
- function locate(source, raw, sessionId) {
12823
+ function locate$1(source, raw, sessionId) {
12845
12824
  if (typeof source.locate === "function") {
12846
12825
  let location;
12847
12826
  try {
@@ -12888,7 +12867,7 @@ async function listSummaries(source, signal) {
12888
12867
  const scanWork = [];
12889
12868
  for (const { header, raw, revision } of listed) {
12890
12869
  const cached = index.get(header.id);
12891
- const path = locate(source, raw, header.id);
12870
+ const path = locate$1(source, raw, header.id);
12892
12871
  const facts = path === void 0 ? void 0 : fileFacts(path);
12893
12872
  const token = revision ?? (facts === void 0 ? void 0 : `${facts.bytes}:${facts.modifiedAt}`);
12894
12873
  let derived;
@@ -13040,10 +13019,10 @@ async function locateSession(source, sessionId, signal) {
13040
13019
  return;
13041
13020
  }
13042
13021
  const match = listed.find((entry) => entry.header.id === sessionId);
13043
- return match === void 0 ? void 0 : locate(source, match.raw, sessionId);
13022
+ return match === void 0 ? void 0 : locate$1(source, match.raw, sessionId);
13044
13023
  }
13045
13024
  //#endregion
13046
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/agent-view.js
13025
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/agent-view.js
13047
13026
  /**
13048
13027
  * Agent view (CC `claude agents`) derivation helpers — pure functions over
13049
13028
  * session events that the channel folds into {@link AgentViewRow}s. Kept in
@@ -13273,7 +13252,7 @@ function featureOn(config, name) {
13273
13252
  return config.mode !== "minimal";
13274
13253
  }
13275
13254
  //#endregion
13276
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/activityPrefs.js
13255
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/activityPrefs.js
13277
13256
  /**
13278
13257
  * Persisted working-activity indicator preference, mirroring the pi
13279
13258
  * working-activity extension's `~/.pi/agent/working-activity.json`
@@ -13342,7 +13321,7 @@ function writeActivityFrames(name, dir = PREFS_DIR$5) {
13342
13321
  }
13343
13322
  }
13344
13323
  //#endregion
13345
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/fileSuggestions.js
13324
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/fileSuggestions.js
13346
13325
  const pathSeparators = /[\\/]/;
13347
13326
  function isPathLikeQuery(query) {
13348
13327
  return query.startsWith(".") || query.startsWith("~") || query.startsWith("/") || /^[A-Za-z]:[\\/]/.test(query) || pathSeparators.test(query);
@@ -13379,7 +13358,7 @@ function preserveSelection(previous, next, fallback = 0) {
13379
13358
  return next.length === 0 ? 0 : Math.min(Math.max(0, fallback), next.length - 1);
13380
13359
  }
13381
13360
  //#endregion
13382
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/effortPrefs.js
13361
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/effortPrefs.js
13383
13362
  /**
13384
13363
  * Persisted reasoning-effort preference (`~/.chatcode-cli/tui/effort.json`). Set via
13385
13364
  * `/effort` (slider or `/effort <id>`; `/effort status` reports the current
@@ -13421,7 +13400,7 @@ function writeEffortPref(effort, dir = PREFS_DIR$4) {
13421
13400
  }
13422
13401
  }
13423
13402
  //#endregion
13424
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/modelPrefs.js
13403
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/modelPrefs.js
13425
13404
  /**
13426
13405
  * Persisted model-route preference (`/model` picker choice), kept at
13427
13406
  * `~/.chatcode-cli/model.json` (`provider` + `model` keys) so CLI and Web share it
@@ -13504,7 +13483,7 @@ function writeModelPref(provider, model, dir = PREFS_DIR$3) {
13504
13483
  }
13505
13484
  }
13506
13485
  //#endregion
13507
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/modelRoute.js
13486
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/modelRoute.js
13508
13487
  /**
13509
13488
  * Model route resolution (issue #67). The `(provider, model)` pair is a
13510
13489
  * single value: every source either supplies the WHOLE route or is skipped,
@@ -13729,6 +13708,7 @@ async function validateResumeModelRoute(llm, configured, recorded, fallback) {
13729
13708
  if (candidate === void 0) return {};
13730
13709
  return validateModelRoute(llm, candidate, fallback);
13731
13710
  }
13711
+ const CUSTOM_MODEL_PROVIDER = "chatcode-custom";
13732
13712
  /**
13733
13713
  * Order product providers as built-in, Yuanjing, then custom/other routes.
13734
13714
  * The sort is stable, so user-added providers retain their registry order.
@@ -13738,7 +13718,226 @@ function orderModelProviders(providers) {
13738
13718
  return [...providers].sort((left, right) => rank(left.id) - rank(right.id));
13739
13719
  }
13740
13720
  //#endregion
13741
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/presetPrefs.js
13721
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/customModelSettings.js
13722
+ /**
13723
+ * Read and update ChatCode CLI's user-defined model list in
13724
+ * `~/.chatcode-cli/settings.json` without exposing stored API keys to the UI.
13725
+ */
13726
+ function isRecord$2(value) {
13727
+ return typeof value === "object" && value !== null && !Array.isArray(value);
13728
+ }
13729
+ function isMissing(error) {
13730
+ return isRecord$2(error) && error["code"] === "ENOENT";
13731
+ }
13732
+ function readDocument(path) {
13733
+ let source;
13734
+ try {
13735
+ source = readFileSync(path, "utf8");
13736
+ } catch (error) {
13737
+ if (isMissing(error)) return {};
13738
+ throw new Error("无法读取 ~/.chatcode-cli/settings.json");
13739
+ }
13740
+ let parsed;
13741
+ try {
13742
+ parsed = JSON.parse(source);
13743
+ } catch {
13744
+ throw new Error("~/.chatcode-cli/settings.json 不是有效的 JSON");
13745
+ }
13746
+ if (!isRecord$2(parsed)) throw new Error("~/.chatcode-cli/settings.json 顶层必须是对象");
13747
+ return parsed;
13748
+ }
13749
+ function modelEntries(document) {
13750
+ if (document.customModels === void 0) return [];
13751
+ if (!Array.isArray(document.customModels)) throw new Error("~/.chatcode-cli/settings.json 的 customModels 必须是数组");
13752
+ return document.customModels;
13753
+ }
13754
+ function nonEmptyText(value) {
13755
+ return typeof value === "string" && value.trim() !== "" ? value : void 0;
13756
+ }
13757
+ function positiveInteger(value) {
13758
+ return typeof value === "number" && Number.isSafeInteger(value) && value > 0 ? value : void 0;
13759
+ }
13760
+ function protocolOf(entry) {
13761
+ const protocol = nonEmptyText(entry["protocol"])?.toLowerCase();
13762
+ if (protocol === "anthropic" || protocol === "anthropic-messages") return "anthropic-messages";
13763
+ if (protocol === "openai" || protocol === "openai-completions") return "openai-completions";
13764
+ return nonEmptyText(entry["provider"])?.toLowerCase() === "anthropic" ? "anthropic-messages" : "openai-completions";
13765
+ }
13766
+ function project(entry, sourceIndex) {
13767
+ if (!isRecord$2(entry)) return void 0;
13768
+ const model = nonEmptyText(entry["model"]);
13769
+ if (model === void 0) return void 0;
13770
+ return {
13771
+ sourceIndex,
13772
+ model,
13773
+ baseUrl: nonEmptyText(entry["baseUrl"]) ?? "",
13774
+ protocol: protocolOf(entry),
13775
+ apiKeyConfigured: nonEmptyText(entry["apiKey"]) !== void 0,
13776
+ ...nonEmptyText(entry["description"]) === void 0 ? {} : { description: nonEmptyText(entry["description"]) },
13777
+ ...positiveInteger(entry["contextWindow"]) === void 0 ? {} : { contextWindow: positiveInteger(entry["contextWindow"]) },
13778
+ ...positiveInteger(entry["maxTokens"]) === void 0 ? {} : { maxTokens: positiveInteger(entry["maxTokens"]) }
13779
+ };
13780
+ }
13781
+ function locate(entries, target) {
13782
+ const indexed = entries[target.sourceIndex];
13783
+ if (isRecord$2(indexed) && indexed["model"] === target.model) return target.sourceIndex;
13784
+ const matches = entries.flatMap((entry, index) => isRecord$2(entry) && entry["model"] === target.model ? [index] : []);
13785
+ if (matches.length !== 1) throw new Error("自定义模型配置已被其他进程修改,请重新打开 /model-config");
13786
+ return matches[0];
13787
+ }
13788
+ function renderEntry(current, input) {
13789
+ const next = {
13790
+ ...current,
13791
+ model: input.model,
13792
+ baseUrl: input.baseUrl,
13793
+ protocol: input.protocol === "anthropic-messages" ? "Anthropic" : "OpenAI"
13794
+ };
13795
+ if (input.description === "") delete next["description"];
13796
+ else next["description"] = input.description;
13797
+ if (input.contextWindow === void 0) delete next["contextWindow"];
13798
+ else next["contextWindow"] = input.contextWindow;
13799
+ if (input.maxTokens === void 0) delete next["maxTokens"];
13800
+ else next["maxTokens"] = input.maxTokens;
13801
+ if (input.keyChange === "replace") next["apiKey"] = input.apiKey;
13802
+ return next;
13803
+ }
13804
+ function sameModelIdentity(entry, input, apiKey) {
13805
+ return isRecord$2(entry) && nonEmptyText(entry["model"]) === input.model && (nonEmptyText(entry["baseUrl"]) ?? "") === input.baseUrl && nonEmptyText(entry["apiKey"]) === apiKey;
13806
+ }
13807
+ /** Create a concurrency-safe store for the ChatCode CLI JSON settings file. */
13808
+ function createCustomModelSettingsStore(path) {
13809
+ return {
13810
+ path,
13811
+ list() {
13812
+ return modelEntries(readDocument(path)).flatMap((entry, index) => {
13813
+ const projected = project(entry, index);
13814
+ return projected === void 0 ? [] : [projected];
13815
+ });
13816
+ },
13817
+ readApiKey(target) {
13818
+ const entries = modelEntries(readDocument(path));
13819
+ const raw = entries[locate(entries, target)];
13820
+ return isRecord$2(raw) ? nonEmptyText(raw["apiKey"]) : void 0;
13821
+ },
13822
+ async write(input, target) {
13823
+ mkdirSync(dirname(path), {
13824
+ recursive: true,
13825
+ mode: 448
13826
+ });
13827
+ await withFileLock(path, async () => {
13828
+ const document = readDocument(path);
13829
+ const entries = [...modelEntries(document)];
13830
+ const index = target === void 0 ? entries.length : locate(entries, target);
13831
+ const current = target === void 0 ? {} : entries[index];
13832
+ if (!isRecord$2(current)) throw new Error("目标自定义模型配置无效,请重新打开 /model-config");
13833
+ const apiKey = input.keyChange === "replace" ? input.apiKey : nonEmptyText(current["apiKey"]);
13834
+ if (entries.some((entry, candidate) => candidate !== index && sameModelIdentity(entry, input, apiKey))) throw new Error(`相同模型名称、模型 URL 和 API Key 的配置已存在:${input.model}`);
13835
+ entries[index] = renderEntry(current, input);
13836
+ document.customModels = entries;
13837
+ await writeFileAtomic(path, `${JSON.stringify(document, null, 2)}\n`, {
13838
+ mode: 384,
13839
+ dirMode: 448
13840
+ });
13841
+ });
13842
+ },
13843
+ async remove(target) {
13844
+ mkdirSync(dirname(path), {
13845
+ recursive: true,
13846
+ mode: 448
13847
+ });
13848
+ await withFileLock(path, async () => {
13849
+ const document = readDocument(path);
13850
+ const entries = [...modelEntries(document)];
13851
+ entries.splice(locate(entries, target), 1);
13852
+ document.customModels = entries;
13853
+ await writeFileAtomic(path, `${JSON.stringify(document, null, 2)}\n`, {
13854
+ mode: 384,
13855
+ dirMode: 448
13856
+ });
13857
+ });
13858
+ }
13859
+ };
13860
+ }
13861
+ //#endregion
13862
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/customModelTest.js
13863
+ /** Direct, one-shot generation used by `/model-config` before a model is registered. */
13864
+ function requestEndpoint(baseURL, api) {
13865
+ const url = new URL(baseURL);
13866
+ const path = url.pathname.replace(/\/+$/u, "");
13867
+ if (api === "openai-completions") url.pathname = /\/chat\/completions$/u.test(path) ? path : `${path}/chat/completions`;
13868
+ else if (/\/messages$/u.test(path)) url.pathname = path;
13869
+ else url.pathname = `${path}${/\/v1$/u.test(path) ? "" : "/v1"}/messages`;
13870
+ return url.href;
13871
+ }
13872
+ function responseText(value) {
13873
+ if (typeof value === "string") return value.trim() || void 0;
13874
+ if (!Array.isArray(value)) return void 0;
13875
+ return value.flatMap((item) => {
13876
+ if (typeof item === "string") return [item];
13877
+ if (typeof item !== "object" || item === null) return [];
13878
+ const candidate = item["text"];
13879
+ return typeof candidate === "string" ? [candidate] : [];
13880
+ }).join("").trim() || void 0;
13881
+ }
13882
+ function answerFrom(data, api) {
13883
+ if (typeof data !== "object" || data === null) return void 0;
13884
+ const record = data;
13885
+ if (api === "anthropic-messages") return responseText(record["content"]);
13886
+ const choices = record["choices"];
13887
+ if (!Array.isArray(choices) || typeof choices[0] !== "object" || choices[0] === null) return void 0;
13888
+ const message = choices[0]["message"];
13889
+ if (typeof message !== "object" || message === null) return void 0;
13890
+ return responseText(message["content"]);
13891
+ }
13892
+ /** Send a real prompt to a draft custom-model endpoint and return visible text. */
13893
+ async function testCustomModelConnection(request, fetchImpl = fetch) {
13894
+ const endpoint = requestEndpoint(request.baseURL, request.api);
13895
+ const controller = new AbortController();
13896
+ const timeout = setTimeout(() => controller.abort(), 3e4);
13897
+ try {
13898
+ const anthropic = request.api === "anthropic-messages";
13899
+ const response = await fetchImpl(endpoint, {
13900
+ method: "POST",
13901
+ signal: controller.signal,
13902
+ headers: {
13903
+ "content-type": "application/json",
13904
+ ...anthropic ? /deepseek/iu.test(request.model) ? {
13905
+ "x-api-key": request.apiKey,
13906
+ "anthropic-version": "2023-06-01"
13907
+ } : {
13908
+ authorization: `Bearer ${request.apiKey}`,
13909
+ "anthropic-version": "2023-06-01"
13910
+ } : { authorization: `Bearer ${request.apiKey}` }
13911
+ },
13912
+ body: JSON.stringify({
13913
+ model: request.model,
13914
+ messages: [{
13915
+ role: "user",
13916
+ content: request.prompt
13917
+ }],
13918
+ max_tokens: 64,
13919
+ ...anthropic ? {} : { stream: false }
13920
+ })
13921
+ });
13922
+ if (!response.ok) throw new Error(`HTTP ${response.status}${response.statusText === "" ? "" : ` ${response.statusText}`}`);
13923
+ let data;
13924
+ try {
13925
+ data = await response.json();
13926
+ } catch {
13927
+ throw new Error("模型端点返回的内容不是有效 JSON");
13928
+ }
13929
+ const answer = answerFrom(data, request.api);
13930
+ if (answer === void 0) throw new Error("模型端点没有返回可见文本");
13931
+ return answer;
13932
+ } catch (error) {
13933
+ if (controller.signal.aborted) throw new Error("模型请求超时(30 秒)");
13934
+ throw error;
13935
+ } finally {
13936
+ clearTimeout(timeout);
13937
+ }
13938
+ }
13939
+ //#endregion
13940
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/presetPrefs.js
13742
13941
  /**
13743
13942
  * Persisted agent-preset preference (`/preset` picker choice), kept at
13744
13943
  * `~/.chatcode-cli/tui/agent-preset.json` (`preset` key) so the choice survives
@@ -13797,7 +13996,7 @@ function migratePresetPref(requested, resolved, dir = PREFS_DIR$2) {
13797
13996
  return requested === void 0 || resolved === void 0 || requested === resolved ? true : writePresetPref(resolved, dir);
13798
13997
  }
13799
13998
  //#endregion
13800
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/compat/persistedSession.js
13999
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/compat/persistedSession.js
13801
14000
  /** Undefined means the service exposes neither supported read API. */
13802
14001
  async function readPersistedSession(persistence, id) {
13803
14002
  if (persistence === null || typeof persistence !== "object") return void 0;
@@ -13817,7 +14016,7 @@ async function readPersistedSession(persistence, id) {
13817
14016
  if (typeof reader.load === "function") return reader.load(id);
13818
14017
  }
13819
14018
  //#endregion
13820
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/preset-resolution.js
14019
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/preset-resolution.js
13821
14020
  /**
13822
14021
  * Agent-preset resolution across upstream prerelease lines.
13823
14022
  *
@@ -13855,7 +14054,7 @@ async function resolveCompatiblePreset(presets, requested) {
13855
14054
  return presets.resolve(requested);
13856
14055
  }
13857
14056
  //#endregion
13858
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/presets.js
14057
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/presets.js
13859
14058
  /**
13860
14059
  * Agent-presets roster integration (issue #8): compose each session's
13861
14060
  * model-facing world (tools, prompt sections, projections) from one preset
@@ -14005,7 +14204,7 @@ function serviceForAgent(ctx, agent, key) {
14005
14204
  return ctx.get(key);
14006
14205
  }
14007
14206
  //#endregion
14008
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/preset-management.js
14207
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/preset-management.js
14009
14208
  const failureReason = (error) => error instanceof Error ? error.message : String(error);
14010
14209
  /** Read a roster-resolved composition without bypassing preset ownership. */
14011
14210
  async function readPresetComposition(presets, presetId) {
@@ -14062,7 +14261,7 @@ async function removePresetComposition(presets, presetId) {
14062
14261
  }
14063
14262
  }
14064
14263
  //#endregion
14065
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/session-organization.js
14264
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/session-organization.js
14066
14265
  /** Adapter-only readers for optional Harness session-organization services. */
14067
14266
  const STAT_KEYS = [
14068
14267
  "turns",
@@ -14123,7 +14322,7 @@ function presetCompositionRows(content, limit = 80) {
14123
14322
  };
14124
14323
  }
14125
14324
  //#endregion
14126
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/debug.js
14325
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/debug.js
14127
14326
  /**
14128
14327
  * Debug logger for the ported Ink core. Writes to stderr only when
14129
14328
  * `CHATCODE_CLI_TUI_DEBUG` (or its legacy alias) is set, so normal runs stay quiet.
@@ -14153,7 +14352,7 @@ function logMouseDebug(message, fields) {
14153
14352
  } catch {}
14154
14353
  }
14155
14354
  //#endregion
14156
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/mentions.js
14355
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/mentions.js
14157
14356
  /**
14158
14357
  * `@` file-mention parsing (issue #15).
14159
14358
  *
@@ -14299,7 +14498,7 @@ function mentionAtCaret(value, cursor) {
14299
14498
  };
14300
14499
  }
14301
14500
  //#endregion
14302
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/commonUtilityCommands.js
14501
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/commonUtilityCommands.js
14303
14502
  /** Format only the files in the authoritative loaded-context projection. */
14304
14503
  function loadedFileLines(files, copy) {
14305
14504
  if (files === void 0) return [copy.unavailable];
@@ -14414,7 +14613,7 @@ function codeRatioLines(report, copy, maxAuthors = 20) {
14414
14613
  return lines;
14415
14614
  }
14416
14615
  //#endregion
14417
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/themeCatalog.js
14616
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/themeCatalog.js
14418
14617
  /**
14419
14618
  * Cordis-free theme catalog shared by future pickers, commands and hosts.
14420
14619
  *
@@ -14495,7 +14694,7 @@ function listThemeCatalog(host) {
14495
14694
  return Object.freeze(entries);
14496
14695
  }
14497
14696
  //#endregion
14498
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/sessionModes.js
14697
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/sessionModes.js
14499
14698
  /**
14500
14699
  * Configurable Shift+Tab session modes (the `modes` dsh-tui plugin config):
14501
14700
  * each mode is a named bundle of optional DSH plane switches — plan mode
@@ -14559,7 +14758,7 @@ function modeDisplayName(spec) {
14559
14758
  return spec.id;
14560
14759
  }
14561
14760
  //#endregion
14562
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/subagents.js
14761
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/subagents.js
14563
14762
  /** Unified subagent activity domain model used by the adapter and every view. */
14564
14763
  const MAX_OUTPUT_EVENTS = 160;
14565
14764
  const MAX_OUTPUT_LINES = 160;
@@ -14937,7 +15136,7 @@ function formatJobDuration(job, now = Date.now()) {
14937
15136
  return `${Math.floor(minutes / 60)}h${String(minutes % 60).padStart(2, "0")}m`;
14938
15137
  }
14939
15138
  //#endregion
14940
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/minimalMode.js
15139
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/minimalMode.js
14941
15140
  /**
14942
15141
  * Minimal mode: one process-wide flag gating decorative UI (header splash,
14943
15142
  * emoji status glyphs, non-tool text colors, status-bar extras). The flag is
@@ -14956,7 +15155,7 @@ function setMinimalMode(enabled) {
14956
15155
  minimal = enabled;
14957
15156
  }
14958
15157
  //#endregion
14959
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/workspace.js
15158
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/workspace.js
14960
15159
  /**
14961
15160
  * Find or create the Workspace for `cwd`, then durably account `sessionId`.
14962
15161
  *
@@ -14972,7 +15171,7 @@ async function attachSessionToWorkspace(ctx, cwd, sessionId) {
14972
15171
  return true;
14973
15172
  }
14974
15173
  //#endregion
14975
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/contract.js
15174
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/contract.js
14976
15175
  /**
14977
15176
  * Upstream compatibility contract.
14978
15177
  *
@@ -15401,7 +15600,7 @@ function pluginsInfoLines(args, deps) {
15401
15600
  return lines;
15402
15601
  }
15403
15602
  //#endregion
15404
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/mcp-status.js
15603
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/mcp-status.js
15405
15604
  /** Loader and tool-registry projection used by the TUI's `/mcp` report. */
15406
15605
  const MCP_CLIENT_PACKAGE = "@deepseek-ai/dsh-mcp-client";
15407
15606
  const FIBER_ACTIVE = 2;
@@ -15454,7 +15653,7 @@ function collectMcpServerStatus(schemas, entries) {
15454
15653
  }));
15455
15654
  }
15456
15655
  //#endregion
15457
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/format.js
15656
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/format.js
15458
15657
  /**
15459
15658
  * Number, token-count, and duration formatters shared by the status line
15460
15659
  * and message rows.
@@ -15517,7 +15716,7 @@ function formatDuration$4(durationMs, options = {}) {
15517
15716
  return parts.join(" ");
15518
15717
  }
15519
15718
  //#endregion
15520
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/contextUsage.js
15719
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/contextUsage.js
15521
15720
  /**
15522
15721
  * Return the current context occupancy. The latest request is authoritative:
15523
15722
  * its uncached input and cache read/write tokens are all part of that request's
@@ -15901,7 +16100,7 @@ function prepareMemoryTargetFile(requested, candidates, cwd, dshHome) {
15901
16100
  }
15902
16101
  }
15903
16102
  //#endregion
15904
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/channel.js
16103
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/channel.js
15905
16104
  /** Return the step left open by a tree fork cut within one turn. */
15906
16105
  function openStepAtForkCut(events, turn) {
15907
16106
  for (let i = events.length - 1; i >= 0; i--) {
@@ -16688,7 +16887,6 @@ function createChannel(ctx, initialAgent, options) {
16688
16887
  const workspaceService = getHostWorkspaceRuntime(ctx.get("tuiWorkspaces")) ?? createLocalWorkspaceRuntime();
16689
16888
  const commandTrees = getHostCommandTrees(ctx.get("tuiCommandTrees"));
16690
16889
  let settingsHostCache;
16691
- let settingsHostResolved = false;
16692
16890
  const sceneRuntime = getHostSceneRuntime(ctx.get("tuiScenes"));
16693
16891
  const settingsSectionsRuntime = getHostSettingsSections(ctx.get("tuiSettingsSections")) ?? getLocalSettingsSectionsHost();
16694
16892
  const rendererRuntime = getHostRenderers(ctx.get("tuiRenderers"));
@@ -19467,12 +19665,23 @@ function createChannel(ctx, initialAgent, options) {
19467
19665
  }
19468
19666
  },
19469
19667
  settingsHost() {
19470
- if (settingsHostResolved) return settingsHostCache;
19471
- settingsHostResolved = true;
19668
+ if (settingsHostCache) return settingsHostCache;
19472
19669
  const settings = ctx.get("settings");
19473
19670
  const credentials = ctx.get("credentials");
19474
19671
  if (!settings) return void 0;
19475
19672
  settingsHostCache = {
19673
+ subscribe(listener) {
19674
+ let active = true;
19675
+ const dispose = ctx.on("settings/document-updated", () => {
19676
+ queueMicrotask(() => {
19677
+ if (active) listener();
19678
+ });
19679
+ });
19680
+ return () => {
19681
+ active = false;
19682
+ dispose();
19683
+ };
19684
+ },
19476
19685
  listNamespaces() {
19477
19686
  return settings.describe({ redactSecrets: true }).map((descriptor) => ({
19478
19687
  ns: descriptor.ns,
@@ -19516,6 +19725,7 @@ function createChannel(ctx, initialAgent, options) {
19516
19725
  const maasEnabled = modelCatalog?.maasToggleable === false ? modelCatalog.maasEnabled?.bind(modelCatalog) : void 0;
19517
19726
  const catalogMembers = () => new Set(llm.listConfigurableProviders().filter((entry) => entry.settingsNs === "llm-pi-ai" && entry.declared !== true).map((entry) => entry.provider));
19518
19727
  return {
19728
+ customModels: createCustomModelSettingsStore(join(resolveChatCodeCliHome(), "settings.json")),
19519
19729
  ...oauthApi === void 0 ? {} : { oauth: oauthApi },
19520
19730
  ...maasEnabled !== void 0 ? { maas: {
19521
19731
  enabled: maasEnabled,
@@ -19524,7 +19734,7 @@ function createChannel(ctx, initialAgent, options) {
19524
19734
  }
19525
19735
  } } : maasNamespace ? { maas: {
19526
19736
  enabled() {
19527
- return settings.get("llm-chatcode-config")?.enableMaas === true;
19737
+ return settingsValue(settings, "llm-chatcode-config")?.enableMaas === true;
19528
19738
  },
19529
19739
  async setEnabled(enabled) {
19530
19740
  const ops = [{
@@ -19541,7 +19751,7 @@ function createChannel(ctx, initialAgent, options) {
19541
19751
  await modelCatalog?.refresh();
19542
19752
  },
19543
19753
  async listModels() {
19544
- if (settings.get("llm-chatcode-config")?.enableMaas !== true) return [];
19754
+ if (settingsValue(settings, "llm-chatcode-config")?.enableMaas !== true) return [];
19545
19755
  return llm.listModels(CHATCODE_MAAS_PROVIDER);
19546
19756
  }
19547
19757
  } } : {},
@@ -19552,11 +19762,11 @@ function createChannel(ctx, initialAgent, options) {
19552
19762
  }));
19553
19763
  },
19554
19764
  routeExists(route) {
19555
- const section = settings.get("llm-pi-ai");
19765
+ const section = settingsValue(settings, "llm-pi-ai");
19556
19766
  return section?.providers !== void 0 && route in section.providers;
19557
19767
  },
19558
19768
  listRefUsers(ref, exceptRoute) {
19559
- const providers = settings.get("llm-pi-ai")?.providers;
19769
+ const providers = settingsValue(settings, "llm-pi-ai")?.providers;
19560
19770
  if (providers === void 0 || typeof providers !== "object" || providers === null) return [];
19561
19771
  return Object.entries(providers).flatMap(([route, profile]) => {
19562
19772
  if (route === exceptRoute) return [];
@@ -19566,7 +19776,7 @@ function createChannel(ctx, initialAgent, options) {
19566
19776
  },
19567
19777
  listConfiguredProviders() {
19568
19778
  const descriptor = settings.describe().find((row) => row.ns === "llm-pi-ai");
19569
- const providers = (descriptor?.user !== void 0 ? descriptor.user : settings.get("llm-pi-ai"))?.providers;
19779
+ const providers = (descriptor?.user !== void 0 ? descriptor.user : settingsValue(settings, "llm-pi-ai"))?.providers;
19570
19780
  if (providers === void 0 || typeof providers !== "object" || providers === null) return [];
19571
19781
  const catalog = catalogMembers();
19572
19782
  return Object.entries(providers).flatMap(([route, profile]) => {
@@ -19594,6 +19804,9 @@ function createChannel(ctx, initialAgent, options) {
19594
19804
  discoverModels(request) {
19595
19805
  return llm.discoverModels("llm-pi-ai", request);
19596
19806
  },
19807
+ testCustomModel(request) {
19808
+ return testCustomModelConnection(request);
19809
+ },
19597
19810
  async testModel(provider, model, prompt) {
19598
19811
  const outcome = await runSideQuestion({
19599
19812
  stream: llm.stream.bind(llm),
@@ -21324,7 +21537,7 @@ ${output}
21324
21537
  }
21325
21538
  switch (event.type) {
21326
21539
  case "user/message": {
21327
- if (event.data.source.kind === "plugin" && event.data.source.plugin === "compact") {
21540
+ if (isCompactionCheckpointSource(event.data.source)) {
21328
21541
  const summary = textOf(event.data.content);
21329
21542
  state.rows.push({
21330
21543
  id: nextRowId,
@@ -22005,11 +22218,9 @@ function normalizeCwd(path, caseInsensitive) {
22005
22218
  return caseInsensitive ? normalized.toLowerCase() : normalized;
22006
22219
  }
22007
22220
  /**
22008
- * `/resume` project filter (issue #96): exact cwd match, PLUS sessions
22009
- * recorded in a subdirectory — pre-upgrade launches recorded the launch
22010
- * subdirectory as the header cwd, and with the cwd default now resolving to
22011
- * the git worktree root an exact match would hide those sessions forever.
22012
- * They belong to the same workspace, so they stay listed. Comparison follows
22221
+ * `/resume` project filter: exact cwd match, PLUS ancestor/descendant sessions
22222
+ * for compatibility with logs recorded at either a launch subdirectory or
22223
+ * a Git worktree root. Sibling subtrees remain hidden. Comparison follows
22013
22224
  * the platform's filesystem semantics (case-insensitive on Windows — a
22014
22225
  * pre-upgrade header may record `C:\Repo` where the current launch resolves
22015
22226
  * `c:\repo`). `caseInsensitive` is a parameter (not a platform read) so the
@@ -22339,7 +22550,7 @@ async function expandMentions(fs, cwd, text, attachments, stagedImages) {
22339
22550
  };
22340
22551
  }
22341
22552
  //#endregion
22342
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/childStderr.js
22553
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/childStderr.js
22343
22554
  /**
22344
22555
  * Child-process stderr guard (issue #17).
22345
22556
  *
@@ -22508,7 +22719,7 @@ function createChildStderrReporter(notify, options = {}) {
22508
22719
  };
22509
22720
  }
22510
22721
  //#endregion
22511
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/questions.js
22722
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/questions.js
22512
22723
  /**
22513
22724
  * Ask-user-question store — the UI-side half of the DSH user-interaction
22514
22725
  * seam (`ctx.userQuestions`). The harness's model-facing
@@ -22748,7 +22959,7 @@ var QuestionStore = class {
22748
22959
  }
22749
22960
  };
22750
22961
  //#endregion
22751
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/providerGuard.js
22962
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/providerGuard.js
22752
22963
  /**
22753
22964
  * Question-provider seat guard (issue #98 security follow-up).
22754
22965
  *
@@ -22860,7 +23071,7 @@ function incumbentQuestionProviderId(service) {
22860
23071
  } catch {}
22861
23072
  }
22862
23073
  //#endregion
22863
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/questions-answerer.js
23074
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/questions-answerer.js
22864
23075
  /**
22865
23076
  * User-question answerer compatibility.
22866
23077
  *
@@ -22919,7 +23130,7 @@ function prepareQuestionAnswerer(ctx, service, answerer) {
22919
23130
  }
22920
23131
  }
22921
23132
  //#endregion
22922
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/approvals.js
23133
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/approvals.js
22923
23134
  /**
22924
23135
  * Approval store — the UI-side answerer half of the DSH approval seam
22925
23136
  * (`ctx.approval`). The harness's permission layer asks
@@ -23313,7 +23524,7 @@ var ApprovalStore = class {
23313
23524
  }
23314
23525
  };
23315
23526
  //#endregion
23316
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/promptDebug.js
23527
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/promptDebug.js
23317
23528
  /**
23318
23529
  * On-demand capture of every final AgentLoop request context observed for a
23319
23530
  * live session.
@@ -23459,7 +23670,7 @@ function registerPromptDebug(ctx) {
23459
23670
  }));
23460
23671
  }
23461
23672
  //#endregion
23462
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/migrationPrefs.js
23673
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/migrationPrefs.js
23463
23674
  /**
23464
23675
  * One-time local migrations (`~/.chatcode-cli/tui/migrations.json`), keyed by stable
23465
23676
  * migration id → ISO timestamp. Named keys (not a bare flag) so later
@@ -23550,7 +23761,7 @@ async function commitFullscreenFactoryMigration(plan, options) {
23550
23761
  } catch {}
23551
23762
  }
23552
23763
  //#endregion
23553
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/retired-packaged-presets.js
23764
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/retired-packaged-presets.js
23554
23765
  const OWNER = "@chatcode/cco-tui";
23555
23766
  const MARKER = ".dsh-tui-managed.json";
23556
23767
  const RETIRED_PACKAGED_PRESETS = ["liangshen"];
@@ -23592,44 +23803,20 @@ function cleanupRetiredPackagedPresets(options = {}) {
23592
23803
  return results;
23593
23804
  }
23594
23805
  //#endregion
23595
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/workspaceRoot.js
23596
- /**
23597
- * Session working-directory resolution (issue #96, bug 2).
23598
- *
23599
- * The bare `process.cwd()` default made `@` file completion, mention
23600
- * expansion, and the statusline all relative to wherever `dsh` happened to
23601
- * be launched — launching from a repo SUBDIRECTORY listed that subdirectory
23602
- * instead of the repository the user is working in. The default now walks
23603
- * up from the launch directory to the nearest git worktree root (the
23604
- * workspace a coding agent is expected to operate on, Codex-style), falling
23605
- * back to the launch directory itself outside any worktree. An explicit
23606
- * cordis.yml `cwd` always wins.
23607
- */
23806
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/workspaceRoot.js
23807
+ /** Resolve a fresh session's working directory without widening it to a Git ancestor. */
23608
23808
  /**
23609
- * Resolve the session cwd: an explicit `configured` value wins (resolved
23610
- * against the launch directory); otherwise the nearest ancestor of `start`
23611
- * containing a `.git` entry — a DIRECTORY for a plain clone, a FILE for a
23612
- * linked worktree or submodule — and `start` itself when no worktree
23613
- * encloses it.
23809
+ * Explicit configuration wins; otherwise keep the invoking directory, even
23810
+ * inside a larger Git worktree. Resumed sessions retain their persisted cwd.
23811
+ * @param configured - Optional directory, absolute or relative to `start`.
23812
+ * @param start - Launch directory, defaulting to the process working directory.
23813
+ * @returns Absolute working directory for a fresh session.
23614
23814
  */
23615
23815
  function resolveSessionCwd(configured, start = process.cwd()) {
23616
- if (configured !== void 0 && configured !== "") return resolve(configured);
23617
- return gitWorktreeRoot(start) ?? start;
23618
- }
23619
- /** Nearest ancestor of `start` (itself included) that is a git worktree root. */
23620
- function gitWorktreeRoot(start) {
23621
- let dir = resolve(start);
23622
- const home = homedir();
23623
- for (;;) {
23624
- if (dir === home) return void 0;
23625
- if (existsSync(join(dir, ".git"))) return dir;
23626
- const parent = dirname(dir);
23627
- if (parent === dir) return void 0;
23628
- dir = parent;
23629
- }
23816
+ return resolve(start, configured ?? "");
23630
23817
  }
23631
23818
  //#endregion
23632
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/openExternal.js
23819
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/openExternal.js
23633
23820
  /**
23634
23821
  * Open URLs, files and folders with the platform's default handler, fully
23635
23822
  * detached from the TUI process (fire-and-forget: no stdio pipes, no wait,
@@ -23790,13 +23977,13 @@ function revealInFileManager(filePath) {
23790
23977
  if (existsSync(dir)) openExternal(dir);
23791
23978
  }
23792
23979
  //#endregion
23793
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/chatCodeApi.js
23980
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/chatCodeApi.js
23794
23981
  /** ChatCode API request capability. Credentials stay in the host adapter. */
23795
23982
  const CHATCODE_API_BASE_URL = "https://chatcode.chinaunicom.cn";
23796
23983
  /** Each mounted TUI receives its own host-authorized request function. */
23797
23984
  const ChatCodeApiContext = (0, import_react.createContext)(void 0);
23798
23985
  //#endregion
23799
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/releaseNotes.js
23986
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/releaseNotes.js
23800
23987
  const RELEASE_NOTE_PATH = join(DATA_DIR, "release-notes.json");
23801
23988
  const RELEASE_NOTE_ENDPOINT = `${CHATCODE_API_BASE_URL}/chatcode/api/v1/cli/version/release-note`;
23802
23989
  function acknowledgedVersion() {
@@ -23892,7 +24079,7 @@ var ReleaseNotesStore = class {
23892
24079
  }
23893
24080
  };
23894
24081
  //#endregion
23895
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/version.js
24082
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/version.js
23896
24083
  const MAIN_CLI_PACKAGES = new Set(["@chatcode/chatcode-cli", "@chatcode/chatcode-cli-test"]);
23897
24084
  const VERSION_PATTERN = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/u;
23898
24085
  const PRODUCT_VERSION_ENV = "CHATCODE_CLI_PRODUCT_VERSION";
@@ -23932,7 +24119,7 @@ function resolveProductVersion(options = {}) {
23932
24119
  /** Product version shown by the TUI, shared with `cco --version` and Web. */
23933
24120
  const PRODUCT_VERSION = resolveProductVersion();
23934
24121
  //#endregion
23935
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/execFileNoThrow.js
24122
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/execFileNoThrow.js
23936
24123
  const MAX_CAPTURE_BYTES = 64 * 1024;
23937
24124
  function appendBounded(chunks, chunk, total) {
23938
24125
  if (total.value >= MAX_CAPTURE_BYTES) return;
@@ -24002,7 +24189,7 @@ function execFileNoThrow(file, args = [], options) {
24002
24189
  });
24003
24190
  }
24004
24191
  //#endregion
24005
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/herdr.js
24192
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/herdr.js
24006
24193
  const REPORT_TIMEOUT_MS = 2e3;
24007
24194
  const RELEASE_TIMEOUT_MS = 500;
24008
24195
  const RETRY_DELAYS_MS = [
@@ -24390,7 +24577,7 @@ var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJSMin(((expo
24390
24577
  })();
24391
24578
  }));
24392
24579
  //#endregion
24393
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/themePrefs.js
24580
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/themePrefs.js
24394
24581
  var import_jsx_runtime = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
24395
24582
  if (process.env.NODE_ENV === "production") module.exports = require_react_jsx_runtime_production();
24396
24583
  else module.exports = require_react_jsx_runtime_development();
@@ -24447,7 +24634,7 @@ function writeThemePref(name, dir = PREFS_DIR) {
24447
24634
  }
24448
24635
  }
24449
24636
  //#endregion
24450
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/hooks/useRuntimeThemeSnapshot.js
24637
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/hooks/useRuntimeThemeSnapshot.js
24451
24638
  const EMPTY_THEME_SNAPSHOT = Object.freeze([]);
24452
24639
  const subscribeNoThemes = (_listener) => () => {};
24453
24640
  /**
@@ -24475,7 +24662,7 @@ function useRuntimeThemeSnapshot(themeHost) {
24475
24662
  return import_react.useSyncExternalStore(subscribeThemes, getThemeSnapshot, getThemeSnapshot);
24476
24663
  }
24477
24664
  //#endregion
24478
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/event.js
24665
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/event.js
24479
24666
  /**
24480
24667
  * Base class for events with immediate-propagation control.
24481
24668
  *
@@ -24499,7 +24686,7 @@ var Event = class {
24499
24686
  }
24500
24687
  };
24501
24688
  //#endregion
24502
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/emitter.js
24689
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/emitter.js
24503
24690
  /**
24504
24691
  * Node-compatible event emitter that is aware of the `Event` class, so
24505
24692
  * `emit` respects `stopImmediatePropagation()` on dispatched events.
@@ -24532,7 +24719,7 @@ var EventEmitter$1 = class extends EventEmitter {
24532
24719
  }
24533
24720
  };
24534
24721
  //#endregion
24535
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/StdinContext.js
24722
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/StdinContext.js
24536
24723
  /**
24537
24724
  * `StdinContext` is a React context, which exposes input stream.
24538
24725
  */
@@ -24546,14 +24733,14 @@ const StdinContext = (0, import_react.createContext)({
24546
24733
  });
24547
24734
  StdinContext.displayName = "InternalStdinContext";
24548
24735
  //#endregion
24549
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-stdin.js
24736
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-stdin.js
24550
24737
  /**
24551
24738
  * React hook exposing the stdin stream and raw-mode helpers from `StdinContext`.
24552
24739
  * @returns the `StdinContext` value.
24553
24740
  */
24554
24741
  const useStdin = () => (0, import_react.useContext)(StdinContext);
24555
24742
  //#endregion
24556
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/ansi.js
24743
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/ansi.js
24557
24744
  /**
24558
24745
  * ANSI Control Characters and Escape Sequence Introducers
24559
24746
  *
@@ -24627,7 +24814,7 @@ function isEscFinal(byte) {
24627
24814
  return byte >= 48 && byte <= 126;
24628
24815
  }
24629
24816
  //#endregion
24630
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/csi.js
24817
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/csi.js
24631
24818
  /**
24632
24819
  * CSI (Control Sequence Introducer) Types
24633
24820
  *
@@ -24943,7 +25130,7 @@ const ENABLE_WIN32_INPUT_MODE = csi("?9001h");
24943
25130
  */
24944
25131
  const DISABLE_WIN32_INPUT_MODE = csi("?9001l");
24945
25132
  //#endregion
24946
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/env.js
25133
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/env.js
24947
25134
  /**
24948
25135
  * Minimal terminal-environment shim for the ported Ink core. The original
24949
25136
  * module computed a richer `env` object from the Claude Code app context; the
@@ -24952,7 +25139,7 @@ const DISABLE_WIN32_INPUT_MODE = csi("?9001l");
24952
25139
  */
24953
25140
  const env$1 = { terminal: (process.env.TERM_PROGRAM ?? process.env.TERM ?? "unknown").toLowerCase() };
24954
25141
  //#endregion
24955
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/osc.js
25142
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/osc.js
24956
25143
  /**
24957
25144
  * OSC (Operating System Command) Types and Parser
24958
25145
  */
@@ -25348,7 +25535,7 @@ function supportsTabStatus() {
25348
25535
  return process.env.USER_TYPE === "ant";
25349
25536
  }
25350
25537
  //#endregion
25351
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/terminal-querier.js
25538
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/terminal-querier.js
25352
25539
  /**
25353
25540
  * Query the terminal and await responses without timeouts.
25354
25541
  *
@@ -25534,7 +25721,7 @@ var TerminalQuerier = class {
25534
25721
  }
25535
25722
  };
25536
25723
  //#endregion
25537
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/ThemeProvider.js
25724
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/ThemeProvider.js
25538
25725
  /**
25539
25726
  * Theme provider with terminal-background auto-detection. With no explicit
25540
25727
  * `theme` prop, no CHATCODE_CLI_TUI_THEME override and no persisted choice
@@ -25733,7 +25920,7 @@ function useTheme() {
25733
25920
  return [theme, setTheme];
25734
25921
  }
25735
25922
  //#endregion
25736
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/settingsEditor.js
25923
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/settingsEditor.js
25737
25924
  /**
25738
25925
  * React-free form model behind the `/settings` screen (issue #165), mirroring
25739
25926
  * the web front door's card-form.ts semantics: a section stages what the user
@@ -25977,7 +26164,7 @@ var SettingsForm = class {
25977
26164
  }
25978
26165
  };
25979
26166
  //#endregion
25980
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/reload.js
26167
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/reload.js
25981
26168
  /**
25982
26169
  * `/reload` planning — the pi-style soft reload: re-read the TUI's persisted
25983
26170
  * preference files (`~/.chatcode-cli/tui/{theme,lang,agent-preset,model,
@@ -26826,7 +27013,7 @@ var SignalExit = class extends SignalExitBase {
26826
27013
  const process$2 = globalThis.process;
26827
27014
  const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
26828
27015
  //#endregion
26829
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/native-ts/yoga-layout/enums.js
27016
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/native-ts/yoga-layout/enums.js
26830
27017
  /**
26831
27018
  * Yoga enums — ported from yoga-layout/src/generated/YGEnums.ts
26832
27019
  * Kept as `const` objects (not TS enums) per repo convention.
@@ -26958,7 +27145,7 @@ const Wrap = {
26958
27145
  WrapReverse: 2
26959
27146
  };
26960
27147
  //#endregion
26961
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/native-ts/yoga-layout/index.js
27148
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/native-ts/yoga-layout/index.js
26962
27149
  /**
26963
27150
  * Pure-TypeScript port of yoga-layout (Meta's flexbox engine).
26964
27151
  *
@@ -29409,7 +29596,7 @@ Object.defineProperties(createChalk.prototype, {
29409
29596
  const chalk = createChalk();
29410
29597
  createChalk({ level: stderrColor ? stderrColor.level : 0 });
29411
29598
  //#endregion
29412
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/colorize.js
29599
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/colorize.js
29413
29600
  /**
29414
29601
  * xterm.js (VS Code, Cursor, code-server, Coder) has supported truecolor
29415
29602
  * since 2017, but code-server/Coder containers often don't set
@@ -29540,7 +29727,7 @@ function applyColor(text, color) {
29540
29727
  return colorize(text, color, "foreground");
29541
29728
  }
29542
29729
  //#endregion
29543
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/envUtils.js
29730
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/envUtils.js
29544
29731
  /**
29545
29732
  * Environment truthiness check for the ported Ink core. Accepts the common
29546
29733
  * shell truthy spellings (`1`, `true`, `yes`, `on`).
@@ -29558,7 +29745,7 @@ function isEnvTruthy(value) {
29558
29745
  ].includes(value.toLowerCase());
29559
29746
  }
29560
29747
  //#endregion
29561
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/fullscreen.js
29748
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/fullscreen.js
29562
29749
  /**
29563
29750
  * Whether mouse click handling is disabled for the ported Ink core. dsh-tui
29564
29751
  * reads its own env flag (`CHATCODE_CLI_TUI_DISABLE_MOUSE`); the original module
@@ -29569,7 +29756,7 @@ function isMouseClicksDisabled() {
29569
29756
  return isEnvTruthy(readTuiEnv("DISABLE_MOUSE"));
29570
29757
  }
29571
29758
  //#endregion
29572
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/input-suppression.js
29759
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/input-suppression.js
29573
29760
  /**
29574
29761
  * Input suppression window for terminal handoffs (issue #123): when stdin is
29575
29762
  * handed to an external TUI (full-screen editor) and back, the tty can
@@ -29596,7 +29783,7 @@ function isInputSuppressed() {
29596
29783
  return Date.now() < suppressedUntil;
29597
29784
  }
29598
29785
  //#endregion
29599
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/tokenize.js
29786
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/tokenize.js
29600
29787
  /**
29601
29788
  * Input Tokenizer - Escape sequence boundary detection
29602
29789
  *
@@ -29794,7 +29981,7 @@ function tokenize$2(input, initialState, initialBuffer, flush, x10Mouse, splitIn
29794
29981
  };
29795
29982
  }
29796
29983
  //#endregion
29797
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/parse-keypress.js
29984
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/parse-keypress.js
29798
29985
  /**
29799
29986
  * Keyboard input parser - converts terminal input to key events
29800
29987
  *
@@ -30858,7 +31045,7 @@ function createWheelKey(s, name, col, row, button) {
30858
31045
  };
30859
31046
  }
30860
31047
  //#endregion
30861
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/input-event.js
31048
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/input-event.js
30862
31049
  function parseKey(keypress) {
30863
31050
  const key = {
30864
31051
  upArrow: keypress.name === "up",
@@ -30943,7 +31130,7 @@ var InputEvent = class extends Event {
30943
31130
  }
30944
31131
  };
30945
31132
  //#endregion
30946
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/terminal-focus-event.js
31133
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/terminal-focus-event.js
30947
31134
  /**
30948
31135
  * Event fired when the terminal window gains or loses focus.
30949
31136
  *
@@ -30962,7 +31149,7 @@ var TerminalFocusEvent = class extends Event {
30962
31149
  }
30963
31150
  };
30964
31151
  //#endregion
30965
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/node-cache.js
31152
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/node-cache.js
30966
31153
  /** Layout bounds cached per rendered node, used for blitting and clearing. */
30967
31154
  const nodeCache = /* @__PURE__ */ new WeakMap();
30968
31155
  /** Rects of removed children that need clearing on next render */
@@ -31000,7 +31187,7 @@ function consumeAbsoluteRemovedFlag() {
31000
31187
  return had;
31001
31188
  }
31002
31189
  //#endregion
31003
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/terminal-event.js
31190
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/terminal-event.js
31004
31191
  /**
31005
31192
  * Base class for all terminal events with DOM-style propagation.
31006
31193
  *
@@ -31129,7 +31316,7 @@ var TerminalEvent = class extends Event {
31129
31316
  _prepareForTarget(_target) {}
31130
31317
  };
31131
31318
  //#endregion
31132
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/pointer-event.js
31319
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/pointer-event.js
31133
31320
  /**
31134
31321
  * Base class for pointer-derived terminal events (click, wheel, hover).
31135
31322
  *
@@ -31190,7 +31377,7 @@ var PointerEvent = class extends TerminalEvent {
31190
31377
  }
31191
31378
  };
31192
31379
  //#endregion
31193
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/drag-event.js
31380
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/drag-event.js
31194
31381
  /**
31195
31382
  * Component-level drag event (DOM HTML5 drag semantics subset).
31196
31383
  *
@@ -47298,7 +47485,7 @@ var require_react_reconciler_development = /* @__PURE__ */ __commonJSMin(((expor
47298
47485
  }, module.exports.default = module.exports, Object.defineProperty(module.exports, "__esModule", { value: !0 }));
47299
47486
  }));
47300
47487
  //#endregion
47301
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/layout/node.js
47488
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/layout/node.js
47302
47489
  var import_react_reconciler = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
47303
47490
  if (process.env.NODE_ENV === "production") module.exports = require_react_reconciler_production();
47304
47491
  else module.exports = require_react_reconciler_development();
@@ -47374,7 +47561,7 @@ const LayoutMeasureMode = {
47374
47561
  AtMost: "at-most"
47375
47562
  };
47376
47563
  //#endregion
47377
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/layout/yoga.js
47564
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/layout/yoga.js
47378
47565
  const EDGE_MAP = {
47379
47566
  all: Edge.All,
47380
47567
  horizontal: Edge.Horizontal,
@@ -47601,7 +47788,7 @@ function createYogaLayoutNode() {
47601
47788
  return new YogaLayoutNode(YOGA_INSTANCE.Node.create());
47602
47789
  }
47603
47790
  //#endregion
47604
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/layout/engine.js
47791
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/layout/engine.js
47605
47792
  /**
47606
47793
  * Create a new layout node backed by the Yoga adapter.
47607
47794
  * @returns an empty layout node with no children, styles, or measure function.
@@ -47610,7 +47797,7 @@ function createLayoutNode() {
47610
47797
  return createYogaLayoutNode();
47611
47798
  }
47612
47799
  //#endregion
47613
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/line-width-cache.js
47800
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/line-width-cache.js
47614
47801
  const cache = /* @__PURE__ */ new Map();
47615
47802
  const MAX_CACHE_SIZE = 4096;
47616
47803
  const MAX_CACHE_CHARS = 1e5;
@@ -47646,7 +47833,7 @@ function lineWidth(line) {
47646
47833
  return width;
47647
47834
  }
47648
47835
  //#endregion
47649
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/measure-text.js
47836
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/measure-text.js
47650
47837
  /**
47651
47838
  * Measure wrapped text dimensions in a single pass.
47652
47839
  * @param text - the text to measure.
@@ -47677,7 +47864,7 @@ function measureText(text, maxWidth) {
47677
47864
  };
47678
47865
  }
47679
47866
  //#endregion
47680
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/squash-text-nodes.js
47867
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/squash-text-nodes.js
47681
47868
  /**
47682
47869
  * Squash text nodes into styled segments, propagating styles down through the tree.
47683
47870
  * This allows structured styling without relying on ANSI string transforms.
@@ -47725,7 +47912,7 @@ function squashTextNodes(node) {
47725
47912
  return text;
47726
47913
  }
47727
47914
  //#endregion
47728
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/tabstops.js
47915
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/tabstops.js
47729
47916
  const DEFAULT_TAB_INTERVAL = 8;
47730
47917
  /**
47731
47918
  * Expand tab characters to spaces at fixed column intervals, preserving
@@ -48175,7 +48362,7 @@ function tokenize$1(str, endChar = Number.POSITIVE_INFINITY) {
48175
48362
  return ret;
48176
48363
  }
48177
48364
  //#endregion
48178
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/sliceAnsi.js
48365
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/sliceAnsi.js
48179
48366
  function isEndCode(code) {
48180
48367
  return code.code === code.endCode;
48181
48368
  }
@@ -48792,7 +48979,7 @@ function wrapAnsi$1(string, columns, options) {
48792
48979
  return normalizeText(String(string)).replaceAll("\r\n", "\n").split("\n").map((line) => exec(expandTabs$1(line), columns, options)).join("\n");
48793
48980
  }
48794
48981
  //#endregion
48795
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/wrapAnsi.js
48982
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/wrapAnsi.js
48796
48983
  const wrapAnsiBun = typeof Bun !== "undefined" && typeof Bun.wrapAnsi === "function" ? Bun.wrapAnsi : null;
48797
48984
  const SLOT_MIN_LENGTH = 2048;
48798
48985
  let slot = null;
@@ -48839,7 +49026,7 @@ function wrapAnsiNpmIncremental(input, columns, options) {
48839
49026
  */
48840
49027
  const wrapAnsi = wrapAnsiBun ?? wrapAnsiNpmIncremental;
48841
49028
  //#endregion
48842
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/wrap-text.js
49029
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/wrap-text.js
48843
49030
  const ELLIPSIS = "…";
48844
49031
  const WRAP_CACHE_MAX_ENTRIES = 2048;
48845
49032
  const WRAP_CACHE_MAX_CHARS = 2e6;
@@ -48903,7 +49090,7 @@ function wrapText$1(text, maxWidth, wrapType) {
48903
49090
  return text;
48904
49091
  }
48905
49092
  //#endregion
48906
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/dom.js
49093
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/dom.js
48907
49094
  /**
48908
49095
  * Create an element node of the given kind, allocating its yoga layout node
48909
49096
  * unless the kind renders without layout (`ink-virtual-text`, `ink-link`,
@@ -49223,7 +49410,7 @@ function findOwnerChainAtRow(root, y) {
49223
49410
  }
49224
49411
  }
49225
49412
  //#endregion
49226
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/event-handlers.js
49413
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/event-handlers.js
49227
49414
  /**
49228
49415
  * Reverse lookup: event type string → handler prop names.
49229
49416
  * Used by the dispatcher for O(1) handler lookup per node.
@@ -49277,7 +49464,7 @@ const EVENT_HANDLER_PROPS = new Set([
49277
49464
  "onWheel"
49278
49465
  ]);
49279
49466
  //#endregion
49280
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/dispatcher.js
49467
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/dispatcher.js
49281
49468
  function getHandler(node, eventType, capture) {
49282
49469
  const handlers = node._eventHandlers;
49283
49470
  if (!handlers) return void 0;
@@ -49445,7 +49632,7 @@ var Dispatcher = class {
49445
49632
  }
49446
49633
  };
49447
49634
  //#endregion
49448
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/focus-event.js
49635
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/focus-event.js
49449
49636
  /**
49450
49637
  * Focus event for component focus changes.
49451
49638
  *
@@ -49470,7 +49657,7 @@ var FocusEvent = class extends TerminalEvent {
49470
49657
  }
49471
49658
  };
49472
49659
  //#endregion
49473
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/focus.js
49660
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/focus.js
49474
49661
  const MAX_FOCUS_STACK = 32;
49475
49662
  /**
49476
49663
  * DOM-like focus manager for the Ink terminal UI.
@@ -49626,7 +49813,7 @@ function getFocusManager(node) {
49626
49813
  return getRootNode(node).focusManager;
49627
49814
  }
49628
49815
  //#endregion
49629
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/styles.js
49816
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/styles.js
49630
49817
  const applyPositionStyles = (node, style) => {
49631
49818
  if ("position" in style) node.setPositionType(style.position === "absolute" ? LayoutPositionType.Absolute : LayoutPositionType.Relative);
49632
49819
  if ("top" in style) applyPositionEdge(node, "top", style.top);
@@ -49761,7 +49948,7 @@ const styles = (node, style = {}, resolvedStyle) => {
49761
49948
  applyGapStyles(node, style);
49762
49949
  };
49763
49950
  //#endregion
49764
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/reconciler.js
49951
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/reconciler.js
49765
49952
  if (process.env.NODE_ENV === "development") try {
49766
49953
  import("./devtools-la_KkjCS.js");
49767
49954
  } catch (error) {
@@ -50081,7 +50268,7 @@ const reconciler = (0, import_react_reconciler.default)({
50081
50268
  });
50082
50269
  dispatcher.discreteUpdates = reconciler.discreteUpdates.bind(reconciler);
50083
50270
  //#endregion
50084
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/layout/geometry.js
50271
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/layout/geometry.js
50085
50272
  /**
50086
50273
  * Compute the smallest rectangle containing both input rectangles.
50087
50274
  * @param a - the first rectangle.
@@ -50113,7 +50300,7 @@ function clamp(value, min, max) {
50113
50300
  return value;
50114
50301
  }
50115
50302
  //#endregion
50116
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/warn.js
50303
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/warn.js
50117
50304
  /**
50118
50305
  * Log a warning when a value is present but not an integer.
50119
50306
  * @param value - the value to check; undefined is skipped silently.
@@ -50125,7 +50312,7 @@ function ifNotInteger(value, name) {
50125
50312
  logForDebugging(`${name} should be an integer, got ${value}`, { level: "warn" });
50126
50313
  }
50127
50314
  //#endregion
50128
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/screen.js
50315
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/screen.js
50129
50316
  /**
50130
50317
  * Pool of character strings shared across all screens.
50131
50318
  * With a shared pool, interned char IDs are valid across screens, so
@@ -51194,7 +51381,7 @@ function markNoSelectRegion(screen, x, y, width, height) {
51194
51381
  }
51195
51382
  }
51196
51383
  //#endregion
51197
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/selection.js
51384
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/selection.js
51198
51385
  /**
51199
51386
  * Text selection state for fullscreen mode.
51200
51387
  *
@@ -52160,7 +52347,7 @@ function applySelectionOverlay(screen, selection, stylePool) {
52160
52347
  }
52161
52348
  }
52162
52349
  //#endregion
52163
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/dec.js
52350
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/dec.js
52164
52351
  /**
52165
52352
  * DEC (Digital Equipment Corporation) Private Mode Sequences
52166
52353
  *
@@ -52226,7 +52413,7 @@ const ENABLE_MOUSE_TRACKING = decset(DEC.MOUSE_NORMAL) + decset(DEC.MOUSE_BUTTON
52226
52413
  /** Disable all mouse tracking modes enabled by ENABLE_MOUSE_TRACKING. */
52227
52414
  const DISABLE_MOUSE_TRACKING = decreset(DEC.MOUSE_SGR) + decreset(DEC.MOUSE_ANY) + decreset(DEC.MOUSE_BUTTON) + decreset(DEC.MOUSE_NORMAL);
52228
52415
  //#endregion
52229
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/terminal.js
52416
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/terminal.js
52230
52417
  /**
52231
52418
  * True when running inside a JetBrains IDE terminal (JediTerm). The IDE
52232
52419
  * injects `TERMINAL_EMULATOR=JetBrains-JediTerm` into the pty environment of
@@ -52468,7 +52655,7 @@ function writeDiffToTerminal(terminal, diff, skipSyncMarkers = false) {
52468
52655
  terminal.stdout.write(buffer);
52469
52656
  }
52470
52657
  //#endregion
52471
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/terminal-focus-state.js
52658
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/terminal-focus-state.js
52472
52659
  let focusState = "unknown";
52473
52660
  const resolvers = /* @__PURE__ */ new Set();
52474
52661
  const subscribers = /* @__PURE__ */ new Set();
@@ -52512,7 +52699,7 @@ function subscribeTerminalFocus(cb) {
52512
52699
  };
52513
52700
  }
52514
52701
  //#endregion
52515
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/AppContext.js
52702
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/AppContext.js
52516
52703
  /**
52517
52704
  * `AppContext` is a React context, which exposes a method to manually exit the app (unmount).
52518
52705
  */
@@ -52557,13 +52744,13 @@ var require_react_compiler_runtime_development = /* @__PURE__ */ __commonJSMin((
52557
52744
  })();
52558
52745
  }));
52559
52746
  //#endregion
52560
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/constants.js
52747
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/constants.js
52561
52748
  var import_compiler_runtime = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
52562
52749
  if (process.env.NODE_ENV === "production") module.exports = require_react_compiler_runtime_production();
52563
52750
  else module.exports = require_react_compiler_runtime_development();
52564
52751
  })))();
52565
52752
  //#endregion
52566
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/geometry-trace.js
52753
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/geometry-trace.js
52567
52754
  /**
52568
52755
  * Geometry forensics — per-frame scroll-geometry trace (issues #421/#433).
52569
52756
  *
@@ -52643,7 +52830,7 @@ function endGeometryFrame(durationMs) {
52643
52830
  };
52644
52831
  }
52645
52832
  //#endregion
52646
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/TerminalFocusContext.js
52833
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/TerminalFocusContext.js
52647
52834
  const TerminalFocusContext = (0, import_react.createContext)({
52648
52835
  isTerminalFocused: true,
52649
52836
  terminalFocusState: "unknown"
@@ -52678,7 +52865,7 @@ function TerminalFocusProvider(t0) {
52678
52865
  return t2;
52679
52866
  }
52680
52867
  //#endregion
52681
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-terminal-focus.js
52868
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-terminal-focus.js
52682
52869
  /**
52683
52870
  * Hook to check if the terminal has focus.
52684
52871
  *
@@ -52693,7 +52880,7 @@ function useTerminalFocus() {
52693
52880
  return isTerminalFocused;
52694
52881
  }
52695
52882
  //#endregion
52696
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/ClockContext.js
52883
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/ClockContext.js
52697
52884
  function createClock(tickIntervalMs) {
52698
52885
  const subscribers = /* @__PURE__ */ new Map();
52699
52886
  let interval = null;
@@ -52790,7 +52977,7 @@ function _temp() {
52790
52977
  return createClock(16);
52791
52978
  }
52792
52979
  //#endregion
52793
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/CursorDeclarationContext.js
52980
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/CursorDeclarationContext.js
52794
52981
  /**
52795
52982
  * React context that provides the cursor-declaration setter to descendants.
52796
52983
  */
@@ -52830,7 +53017,7 @@ var require_escape_string_regexp = /* @__PURE__ */ __commonJSMin(((exports, modu
52830
53017
  };
52831
53018
  }));
52832
53019
  //#endregion
52833
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/Box.js
53020
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/Box.js
52834
53021
  var import_stack_utils = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
52835
53022
  const escapeStringRegexp = require_escape_string_regexp();
52836
53023
  const cwd = typeof process === "object" && process && typeof process.cwd === "function" ? process.cwd() : ".";
@@ -53198,7 +53385,7 @@ function Box(t0) {
53198
53385
  return t4;
53199
53386
  }
53200
53387
  //#endregion
53201
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/Text.js
53388
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/Text.js
53202
53389
  const memoizedStylesForWrap = {
53203
53390
  wrap: {
53204
53391
  flexGrow: 0,
@@ -53350,7 +53537,7 @@ function Text(t0) {
53350
53537
  return t16;
53351
53538
  }
53352
53539
  //#endregion
53353
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/ErrorOverview.js
53540
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/ErrorOverview.js
53354
53541
  const cleanupPath = (path) => {
53355
53542
  return path?.replace(`file://${process.cwd()}/`, "");
53356
53543
  };
@@ -53455,10 +53642,10 @@ function ErrorOverview({ error }) {
53455
53642
  });
53456
53643
  }
53457
53644
  //#endregion
53458
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/TerminalSizeContext.js
53645
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/TerminalSizeContext.js
53459
53646
  const TerminalSizeContext = (0, import_react.createContext)(null);
53460
53647
  //#endregion
53461
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/useTerminalNotification.js
53648
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/useTerminalNotification.js
53462
53649
  /**
53463
53650
  * React context providing a raw terminal write function. Null until a
53464
53651
  * TerminalWriteProvider is mounted.
@@ -53469,7 +53656,7 @@ const TerminalWriteContext = (0, import_react.createContext)(null);
53469
53656
  */
53470
53657
  const TerminalWriteProvider = TerminalWriteContext.Provider;
53471
53658
  //#endregion
53472
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/App.js
53659
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/App.js
53473
53660
  const SUPPORTS_SUSPEND = process.platform !== "win32";
53474
53661
  const STDIN_RESUME_GAP_MS = 5e3;
53475
53662
  const MULTI_CLICK_TIMEOUT_MS = 500;
@@ -53995,7 +54182,7 @@ function handleMouseEvent(app, m) {
53995
54182
  }
53996
54183
  }
53997
54184
  //#endregion
53998
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/keyboard-event.js
54185
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/keyboard-event.js
53999
54186
  /**
54000
54187
  * Keyboard event dispatched through the DOM tree via capture/bubble.
54001
54188
  *
@@ -54055,7 +54242,7 @@ function keyFromParsed(parsed) {
54055
54242
  return name || seq;
54056
54243
  }
54057
54244
  //#endregion
54058
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/frame.js
54245
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/frame.js
54059
54246
  /**
54060
54247
  * Create an empty frame with a zero-size screen, the given viewport, and a
54061
54248
  * visible cursor at the origin.
@@ -54081,7 +54268,7 @@ function emptyFrame(rows, columns, stylePool, charPool, hyperlinkPool) {
54081
54268
  };
54082
54269
  }
54083
54270
  //#endregion
54084
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/click-event.js
54271
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/click-event.js
54085
54272
  /**
54086
54273
  * Mouse click event. Fired on left-button release without drag, only when
54087
54274
  * mouse tracking is enabled (i.e. inside <AlternateScreen>).
@@ -54112,7 +54299,7 @@ var ClickEvent = class extends PointerEvent {
54112
54299
  }
54113
54300
  };
54114
54301
  //#endregion
54115
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/context-menu-event.js
54302
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/context-menu-event.js
54116
54303
  /**
54117
54304
  * Mouse context-menu event. Fired on right-button press (SGR button 2,
54118
54305
  * low bits of the raw button byte), mirroring the DOM `contextmenu` event
@@ -54136,7 +54323,7 @@ var ContextMenuEvent = class extends PointerEvent {
54136
54323
  }
54137
54324
  };
54138
54325
  //#endregion
54139
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/wheel-event.js
54326
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/events/wheel-event.js
54140
54327
  /**
54141
54328
  * Mouse wheel event dispatched to the ScrollBox under the pointer.
54142
54329
  *
@@ -54172,7 +54359,7 @@ function indentString(string, count = 1, options = {}) {
54172
54359
  return string.replace(regex, indent.repeat(count));
54173
54360
  }
54174
54361
  //#endregion
54175
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/get-max-width.js
54362
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/get-max-width.js
54176
54363
  /**
54177
54364
  * Returns the yoga node's content width (computed width minus padding and
54178
54365
  * border).
@@ -54277,7 +54464,7 @@ var cli_boxes_default = {
54277
54464
  }
54278
54465
  };
54279
54466
  //#endregion
54280
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/render-border.js
54467
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/render-border.js
54281
54468
  /** Built-in border styles beyond those provided by cli-boxes. */
54282
54469
  const CUSTOM_BORDER_STYLES = { dashed: {
54283
54470
  top: "╌",
@@ -54367,7 +54554,7 @@ const renderBorder = (x, y, node, output) => {
54367
54554
  }
54368
54555
  };
54369
54556
  //#endregion
54370
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/widest-line.js
54557
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/widest-line.js
54371
54558
  /**
54372
54559
  * Get the display width of the widest line in a string.
54373
54560
  * @param string - the text to measure, possibly containing newlines.
@@ -54386,7 +54573,7 @@ function widestLine(string) {
54386
54573
  return maxWidth;
54387
54574
  }
54388
54575
  //#endregion
54389
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/render-node-to-output.js
54576
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/render-node-to-output.js
54390
54577
  function isXtermJsHost() {
54391
54578
  return process.env.TERM_PROGRAM === "vscode" || isXtermJs();
54392
54579
  }
@@ -55202,7 +55389,7 @@ function dropSubtreeCache(node) {
55202
55389
  for (const child of node.childNodes) if (child.nodeName !== "#text") dropSubtreeCache(child);
55203
55390
  }
55204
55391
  //#endregion
55205
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hit-test.js
55392
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hit-test.js
55206
55393
  /**
55207
55394
  * Find the deepest DOM element whose rendered rect contains (col, row).
55208
55395
  *
@@ -55592,7 +55779,7 @@ function dispatchHover(root, col, row, hovered) {
55592
55779
  }
55593
55780
  }
55594
55781
  //#endregion
55595
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/flush-tick.js
55782
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/flush-tick.js
55596
55783
  /**
55597
55784
  * Monotonic terminal-flush counter for the ported Ink core.
55598
55785
  *
@@ -55625,7 +55812,7 @@ function getTerminalFlushTick() {
55625
55812
  return flushTick;
55626
55813
  }
55627
55814
  //#endregion
55628
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/instances.js
55815
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/instances.js
55629
55816
  /**
55630
55817
  * Live Ink instances keyed by their output stream, so consecutive render()
55631
55818
  * calls reuse the instance for a stream instead of creating a new one.
@@ -55634,7 +55821,7 @@ function getTerminalFlushTick() {
55634
55821
  */
55635
55822
  const instances = /* @__PURE__ */ new Map();
55636
55823
  //#endregion
55637
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/log-update.js
55824
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/log-update.js
55638
55825
  const CARRIAGE_RETURN = { type: "carriageReturn" };
55639
55826
  const NEWLINE = {
55640
55827
  type: "stdout",
@@ -56250,7 +56437,7 @@ var VirtualScreen = class {
56250
56437
  }
56251
56438
  };
56252
56439
  //#endregion
56253
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/optimizer.js
56440
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/optimizer.js
56254
56441
  /**
56255
56442
  * Optimize a diff by applying all optimization rules in a single pass.
56256
56443
  * This reduces the number of patches that need to be written to the terminal.
@@ -56315,7 +56502,7 @@ function optimize(diff) {
56315
56502
  return result;
56316
56503
  }
56317
56504
  //#endregion
56318
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/bidi.js
56505
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/bidi.js
56319
56506
  var import_bidi = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
56320
56507
  (function(global, factory) {
56321
56508
  typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global.bidi_js = factory());
@@ -57091,7 +57278,7 @@ function hasRTLCharacters(text) {
57091
57278
  return /[\u0590-\u05FF\uFB1D-\uFB4F\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF\u0780-\u07BF\u0700-\u074F]/u.test(text);
57092
57279
  }
57093
57280
  //#endregion
57094
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/output.js
57281
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/output.js
57095
57282
  /**
57096
57283
  * charCache bounds. The entry-count cap alone was not enough: a streaming
57097
57284
  * line produces a NEW cache key on every frame, and each entry's cost is
@@ -57761,7 +57948,7 @@ function writeLineToScreen(screen, line, x, y, screenWidth, stylePool, charCache
57761
57948
  return offsetX;
57762
57949
  }
57763
57950
  //#endregion
57764
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/render-to-screen.js
57951
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/render-to-screen.js
57765
57952
  const timing = {
57766
57953
  reconcile: 0,
57767
57954
  yoga: 0,
@@ -57855,7 +58042,7 @@ function applyPositionedHighlight(screen, stylePool, positions, rowOffset, curre
57855
58042
  return true;
57856
58043
  }
57857
58044
  //#endregion
57858
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/renderer.js
58045
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/renderer.js
57859
58046
  /**
57860
58047
  * Create the renderer function for a root DOM node. The returned renderer
57861
58048
  * reuses an Output across frames so its character cache persists.
@@ -57930,7 +58117,7 @@ function createRenderer(node, stylePool) {
57930
58117
  };
57931
58118
  }
57932
58119
  //#endregion
57933
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/searchHighlight.js
58120
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/searchHighlight.js
57934
58121
  /**
57935
58122
  * Highlight all visible occurrences of `query` in the screen buffer by
57936
58123
  * inverting cell styles (SGR 7). Post-render, same damage-tracking machinery
@@ -57992,7 +58179,7 @@ function applySearchHighlight(screen, query, stylePool) {
57992
58179
  return applied;
57993
58180
  }
57994
58181
  //#endregion
57995
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/ink.js
58182
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/ink.js
57996
58183
  const ALT_SCREEN_ANCHOR_CURSOR = Object.freeze({
57997
58184
  x: 0,
57998
58185
  y: 0,
@@ -59545,7 +59732,7 @@ const CONSOLE_STDERR_METHODS = [
59545
59732
  "trace"
59546
59733
  ];
59547
59734
  //#endregion
59548
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/root.js
59735
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/root.js
59549
59736
  /**
59550
59737
  * Mount a component and render the output.
59551
59738
  * @param node - the React element to render.
@@ -59628,7 +59815,7 @@ const getInstance = (stdout, createInstance) => {
59628
59815
  return instance;
59629
59816
  };
59630
59817
  //#endregion
59631
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/ThemedBox.js
59818
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/ThemedBox.js
59632
59819
  /** Resolves a color value that may be a theme key to a raw Color. */
59633
59820
  function resolveColor$1(color, theme) {
59634
59821
  if (!color) return void 0;
@@ -59653,7 +59840,7 @@ function ThemedBox({ borderColor, borderTopColor, borderBottomColor, borderLeftC
59653
59840
  });
59654
59841
  }
59655
59842
  //#endregion
59656
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/ThemedText.js
59843
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/ThemedText.js
59657
59844
  /**
59658
59845
  * Colors uncolored ThemedText in the subtree. Precedence: explicit `color` >
59659
59846
  * this > dimColor (in the Claude Code visual language, where message rows
@@ -59689,7 +59876,7 @@ function ThemedText({ color, backgroundColor, dimColor = false, bold = false, it
59689
59876
  });
59690
59877
  }
59691
59878
  //#endregion
59692
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/Spacer.js
59879
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/Spacer.js
59693
59880
  /**
59694
59881
  * A flexible space that expands along the major axis of its containing layout.
59695
59882
  * It's useful as a shortcut for filling all the available spaces between elements.
@@ -59704,7 +59891,7 @@ function Spacer() {
59704
59891
  return t0;
59705
59892
  }
59706
59893
  //#endregion
59707
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/Newline.js
59894
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/Newline.js
59708
59895
  /**
59709
59896
  * Adds one or more newline (\n) characters. Must be used within <Text> components.
59710
59897
  */
@@ -59727,7 +59914,7 @@ function Newline(t0) {
59727
59914
  return t3;
59728
59915
  }
59729
59916
  //#endregion
59730
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/NoSelect.js
59917
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/NoSelect.js
59731
59918
  /**
59732
59919
  * Marks its contents as non-selectable in fullscreen text selection.
59733
59920
  * Cells inside this box are skipped by both the selection highlight and
@@ -59778,7 +59965,7 @@ function NoSelect(t0) {
59778
59965
  return t2;
59779
59966
  }
59780
59967
  //#endregion
59781
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/AlternateScreen.js
59968
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/AlternateScreen.js
59782
59969
  /**
59783
59970
  * Run children in the terminal's alternate screen buffer, constrained to
59784
59971
  * the viewport height. While mounted:
@@ -59853,7 +60040,7 @@ function AlternateScreen(t0) {
59853
60040
  return t5;
59854
60041
  }
59855
60042
  //#endregion
59856
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/ScrollBox.js
60043
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/ScrollBox.js
59857
60044
  /**
59858
60045
  * A Box with `overflow: scroll` and an imperative scroll API.
59859
60046
  *
@@ -60031,7 +60218,7 @@ function ScrollBox({ children, ref, stickyScroll, ...style }) {
60031
60218
  });
60032
60219
  }
60033
60220
  //#endregion
60034
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-input.js
60221
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-input.js
60035
60222
  /**
60036
60223
  * Keep an event listener stable while always dispatching to the latest render's
60037
60224
  * callback. Keeping this hook local is important for packaged installs: a
@@ -60097,7 +60284,7 @@ const useInput = (inputHandler, options = {}) => {
60097
60284
  }, [internal_eventEmitter, handleData]);
60098
60285
  };
60099
60286
  //#endregion
60100
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-selection.js
60287
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-selection.js
60101
60288
  /**
60102
60289
  * Access to text selection operations on the Ink instance (fullscreen only).
60103
60290
  * Returns no-op functions when fullscreen mode is disabled.
@@ -60137,7 +60324,7 @@ function useSelection() {
60137
60324
  }, [ink]);
60138
60325
  }
60139
60326
  //#endregion
60140
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-copy-on-select.js
60327
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-copy-on-select.js
60141
60328
  /**
60142
60329
  * Copy-on-select: when a drag finishes (or a double/triple click, or a
60143
60330
  * shift+arrow extension, lands a selection), copy the selected text to the
@@ -60177,14 +60364,14 @@ function useCopyOnSelect(onCopied) {
60177
60364
  ]);
60178
60365
  }
60179
60366
  //#endregion
60180
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-app.js
60367
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-app.js
60181
60368
  /**
60182
60369
  * React hook exposing the manual app-exit function from `AppContext`.
60183
60370
  * @returns the `AppContext` value, whose `exit` function unmounts the app.
60184
60371
  */
60185
60372
  const useApp = () => (0, import_react.useContext)(AppContext);
60186
60373
  //#endregion
60187
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-terminal-viewport.js
60374
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-terminal-viewport.js
60188
60375
  /**
60189
60376
  * Hook to detect if a component is within the terminal viewport.
60190
60377
  *
@@ -60238,7 +60425,7 @@ function useTerminalViewport() {
60238
60425
  return [setElement, entryRef.current];
60239
60426
  }
60240
60427
  //#endregion
60241
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-animation-frame.js
60428
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-animation-frame.js
60242
60429
  /**
60243
60430
  * Hook for synchronized animations that pause when offscreen.
60244
60431
  *
@@ -60287,7 +60474,7 @@ function useAnimationFrame(intervalMs = 16) {
60287
60474
  return [viewportRef, time];
60288
60475
  }
60289
60476
  //#endregion
60290
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-terminal-size.js
60477
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-terminal-size.js
60291
60478
  /** Terminal dimensions from the Ink app shell (from Claude Code).
60292
60479
  * @returns the current terminal dimensions.
60293
60480
  */
@@ -60297,7 +60484,7 @@ function useTerminalSize() {
60297
60484
  return size;
60298
60485
  }
60299
60486
  //#endregion
60300
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/hooks/useBlink.js
60487
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/hooks/useBlink.js
60301
60488
  const BLINK_INTERVAL_MS = 600;
60302
60489
  /**
60303
60490
  * Hook for synchronized blinking animations that pause when offscreen
@@ -60314,7 +60501,7 @@ function useBlink(enabled, intervalMs = BLINK_INTERVAL_MS) {
60314
60501
  return [ref, Math.floor(time / intervalMs) % 2 === 0];
60315
60502
  }
60316
60503
  //#endregion
60317
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/supports-hyperlinks.js
60504
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/supports-hyperlinks.js
60318
60505
  var import_supports_hyperlinks = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
60319
60506
  const supportsColor = require_supports_color();
60320
60507
  const hasFlag = require_has_flag();
@@ -60411,7 +60598,7 @@ function supportsHyperlinks(options) {
60411
60598
  return false;
60412
60599
  }
60413
60600
  //#endregion
60414
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/Link.js
60601
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/components/Link.js
60415
60602
  function Link(t0) {
60416
60603
  const $ = (0, import_compiler_runtime.c)(5);
60417
60604
  const { children, url, fallback } = t0;
@@ -60439,7 +60626,7 @@ function Link(t0) {
60439
60626
  return t2;
60440
60627
  }
60441
60628
  //#endregion
60442
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/esc.js
60629
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/esc.js
60443
60630
  /**
60444
60631
  * ESC Sequence Parser
60445
60632
  *
@@ -60495,7 +60682,7 @@ function parseEsc(chars) {
60495
60682
  };
60496
60683
  }
60497
60684
  //#endregion
60498
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/types.js
60685
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/types.js
60499
60686
  /**
60500
60687
  * ANSI Parser - Semantic Types
60501
60688
  *
@@ -60523,7 +60710,7 @@ function defaultStyle() {
60523
60710
  };
60524
60711
  }
60525
60712
  //#endregion
60526
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/sgr.js
60713
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/sgr.js
60527
60714
  /**
60528
60715
  * SGR (Select Graphic Rendition) Parser
60529
60716
  *
@@ -60831,7 +61018,7 @@ function applySGR(paramStr, style) {
60831
61018
  return s;
60832
61019
  }
60833
61020
  //#endregion
60834
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/parser.js
61021
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/termio/parser.js
60835
61022
  /**
60836
61023
  * ANSI Parser - Semantic Action Generator
60837
61024
  *
@@ -61208,7 +61395,7 @@ var Parser = class {
61208
61395
  }
61209
61396
  };
61210
61397
  //#endregion
61211
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/Ansi.js
61398
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/Ansi.js
61212
61399
  /**
61213
61400
  * Component that parses ANSI escape codes and renders them using Text components.
61214
61401
  *
@@ -61459,7 +61646,7 @@ function StyledText(t0) {
61459
61646
  return t1;
61460
61647
  }
61461
61648
  //#endregion
61462
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ui.js
61649
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ui.js
61463
61650
  var ui_exports = /* @__PURE__ */ __exportAll({
61464
61651
  AlternateScreen: () => AlternateScreen,
61465
61652
  Ansi: () => Ansi,
@@ -61483,7 +61670,7 @@ var ui_exports = /* @__PURE__ */ __exportAll({
61483
61670
  useTheme: () => useTheme
61484
61671
  });
61485
61672
  //#endregion
61486
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PageMargin.js
61673
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PageMargin.js
61487
61674
  /** 嵌套安全的 inset(若未来出现嵌套 PageMargin 会累加)。 */
61488
61675
  const PageInsetContext = import_react.createContext({
61489
61676
  x: 0,
@@ -61537,7 +61724,7 @@ function PageMargin({ children }) {
61537
61724
  });
61538
61725
  }
61539
61726
  //#endregion
61540
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/figures.js
61727
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/figures.js
61541
61728
  /**
61542
61729
  * UI glyph constants used across the TUI: prompt markers, status badges,
61543
61730
  * direction arrows, media controls, reasoning-effort indicators, and
@@ -61564,7 +61751,7 @@ const THINKING_SPINNER_FRAMES = [
61564
61751
  "⠏"
61565
61752
  ];
61566
61753
  //#endregion
61567
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/providerWizard.js
61754
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/providerWizard.js
61568
61755
  /**
61569
61756
  * `/provider` wizard — interactively adds, edits, or deletes an LLM
61570
61757
  * provider route at runtime.
@@ -61594,13 +61781,13 @@ function deriveKeyRef(route) {
61594
61781
  }
61595
61782
  /** Max attempts for validated free-text prompts before giving up. */
61596
61783
  const MAX_RETRY = 3;
61597
- function answerText(answer, id) {
61784
+ function answerText$1(answer, id) {
61598
61785
  return answer.answers.find((item) => item.id === id)?.custom?.trim() ?? "";
61599
61786
  }
61600
61787
  function answerSelected$1(answer, id) {
61601
61788
  return answer.answers.find((item) => item.id === id)?.selected ?? [];
61602
61789
  }
61603
- function optionQuestion(id, question, options, extra) {
61790
+ function optionQuestion$1(id, question, options, extra) {
61604
61791
  return {
61605
61792
  id,
61606
61793
  question,
@@ -61638,7 +61825,7 @@ async function runProviderWizard(deps) {
61638
61825
  const { ask, notify } = deps;
61639
61826
  let action = "add";
61640
61827
  try {
61641
- if (answerSelected$1(await ask({ questions: [optionQuestion("action", t("provider-q-action"), [{
61828
+ if (answerSelected$1(await ask({ questions: [optionQuestion$1("action", t("provider-q-action"), [{
61642
61829
  label: t("provider-opt-action-add"),
61643
61830
  description: t("provider-opt-action-add-desc")
61644
61831
  }, {
@@ -61680,7 +61867,7 @@ async function runAddFlow(deps) {
61680
61867
  label: t("provider-opt-oauth"),
61681
61868
  description: t("provider-opt-oauth-desc")
61682
61869
  });
61683
- const pickedMode = answerSelected$1(await ask({ questions: [optionQuestion("mode", t("provider-q-mode"), modeOptions, { hideCustomInput: true })] }), "mode")[0];
61870
+ const pickedMode = answerSelected$1(await ask({ questions: [optionQuestion$1("mode", t("provider-q-mode"), modeOptions, { hideCustomInput: true })] }), "mode")[0];
61684
61871
  if (host.oauth !== void 0 && pickedMode === t("provider-opt-oauth")) return runOAuthWizard(deps, host.oauth);
61685
61872
  const isCatalog = pickedMode === t("provider-opt-catalog");
61686
61873
  let route = "";
@@ -61688,7 +61875,7 @@ async function runAddFlow(deps) {
61688
61875
  const candidates = host.listCatalogProviders();
61689
61876
  if (candidates.length > 0) {
61690
61877
  const otherLabel = t("provider-opt-other-route");
61691
- const pick = answerSelected$1(await ask({ questions: [optionQuestion("catalog", t("provider-q-catalog"), [...candidates.map((candidate) => ({
61878
+ const pick = answerSelected$1(await ask({ questions: [optionQuestion$1("catalog", t("provider-q-catalog"), [...candidates.map((candidate) => ({
61692
61879
  label: candidate.provider,
61693
61880
  description: candidate.displayName === candidate.provider ? void 0 : candidate.displayName
61694
61881
  })), {
@@ -61704,14 +61891,14 @@ async function runAddFlow(deps) {
61704
61891
  }
61705
61892
  const ref = deriveKeyRef(route);
61706
61893
  const shadowed = host.envShadows(ref);
61707
- const apiKey = answerText(await ask({ questions: [textQuestion("apikey", t("provider-q-apikey"), t("provider-q-apikey-detail"), true)] }, { redact: true }), "apikey");
61894
+ const apiKey = answerText$1(await ask({ questions: [textQuestion("apikey", t("provider-q-apikey"), t("provider-q-apikey-detail"), true)] }, { redact: true }), "apikey");
61708
61895
  const keyLine = shadowed ? t("provider-line-keyref-env", { ref }) : t("provider-line-keyref", { ref });
61709
61896
  let baseURL;
61710
61897
  let api;
61711
61898
  if (isCatalog) {
61712
- if (answerSelected$1(await ask({ questions: [optionQuestion("baseurl-choice", t("provider-q-baseurl-choice"), [{ label: t("provider-opt-baseurl-skip") }, { label: t("provider-opt-baseurl-input") }], { hideCustomInput: true })] }), "baseurl-choice")[0] === t("provider-opt-baseurl-input")) baseURL = answerText(await ask({ questions: [textQuestion("baseurl", t("provider-q-baseurl"))] }), "baseurl");
61899
+ if (answerSelected$1(await ask({ questions: [optionQuestion$1("baseurl-choice", t("provider-q-baseurl-choice"), [{ label: t("provider-opt-baseurl-skip") }, { label: t("provider-opt-baseurl-input") }], { hideCustomInput: true })] }), "baseurl-choice")[0] === t("provider-opt-baseurl-input")) baseURL = answerText$1(await ask({ questions: [textQuestion("baseurl", t("provider-q-baseurl"))] }), "baseurl");
61713
61900
  } else {
61714
- const endpointAnswer = await ask({ questions: [textQuestion("baseurl", t("provider-q-baseurl")), optionQuestion("protocol", t("provider-q-protocol"), [
61901
+ const endpointAnswer = await ask({ questions: [textQuestion("baseurl", t("provider-q-baseurl")), optionQuestion$1("protocol", t("provider-q-protocol"), [
61715
61902
  {
61716
61903
  label: "openai-completions",
61717
61904
  description: t("provider-protocol-completions-desc")
@@ -61725,7 +61912,7 @@ async function runAddFlow(deps) {
61725
61912
  description: t("provider-protocol-anthropic-desc")
61726
61913
  }
61727
61914
  ], { hideCustomInput: true })] });
61728
- baseURL = answerText(endpointAnswer, "baseurl");
61915
+ baseURL = answerText$1(endpointAnswer, "baseurl");
61729
61916
  api = answerSelected$1(endpointAnswer, "protocol")[0];
61730
61917
  }
61731
61918
  notify(t("provider-discovery-running"));
@@ -61739,15 +61926,15 @@ async function runAddFlow(deps) {
61739
61926
  let discoveredById = /* @__PURE__ */ new Map();
61740
61927
  if (discovered.length > 0) {
61741
61928
  discoveredById = new Map(discovered.map((model) => [model.id, model]));
61742
- const modelsAnswer = await ask({ questions: [optionQuestion("models", t("provider-q-models"), discovered.map((model) => ({
61929
+ const modelsAnswer = await ask({ questions: [optionQuestion$1("models", t("provider-q-models"), discovered.map((model) => ({
61743
61930
  label: model.id,
61744
61931
  description: [model.name ?? "", model.contextWindow !== void 0 ? `${model.contextWindow}` : ""].filter((part) => part !== "").join(" · ") || void 0
61745
61932
  })), { multiSelect: true })] });
61746
- models = mergeModelIds(answerSelected$1(modelsAnswer, "models"), answerText(modelsAnswer, "models"));
61933
+ models = mergeModelIds(answerSelected$1(modelsAnswer, "models"), answerText$1(modelsAnswer, "models"));
61747
61934
  } else {
61748
61935
  notify(t("provider-discovery-failed"), { color: "warning" });
61749
61936
  for (let attempt = 0; attempt < MAX_RETRY && models.length === 0; attempt += 1) {
61750
- models = mergeModelIds([], answerText(await ask({ questions: [textQuestion("models-fallback", t("provider-q-models-fallback"))] }), "models-fallback"));
61937
+ models = mergeModelIds([], answerText$1(await ask({ questions: [textQuestion("models-fallback", t("provider-q-models-fallback"))] }), "models-fallback"));
61751
61938
  if (models.length === 0) notify(t("provider-models-required"), { color: "warning" });
61752
61939
  }
61753
61940
  if (models.length === 0) return "cancelled";
@@ -61767,7 +61954,7 @@ async function runAddFlow(deps) {
61767
61954
  keyLine
61768
61955
  });
61769
61956
  const detail = host.routeExists(route) ? `${summaryLines.join("\n")}\n${t("provider-route-exists-warning")}` : summaryLines.join("\n");
61770
- if (answerSelected$1(await ask({ questions: [optionQuestion("confirm", t("provider-q-confirm"), [{ label: t("provider-opt-confirm-write") }, { label: t("provider-opt-confirm-cancel") }], {
61957
+ if (answerSelected$1(await ask({ questions: [optionQuestion$1("confirm", t("provider-q-confirm"), [{ label: t("provider-opt-confirm-write") }, { label: t("provider-opt-confirm-cancel") }], {
61771
61958
  detail,
61772
61959
  hideCustomInput: true
61773
61960
  })] }), "confirm")[0] !== t("provider-opt-confirm-write")) {
@@ -61809,7 +61996,7 @@ async function runAddFlow(deps) {
61809
61996
  notify(t("provider-success", { route }), { color: "success" });
61810
61997
  if (!deps.working() && models.length > 0) {
61811
61998
  const target = models[0];
61812
- if (answerSelected$1(await ask({ questions: [optionQuestion("switch", t("provider-q-switch"), [{ label: t("provider-opt-switch-now", { model: target }) }, { label: t("provider-opt-switch-keep") }], { hideCustomInput: true })] }), "switch")[0] === t("provider-opt-switch-now", { model: target })) await deps.switchModel(route, target);
61999
+ if (answerSelected$1(await ask({ questions: [optionQuestion$1("switch", t("provider-q-switch"), [{ label: t("provider-opt-switch-now", { model: target }) }, { label: t("provider-opt-switch-keep") }], { hideCustomInput: true })] }), "switch")[0] === t("provider-opt-switch-now", { model: target })) await deps.switchModel(route, target);
61813
62000
  }
61814
62001
  return "added";
61815
62002
  }
@@ -61824,7 +62011,7 @@ async function runEditWizard(deps) {
61824
62011
  notify(t("provider-none-configured"), { color: "warning" });
61825
62012
  return "cancelled";
61826
62013
  }
61827
- const route = answerSelected$1(await ask({ questions: [optionQuestion("edit-provider", t("provider-q-edit"), configured.map((provider) => ({
62014
+ const route = answerSelected$1(await ask({ questions: [optionQuestion$1("edit-provider", t("provider-q-edit"), configured.map((provider) => ({
61828
62015
  label: provider.route,
61829
62016
  description: providerRowDescription(provider)
61830
62017
  })), { hideCustomInput: true })] }), "edit-provider")[0];
@@ -61840,7 +62027,7 @@ async function runEditWizard(deps) {
61840
62027
  */
61841
62028
  async function runEditMenu(deps, provider) {
61842
62029
  const { ask, notify } = deps;
61843
- const picked = answerSelected$1(await ask({ questions: [optionQuestion("edit-menu", t("provider-q-edit-menu", { route: provider.route }), buildEditMenuOptions(provider), { hideCustomInput: true })] }), "edit-menu")[0];
62030
+ const picked = answerSelected$1(await ask({ questions: [optionQuestion$1("edit-menu", t("provider-q-edit-menu", { route: provider.route }), buildEditMenuOptions(provider), { hideCustomInput: true })] }), "edit-menu")[0];
61844
62031
  if (picked === t("provider-opt-edit-delete")) return deleteConfiguredProvider(deps, provider);
61845
62032
  if (picked === t("provider-opt-edit-key")) return editApiKey(deps, provider);
61846
62033
  if (picked === t("provider-opt-edit-baseurl")) return editBaseUrl(deps, provider);
@@ -61890,7 +62077,7 @@ async function editApiKey(deps, provider) {
61890
62077
  }), { color: "warning" });
61891
62078
  return "cancelled";
61892
62079
  }
61893
- const value = answerText(await ask({ questions: [textQuestion("apikey", t("provider-q-apikey"), t("provider-q-apikey-detail"), true)] }, { redact: true }), "apikey");
62080
+ const value = answerText$1(await ask({ questions: [textQuestion("apikey", t("provider-q-apikey"), t("provider-q-apikey-detail"), true)] }, { redact: true }), "apikey");
61894
62081
  if (value === "") {
61895
62082
  notify(t("provider-key-empty"), { color: "warning" });
61896
62083
  return "cancelled";
@@ -61899,7 +62086,7 @@ async function editApiKey(deps, provider) {
61899
62086
  if (otherUsers.length > 0) {
61900
62087
  let overwriteAnswer;
61901
62088
  try {
61902
- overwriteAnswer = await ask({ questions: [optionQuestion("key-overwrite-confirm", t("provider-q-key-overwrite-confirm", { ref: provider.ref }), [{ label: t("provider-opt-key-overwrite-yes") }, { label: t("provider-opt-confirm-cancel") }], {
62089
+ overwriteAnswer = await ask({ questions: [optionQuestion$1("key-overwrite-confirm", t("provider-q-key-overwrite-confirm", { ref: provider.ref }), [{ label: t("provider-opt-key-overwrite-yes") }, { label: t("provider-opt-confirm-cancel") }], {
61903
62090
  detail: t("provider-key-overwrite-warning", { routes: otherUsers.join(", ") }),
61904
62091
  hideCustomInput: true
61905
62092
  })] });
@@ -61957,7 +62144,7 @@ async function patchProfileField(deps, provider, path, value, change) {
61957
62144
  * patch just that field. An empty answer is a no-op. */
61958
62145
  async function editBaseUrl(deps, provider) {
61959
62146
  const { ask, notify } = deps;
61960
- const value = answerText(await ask({ questions: [textQuestion("baseurl", t("provider-q-baseurl"), provider.baseURL !== void 0 ? t("provider-edit-current", { value: provider.baseURL }) : void 0)] }), "baseurl");
62147
+ const value = answerText$1(await ask({ questions: [textQuestion("baseurl", t("provider-q-baseurl"), provider.baseURL !== void 0 ? t("provider-edit-current", { value: provider.baseURL }) : void 0)] }), "baseurl");
61961
62148
  if (value === "") {
61962
62149
  notify(t("provider-edit-no-changes"));
61963
62150
  return "cancelled";
@@ -61970,7 +62157,7 @@ async function editBaseUrl(deps, provider) {
61970
62157
  async function editWireProtocol(deps, provider) {
61971
62158
  const { ask, notify } = deps;
61972
62159
  const current = provider.api ?? "openai-completions";
61973
- const picked = answerSelected$1(await ask({ questions: [optionQuestion("protocol", t("provider-q-protocol"), [
62160
+ const picked = answerSelected$1(await ask({ questions: [optionQuestion$1("protocol", t("provider-q-protocol"), [
61974
62161
  {
61975
62162
  label: "openai-completions",
61976
62163
  description: t("provider-protocol-completions-desc")
@@ -62017,7 +62204,7 @@ async function editModelList(deps, provider) {
62017
62204
  let discoveredById = /* @__PURE__ */ new Map();
62018
62205
  if (discovered.length === 0) {
62019
62206
  notify(t("provider-discovery-failed"), { color: "warning" });
62020
- models = mergeModelIds([], answerText(await ask({ questions: [textQuestion("models-fallback", t("provider-q-models-fallback"))] }), "models-fallback"));
62207
+ models = mergeModelIds([], answerText$1(await ask({ questions: [textQuestion("models-fallback", t("provider-q-models-fallback"))] }), "models-fallback"));
62021
62208
  if (models.length === 0) {
62022
62209
  notify(t("provider-edit-no-changes"));
62023
62210
  return "cancelled";
@@ -62032,11 +62219,11 @@ async function editModelList(deps, provider) {
62032
62219
  label: id,
62033
62220
  description: t("provider-row-model-missing")
62034
62221
  }));
62035
- const modelsAnswer = await ask({ questions: [optionQuestion("models", t("provider-q-models"), [...optionRows, ...missingRows], {
62222
+ const modelsAnswer = await ask({ questions: [optionQuestion$1("models", t("provider-q-models"), [...optionRows, ...missingRows], {
62036
62223
  multiSelect: true,
62037
62224
  defaultSelected: previous
62038
62225
  })] });
62039
- models = mergeModelIds(answerSelected$1(modelsAnswer, "models"), answerText(modelsAnswer, "models"));
62226
+ models = mergeModelIds(answerSelected$1(modelsAnswer, "models"), answerText$1(modelsAnswer, "models"));
62040
62227
  }
62041
62228
  if (!isCatalog && models.length === 0) {
62042
62229
  notify(t("provider-models-required"), { color: "error" });
@@ -62099,7 +62286,7 @@ async function deleteConfiguredProvider(deps, provider) {
62099
62286
  const lines = buildDeleteSummary(provider);
62100
62287
  let confirmAnswer;
62101
62288
  try {
62102
- confirmAnswer = await ask({ questions: [optionQuestion("delete-confirm", t("provider-q-delete-confirm", { route: provider.route }), [{ label: t("provider-opt-delete-yes") }, { label: t("provider-opt-confirm-cancel") }], {
62289
+ confirmAnswer = await ask({ questions: [optionQuestion$1("delete-confirm", t("provider-q-delete-confirm", { route: provider.route }), [{ label: t("provider-opt-delete-yes") }, { label: t("provider-opt-confirm-cancel") }], {
62103
62290
  detail: sharers.length > 0 ? `${lines.join("\n")}\n${t("provider-delete-shared-warning", {
62104
62291
  ref: provider.ref,
62105
62292
  routes: sharers.join(", ")
@@ -62197,14 +62384,14 @@ async function runOAuthWizard(deps, oauth) {
62197
62384
  notify(t("provider-oauth-none"), { color: "warning" });
62198
62385
  return "failed";
62199
62386
  }
62200
- const providerId = answerSelected$1(await ask({ questions: [optionQuestion("oauth-provider", t("provider-q-oauth"), statuses.map((status) => ({
62387
+ const providerId = answerSelected$1(await ask({ questions: [optionQuestion$1("oauth-provider", t("provider-q-oauth"), statuses.map((status) => ({
62201
62388
  label: status.provider,
62202
62389
  description: oauthStateDescription(status)
62203
62390
  })), { hideCustomInput: true })] }), "oauth-provider")[0];
62204
62391
  const status = statuses.find((row) => row.provider === providerId);
62205
62392
  if (status === void 0) return "cancelled";
62206
62393
  if (status.signedIn) {
62207
- const action = answerSelected$1(await ask({ questions: [optionQuestion("oauth-signed-action", t("provider-q-oauth-signed", { provider: status.provider }), [
62394
+ const action = answerSelected$1(await ask({ questions: [optionQuestion$1("oauth-signed-action", t("provider-q-oauth-signed", { provider: status.provider }), [
62208
62395
  {
62209
62396
  label: t("provider-opt-oauth-relogin"),
62210
62397
  description: t("provider-opt-oauth-relogin-desc")
@@ -62247,7 +62434,7 @@ async function runOAuthWizard(deps, oauth) {
62247
62434
  /** Prompt for a route id until it validates or the retry budget runs out. */
62248
62435
  async function promptRouteId(ask, notify) {
62249
62436
  for (let attempt = 0; attempt < MAX_RETRY; attempt += 1) {
62250
- const route = answerText(await ask({ questions: [textQuestion("route-id", t("provider-q-route-id"), t("provider-q-route-id-detail"))] }), "route-id");
62437
+ const route = answerText$1(await ask({ questions: [textQuestion("route-id", t("provider-q-route-id"), t("provider-q-route-id-detail"))] }), "route-id");
62251
62438
  if (PROVIDER_ROUTE_ID.test(route)) return route;
62252
62439
  notify(t("provider-route-id-invalid"), { color: "warning" });
62253
62440
  }
@@ -62290,16 +62477,28 @@ function buildProfile(input) {
62290
62477
  return profile;
62291
62478
  }
62292
62479
  //#endregion
62293
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/modelConfigWizard.js
62294
- /**
62295
- * `/model-config` is a compact settings-backed model editor. The landing page
62296
- * keeps the managed catalog switch and selectable platform models in one
62297
- * list. User-defined routes may remain active for compatibility, but this
62298
- * surface does not expose their create, edit, test, or delete actions.
62299
- */
62480
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/modelConfigWizard.js
62481
+ /** `/model-config`: platform catalog plus ~/.chatcode-cli/settings.json custom models. */
62482
+ const CUSTOM_MODEL_PROTOCOLS = ["openai-completions", "anthropic-messages"];
62483
+ const LEGAL_API_KEY = /^[\x21-\x7e]+$/u;
62484
+ function answerText(answer, id) {
62485
+ return answer.answers.find((item) => item.id === id)?.custom?.trim() ?? "";
62486
+ }
62300
62487
  function answerSelected(answer, id) {
62301
62488
  return answer.answers.find((item) => item.id === id)?.selected ?? [];
62302
62489
  }
62490
+ function optionQuestion(id, question, options, extra) {
62491
+ return {
62492
+ id,
62493
+ question,
62494
+ header: "/model-config",
62495
+ options: options.map((option) => ({ ...option })),
62496
+ ...extra?.detail === void 0 ? {} : { detail: extra.detail },
62497
+ ...extra?.hideCustomInput ? { hideCustomInput: true } : {},
62498
+ ...extra?.defaultSelected === void 0 ? {} : { defaultSelected: extra.defaultSelected },
62499
+ ...extra?.secretInput ? { secretInput: true } : {}
62500
+ };
62501
+ }
62303
62502
  function formQuestion(id, title, options, footer, defaultSelected) {
62304
62503
  return {
62305
62504
  id,
@@ -62312,6 +62511,18 @@ function formQuestion(id, title, options, footer, defaultSelected) {
62312
62511
  ...defaultSelected === void 0 ? {} : { defaultSelected: [defaultSelected] }
62313
62512
  };
62314
62513
  }
62514
+ function menuQuestion(id, title, detail, options, defaultSelected) {
62515
+ return {
62516
+ id,
62517
+ question: title,
62518
+ detail,
62519
+ options: options.map((option) => ({ ...option })),
62520
+ hideCustomInput: true,
62521
+ menuLayout: true,
62522
+ formHint: t("model-config-menu-hint"),
62523
+ ...defaultSelected === void 0 ? {} : { defaultSelected: [defaultSelected] }
62524
+ };
62525
+ }
62315
62526
  /** Run the model list and its per-model action menus until Esc or a model switch. */
62316
62527
  async function runModelConfigWizard(deps) {
62317
62528
  let changed = "cancelled";
@@ -62320,6 +62531,7 @@ async function runModelConfigWizard(deps) {
62320
62531
  try {
62321
62532
  while (true) {
62322
62533
  const builtInModels = (await deps.listModels()).filter((model) => model.provider === CHATCODE_CODING_PLAN_PROVIDER);
62534
+ const customModels = configuredModels(deps.host);
62323
62535
  let maasModels = [];
62324
62536
  if (deps.host.maas?.enabled() === true) try {
62325
62537
  maasModels = await deps.host.maas.listModels();
@@ -62335,13 +62547,24 @@ async function runModelConfigWizard(deps) {
62335
62547
  }
62336
62548
  }
62337
62549
  else reportedMaasError = void 0;
62338
- const rows = landingRows(deps, builtInModels, maasModels);
62550
+ const rows = landingRows(deps, builtInModels, maasModels, customModels);
62339
62551
  const choice = answerSelected(await deps.ask({ questions: [formQuestion("landing", t("model-config-q-action"), rows.map((row) => ({
62340
62552
  label: row.label,
62341
62553
  value: row.value
62342
62554
  })), t("model-config-landing-footer"), landingFocus)] }), "landing")[0];
62343
62555
  const selected = rows.find((row) => row.label === choice);
62344
62556
  if (choice !== void 0) landingFocus = choice;
62557
+ if (selected?.kind === "add") {
62558
+ const outcome = await addCustomModel(deps);
62559
+ if (outcome === "added") changed = outcome;
62560
+ continue;
62561
+ }
62562
+ if (selected?.kind === "custom-model") {
62563
+ const result = await manageExistingModel(deps, selected.target);
62564
+ if (result.outcome !== "cancelled") changed = result.outcome;
62565
+ if (result.close) return changed;
62566
+ continue;
62567
+ }
62345
62568
  if (selected?.kind === "maas") {
62346
62569
  if (deps.host.maas?.setEnabled === void 0) {
62347
62570
  deps.notify(t("model-config-maas-unavailable"), {
@@ -62378,16 +62601,26 @@ async function runModelConfigWizard(deps) {
62378
62601
  return "failed";
62379
62602
  }
62380
62603
  }
62381
- function landingRows(deps, builtInModels, maasModels) {
62604
+ function landingRows(deps, builtInModels, maasModels, customModels) {
62382
62605
  const counts = /* @__PURE__ */ new Map();
62383
62606
  for (const model of builtInModels) counts.set(model.name, (counts.get(model.name) ?? 0) + 1);
62384
62607
  for (const model of maasModels) {
62385
62608
  const name = maasModelDisplayName(model);
62386
62609
  counts.set(name, (counts.get(name) ?? 0) + 1);
62387
62610
  }
62388
- const maas = deps.host.maas;
62611
+ for (const target of customModels) {
62612
+ const name = customModelDisplayName(target);
62613
+ counts.set(name, (counts.get(name) ?? 0) + 1);
62614
+ }
62615
+ const customOrdinals = /* @__PURE__ */ new Map();
62389
62616
  const current = deps.current();
62617
+ const maas = deps.host.maas;
62390
62618
  return [
62619
+ {
62620
+ kind: "add",
62621
+ label: t("model-config-opt-add"),
62622
+ value: t("model-config-enter-add")
62623
+ },
62391
62624
  ...maas !== void 0 && maas.setEnabled === void 0 ? [] : [{
62392
62625
  kind: "maas",
62393
62626
  label: t("model-config-maas-row"),
@@ -62407,17 +62640,483 @@ function landingRows(deps, builtInModels, maasModels) {
62407
62640
  value: `${t("model-config-maas-provider-label")} · ${name}`,
62408
62641
  target: { model }
62409
62642
  };
62643
+ }),
62644
+ ...customModels.map((target) => {
62645
+ const name = customModelDisplayName(target);
62646
+ const ordinal = (customOrdinals.get(name) ?? 0) + 1;
62647
+ customOrdinals.set(name, ordinal);
62648
+ return {
62649
+ kind: "custom-model",
62650
+ label: markCurrent(counts.get(name) !== 1 ? `${name} · #${ordinal}` : name, current.provider === "chatcode-custom" && current.model === target.entry.model),
62651
+ value: modelRowDescription(target),
62652
+ target
62653
+ };
62410
62654
  })
62411
62655
  ];
62412
62656
  }
62657
+ async function addCustomModel(deps) {
62658
+ const draft = {
62659
+ api: "openai-completions",
62660
+ model: "",
62661
+ baseURL: "",
62662
+ description: "",
62663
+ maxTokens: void 0,
62664
+ contextWindow: void 0,
62665
+ keyChange: "replace",
62666
+ apiKey: void 0
62667
+ };
62668
+ let focus;
62669
+ while (true) {
62670
+ const choice = await chooseFormRow(deps, t("model-config-add-title"), draft, false, void 0, focus);
62671
+ if (choice === void 0 || choice === t("model-config-opt-cancel")) return "cancelled";
62672
+ focus = choice;
62673
+ if (choice === t("model-config-opt-confirm-save")) {
62674
+ const outcome = await saveNewModel(deps, draft);
62675
+ if (outcome === "added") return outcome;
62676
+ continue;
62677
+ }
62678
+ if (choice === t("model-config-opt-test")) {
62679
+ await testDraftConnection(deps, draft);
62680
+ continue;
62681
+ }
62682
+ await editDraftField(deps, draft, choice, false);
62683
+ }
62684
+ }
62685
+ async function manageExistingModel(deps, initial) {
62686
+ const target = configuredModels(deps.host).find((candidate) => modelRef(candidate) === modelRef(initial));
62687
+ if (target === void 0) return {
62688
+ outcome: "cancelled",
62689
+ close: false
62690
+ };
62691
+ let focus;
62692
+ while (true) {
62693
+ let choice;
62694
+ try {
62695
+ choice = answerSelected(await deps.ask({ questions: [menuQuestion("model-action", target.entry.model, modelActionDetail(target), [
62696
+ { label: t("model-config-opt-set-current") },
62697
+ { label: t("model-config-opt-edit") },
62698
+ { label: t("model-config-opt-test-model") },
62699
+ { label: t("model-config-opt-delete") },
62700
+ { label: t("model-config-opt-back-list") }
62701
+ ], focus)] }), "model-action")[0];
62702
+ } catch (error) {
62703
+ if (error instanceof UserQuestionError) return {
62704
+ outcome: "cancelled",
62705
+ close: false
62706
+ };
62707
+ throw error;
62708
+ }
62709
+ if (choice === void 0 || choice === t("model-config-opt-back-list")) return {
62710
+ outcome: "cancelled",
62711
+ close: false
62712
+ };
62713
+ focus = choice;
62714
+ if (choice === t("model-config-opt-set-current")) {
62715
+ const current = deps.current();
62716
+ if (current.provider === "chatcode-custom" && current.model === target.entry.model) deps.notify(t("model-config-already-current"));
62717
+ else return {
62718
+ outcome: await deps.switchModel("chatcode-custom", target.entry.model) ? "updated" : "cancelled",
62719
+ close: true
62720
+ };
62721
+ return {
62722
+ outcome: "cancelled",
62723
+ close: true
62724
+ };
62725
+ }
62726
+ if (choice === t("model-config-opt-edit")) {
62727
+ const outcome = await editExistingModel(deps, target);
62728
+ if (outcome === "updated") return {
62729
+ outcome,
62730
+ close: false
62731
+ };
62732
+ continue;
62733
+ }
62734
+ if (choice === t("model-config-opt-test-model")) {
62735
+ await testConfiguredModel(deps, target);
62736
+ continue;
62737
+ }
62738
+ if (choice === t("model-config-opt-delete")) {
62739
+ const outcome = await deleteModel(deps, target);
62740
+ if (outcome === "deleted") return {
62741
+ outcome,
62742
+ close: false
62743
+ };
62744
+ }
62745
+ }
62746
+ }
62747
+ async function editExistingModel(deps, target) {
62748
+ const draft = draftFromTarget(target);
62749
+ let focus;
62750
+ while (true) {
62751
+ const choice = await chooseFormRow(deps, t("model-config-edit-title"), draft, true, target, focus);
62752
+ if (choice === void 0 || choice === t("model-config-opt-cancel")) return "cancelled";
62753
+ focus = choice;
62754
+ if (choice === t("model-config-opt-confirm-save")) {
62755
+ const outcome = await saveEditedModel(deps, target, draft);
62756
+ if (outcome === "updated") return outcome;
62757
+ continue;
62758
+ }
62759
+ if (choice === t("model-config-opt-test")) {
62760
+ await testDraftConnection(deps, draft, target);
62761
+ continue;
62762
+ }
62763
+ await editDraftField(deps, draft, choice, true);
62764
+ }
62765
+ }
62766
+ async function chooseFormRow(deps, title, draft, existing, target, defaultSelected) {
62767
+ const options = [
62768
+ {
62769
+ label: t("model-config-q-protocol"),
62770
+ value: protocolDisplay(draft.api)
62771
+ },
62772
+ {
62773
+ label: t("model-config-q-model"),
62774
+ value: shown(draft.model, t("model-config-value-unset"))
62775
+ },
62776
+ {
62777
+ label: t("model-config-q-baseurl"),
62778
+ value: shown(draft.baseURL, t("model-config-value-unset"))
62779
+ },
62780
+ {
62781
+ label: t("model-config-q-apikey"),
62782
+ value: keyDisplay(draft, target)
62783
+ },
62784
+ {
62785
+ label: t("model-config-q-description"),
62786
+ value: shown(draft.description, t("model-config-value-optional"))
62787
+ },
62788
+ {
62789
+ label: t("model-config-q-max-tokens"),
62790
+ value: draft.maxTokens === void 0 ? t("model-config-value-default") : String(draft.maxTokens)
62791
+ },
62792
+ {
62793
+ label: t("model-config-q-context-window"),
62794
+ value: draft.contextWindow === void 0 ? t("model-config-value-default") : String(draft.contextWindow)
62795
+ },
62796
+ {
62797
+ label: t("model-config-opt-test"),
62798
+ action: true
62799
+ },
62800
+ {
62801
+ label: t("model-config-opt-confirm-save"),
62802
+ action: true
62803
+ },
62804
+ {
62805
+ label: t("model-config-opt-cancel"),
62806
+ action: true
62807
+ }
62808
+ ];
62809
+ try {
62810
+ const id = existing ? "edit-form" : "add-form";
62811
+ return answerSelected(await deps.ask({ questions: [formQuestion(id, title, options, existing ? t("model-config-edit-footer") : t("model-config-add-footer"), defaultSelected)] }), id)[0];
62812
+ } catch (error) {
62813
+ if (error instanceof UserQuestionError) return void 0;
62814
+ throw error;
62815
+ }
62816
+ }
62817
+ async function editDraftField(deps, draft, field, existing) {
62818
+ if (field === t("model-config-q-protocol")) {
62819
+ const next = await promptProtocol(deps, draft.api);
62820
+ if (next !== void 0) draft.api = next;
62821
+ return;
62822
+ }
62823
+ if (field === t("model-config-q-apikey")) {
62824
+ await editDraftKey(deps, draft, existing);
62825
+ return;
62826
+ }
62827
+ if (field === t("model-config-q-model")) {
62828
+ const next = await promptText(deps, field, draft.model, false);
62829
+ if (next !== void 0) draft.model = next;
62830
+ return;
62831
+ }
62832
+ if (field === t("model-config-q-baseurl")) {
62833
+ const next = await promptText(deps, field, draft.baseURL, false);
62834
+ if (next !== void 0) draft.baseURL = next;
62835
+ return;
62836
+ }
62837
+ if (field === t("model-config-q-description")) {
62838
+ const next = await promptText(deps, field, draft.description, true);
62839
+ if (next !== void 0) draft.description = next;
62840
+ return;
62841
+ }
62842
+ if (field === t("model-config-q-max-tokens")) {
62843
+ const next = await promptCapacity(deps, field, draft.maxTokens);
62844
+ if (next !== "cancelled") draft.maxTokens = next;
62845
+ return;
62846
+ }
62847
+ if (field === t("model-config-q-context-window")) {
62848
+ const next = await promptCapacity(deps, field, draft.contextWindow);
62849
+ if (next !== "cancelled") draft.contextWindow = next;
62850
+ }
62851
+ }
62852
+ async function promptProtocol(deps, current) {
62853
+ try {
62854
+ const label = answerSelected(await deps.ask({ questions: [optionQuestion("protocol", t("model-config-q-protocol"), CUSTOM_MODEL_PROTOCOLS.map((api) => ({
62855
+ label: protocolDisplay(api),
62856
+ description: api
62857
+ })), {
62858
+ hideCustomInput: true,
62859
+ defaultSelected: [protocolDisplay(current)]
62860
+ })] }), "protocol")[0];
62861
+ return CUSTOM_MODEL_PROTOCOLS.find((api) => protocolDisplay(api) === label);
62862
+ } catch (error) {
62863
+ if (error instanceof UserQuestionError) return void 0;
62864
+ throw error;
62865
+ }
62866
+ }
62867
+ async function promptText(deps, field, current, allowClear) {
62868
+ try {
62869
+ const keep = t("model-config-opt-keep");
62870
+ const clear = t("model-config-opt-clear");
62871
+ const id = `field-${field}`;
62872
+ const answer = await deps.ask({ questions: [optionQuestion(id, t("model-config-edit-field", { field }), [{ label: keep }, ...allowClear ? [{ label: clear }] : []], {
62873
+ detail: t("model-config-current-value-short", { value: shown(current, t("model-config-value-unset")) }),
62874
+ defaultSelected: [keep]
62875
+ })] });
62876
+ const value = answerText(answer, id);
62877
+ if (value !== "") return value;
62878
+ return answerSelected(answer, id).includes(clear) ? "" : current;
62879
+ } catch (error) {
62880
+ if (error instanceof UserQuestionError) return void 0;
62881
+ throw error;
62882
+ }
62883
+ }
62884
+ async function promptCapacity(deps, field, current) {
62885
+ const value = await promptText(deps, field, current === void 0 ? "" : String(current), true);
62886
+ if (value === void 0) return "cancelled";
62887
+ if (value === "") return void 0;
62888
+ const parsed = parseCapacity(value);
62889
+ if (parsed !== void 0) return parsed;
62890
+ deps.notify(field === t("model-config-q-max-tokens") ? t("model-config-invalid-max-tokens") : t("model-config-invalid-context-window"), { color: "warning" });
62891
+ return "cancelled";
62892
+ }
62893
+ async function editDraftKey(deps, draft, existing) {
62894
+ try {
62895
+ const keep = existing ? t("model-config-opt-key-keep") : t("model-config-opt-key-unset");
62896
+ const id = "apikey";
62897
+ const value = answerText(await deps.ask({ questions: [optionQuestion(id, t("model-config-q-apikey"), [{ label: keep }], {
62898
+ detail: t("model-config-q-apikey-detail"),
62899
+ defaultSelected: [keep],
62900
+ secretInput: true
62901
+ })] }, { redact: true }), id);
62902
+ if (value === "") return;
62903
+ if (!LEGAL_API_KEY.test(value)) {
62904
+ deps.notify(t("model-config-invalid-apikey"), { color: "warning" });
62905
+ return;
62906
+ }
62907
+ draft.keyChange = "replace";
62908
+ draft.apiKey = value;
62909
+ } catch (error) {
62910
+ if (!(error instanceof UserQuestionError)) throw error;
62911
+ }
62912
+ }
62913
+ async function saveNewModel(deps, draft) {
62914
+ const invalid = validateDraft(draft, false);
62915
+ if (invalid !== void 0) {
62916
+ deps.notify(invalid, {
62917
+ color: "warning",
62918
+ timeoutMs: 8e3
62919
+ });
62920
+ return "cancelled";
62921
+ }
62922
+ await deps.host.customModels.write(toConfigInput(draft));
62923
+ deps.pushLocal("/model-config", summaryLines(draft, true));
62924
+ deps.notify(t("model-config-add-success", { model: draft.model }), { color: "success" });
62925
+ notifyRestartRequired(deps);
62926
+ return "added";
62927
+ }
62928
+ async function saveEditedModel(deps, target, draft) {
62929
+ const invalid = validateDraft(draft, target.entry.apiKeyConfigured);
62930
+ if (invalid !== void 0) {
62931
+ deps.notify(invalid, {
62932
+ color: "warning",
62933
+ timeoutMs: 8e3
62934
+ });
62935
+ return "cancelled";
62936
+ }
62937
+ const current = deps.current();
62938
+ if (draft.model !== target.entry.model && current.provider === "chatcode-custom" && current.model === target.entry.model) {
62939
+ deps.notify(t("model-config-current-rename-blocked"), {
62940
+ color: "warning",
62941
+ timeoutMs: 8e3
62942
+ });
62943
+ return "cancelled";
62944
+ }
62945
+ await deps.host.customModels.write(toConfigInput(draft), target.entry);
62946
+ deps.pushLocal("/model-config", summaryLines(draft, draft.keyChange === "replace" || target.entry.apiKeyConfigured));
62947
+ deps.notify(t("model-config-edit-success", { model: draft.model }), { color: "success" });
62948
+ notifyRestartRequired(deps);
62949
+ return "updated";
62950
+ }
62951
+ async function testDraftConnection(deps, draft, target) {
62952
+ const invalid = validateDraft(draft, target?.entry.apiKeyConfigured ?? false);
62953
+ if (invalid !== void 0) {
62954
+ deps.notify(invalid, {
62955
+ color: "warning",
62956
+ timeoutMs: 8e3
62957
+ });
62958
+ return;
62959
+ }
62960
+ const key = draft.keyChange === "replace" ? draft.apiKey : target === void 0 ? void 0 : deps.host.customModels.readApiKey(target.entry);
62961
+ deps.notify(t("model-config-test-running", { model: draft.model }));
62962
+ try {
62963
+ if (key === void 0) throw new Error(t("model-config-invalid-apikey"));
62964
+ const response = await deps.host.testCustomModel({
62965
+ model: draft.model,
62966
+ baseURL: draft.baseURL,
62967
+ api: draft.api,
62968
+ apiKey: key,
62969
+ prompt: t("model-config-test-prompt")
62970
+ });
62971
+ deps.pushLocal(t("model-config-test-result-title", { model: draft.model }), [t("model-config-test-response", { response })]);
62972
+ deps.notify(t("model-config-test-message-success", { model: draft.model }), { color: "success" });
62973
+ } catch (error) {
62974
+ const message = error instanceof Error ? error.message : String(error);
62975
+ deps.notify(t("model-config-test-message-failed", { err: message }), {
62976
+ color: "error",
62977
+ timeoutMs: 12e3
62978
+ });
62979
+ }
62980
+ }
62981
+ async function testConfiguredModel(deps, target) {
62982
+ await testDraftConnection(deps, draftFromTarget(target), target);
62983
+ }
62984
+ async function deleteModel(deps, target) {
62985
+ const current = deps.current();
62986
+ if (current.provider === "chatcode-custom" && current.model === target.entry.model) {
62987
+ await deps.ask({ questions: [optionQuestion("delete-blocked", t("model-config-current-delete-blocked"), [{ label: t("model-config-opt-back-list") }], {
62988
+ detail: summaryForTarget(target).join("\n"),
62989
+ hideCustomInput: true
62990
+ })] });
62991
+ return "cancelled";
62992
+ }
62993
+ if (answerSelected(await deps.ask({ questions: [optionQuestion("delete", t("model-config-q-delete", { model: target.entry.model }), [{ label: t("model-config-opt-delete-confirm") }, { label: t("model-config-opt-cancel") }], {
62994
+ detail: summaryForTarget(target).join("\n"),
62995
+ hideCustomInput: true
62996
+ })] }), "delete")[0] !== t("model-config-opt-delete-confirm")) return "cancelled";
62997
+ await deps.host.customModels.remove(target.entry);
62998
+ deps.pushLocal("/model-config", [t("model-config-line-deleted", {
62999
+ model: target.entry.model,
63000
+ route: CUSTOM_MODEL_PROVIDER
63001
+ })]);
63002
+ deps.notify(t("model-config-delete-success", { model: target.entry.model }), { color: "success" });
63003
+ notifyRestartRequired(deps);
63004
+ return "deleted";
63005
+ }
63006
+ function notifyRestartRequired(deps) {
63007
+ deps.notify(t("model-config-restart-required"), {
63008
+ color: "warning",
63009
+ timeoutMs: 8e3
63010
+ });
63011
+ }
63012
+ function configuredModels(host) {
63013
+ return host.customModels.list().map((entry) => ({ entry }));
63014
+ }
63015
+ function draftFromTarget(target) {
63016
+ return {
63017
+ api: target.entry.protocol,
63018
+ model: target.entry.model,
63019
+ baseURL: target.entry.baseUrl,
63020
+ description: target.entry.description ?? "",
63021
+ maxTokens: target.entry.maxTokens,
63022
+ contextWindow: target.entry.contextWindow,
63023
+ keyChange: "keep",
63024
+ apiKey: void 0
63025
+ };
63026
+ }
63027
+ function toConfigInput(draft) {
63028
+ return {
63029
+ model: draft.model,
63030
+ baseUrl: draft.baseURL,
63031
+ description: draft.description,
63032
+ protocol: draft.api,
63033
+ maxTokens: draft.maxTokens,
63034
+ contextWindow: draft.contextWindow,
63035
+ keyChange: draft.keyChange,
63036
+ apiKey: draft.apiKey
63037
+ };
63038
+ }
63039
+ function modelRef(target) {
63040
+ return `${target.entry.sourceIndex}/${target.entry.model}`;
63041
+ }
63042
+ function modelRowDescription(target) {
63043
+ return `${t("model-config-custom-provider-label")} · ${target.entry.model}`;
63044
+ }
63045
+ function customModelDisplayName(target) {
63046
+ return target.entry.description?.trim() || target.entry.model;
63047
+ }
62413
63048
  function maasModelDisplayName(model) {
62414
63049
  return model.name?.trim() || model.id;
62415
63050
  }
62416
63051
  function markCurrent(label, current) {
62417
63052
  return current ? `${label} ${t("model-config-current-tag")}` : label;
62418
63053
  }
63054
+ function keyDisplay(draft, target) {
63055
+ if (draft.keyChange === "replace" && draft.apiKey !== void 0) return t("model-config-key-configured-form");
63056
+ return target?.entry.apiKeyConfigured === true ? t("model-config-key-configured-form") : t("model-config-key-not-configured");
63057
+ }
63058
+ function protocolDisplay(api) {
63059
+ if (api === "openai-completions") return "OpenAI-compatible";
63060
+ if (api === "anthropic-messages") return "Anthropic Messages";
63061
+ return api;
63062
+ }
63063
+ function shown(value, fallback) {
63064
+ return value === "" ? fallback : value;
63065
+ }
63066
+ function summaryForTarget(target) {
63067
+ return summaryLines(draftFromTarget(target), target.entry.apiKeyConfigured);
63068
+ }
63069
+ function modelActionDetail(target) {
63070
+ const draft = draftFromTarget(target);
63071
+ return [
63072
+ t("model-config-detail-protocol", { api: protocolDisplay(draft.api) }),
63073
+ t("model-config-detail-baseurl", { url: shown(draft.baseURL, t("model-config-value-unset")) }),
63074
+ t("model-config-detail-key", { state: target.entry.apiKeyConfigured ? t("model-config-key-configured") : t("model-config-key-not-configured") }),
63075
+ t("model-config-detail-max-tokens", { value: draft.maxTokens ?? t("model-config-value-default") }),
63076
+ t("model-config-detail-context-window", { value: draft.contextWindow ?? t("model-config-value-default") })
63077
+ ].join("\n");
63078
+ }
63079
+ function summaryLines(input, keyConfigured) {
63080
+ return [
63081
+ t("model-config-line-provider", {
63082
+ provider: t("model-config-custom-provider-label"),
63083
+ route: CUSTOM_MODEL_PROVIDER
63084
+ }),
63085
+ t("model-config-line-model", { model: input.model }),
63086
+ t("model-config-line-protocol", { api: input.api }),
63087
+ t("model-config-line-baseurl", { url: input.baseURL }),
63088
+ t("model-config-line-key", { state: keyConfigured ? t("model-config-key-configured") : t("model-config-key-not-configured") }),
63089
+ t("model-config-line-description", { description: input.description || t("model-config-value-none") }),
63090
+ t("model-config-line-max-tokens", { value: input.maxTokens ?? t("model-config-value-default") }),
63091
+ t("model-config-line-context-window", { value: input.contextWindow ?? t("model-config-value-default") })
63092
+ ];
63093
+ }
63094
+ function validateDraft(input, existingKey) {
63095
+ if (!CUSTOM_MODEL_PROTOCOLS.includes(input.api)) return t("model-config-invalid-protocol");
63096
+ if (input.model === "") return t("model-config-invalid-model");
63097
+ if (!validBaseUrl(input.baseURL)) return t("model-config-invalid-baseurl");
63098
+ if (input.keyChange === "replace" && (input.apiKey === void 0 || !LEGAL_API_KEY.test(input.apiKey))) return t("model-config-invalid-apikey");
63099
+ if (input.keyChange === "keep" && !existingKey) return t("model-config-invalid-apikey");
63100
+ if (input.maxTokens !== void 0 && input.contextWindow !== void 0 && input.maxTokens > input.contextWindow) return t("model-config-invalid-capacity-order");
63101
+ }
63102
+ function validBaseUrl(value) {
63103
+ try {
63104
+ const url = new URL(value);
63105
+ return (url.protocol === "http:" || url.protocol === "https:") && url.username === "" && url.password === "" && url.search === "" && url.hash === "";
63106
+ } catch {
63107
+ return false;
63108
+ }
63109
+ }
63110
+ /** Parse a positive integer, accepting friendly K/M suffixes. */
63111
+ function parseCapacity(value) {
63112
+ const match = /^(\d+(?:\.\d+)?)\s*([km])?$/iu.exec(value.trim());
63113
+ if (match === null) return void 0;
63114
+ const multiplier = match[2]?.toLowerCase() === "k" ? 1e3 : match[2]?.toLowerCase() === "m" ? 1e6 : 1;
63115
+ const parsed = Number(match[1]) * multiplier;
63116
+ return Number.isSafeInteger(parsed) && parsed > 0 ? parsed : void 0;
63117
+ }
62419
63118
  //#endregion
62420
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-declared-cursor.js
63119
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-declared-cursor.js
62421
63120
  /**
62422
63121
  * Declares where the terminal cursor should be parked after each frame.
62423
63122
  *
@@ -62466,7 +63165,7 @@ function useDeclaredCursor(options) {
62466
63165
  return setNode;
62467
63166
  }
62468
63167
  //#endregion
62469
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/measure-element.js
63168
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/measure-element.js
62470
63169
  /**
62471
63170
  * Measure the rendered dimensions of a Box element.
62472
63171
  * @param node - the DOM element to measure.
@@ -62477,7 +63176,7 @@ const measureElement = (node) => ({
62477
63176
  height: node.yogaNode?.getComputedHeight() ?? 0
62478
63177
  });
62479
63178
  //#endregion
62480
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/Divider.js
63179
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/Divider.js
62481
63180
  const MAX_APPLIED_MEASUREMENTS = 8;
62482
63181
  /**
62483
63182
  * A horizontal divider line, optionally with a title in the middle
@@ -62560,9 +63259,9 @@ function Divider({ width, color, char = "─", padding = 0, title, bleed = false
62560
63259
  });
62561
63260
  }
62562
63261
  //#endregion
62563
- //#region ../../node_modules/.pnpm/marked@18.0.14/node_modules/marked/lib/marked.esm.js
63262
+ //#region ../../node_modules/.pnpm/marked@18.1.0/node_modules/marked/lib/marked.esm.js
62564
63263
  /**
62565
- * marked v18.0.14 - a markdown parser
63264
+ * marked v18.1.0 - a markdown parser
62566
63265
  * Copyright (c) 2018-2026, MarkedJS. (MIT License)
62567
63266
  * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
62568
63267
  * https://github.com/markedjs/marked
@@ -62585,9 +63284,9 @@ function I() {
62585
63284
  walkTokens: null
62586
63285
  };
62587
63286
  }
62588
- var y = I();
63287
+ var P = I();
62589
63288
  function W(l) {
62590
- y = l;
63289
+ P = l;
62591
63290
  }
62592
63291
  var A = { exec: () => null };
62593
63292
  function C(l) {
@@ -62673,7 +63372,7 @@ var _e = ((l = "") => {
62673
63372
  headingBeginRegex: C((l) => new RegExp(`^ {0,${l}}#`)),
62674
63373
  htmlBeginRegex: C((l) => new RegExp(`^ {0,${l}}(?:</?(?:${N})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`, "i")),
62675
63374
  blockquoteBeginRegex: C((l) => new RegExp(`^ {0,${l}}>`))
62676
- }, $e = /^(?:[ \t]*(?:\n|$))+/, Le = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ze = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, G = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ae = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, J = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ce = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, he = h(ce).replace(/bull/g, J).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Ee = h(ce).replace(/bull/g, J).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), V = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Me = /^[^\n]+/, Y = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ie = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Y).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ce = h(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, J).getRegex(), N = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", ee = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Be = h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", ee).replace("tag", N).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), de = (l) => h(V).replace("hr", G).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", l).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", N).getRegex(), De = de(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), qe = de(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), te = {
63375
+ }, $e = /^(?:[ \t]*(?:\n|$))+/, Le = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ze = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, G = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ae = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, J = / {0,3}(?:[*+-]|\d{1,9}[.)])/, he = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, de = h(he).replace(/bull/g, J).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Ee = h(he).replace(/bull/g, J).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/hr/g, / {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), V = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Me = /^[^\n]+/, Y = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ie = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Y).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ce = h(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, J).getRegex(), N = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", ee = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Be = h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", ee).replace("tag", N).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ke = (l) => h(V).replace("hr", G).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", l).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", N).getRegex(), De = ke(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), qe = ke(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), te = {
62677
63376
  blockquote: h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", qe).getRegex(),
62678
63377
  code: Le,
62679
63378
  def: Ie,
@@ -62681,17 +63380,17 @@ var _e = ((l = "") => {
62681
63380
  heading: Ae,
62682
63381
  hr: G,
62683
63382
  html: Be,
62684
- lheading: he,
63383
+ lheading: de,
62685
63384
  list: Ce,
62686
63385
  newline: $e,
62687
63386
  paragraph: De,
62688
63387
  table: A,
62689
63388
  text: Me
62690
- }, le = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", G).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", N).getRegex(), Ze = {
63389
+ }, ue = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", G).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", N).getRegex(), Ze = {
62691
63390
  ...te,
62692
63391
  lheading: Ee,
62693
- table: le,
62694
- paragraph: h(V).replace("hr", G).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", le).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", N).getRegex()
63392
+ table: ue,
63393
+ paragraph: h(V).replace("hr", G).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ue).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", N).getRegex()
62695
63394
  }, He = {
62696
63395
  ...te,
62697
63396
  html: h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ee).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
@@ -62700,13 +63399,13 @@ var _e = ((l = "") => {
62700
63399
  fences: A,
62701
63400
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
62702
63401
  paragraph: h(V).replace("hr", G).replace("heading", ` *#{1,6} *[^
62703
- ]`).replace("lheading", he).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
62704
- }, Ge = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ne = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ke = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, Qe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, $ = /[\p{P}\p{S}]/u, B = /[\s\p{P}\p{S}]/u, Q = /[^\s\p{P}\p{S}]/u, je = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, B).getRegex(), Fe = /[\p{Pi}\p{Ps}"']/u, ge = /(?!~)[\p{P}\p{S}]/u, Ue = /(?!~)[\s\p{P}\p{S}]/u, Ke = /(?:[^\s\p{P}\p{S}]|~)/u, We = h(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", _e ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), fe = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Xe = h(fe, "u").replace(/punct/g, $).getRegex(), Je = h(fe, "u").replace(/punct/g, ge).getRegex(), Ye = h(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, Fe).replace(/punct/g, $).getRegex(), me = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", et = h(me, "gu").replace(/notPunctSpace/g, Q).replace(/punctSpace/g, B).replace(/punct/g, $).getRegex(), tt = h(me, "gu").replace(/notPunctSpace/g, Ke).replace(/punctSpace/g, Ue).replace(/punct/g, ge).getRegex(), rt = h("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Q).replace(/punctSpace/g, B).replace(/punct/g, $).getRegex(), st = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Q).replace(/punctSpace/g, B).replace(/punct/g, $).getRegex(), ot = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Q).replace(/punctSpace/g, B).replace(/punct/g, $).getRegex(), at = h(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, $).getRegex(), ut = h("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Q).replace(/punctSpace/g, B).replace(/punct/g, $).getRegex(), pt = h(/\\(punct)/, "gu").replace(/punct/g, $).getRegex(), ct = h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ht = h(ee).replace("(?:-->|$)", "-->").getRegex(), dt = h("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ht).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), xe = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, U = h(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", xe).getRegex(), kt = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", U).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), gt = h(/^!?\[(label)\]\[(ref)\]/).replace("label", U).replace("ref", Y).getRegex(), ft = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Y).getRegex(), ue = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, mt = h(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", xe).getRegex(), xt = h("reflink|nolink(?!\\()", "g").replace("reflink", h(/^!?\[(label)\]\[(ref)\]/).replace("label", mt).replace("ref", ue).getRegex()).replace("nolink", h(/^!?\[(ref)\](?:\[\])?/).replace("ref", ue).getRegex()).getRegex(), pe = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Rt = h(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), ne = {
63402
+ ]`).replace("lheading", de).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
63403
+ }, Ge = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ne = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ge = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, Qe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, $ = /[\p{P}\p{S}]/u, B = /[\s\p{P}\p{S}]/u, Q = /[^\s\p{P}\p{S}]/u, je = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, B).getRegex(), Fe = /[\p{Pi}\p{Ps}"']/u, fe = /(?!~)[\p{P}\p{S}]/u, Ue = /(?!~)[\s\p{P}\p{S}]/u, Ke = /(?:[^\s\p{P}\p{S}]|~)/u, We = h(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", _e ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), me = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Xe = h(me, "u").replace(/punct/g, $).getRegex(), Je = h(me, "u").replace(/punct/g, fe).getRegex(), Ye = h(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, "u").replace(/openQuote/g, Fe).replace(/punct/g, $).getRegex(), xe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", et = h(xe, "gu").replace(/notPunctSpace/g, Q).replace(/punctSpace/g, B).replace(/punct/g, $).getRegex(), tt = h(xe, "gu").replace(/notPunctSpace/g, Ke).replace(/punctSpace/g, Ue).replace(/punct/g, fe).getRegex(), rt = h("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Q).replace(/punctSpace/g, B).replace(/punct/g, $).getRegex(), st = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Q).replace(/punctSpace/g, B).replace(/punct/g, $).getRegex(), ot = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Q).replace(/punctSpace/g, B).replace(/punct/g, $).getRegex(), at = h(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, $).getRegex(), ut = h("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Q).replace(/punctSpace/g, B).replace(/punct/g, $).getRegex(), pt = h(/\\(punct)/, "gu").replace(/punct/g, $).getRegex(), ct = h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ht = h(ee).replace("(?:-->|$)", "-->").getRegex(), dt = h("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ht).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), be = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, U = h(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", be).getRegex(), kt = h(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label", U).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), gt = h(/^!?\[(label)\]\[(ref)\]/).replace("label", U).replace("ref", Y).getRegex(), ft = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Y).getRegex(), pe = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, mt = h(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", be).getRegex(), xt = h("reflink|nolink(?!\\()", "g").replace("reflink", h(/^!?\[(label)\]\[(ref)\]/).replace("label", mt).replace("ref", pe).getRegex()).replace("nolink", h(/^!?\[(ref)\](?:\[\])?/).replace("ref", pe).getRegex()).getRegex(), ce = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Rt = h(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g, /[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), ne = {
62705
63404
  _backpedal: A,
62706
63405
  anyPunctuation: pt,
62707
63406
  autolink: ct,
62708
63407
  blockSkip: We,
62709
- br: ke,
63408
+ br: ge,
62710
63409
  code: Ne,
62711
63410
  del: A,
62712
63411
  delLDelim: A,
@@ -62736,13 +63435,13 @@ var _e = ((l = "") => {
62736
63435
  emStrongLDelim: Je,
62737
63436
  delLDelim: at,
62738
63437
  delRDelim: ut,
62739
- url: h(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", Rt).replace("protocol", pe).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
63438
+ url: h(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol", Rt).replace("protocol", ce).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),
62740
63439
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
62741
63440
  del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
62742
- text: h(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol", pe).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
63441
+ text: h(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol", ce).replace(/emailProtocol/g, /(?:mailto|xmpp):/).getRegex()
62743
63442
  }, Ot = {
62744
63443
  ...X,
62745
- br: h(ke).replace("{2,}", "*").getRegex(),
63444
+ br: h(ge).replace("{2,}", "*").getRegex(),
62746
63445
  text: h(X.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
62747
63446
  }, j = {
62748
63447
  normal: te,
@@ -62760,14 +63459,14 @@ var wt = {
62760
63459
  ">": "&gt;",
62761
63460
  "\"": "&quot;",
62762
63461
  "'": "&#39;"
62763
- }, be = (l) => wt[l];
63462
+ }, Re = (l) => wt[l];
62764
63463
  function O(l, e) {
62765
63464
  if (e) {
62766
- if (x.escapeTest.test(l)) return l.replace(x.escapeReplace, be);
62767
- } else if (x.escapeTestNoEncode.test(l)) return l.replace(x.escapeReplaceNoEncode, be);
63465
+ if (x.escapeTest.test(l)) return l.replace(x.escapeReplace, Re);
63466
+ } else if (x.escapeTestNoEncode.test(l)) return l.replace(x.escapeReplaceNoEncode, Re);
62768
63467
  return l;
62769
63468
  }
62770
- function Re(l) {
63469
+ function Te(l) {
62771
63470
  return l.replace(x.numericCharacterReference, (e, t, n) => {
62772
63471
  let s = t === void 0 ? Number.parseInt(n, 16) : Number.parseInt(t, 10);
62773
63472
  return s === 0 || s > 1114111 || s >= 55296 && s <= 57343 ? "�" : String.fromCodePoint(s);
@@ -62814,15 +63513,15 @@ function ie(l) {
62814
63513
  function q(l) {
62815
63514
  return l.trim().toLowerCase().toUpperCase().toLowerCase();
62816
63515
  }
62817
- function Te(l, e) {
62818
- if (l.indexOf(e[1]) === -1) return -1;
63516
+ function oe(l, e) {
63517
+ if (l.indexOf(e[0]) === -1 && l.indexOf(e[1]) === -1) return -1;
62819
63518
  let t = 0;
62820
63519
  for (let n = 0; n < l.length; n++) if (l[n] === "\\") n++;
62821
63520
  else if (l[n] === e[0]) t++;
62822
63521
  else if (l[n] === e[1] && (t--, t < 0)) return n;
62823
63522
  return t > 0 ? -2 : -1;
62824
63523
  }
62825
- function oe(l, e = 0) {
63524
+ function ae(l, e = 0) {
62826
63525
  let t = e, n = "";
62827
63526
  for (let s of l) if (s === " ") {
62828
63527
  let r = 4 - t % 4;
@@ -62852,7 +63551,7 @@ function Oe(l, e, t, n, s) {
62852
63551
  tokens: c
62853
63552
  };
62854
63553
  }
62855
- function yt(l, e, t) {
63554
+ function Pt(l, e, t) {
62856
63555
  let n = l.match(t.other.indentCodeCompensation);
62857
63556
  if (n === null) return e;
62858
63557
  let s = n[1];
@@ -62888,12 +63587,12 @@ function we(l, e, t, n) {
62888
63587
  }
62889
63588
  return !1;
62890
63589
  }
62891
- var P = class {
63590
+ var y = class {
62892
63591
  options;
62893
63592
  rules;
62894
63593
  lexer;
62895
63594
  constructor(e) {
62896
- this.options = e || y;
63595
+ this.options = e || P;
62897
63596
  }
62898
63597
  space(e) {
62899
63598
  let t = this.rules.block.newline.exec(e);
@@ -62917,7 +63616,7 @@ var P = class {
62917
63616
  fences(e) {
62918
63617
  let t = this.rules.block.fences.exec(e);
62919
63618
  if (t) {
62920
- let n = t[0], s = yt(n, t[3] || "", this.rules);
63619
+ let n = t[0], s = Pt(n, t[3] || "", this.rules);
62921
63620
  return {
62922
63621
  type: "code",
62923
63622
  raw: n,
@@ -63020,19 +63719,19 @@ ${Z.join(`
63020
63719
  if (!(t = o.exec(e)) || this.rules.block.hr.test(e)) break;
63021
63720
  p = t[0], e = e.substring(p.length);
63022
63721
  let d = t[2].split(`
63023
- `, 1)[0], m = t[1].length, b = this.options.pedantic ? oe(d, m) : d.replace(this.rules.other.leadingSpaceTab, (M) => oe(M, m)), g = e.split(`
63722
+ `, 1)[0], m = t[1].length, b = this.options.pedantic ? ae(d, m) : d.replace(this.rules.other.leadingSpaceTab, (M) => ae(M, m)), g = e.split(`
63024
63723
  `, 1)[0], w = !b.trim(), f = 0;
63025
63724
  if (this.options.pedantic ? (f = 2, c = b.trimStart()) : w ? f = m + 1 : (f = b.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = b.slice(f), f += m), w && this.rules.other.blankLine.test(g) && (p += g + `
63026
63725
  `, e = e.substring(g.length + 1), a = !0), !a) {
63027
- let M = this.rules.other.nextBulletRegex(f), v = this.rules.other.hrRegex(f), Z = this.rules.other.fencesBeginRegex(f), ae = this.rules.other.headingBeginRegex(f), ye = this.rules.other.htmlBeginRegex(f), Pe = this.rules.other.blockquoteBeginRegex(f);
63726
+ let M = this.rules.other.nextBulletRegex(f), v = this.rules.other.hrRegex(f), Z = this.rules.other.fencesBeginRegex(f), le = this.rules.other.headingBeginRegex(f), Pe = this.rules.other.htmlBeginRegex(f), ye = this.rules.other.blockquoteBeginRegex(f);
63028
63727
  for (; e;) {
63029
63728
  let K = e.split(`
63030
63729
  `, 1)[0], H;
63031
- if (g = K, this.options.pedantic ? (g = g.replace(this.rules.other.listReplaceNesting, " "), H = g) : H = g.replace(this.rules.other.leadingSpaceTab, (Se) => Se.replace(this.rules.other.tabCharGlobal, " ")), Z.test(g) || ae.test(g) || ye.test(g) || Pe.test(g) || M.test(g) || v.test(g)) break;
63730
+ if (g = K, this.options.pedantic ? (g = g.replace(this.rules.other.listReplaceNesting, " "), H = g) : H = g.replace(this.rules.other.leadingSpaceTab, (Se) => Se.replace(this.rules.other.tabCharGlobal, " ")), Z.test(g) || le.test(g) || Pe.test(g) || ye.test(g) || M.test(g) || v.test(g)) break;
63032
63731
  if (H.search(this.rules.other.nonSpaceChar) >= f || !g.trim()) c += `
63033
63732
  ` + H.slice(f);
63034
63733
  else {
63035
- if (w || b.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || Z.test(b) || ae.test(b) || v.test(b)) break;
63734
+ if (w || b.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || Z.test(b) || le.test(b) || v.test(b)) break;
63036
63735
  c += `
63037
63736
  ` + g;
63038
63737
  }
@@ -63104,6 +63803,7 @@ ${Z.join(`
63104
63803
  def(e) {
63105
63804
  let t = this.rules.block.def.exec(e);
63106
63805
  if (t) {
63806
+ if (!this.rules.other.startAngleBracket.test(t[2]) && oe(t[2], "()") !== -1) return;
63107
63807
  let n = q(t[1]).replace(this.rules.other.multipleSpaceGlobal, " "), s = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
63108
63808
  return {
63109
63809
  type: "def",
@@ -63200,6 +63900,7 @@ ${Z.join(`
63200
63900
  };
63201
63901
  }
63202
63902
  link(e) {
63903
+ if (this.lexer.state.linkParenPossible === !1) return;
63203
63904
  let t = this.rules.inline.link.exec(e);
63204
63905
  if (t) {
63205
63906
  let n = t[0].charAt(0) === "!" ? 2 : 1;
@@ -63210,7 +63911,7 @@ ${Z.join(`
63210
63911
  let i = L(s.slice(0, -1), "\\");
63211
63912
  if ((s.length - i.length) % 2 === 0) return;
63212
63913
  } else {
63213
- let i = Te(t[2], "()");
63914
+ let i = oe(t[2], "()");
63214
63915
  if (i === -2) return;
63215
63916
  if (i > -1) {
63216
63917
  let a = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + i;
@@ -63376,7 +64077,7 @@ ${Z.join(`
63376
64077
  return {
63377
64078
  type: "text",
63378
64079
  raw: t[0],
63379
- text: n ? t[0] : Re(t[0]),
64080
+ text: n ? t[0] : Te(t[0]),
63380
64081
  escaped: n
63381
64082
  };
63382
64083
  }
@@ -63389,10 +64090,11 @@ var R = class l {
63389
64090
  inlineQueue;
63390
64091
  tokenizer;
63391
64092
  constructor(e) {
63392
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || y, this.options.tokenizer = this.options.tokenizer || new P(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
64093
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || P, this.options.tokenizer = this.options.tokenizer || new y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
63393
64094
  inLink: !1,
63394
64095
  inRawBlock: !1,
63395
64096
  linkEmitted: !1,
64097
+ linkParenPossible: !0,
63396
64098
  top: !0
63397
64099
  };
63398
64100
  let t = {
@@ -63543,6 +64245,15 @@ var R = class l {
63543
64245
  }
63544
64246
  inlineTokens(e, t = []) {
63545
64247
  this.tokenizer.lexer = this;
64248
+ let n = this.state.linkParenPossible;
64249
+ this.state.linkParenPossible = n && e.includes(")");
64250
+ try {
64251
+ return this.#e(e, t);
64252
+ } finally {
64253
+ this.state.linkParenPossible = n;
64254
+ }
64255
+ }
64256
+ #e(e, t) {
63546
64257
  let n = e;
63547
64258
  if (this.tokens.links && e.includes("[")) {
63548
64259
  let i = this.tokenizer.rules.inline.reflinkSearch, u = (a) => {
@@ -63642,7 +64353,7 @@ var S = class {
63642
64353
  options;
63643
64354
  parser;
63644
64355
  constructor(e) {
63645
- this.options = e || y;
64356
+ this.options = e || P;
63646
64357
  }
63647
64358
  space(e) {
63648
64359
  return "";
@@ -63793,7 +64504,7 @@ var T = class l {
63793
64504
  renderer;
63794
64505
  textRenderer;
63795
64506
  constructor(e) {
63796
- this.options = e || y, this.options.renderer = this.options.renderer || new S(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new z$1();
64507
+ this.options = e || P, this.options.renderer = this.options.renderer || new S(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new z$1();
63797
64508
  }
63798
64509
  static parse(e, t) {
63799
64510
  return new l(t).parse(e);
@@ -63946,7 +64657,7 @@ var _ = class {
63946
64657
  options;
63947
64658
  block;
63948
64659
  constructor(e) {
63949
- this.options = e || y;
64660
+ this.options = e || P;
63950
64661
  }
63951
64662
  static passThroughHooks = new Set([
63952
64663
  "preprocess",
@@ -63987,7 +64698,7 @@ var F = class {
63987
64698
  Renderer = S;
63988
64699
  TextRenderer = z$1;
63989
64700
  Lexer = R;
63990
- Tokenizer = P;
64701
+ Tokenizer = y;
63991
64702
  Hooks = _;
63992
64703
  constructor(...e) {
63993
64704
  this.use(...e);
@@ -64052,7 +64763,7 @@ var F = class {
64052
64763
  s.renderer = r;
64053
64764
  }
64054
64765
  if (n.tokenizer) {
64055
- let r = this.defaults.tokenizer || new P(this.defaults);
64766
+ let r = this.defaults.tokenizer || new y(this.defaults);
64056
64767
  for (let o in n.tokenizer) {
64057
64768
  if (!(o in r)) throw new Error(`tokenizer '${o}' does not exist`);
64058
64769
  if ([
@@ -64163,11 +64874,11 @@ k.options = k.setOptions = function(l) {
64163
64874
  return E.setOptions(l), k.defaults = E.defaults, W(k.defaults), k;
64164
64875
  };
64165
64876
  k.getDefaults = I;
64166
- k.defaults = y;
64167
- function Pt(...l) {
64877
+ k.defaults = P;
64878
+ function yt(...l) {
64168
64879
  return E.use(...l), k.defaults = E.defaults, W(k.defaults), k;
64169
64880
  }
64170
- k.use = Pt;
64881
+ k.use = yt;
64171
64882
  k.walkTokens = function(l, e) {
64172
64883
  return E.walkTokens(l, e);
64173
64884
  };
@@ -64178,7 +64889,7 @@ k.Renderer = S;
64178
64889
  k.TextRenderer = z$1;
64179
64890
  k.Lexer = R;
64180
64891
  k.lexer = R.lex;
64181
- k.Tokenizer = P;
64892
+ k.Tokenizer = y;
64182
64893
  k.Hooks = _;
64183
64894
  k.parse = k;
64184
64895
  k.options;
@@ -64188,7 +64899,7 @@ k.parseInline;
64188
64899
  T.parse;
64189
64900
  R.lex;
64190
64901
  //#endregion
64191
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/syntaxTheme.js
64902
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/syntaxTheme.js
64192
64903
  /** highlight.js token classes -> theme syntax tokens. `default` catches
64193
64904
  * every unmapped class so cli-highlight's own yellow never leaks through
64194
64905
  * (issue #250, P2-6). */
@@ -64254,7 +64965,7 @@ function buildSyntaxTheme(theme) {
64254
64965
  return out;
64255
64966
  }
64256
64967
  //#endregion
64257
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/hyperlink.js
64968
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/hyperlink.js
64258
64969
  /** OSC 8 hyperlink start sequence: `ESC ] 8 ; ;`, followed by the URL. */
64259
64970
  const OSC8_START = "\x1B]8;;";
64260
64971
  /** Schemes a rendered hyperlink may point at. Anything else degrades to
@@ -64296,7 +65007,7 @@ function createHyperlink(url, content, options) {
64296
65007
  return `${OSC8_START}${safeUrl}${(options?.style ?? ((text) => chalk.blue(text)))(displayText)}${OSC8_START}`;
64297
65008
  }
64298
65009
  //#endregion
64299
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/fileTarget.js
65010
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/fileTarget.js
64300
65011
  /**
64301
65012
  * Clickable file targets: turning path-like text in AI output into
64302
65013
  * clickable targets, and resolving those targets back to absolute paths at
@@ -64438,7 +65149,7 @@ function linkifyFilePaths(text, wrap) {
64438
65149
  });
64439
65150
  }
64440
65151
  //#endregion
64441
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/markdown.js
65152
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/markdown.js
64442
65153
  /**
64443
65154
  * Markdown-to-ANSI renderer over marked's token stream.
64444
65155
  *
@@ -64753,7 +65464,7 @@ function padAligned(content, displayWidth, targetWidth, align) {
64753
65464
  return content + " ".repeat(extra);
64754
65465
  }
64755
65466
  //#endregion
64756
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/cliHighlight.js
65467
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/cliHighlight.js
64757
65468
  let cliHighlightPromise;
64758
65469
  async function loadCliHighlight() {
64759
65470
  try {
@@ -64776,7 +65487,7 @@ function getCliHighlightPromise() {
64776
65487
  return cliHighlightPromise;
64777
65488
  }
64778
65489
  //#endregion
64779
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/MarkdownTable.js
65490
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/MarkdownTable.js
64780
65491
  /** Accounts for parent indentation and terminal resize races (from Claude Code). */
64781
65492
  const SAFETY_MARGIN = 4;
64782
65493
  /** Minimum column width to prevent degenerate layouts */
@@ -64963,7 +65674,7 @@ function MarkdownTable({ token, highlight, forceWidth }) {
64963
65674
  return (0, import_jsx_runtime.jsx)(Text, { children: tableLines.join("\n") });
64964
65675
  }
64965
65676
  //#endregion
64966
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Markdown.js
65677
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Markdown.js
64967
65678
  const TOKEN_CACHE_CAPACITY = 200;
64968
65679
  const TOKEN_CACHE_CHAR_BUDGET = 2e5;
64969
65680
  const TOKEN_CACHE_MAX_SOURCE_LENGTH = 2e4;
@@ -65072,7 +65783,7 @@ function MarkdownImpl({ children, dimColor = false, cacheTokens = true }) {
65072
65783
  */
65073
65784
  const Markdown = import_react.memo(MarkdownImpl, (prev, next) => prev.children === next.children && prev.dimColor === next.dimColor && prev.cacheTokens === next.cacheTokens);
65074
65785
  //#endregion
65075
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/questions/PlanReviewPanel.js
65786
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/questions/PlanReviewPanel.js
65076
65787
  /**
65077
65788
  * The plan-review panel — Claude Code style exit-plan-mode decision card
65078
65789
  * for the DSH user-interaction seam. plan-mode's `exit_plan_mode` tool asks
@@ -65394,7 +66105,7 @@ function PlanReviewPanel({ question, onAnswer, onCancel }) {
65394
66105
  });
65395
66106
  }
65396
66107
  //#endregion
65397
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/listWindow.js
66108
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/listWindow.js
65398
66109
  /**
65399
66110
  * 焦点居中的列表窗口:长列表只渲染焦点附近的一段,保证焦点行始终可见。
65400
66111
  * 瞬态面板走 OverlayAbove 零高度浮层后,超高部分会被 overflow 裁掉且焦点
@@ -65446,7 +66157,7 @@ function listWindow(heights, focusIndex, maxRows, gap = 0) {
65446
66157
  }
65447
66158
  }
65448
66159
  //#endregion
65449
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/questions/AskUserQuestionPanel.js
66160
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/questions/AskUserQuestionPanel.js
65450
66161
  /**
65451
66162
  * The questionnaire panel — Claude Code style ask-user-question UI for the
65452
66163
  * DSH user-interaction seam. One question per panel (progress header, header
@@ -66029,7 +66740,7 @@ function AskUserQuestionPanel({ question, position, total, answered, initialDraf
66029
66740
  });
66030
66741
  }
66031
66742
  //#endregion
66032
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/approvals/ApprovalPanel.js
66743
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/approvals/ApprovalPanel.js
66033
66744
  /**
66034
66745
  * The approval panel — Claude Code style permission prompt for the DSH
66035
66746
  * approval seam (`ctx.approval`). One ask per panel: a permission-colored
@@ -66154,7 +66865,7 @@ function ApprovalPanel({ approval, background = false, onDecide }) {
66154
66865
  });
66155
66866
  }
66156
66867
  //#endregion
66157
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/Pane.js
66868
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/Pane.js
66158
66869
  /**
66159
66870
  * A pane — a region below the prompt bounded by a colored top line with a
66160
66871
  * one-row gap above and horizontal padding, mirroring Claude Code's
@@ -66176,7 +66887,7 @@ function Pane({ children, color }) {
66176
66887
  });
66177
66888
  }
66178
66889
  //#endregion
66179
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/ListItem.js
66890
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/ListItem.js
66180
66891
  /**
66181
66892
  * A list item for selection UIs, mirroring Claude Code's
66182
66893
  * design-system/ListItem.tsx: `❯` pointer for the focused row, `✓`
@@ -66273,7 +66984,7 @@ function flattenDeep(node) {
66273
66984
  return node;
66274
66985
  }
66275
66986
  //#endregion
66276
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/HintLine.js
66987
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/HintLine.js
66277
66988
  /**
66278
66989
  * Localized shortcut-hint line: renders a `t('hint-*')` string, with the
66279
66990
  * `**primary shortcut**` segment (the main action's key, wrapped in `**` in
@@ -66290,7 +67001,7 @@ function HintLine({ text }) {
66290
67001
  }, index) : part) });
66291
67002
  }
66292
67003
  //#endregion
66293
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ExtensionDialog.js
67004
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ExtensionDialog.js
66294
67005
  /**
66295
67006
  * The managed plugin dialog (`ctx.tuiDialogs`) — one panel rendering the
66296
67007
  * store's current snapshot in the chat chrome (the slot approval/question
@@ -66550,7 +67261,7 @@ function InputDialog({ dialog, onDecide, onCancel }) {
66550
67261
  });
66551
67262
  }
66552
67263
  //#endregion
66553
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-search-highlight.js
67264
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-search-highlight.js
66554
67265
  /**
66555
67266
  * Set the search highlight query on the Ink instance. Non-empty → all
66556
67267
  * visible occurrences are inverted on the next frame (SGR 7, screen-buffer
@@ -66582,7 +67293,7 @@ function useSearchHighlight() {
66582
67293
  }, [ink]);
66583
67294
  }
66584
67295
  //#endregion
66585
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-terminal-title.js
67296
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/hooks/use-terminal-title.js
66586
67297
  /**
66587
67298
  * Declaratively set the terminal tab/window title.
66588
67299
  *
@@ -66605,7 +67316,7 @@ function useTerminalTitle(title) {
66605
67316
  }, [title, writeRaw]);
66606
67317
  }
66607
67318
  //#endregion
66608
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/sessions/format.js
67319
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/sessions/format.js
66609
67320
  /**
66610
67321
  * Session browser formatting.
66611
67322
  *
@@ -66854,7 +67565,7 @@ function projectName(cwd) {
66854
67565
  return normalized.split("/").filter(Boolean).at(-1) ?? normalized;
66855
67566
  }
66856
67567
  //#endregion
66857
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Tooltip.js
67568
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Tooltip.js
66858
67569
  /**
66859
67570
  * Tooltip hover system — the terminal equivalent of the HTML `title`
66860
67571
  * attribute. Attach {@link useTooltip} props to any Box whose visible text
@@ -67062,7 +67773,7 @@ function wrapTooltipContent(text, width) {
67062
67773
  return rows;
67063
67774
  }
67064
67775
  //#endregion
67065
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/messages/UserPromptMessage.js
67776
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/messages/UserPromptMessage.js
67066
67777
  /** User prompt row in the legacy CLI treatment: a full-width gray strip. */
67067
67778
  function UserPromptMessage({ text, addMargin, isSelected = false, onClick }) {
67068
67779
  const { columns } = useTerminalSize();
@@ -67091,7 +67802,7 @@ function UserPromptMessage({ text, addMargin, isSelected = false, onClick }) {
67091
67802
  });
67092
67803
  }
67093
67804
  //#endregion
67094
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/messages/AssistantTextMessage.js
67805
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/messages/AssistantTextMessage.js
67095
67806
  /**
67096
67807
  * Assistant text message: bullet + markdown body (mirroring Claude Code's default branch).
67097
67808
  *
@@ -67124,7 +67835,7 @@ function AssistantTextMessage({ text, addMargin, isSelected = false, isExpanded
67124
67835
  });
67125
67836
  }
67126
67837
  //#endregion
67127
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/StreamingMarkdown.js
67838
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/StreamingMarkdown.js
67128
67839
  /**
67129
67840
  * Renders markdown during streaming by splitting at the last top-level block
67130
67841
  * boundary: everything before is stable (memoized, never re-parsed), only the
@@ -67314,7 +68025,7 @@ function StreamingMarkdown({ children, dimColor = false }) {
67314
68025
  });
67315
68026
  }
67316
68027
  //#endregion
67317
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Spinner/spinnerUtils.js
68028
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Spinner/spinnerUtils.js
67318
68029
  /**
67319
68030
  * Spinner 动画的通用工具集:平台相关的帧字符选择、RGB 颜色插值、
67320
68031
  * HSL 色相转 RGB,以及 `rgb(...)` 颜色字符串的解析与记忆化。
@@ -67394,7 +68105,7 @@ function parseRGB(colorStr) {
67394
68105
  return parsed;
67395
68106
  }
67396
68107
  //#endregion
67397
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/shimmer.js
68108
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/shimmer.js
67398
68109
  /** Header blue-white ladder: brand → ice → pale → soft ice flash.
67399
68110
  * FLASH stays visibly blue (never pure white) — the highlight reads as a
67400
68111
  * mist-brightened crest, not a white strobe. */
@@ -67410,7 +68121,7 @@ const ICE = {
67410
68121
  b: 255
67411
68122
  };
67412
68123
  //#endregion
67413
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/messages/AssistantThinkingMessage.js
68124
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/messages/AssistantThinkingMessage.js
67414
68125
  /** Preview body rows — a FIXED row count (kimicode-style constant-height
67415
68126
  * ticker). Ink's truncate slices the whole string across newlines as one
67416
68127
  * logical line, so a single joined Text collapses to 1-2 rows whenever
@@ -67523,7 +68234,7 @@ function AssistantThinkingMessage({ thinking, textFull, addMargin, verbose, stre
67523
68234
  });
67524
68235
  }
67525
68236
  //#endregion
67526
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ToolUseLoader.js
68237
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ToolUseLoader.js
67527
68238
  const CATEGORY_BY_TOOL = {
67528
68239
  bash: "exec",
67529
68240
  powershell: "exec",
@@ -68104,7 +68815,7 @@ var ArrayDiff = class extends Diff {
68104
68815
  };
68105
68816
  new ArrayDiff();
68106
68817
  //#endregion
68107
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/syntaxRuns.js
68818
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/cc/syntaxRuns.js
68108
68819
  const ANSI16 = {
68109
68820
  30: "rgb(0,0,0)",
68110
68821
  31: "rgb(128,0,0)",
@@ -68189,7 +68900,7 @@ function syntaxThemeSignature(theme) {
68189
68900
  return Object.values(SYNTAX_CLASS_TO_TOKEN).map((key) => palette[key] ?? "").join("|");
68190
68901
  }
68191
68902
  //#endregion
68192
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/smoothReveal.js
68903
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/smoothReveal.js
68193
68904
  /**
68194
68905
  * Smooth streaming reveal — decouples "text the provider has delivered" from
68195
68906
  * "text the screen is showing" (the oh-my-pi `display.smoothStreaming` idea,
@@ -68435,7 +69146,7 @@ function revealLinesOf(key, total, options) {
68435
69146
  return Math.min(existing.revealed, total);
68436
69147
  }
68437
69148
  //#endregion
68438
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SplitDiffView.js
69149
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SplitDiffView.js
68439
69150
  /** Replace tabs so width math and alignment hold (pi convention). */
68440
69151
  const expandTabs = (text) => text.replaceAll(" ", " ");
68441
69152
  /**
@@ -68744,7 +69455,7 @@ function SplitDiffView({ diffs, width, maxRows, verbose, toolBackground = "none"
68744
69455
  });
68745
69456
  }
68746
69457
  //#endregion
68747
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SyntaxText.js
69458
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SyntaxText.js
68748
69459
  /** Async nested Text renderer. Lexes the complete payload before splitting. */
68749
69460
  function SyntaxText({ text, language, sourceText = text, lineIndex = 0, color, dimColor }) {
68750
69461
  const [highlighter, setHighlighter] = import_react.useState(null);
@@ -68788,7 +69499,7 @@ function SyntaxText({ text, language, sourceText = text, lineIndex = 0, color, d
68788
69499
  }, index)) });
68789
69500
  }
68790
69501
  //#endregion
68791
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/trajectory/format.js
69502
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/trajectory/format.js
68792
69503
  /**
68793
69504
  * Trajectory formatting — durations, clocks, badges and heat.
68794
69505
  *
@@ -68990,7 +69701,7 @@ function ledgerLayout(columns) {
68990
69701
  };
68991
69702
  }
68992
69703
  //#endregion
68993
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/hooks/useRevealVersion.js
69704
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/hooks/useRevealVersion.js
68994
69705
  /**
68995
69706
  * Reveal-frame wakeup as a React hook — bumps once per advancing ~30fps
68996
69707
  * scheduler tick so consumers re-run their render-phase cursor reads
@@ -69020,7 +69731,7 @@ function useRevealVersion(enabled = true) {
69020
69731
  return version;
69021
69732
  }
69022
69733
  //#endregion
69023
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/messages/AssistantToolUseMessage.js
69734
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/messages/AssistantToolUseMessage.js
69024
69735
  /** Tool display names: DSH emits lowercase tool ids (`bash`); Claude Code
69025
69736
  * shows capitalized names (`Bash`). Map the common ones, fall back to the
69026
69737
  * id with its first letter uppercased. */
@@ -69556,7 +70267,7 @@ function AssistantToolUseMessage({ tool, addMargin, verbose, isSelected = false,
69556
70267
  });
69557
70268
  }
69558
70269
  //#endregion
69559
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Chat/SubagentMessage.js
70270
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Chat/SubagentMessage.js
69560
70271
  /** The waterfall window is a Kimi Code style constant-height region. */
69561
70272
  const WATERFALL_ROWS = 3;
69562
70273
  /** Card left padding + the `│ ` gutter prefix. */
@@ -69764,7 +70475,7 @@ function SubagentMessage({ subagent, addMargin, activityFrames, onClick }) {
69764
70475
  });
69765
70476
  }
69766
70477
  //#endregion
69767
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Chat/JobCard.js
70478
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Chat/JobCard.js
69768
70479
  /** Card left padding + the `│ ` gutter prefix. */
69769
70480
  const WATERFALL_GUTTER = 4;
69770
70481
  /** Static status marker — deliberately NOT the animated activity-indicator
@@ -69917,7 +70628,7 @@ function JobCard({ job, addMargin, onClick }) {
69917
70628
  });
69918
70629
  }
69919
70630
  //#endregion
69920
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/InterruptedByUser.js
70631
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/InterruptedByUser.js
69921
70632
  /**
69922
70633
  * The dim "interrupted" row shown when the user stops a turn, mirroring
69923
70634
  * Claude Code's `InterruptedByUser.tsx`.
@@ -69932,7 +70643,7 @@ function InterruptedByUser() {
69932
70643
  })] });
69933
70644
  }
69934
70645
  //#endregion
69935
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/gitCommitStats.js
70646
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/gitCommitStats.js
69936
70647
  /**
69937
70648
  * 当月 AI 代码生成占比统计(移植自 chatcode-cli 的同名服务)。
69938
70649
  *
@@ -70100,7 +70811,7 @@ function computeAiRatioPercent(records) {
70100
70811
  return clampPercent(aiAdoptedTotal / addedTotal * 100);
70101
70812
  }
70102
70813
  //#endregion
70103
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/hooks/useAiRatio.js
70814
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/hooks/useAiRatio.js
70104
70815
  /**
70105
70816
  * 「AI代码生成占比」数据源 Hook(移植自 chatcode-cli 的同名 Hook)。
70106
70817
  *
@@ -70144,7 +70855,7 @@ function useAiRatio(enabled = true) {
70144
70855
  };
70145
70856
  }
70146
70857
  //#endregion
70147
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/truncateToWidth.js
70858
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/ink/truncateToWidth.js
70148
70859
  /**
70149
70860
  * Slice a string to at most `maxWidth` terminal cells, walking by code
70150
70861
  * point so CJK wide characters never split mid-glyph. Assumes no ANSI in
@@ -70162,7 +70873,7 @@ function truncateToWidth(text, maxWidth) {
70162
70873
  return out;
70163
70874
  }
70164
70875
  //#endregion
70165
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/LogoV2.js
70876
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/LogoV2.js
70166
70877
  /** Main ChatCode CLI package version shown in the startup information panel. */
70167
70878
  const VERSION = PRODUCT_VERSION;
70168
70879
  const PRODUCT_LABEL = "chatcode-cli";
@@ -70398,7 +71109,7 @@ function LogoV2({ model, effort, cwd, whale = true, aiRatio, drift }) {
70398
71109
  });
70399
71110
  }
70400
71111
  //#endregion
70401
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/messages/MessageMetadata.js
71112
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/messages/MessageMetadata.js
70402
71113
  /**
70403
71114
  * Transcript-mode metadata row: `HH:MM · model`, right-aligned above the
70404
71115
  * assistant text, mirroring Claude Code's MessageTimestamp + MessageModel,
@@ -70420,7 +71131,7 @@ function MessageMetadata({ timestamp, model }) {
70420
71131
  });
70421
71132
  }
70422
71133
  //#endregion
70423
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/narration.js
71134
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/narration.js
70424
71135
  /**
70425
71136
  * Strip the `⏵` self-narration line from assistant text. The
70426
71137
  * dsh-working-activity narrate contract puts exactly one `⏵` line at the
@@ -70536,7 +71247,7 @@ function ellipsize(line, maxWidth) {
70536
71247
  return `${out}…`;
70537
71248
  }
70538
71249
  //#endregion
70539
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/MessageList.js
71250
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/MessageList.js
70540
71251
  /**
70541
71252
  * Transcript rows rendered in the Claude Code visual language: user prompts
70542
71253
  * on a grey bubble with a `❯` pointer, assistant text with a `●` bullet and
@@ -71349,7 +72060,7 @@ function LogoHeader({ model, effort, cwd, whale = true, skipIntro = false }) {
71349
72060
  });
71350
72061
  }
71351
72062
  //#endregion
71352
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/TimelineRail.js
72063
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/TimelineRail.js
71353
72064
  /** ▴ / ▾ (U+25B4 / U+25BE — the small triangles; CP437-safe on ConHost too). */
71354
72065
  const CHEVRON_UP = " ▴";
71355
72066
  const CHEVRON_DOWN = " ▾";
@@ -71543,7 +72254,7 @@ function TimelineRail({ handle, turns, activeId, upId, downId, terminalWidth, ho
71543
72254
  }) });
71544
72255
  }
71545
72256
  //#endregion
71546
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ScrollbarGutter.js
72257
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ScrollbarGutter.js
71547
72258
  /** Thumb glyph across the 2-col gutter: solid, clearly positional —
71548
72259
  * deliberately distinct from the timeline's ━━ active tick. */
71549
72260
  const THUMB = "██";
@@ -71659,7 +72370,7 @@ function ScrollbarGutter({ handle, terminalWidth }) {
71659
72370
  }) });
71660
72371
  }
71661
72372
  //#endregion
71662
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/OverlayAbove.js
72373
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/OverlayAbove.js
71663
72374
  /**
71664
72375
  * 瞬态面板的浮层容器:absolute 定位 + bottom:'100%' 把面板底边钉在锚点
71665
72376
  * (父元素)顶边,向上覆盖转录尾部行,自身**不占布局高度**。
@@ -71692,7 +72403,7 @@ function OverlayAbove({ children, maxHeight }) {
71692
72403
  });
71693
72404
  }
71694
72405
  //#endregion
71695
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/trajectory/motion.js
72406
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/trajectory/motion.js
71696
72407
  /**
71697
72408
  * Trajectory motion — five verbs, one shared clock, one hard rule.
71698
72409
  *
@@ -71817,7 +72528,7 @@ function alert(tick, startTick) {
71817
72528
  return Math.floor(age / 2) % 2 === 0 ? 1 : 0;
71818
72529
  }
71819
72530
  //#endregion
71820
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/trajectory/effortIgnition.js
72531
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/trajectory/effortIgnition.js
71821
72532
  /** 三幕时间轴(ms):扫光全长、字样启动(波至中段)、字样渐亮、渐隐起止。边框扫光与输入行字样徽标共用。 */
71822
72533
  const IGNITION_TIMELINE = {
71823
72534
  sweepMs: 1e3,
@@ -71965,7 +72676,7 @@ function ignitionLineColors(options) {
71965
72676
  return colors;
71966
72677
  }
71967
72678
  //#endregion
71968
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/EffortChargeGlyph.js
72679
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/EffortChargeGlyph.js
71969
72680
  /**
71970
72681
  * EffortChargeGlyph — 输入提示前缀 `❯ ` 的最高档强调与充能。
71971
72682
  *
@@ -72021,7 +72732,7 @@ function EffortChargeGlyph({ effort, levels, working }) {
72021
72732
  });
72022
72733
  }
72023
72734
  //#endregion
72024
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/EffortInputBorder.js
72735
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/EffortInputBorder.js
72025
72736
  /**
72026
72737
  * EffortInputBorder — 输入框层上的三幕点焰叠加(对齐 Codex 的完整
72027
72738
  * 语义:光扫过、档位字样浮现、整体渐隐)。
@@ -72156,7 +72867,7 @@ function EffortInputBorder({ effort, levels, columns, onLight, idleColor, topRig
72156
72867
  });
72157
72868
  }
72158
72869
  //#endregion
72159
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/EffortTierBadge.js
72870
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/EffortTierBadge.js
72160
72871
  /**
72161
72872
  * EffortTierBadge — 输入行尾的档位字样徽标:三幕点焰的第二幕载体
72162
72873
  * (与 EffortInputBorder 的双框扫光同一时间轴、同一触发),切到最高
@@ -72239,7 +72950,7 @@ function EffortTierBadge({ effort, levels, onLight, columns, leadingColumns }) {
72239
72950
  });
72240
72951
  }
72241
72952
  //#endregion
72242
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/clipboard.js
72953
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/clipboard.js
72243
72954
  /**
72244
72955
  * Cross-platform clipboard access for Ctrl+V paste. The TUI runs in raw
72245
72956
  * mode, so the terminal never performs its own paste for Ctrl+V — the key
@@ -72753,7 +73464,7 @@ function formatClipboardInsert(content) {
72753
73464
  return content.text.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
72754
73465
  }
72755
73466
  //#endregion
72756
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/externalEditor.js
73467
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/externalEditor.js
72757
73468
  /**
72758
73469
  * External editor round-trip for the prompt input (issue #123): Ctrl+G dumps
72759
73470
  * the current draft into a temp file, hands the terminal to `$VISUAL` /
@@ -73031,7 +73742,7 @@ async function editInExternalEditor(draft) {
73031
73742
  }
73032
73743
  }
73033
73744
  //#endregion
73034
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PromptEditor.js
73745
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PromptEditor.js
73035
73746
  let editorNode = null;
73036
73747
  const listeners = /* @__PURE__ */ new Set();
73037
73748
  /** Publish (or withdraw, with null) the fullscreen editor subtree. */
@@ -73107,7 +73818,7 @@ function EditorButton({ label, hint, onClick, primary, accent }) {
73107
73818
  });
73108
73819
  }
73109
73820
  //#endregion
73110
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/history.js
73821
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/history.js
73111
73822
  const HISTORY_DIR = DATA_DIR;
73112
73823
  const HISTORY_FILE = join(HISTORY_DIR, "history.jsonl");
73113
73824
  const HISTORY_LOCK = `${HISTORY_FILE}.lock`;
@@ -73241,7 +73952,7 @@ function historyEntryId(entry, index = 0) {
73241
73952
  return createHash("sha1").update(`${entry.text}\0${entry.ts}\0${index}`).digest("hex").slice(0, 12);
73242
73953
  }
73243
73954
  //#endregion
73244
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SuggestionCard.js
73955
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SuggestionCard.js
73245
73956
  /**
73246
73957
  * `/` 命令菜单与 `@` 文件菜单共用的圆角卡片外壳(与输入框 EffortInputBorder
73247
73958
  * 同款 ╭╮╰╯ 视觉语言):
@@ -73373,7 +74084,7 @@ function splitQueryMatch(name, query) {
73373
74084
  return startsWith(0) ?? (lastSpace >= 0 ? startsWith(lastSpace + 1) : null) ?? startsWith(name.lastIndexOf("/") + 1);
73374
74085
  }
73375
74086
  //#endregion
73376
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/CommandSuggestions.js
74087
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/CommandSuggestions.js
73377
74088
  /**
73378
74089
  * The slash-command suggestion overlay, mirroring Claude Code's
73379
74090
  * `PromptInputFooterSuggestions.tsx` (command layout only) wrapped in the
@@ -73453,7 +74164,7 @@ function CommandSuggestions({ commands, selectedIndex, columns, query = "", acce
73453
74164
  });
73454
74165
  }
73455
74166
  //#endregion
73456
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/FileSuggestions.js
74167
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/FileSuggestions.js
73457
74168
  /**
73458
74169
  * The `@` file-completion overlay in CC's suggestion style, wrapped in the
73459
74170
  * shared rounded `SuggestionCard` (与 `/` 命令菜单同一视觉语言):
@@ -73552,7 +74263,7 @@ function FileSuggestions({ files, selectedIndex, columns, query = "", accent, on
73552
74263
  });
73553
74264
  }
73554
74265
  //#endregion
73555
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/HelpMenu.js
74266
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/HelpMenu.js
73556
74267
  /**
73557
74268
  * The `?` help menu, mirroring Claude Code's `PromptInputHelpMenu.tsx`
73558
74269
  * (three-column shortcut layout, trimmed to the keys dsh-tui actually binds).
@@ -73743,7 +74454,7 @@ function HelpCommandRow({ command, onPick }) {
73743
74454
  });
73744
74455
  }
73745
74456
  //#endregion
73746
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PromptInput.js
74457
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PromptInput.js
73747
74458
  const HISTORY_LIMIT = 50;
73748
74459
  /**
73749
74460
  * Paste fold (CC-style collapse with a visible preview, no black box):
@@ -76023,7 +76734,7 @@ function wordSelectionAt(text, offset, lo, hi) {
76023
76734
  };
76024
76735
  }
76025
76736
  //#endregion
76026
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/GoalTodoPanel.js
76737
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/GoalTodoPanel.js
76027
76738
  /** Maximum todo rows shown before the overflow line. */
76028
76739
  const MAX_TODOS = 8;
76029
76740
  const PHASE_LABEL = {
@@ -76269,7 +76980,7 @@ function GoalTodoPanel({ channel, collapsed = false, onToggle }) {
76269
76980
  });
76270
76981
  }
76271
76982
  //#endregion
76272
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/AutoRecapRow.js
76983
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/AutoRecapRow.js
76273
76984
  /**
76274
76985
  * Auto-recap row (`dsh-tui.recapOnOpen` setting): a quiet, dim recap shown
76275
76986
  * at the bottom of the transcript after an automatic summary on session
@@ -76349,7 +77060,7 @@ function summarizeLoadedContext(context) {
76349
77060
  return parts.join(" · ");
76350
77061
  }
76351
77062
  //#endregion
76352
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/LoadedContextPanel.js
77063
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/LoadedContextPanel.js
76353
77064
  /** One named entry (section or dynamic context) with its full text. */
76354
77065
  function Entry({ entry }) {
76355
77066
  return (0, import_jsx_runtime.jsxs)(ThemedBox, {
@@ -76486,7 +77197,7 @@ function LoadedContextPanel({ context, open, onToggle }) {
76486
77197
  });
76487
77198
  }
76488
77199
  //#endregion
76489
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/MoonPhaseSpinner.js
77200
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/MoonPhaseSpinner.js
76490
77201
  /**
76491
77202
  * Terminal-safe construction cycle derived from the supplied China Unicom
76492
77203
  * knot mark. Every frame is one display cell, unlike emoji on mixed terminals.
@@ -76518,7 +77229,7 @@ function UnicomKnotSpinner({ time }) {
76518
77229
  });
76519
77230
  }
76520
77231
  //#endregion
76521
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ActivityLine.js
77232
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ActivityLine.js
76522
77233
  /**
76523
77234
  * Context-pressure percentage (0–100) from the last usage snapshot, or
76524
77235
  * undefined when unknown — shared by the spinner-line and status-line
@@ -76590,7 +77301,7 @@ function ActivityLine({ activity, activityFrames, warnPct, warnDanger, suffix })
76590
77301
  });
76591
77302
  }
76592
77303
  //#endregion
76593
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/trajectory/guards.js
77304
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/trajectory/guards.js
76594
77305
  /**
76595
77306
  * Structural guards for the session events the trajectory projection reads.
76596
77307
  *
@@ -76814,7 +77525,7 @@ function readTodos(data) {
76814
77525
  };
76815
77526
  }
76816
77527
  //#endregion
76817
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/trajectory/types.js
77528
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/trajectory/types.js
76818
77529
  /**
76819
77530
  * Trajectory projection — the data contract shared by the adapter-side fold
76820
77531
  * and the UI-side scene (issue #80 evolution).
@@ -76881,7 +77592,7 @@ function previewText(raw, limit) {
76881
77592
  return `${flat.slice(0, limit)}…`;
76882
77593
  }
76883
77594
  //#endregion
76884
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/trajectory/projection.js
77595
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/trajectory/projection.js
76885
77596
  /**
76886
77597
  * Trajectory projection — folding the session event log into ledger nodes.
76887
77598
  *
@@ -77460,7 +78171,7 @@ function extendTrajectory(previous, events) {
77460
78171
  };
77461
78172
  }
77462
78173
  //#endregion
77463
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/trajectory/aggregate.js
78174
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/trajectory/aggregate.js
77464
78175
  /**
77465
78176
  * Trajectory aggregate — the hotspot view's data and the session totals.
77466
78177
  *
@@ -77681,7 +78392,7 @@ function modelTiming(timing) {
77681
78392
  };
77682
78393
  }
77683
78394
  //#endregion
77684
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/trajectory/inspect.js
78395
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/trajectory/inspect.js
77685
78396
  /**
77686
78397
  * Inspector detail — full content, resolved on demand.
77687
78398
  *
@@ -77841,7 +78552,7 @@ function inspectNode(node, events) {
77841
78552
  };
77842
78553
  }
77843
78554
  //#endregion
77844
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/trajectory/wave.js
78555
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/trajectory/wave.js
77845
78556
  /**
77846
78557
  * Wave band projection — the whole session compressed onto one row of glyphs.
77847
78558
  *
@@ -78014,7 +78725,7 @@ function columnOfIndex(band, ledgerIndex) {
78014
78725
  return 0;
78015
78726
  }
78016
78727
  //#endregion
78017
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/trajectory/MiniWake.js
78728
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/trajectory/MiniWake.js
78018
78729
  /**
78019
78730
  * The mini wake — the whole session as a dozen glyphs in the status line.
78020
78731
  *
@@ -78117,7 +78828,7 @@ function toHex$1(colour) {
78117
78828
  return `#${hex(parsed.r)}${hex(parsed.g)}${hex(parsed.b)}`;
78118
78829
  }
78119
78830
  //#endregion
78120
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/StatusMetrics.js
78831
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/StatusMetrics.js
78121
78832
  /**
78122
78833
  * Status-line metric renderers, ported from two pi extensions:
78123
78834
  * - `pi-nano-context`: segmented context progress bar (morandi pastel
@@ -78393,7 +79104,7 @@ function tpsStats(samples, nowMs) {
78393
79104
  };
78394
79105
  }
78395
79106
  //#endregion
78396
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ContextBarView.js
79107
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ContextBarView.js
78397
79108
  /** Free-segment colors, mirroring StatusMetrics' dark-theme defaults. */
78398
79109
  const FREE_FILL = "#E8E8E8";
78399
79110
  const FREE_TEXT = "#4A4A4A";
@@ -78460,7 +79171,7 @@ function ContextBarView({ segments, usedTokens, contextWindow, width, colors, on
78460
79171
  });
78461
79172
  }
78462
79173
  //#endregion
78463
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/chatCodeTokenTrend.js
79174
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/chatCodeTokenTrend.js
78464
79175
  /**
78465
79176
  * ChatCode 今日总 Token 消耗量查询(移植自 chatcode-cli 的 chatCodeTokenTrend)。
78466
79177
  *
@@ -78535,7 +79246,7 @@ async function fetchTodayTotalTokens(post, signal) {
78535
79246
  }
78536
79247
  }
78537
79248
  //#endregion
78538
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/hooks/useTodayTotalTokens.js
79249
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/hooks/useTodayTotalTokens.js
78539
79250
  /**
78540
79251
  * 「今日总Token消耗」数据源 Hook(移植自 chatcode-cli 的 useTokenDashboard)。
78541
79252
  *
@@ -78567,7 +79278,7 @@ function useTodayTotalTokens(enabled = true) {
78567
79278
  return { totalTokens };
78568
79279
  }
78569
79280
  //#endregion
78570
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/TokenDashboard.js
79281
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/TokenDashboard.js
78571
79282
  const BAR_WIDTH = 14;
78572
79283
  /** Yuanjing-compatible percentage label centered inside a fixed-width bar. */
78573
79284
  function LabeledBar({ ratio, percent }) {
@@ -78643,7 +79354,7 @@ function TokenDashboard({ todayTokens, usedTokens, contextWindow, compact = fals
78643
79354
  });
78644
79355
  }
78645
79356
  //#endregion
78646
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/StatusLine.js
79357
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/StatusLine.js
78647
79358
  /** Stable fallback for stubbed channels: verify/repro harnesses render the
78648
79359
  * real Chat with partial channel literals that predate the jobs field. */
78649
79360
  const NO_BACKGROUND_JOBS = [];
@@ -79554,7 +80265,7 @@ const fallbackSymbols = {
79554
80265
  const figures = isUnicodeSupported() ? mainSymbols : fallbackSymbols;
79555
80266
  Object.entries(specialMainSymbols);
79556
80267
  //#endregion
79557
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/Byline.js
80268
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/Byline.js
79558
80269
  /**
79559
80270
  * Joins children with a middot separator (" · ") for inline metadata display
79560
80271
  * (in the Claude Code visual language). Automatically filters out
@@ -79570,7 +80281,7 @@ function Byline({ children }) {
79570
80281
  }), child] }, (0, import_react.isValidElement)(child) ? child.key ?? index : index)) });
79571
80282
  }
79572
80283
  //#endregion
79573
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Spinner/GlimmerMessage.js
80284
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Spinner/GlimmerMessage.js
79574
80285
  const ERROR_RED$1 = {
79575
80286
  r: 171,
79576
80287
  g: 43,
@@ -79660,7 +80371,7 @@ function GlimmerMessage({ message, mode, messageColor, glimmerIndex, flashOpacit
79660
80371
  })] });
79661
80372
  }
79662
80373
  //#endregion
79663
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Spinner/SpinnerGlyph.js
80374
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Spinner/SpinnerGlyph.js
79664
80375
  const DEFAULT_CHARACTERS = getDefaultCharacters();
79665
80376
  const SPINNER_FRAMES$1 = [...DEFAULT_CHARACTERS, ...[...DEFAULT_CHARACTERS].reverse()];
79666
80377
  const REDUCED_MOTION_DOT = "●";
@@ -79721,7 +80432,7 @@ function SpinnerGlyph({ frame, messageColor, stalledIntensity = 0, reducedMotion
79721
80432
  });
79722
80433
  }
79723
80434
  //#endregion
79724
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Spinner/useStalledAnimation.js
80435
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Spinner/useStalledAnimation.js
79725
80436
  /**
79726
80437
  * Tracks the transition to red when tokens stop flowing (mirroring Claude Code's `Spinner/useStalledAnimation.ts`). Driven by the parent's animation
79727
80438
  * clock time instead of independent intervals, so it slows down when the
@@ -79778,7 +80489,7 @@ function useStalledAnimation(time, currentResponseLength, hasActiveTools = false
79778
80489
  };
79779
80490
  }
79780
80491
  //#endregion
79781
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Spinner/SpinnerAnimationRow.js
80492
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Spinner/SpinnerAnimationRow.js
79782
80493
  const SEP_WIDTH = stringWidth$1(" · ");
79783
80494
  const THINKING_BARE_WIDTH = stringWidth$1("thinking");
79784
80495
  const SHOW_TOKENS_AFTER_MS = 3e4;
@@ -79945,7 +80656,7 @@ function SpinnerModeGlyph({ mode }) {
79945
80656
  }
79946
80657
  }
79947
80658
  //#endregion
79948
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/WorkingSpinner.js
80659
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/WorkingSpinner.js
79949
80660
  /**
79950
80661
  * The working spinner block shown between the transcript and the prompt
79951
80662
  * input while a turn is in flight. Mirrors Claude Code's `Spinner.tsx`
@@ -80015,7 +80726,7 @@ function useThinkingStatus(isThinking) {
80015
80726
  return thinkingStatus;
80016
80727
  }
80017
80728
  //#endregion
80018
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ModelPicker.js
80729
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ModelPicker.js
80019
80730
  /**
80020
80731
  * Model picker in the CC ModelPicker style: a permission-colored Pane with
80021
80732
  * the rows as Select entries (❯ focus pointer, ✓ on the active row,
@@ -80075,7 +80786,7 @@ function ModelPicker(props) {
80075
80786
  });
80076
80787
  }
80077
80788
  //#endregion
80078
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PluginSceneBoundary.js
80789
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PluginSceneBoundary.js
80079
80790
  /**
80080
80791
  * Error boundary for plugin scenes (dsh-tui-scenes). A scene component is
80081
80792
  * third-party code rendered inside Chat's tree: without a boundary a render
@@ -80101,7 +80812,7 @@ var PluginSceneBoundary = class extends import_react.Component {
80101
80812
  }
80102
80813
  };
80103
80814
  //#endregion
80104
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/LoadingState.js
80815
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/design-system/LoadingState.js
80105
80816
  const SPINNER_FRAMES = [...getDefaultCharacters(), ...[...getDefaultCharacters()].reverse()];
80106
80817
  /**
80107
80818
  * A spinner with a loading message for async operations, mirroring Claude Code's design-system/LoadingState.tsx (using the small animated glyph).
@@ -80132,7 +80843,7 @@ function LoadingState({ message, bold = false, dimColor = false, subtitle }) {
80132
80843
  });
80133
80844
  }
80134
80845
  //#endregion
80135
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SkillsPicker.js
80846
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SkillsPicker.js
80136
80847
  /** 来源桶 → 本地化标签(未知桶原样显示,SkillSource 对自定义桶开放)。 */
80137
80848
  function sourceLabel(source) {
80138
80849
  switch (source) {
@@ -80210,7 +80921,7 @@ function SkillsPickerLoading() {
80210
80921
  });
80211
80922
  }
80212
80923
  //#endregion
80213
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SearchBox.js
80924
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SearchBox.js
80214
80925
  /**
80215
80926
  * Window a single-line query around the caret so the visible slice fits
80216
80927
  * `avail` display cells (CJK display width, code-point safe — `[...s]`
@@ -80348,7 +81059,7 @@ function SearchBox({ query, placeholder = "Search…", isFocused, isTerminalFocu
80348
81059
  });
80349
81060
  }
80350
81061
  //#endregion
80351
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/sessions/SessionListRow.js
81062
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/sessions/SessionListRow.js
80352
81063
  /**
80353
81064
  * One session in the browser's list: a title line and a metadata line.
80354
81065
  *
@@ -80429,7 +81140,7 @@ function SessionListRow({ session, width, depth, focused, pinned, now, onClick,
80429
81140
  });
80430
81141
  }
80431
81142
  //#endregion
80432
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/sessions/SessionPreview.js
81143
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/sessions/SessionPreview.js
80433
81144
  /** Role marker and colour for a preview entry. */
80434
81145
  const ROLE = {
80435
81146
  user: {
@@ -80520,7 +81231,7 @@ function SessionPreview({ session, entries, loading, width, height, home, now })
80520
81231
  });
80521
81232
  }
80522
81233
  //#endregion
80523
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/sessions/WorkspaceListRow.js
81234
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/sessions/WorkspaceListRow.js
80524
81235
  /** One two-line working-directory choice in the /resume browser. */
80525
81236
  function WorkspaceListRow({ workspace, all, totalProjects, totalSessions, width, focused, selected, home, now, onClick }) {
80526
81237
  const [hovered, setHovered] = (0, import_react.useState)(false);
@@ -80565,7 +81276,7 @@ function WorkspaceListRow({ workspace, all, totalProjects, totalSessions, width,
80565
81276
  });
80566
81277
  }
80567
81278
  //#endregion
80568
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/sessions/view.js
81279
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/sessions/view.js
80569
81280
  /** The browser's default view: this project, conversations only. */
80570
81281
  const DEFAULT_FILTERS = {
80571
81282
  query: "",
@@ -80854,7 +81565,7 @@ function windowEnd(rows, top, budget) {
80854
81565
  return at;
80855
81566
  }
80856
81567
  //#endregion
80857
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/sessionPins.js
81568
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/sessionPins.js
80858
81569
  /**
80859
81570
  * Pinned sessions for the `/resume` browser, kept at
80860
81571
  * `~/.chatcode-cli/tui/session-pins.json` (a JSON array of session ids) so the pins
@@ -81003,7 +81714,7 @@ function setSessionPinned(id, pinned, dir = DATA_DIR) {
81003
81714
  }
81004
81715
  }
81005
81716
  //#endregion
81006
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/SessionBrowser.js
81717
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/SessionBrowser.js
81007
81718
  /**
81008
81719
  * Rows the layout cannot do without: the header, the four-row scope/search
81009
81720
  * card, the notice slot, and the hints. Everything else yields before these.
@@ -81889,7 +82600,7 @@ function SessionBrowser({ channel, home, sameProject, onClose }) {
81889
82600
  });
81890
82601
  }
81891
82602
  //#endregion
81892
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/SessionTree.js
82603
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/SessionTree.js
81893
82604
  /** Local HH:MM (or MM/DD HH:MM when older than this year). */
81894
82605
  function formatTime(at, now) {
81895
82606
  const date = new Date(at);
@@ -82645,7 +83356,7 @@ function PreviewPane({ entry, meta, width, height, liveSessionId, now, compact }
82645
83356
  });
82646
83357
  }
82647
83358
  //#endregion
82648
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/Settings.js
83359
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/Settings.js
82649
83360
  /** Pick the provider-owned translation for the active language. */
82650
83361
  function pick(text, descriptions) {
82651
83362
  return descriptions?.[getLang()] ?? text;
@@ -82893,6 +83604,12 @@ function Settings({ channel, onClose, initialGroup }) {
82893
83604
  import_react.useEffect(() => channel.subscribeSettingsSections(() => {
82894
83605
  setSections(channel.settingsSections());
82895
83606
  }), [channel]);
83607
+ import_react.useEffect(() => {
83608
+ const refresh = () => setNamespaces(host?.listNamespaces() ?? []);
83609
+ const unsubscribe = host?.subscribe?.(refresh);
83610
+ refresh();
83611
+ return unsubscribe;
83612
+ }, [host]);
82896
83613
  const formsRef = import_react.useRef(/* @__PURE__ */ new Map());
82897
83614
  const forms = /* @__PURE__ */ new Map();
82898
83615
  if (host !== void 0) for (const section of sections) {
@@ -83389,7 +84106,7 @@ function Settings({ channel, onClose, initialGroup }) {
83389
84106
  });
83390
84107
  }
83391
84108
  //#endregion
83392
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/WorkspacePicker.js
84109
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/WorkspacePicker.js
83393
84110
  const WINDOW$1 = 8;
83394
84111
  /** `/workspace` target picker contributed by local and optional providers. */
83395
84112
  function WorkspacePicker({ targets, focusIndex, currentCwd, onPick }) {
@@ -83427,7 +84144,7 @@ function WorkspacePicker({ targets, focusIndex, currentCwd, onPick }) {
83427
84144
  });
83428
84145
  }
83429
84146
  //#endregion
83430
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Select.js
84147
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/Select.js
83431
84148
  /**
83432
84149
  * A single-choice select list in the CC CustomSelect style (ported visual:
83433
84150
  * ListItem rows with ❯ focus pointer, ✓ selected checkmark, descriptions,
@@ -83454,7 +84171,7 @@ function Select({ options, focusIndex, selectedValue, visibleOptionCount = 5, on
83454
84171
  });
83455
84172
  }
83456
84173
  //#endregion
83457
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/WorkspaceMenuPicker.js
84174
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/WorkspaceMenuPicker.js
83458
84175
  /**
83459
84176
  * Bare `/workspace` action menu: the built-in subcommands (resume / rename /
83460
84177
  * open) plus any dynamically registered workspace extensions. Enter runs the
@@ -83495,7 +84212,7 @@ function WorkspaceMenuPicker({ options, focusIndex, onPick }) {
83495
84212
  });
83496
84213
  }
83497
84214
  //#endregion
83498
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/WorkspaceFlowPicker.js
84215
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/WorkspaceFlowPicker.js
83499
84216
  const WINDOW = 8;
83500
84217
  /** Generic nested choice surface returned by a workspace provider command. */
83501
84218
  function WorkspaceFlowPicker({ title, choices, focusIndex, busy = false, input = null, onPick }) {
@@ -83553,7 +84270,7 @@ function WorkspaceFlowPicker({ title, choices, focusIndex, busy = false, input =
83553
84270
  });
83554
84271
  }
83555
84272
  //#endregion
83556
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ActivityPicker.js
84273
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ActivityPicker.js
83557
84274
  /**
83558
84275
  * Working-activity indicator picker in the CC ModelPicker style (ported
83559
84276
  * from the pi extension's `/activity` interactive select): a
@@ -83595,7 +84312,7 @@ function ActivityPicker({ focusIndex, currentPreset, onPick }) {
83595
84312
  });
83596
84313
  }
83597
84314
  //#endregion
83598
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ColorPicker.js
84315
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ColorPicker.js
83599
84316
  /**
83600
84317
  * Session accent color picker (bare `/color`): a permission-colored Pane
83601
84318
  * listing the whole palette with a colored swatch per row, `❯` focus
@@ -83639,7 +84356,7 @@ function ColorPicker({ focusIndex, currentColor, onPick }) {
83639
84356
  });
83640
84357
  }
83641
84358
  //#endregion
83642
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/EffortSlider.js
84359
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/EffortSlider.js
83643
84360
  /**
83644
84361
  * Reasoning-effort slider (`/effort`): a rheostat row of the live route's
83645
84362
  * adapter-owned levels in adapter order, ←/→ moving focus (each move applies
@@ -83698,7 +84415,7 @@ function EffortSlider({ options, focusIndex, currentId, onPick }) {
83698
84415
  });
83699
84416
  }
83700
84417
  //#endregion
83701
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PresetPicker.js
84418
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PresetPicker.js
83702
84419
  /**
83703
84420
  * Agent-preset picker (issue #8) in the CC ModelPicker style — same chrome
83704
84421
  * as the ActivityPicker: a permission-colored Pane listing every roster
@@ -83742,7 +84459,7 @@ function PresetPicker({ presets, focusIndex, currentPreset, onPick }) {
83742
84459
  });
83743
84460
  }
83744
84461
  //#endregion
83745
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PermissionsPicker.js
84462
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PermissionsPicker.js
83746
84463
  /**
83747
84464
  * `/permission` sandbox-preset picker. The command itself is registered by
83748
84465
  * the harness side (dsh-sandbox-policy / dsh-base permission-presets row);
@@ -83789,7 +84506,7 @@ function PermissionsPicker({ options, focusIndex, currentValue, cwd, onPick }) {
83789
84506
  });
83790
84507
  }
83791
84508
  //#endregion
83792
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PlanPicker.js
84509
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/PlanPicker.js
83793
84510
  /**
83794
84511
  * `/plan` on/off picker. The command itself is registered by dsh-plan-mode
83795
84512
  * on the harness side; bare `/plan` opens this picker (with the current
@@ -83834,7 +84551,7 @@ function PlanPicker({ focusIndex, currentOn, onPick }) {
83834
84551
  });
83835
84552
  }
83836
84553
  //#endregion
83837
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/LangPicker.js
84554
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/LangPicker.js
83838
84555
  /**
83839
84556
  * `/lang` en/zh picker: bare `/lang` opens this picker (the current language
83840
84557
  * marked) and Enter applies the choice through the same path as `/lang <id>`.
@@ -83873,7 +84590,7 @@ function LangPicker({ focusIndex, currentLang, onPick }) {
83873
84590
  });
83874
84591
  }
83875
84592
  //#endregion
83876
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ThemePicker.js
84593
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ThemePicker.js
83877
84594
  /** One double-block swatch character per preview key, in a row. */
83878
84595
  const SWATCH = "██";
83879
84596
  /** Theme keys previewed in the picker, chosen for visual contrast. */
@@ -83959,7 +84676,7 @@ function ThemePicker({ focusIndex, currentTheme, themeHost, onPick }) {
83959
84676
  });
83960
84677
  }
83961
84678
  //#endregion
83962
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ThinkingToggle.js
84679
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ThinkingToggle.js
83963
84680
  /**
83964
84681
  * The `/thinking` display dialog: a permission-colored Pane with a bold
83965
84682
  * title, the Shown/Hidden select, and the Enter/Esc hint line.
@@ -84008,7 +84725,7 @@ function ThinkingToggle({ currentValue, focusIndex, onPick }) {
84008
84725
  });
84009
84726
  }
84010
84727
  //#endregion
84011
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/HistorySearchDialog.js
84728
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/HistorySearchDialog.js
84012
84729
  /**
84013
84730
  * The ctrl+r history search dialog, in the shape of Claude Code's
84014
84731
  * HistorySearchDialog/FuzzyPicker: a permission-colored Pane with a bold
@@ -84071,7 +84788,7 @@ function formatRelativeAge(ts) {
84071
84788
  return t("time-days-ago", { n: Math.floor(elapsed / 864e5) });
84072
84789
  }
84073
84790
  //#endregion
84074
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/RewindPicker.js
84791
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/RewindPicker.js
84075
84792
  /**
84076
84793
  * Double-Esc rewind picker (CC's "Double-tap esc to rewind the code and/or
84077
84794
  * conversation to a previous point in time"): lists the user's past messages
@@ -84208,7 +84925,7 @@ function preview(text) {
84208
84925
  return flat.length <= 80 ? flat : `${flat.slice(0, 80)}…`;
84209
84926
  }
84210
84927
  //#endregion
84211
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/BtwPanel.js
84928
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/BtwPanel.js
84212
84929
  /**
84213
84930
  * /btw side-question panel (CC's btw.tsx, inline-pane form like the local
84214
84931
  * pickers): title line with the question, a scrollable answer body (error /
@@ -84292,7 +85009,7 @@ function BtwPanel({ question, answer, error, streaming, onClose, onCopy }) {
84292
85009
  });
84293
85010
  }
84294
85011
  //#endregion
84295
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ReleaseNotesPanel.js
85012
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ReleaseNotesPanel.js
84296
85013
  function ReleaseNotesPanel({ release, onClose }) {
84297
85014
  const scrollRef = import_react.useRef(null);
84298
85015
  const { rows } = useTerminalSize();
@@ -84337,7 +85054,7 @@ function ReleaseNotesPanel({ release, onClose }) {
84337
85054
  });
84338
85055
  }
84339
85056
  //#endregion
84340
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/RecapPanel.js
85057
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/RecapPanel.js
84341
85058
  /**
84342
85059
  * `/recap` panel (pi-recap semantics), in the picker/dialog visual
84343
85060
  * language: a permission-colored Pane with a title bar (会话回顾), a
@@ -84458,7 +85175,7 @@ function RecapPanel({ summary, title, error, streaming, titleApplied, onClose, o
84458
85175
  });
84459
85176
  }
84460
85177
  //#endregion
84461
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/tips.js
85178
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/tips.js
84462
85179
  /**
84463
85180
  * 精简 Tips 池 —— 启动首屏轮换(LogoV2)与 `/tips` 命令面板共用。
84464
85181
  *
@@ -85172,7 +85889,7 @@ const TIPS = [
85172
85889
  }
85173
85890
  ];
85174
85891
  //#endregion
85175
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/TipsPanel.js
85892
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/TipsPanel.js
85176
85893
  const GROUP_ORDER = [
85177
85894
  "keys",
85178
85895
  "commands",
@@ -85251,7 +85968,7 @@ function TipsPanel({ onClose }) {
85251
85968
  });
85252
85969
  }
85253
85970
  //#endregion
85254
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SubagentCard.js
85971
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SubagentCard.js
85255
85972
  function formatDuration$1(ms) {
85256
85973
  const seconds = Math.floor(ms / 1e3);
85257
85974
  return seconds < 60 ? `${seconds}s` : `${Math.floor(seconds / 60)}m${seconds % 60}s`;
@@ -85306,7 +86023,7 @@ function SubagentCard({ subagent, focused, onClick }) {
85306
86023
  });
85307
86024
  }
85308
86025
  //#endregion
85309
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SubagentDashboard.js
86026
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SubagentDashboard.js
85310
86027
  /** 可点击 ✕ 退出按钮:整屏/浮层场景的鼠标退出通道(Esc 等价)。 */
85311
86028
  function ExitButton({ onClick }) {
85312
86029
  const [hovered, setHovered] = import_react.useState(false);
@@ -85454,7 +86171,7 @@ function SubagentDashboard({ subagents, onClose, onSelect }) {
85454
86171
  });
85455
86172
  }
85456
86173
  //#endregion
85457
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/JobsPanel.js
86174
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/JobsPanel.js
85458
86175
  function statusInfo(status) {
85459
86176
  const minimal = isMinimalMode();
85460
86177
  switch (status) {
@@ -85742,7 +86459,7 @@ function JobsPanel({ jobs, onClose, onKill }) {
85742
86459
  });
85743
86460
  }
85744
86461
  //#endregion
85745
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SubagentDetailScene.js
86462
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/SubagentDetailScene.js
85746
86463
  function formatDuration(ms) {
85747
86464
  if (ms < 1e3) return `${ms}ms`;
85748
86465
  if (ms < 6e4) return `${(ms / 1e3).toFixed(1)}s`;
@@ -86200,7 +86917,7 @@ function FileActionsPanel({ path, isDir, focusIndex, onPick }) {
86200
86917
  });
86201
86918
  }
86202
86919
  //#endregion
86203
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ProductivityPickers.js
86920
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/ProductivityPickers.js
86204
86921
  function oneLine(text, max = 70) {
86205
86922
  const compact = text.replace(/\s+/gu, " ").trim();
86206
86923
  return compact.length > max ? `${compact.slice(0, max - 1)}…` : compact;
@@ -86292,7 +87009,7 @@ function DiffLoading() {
86292
87009
  });
86293
87010
  }
86294
87011
  //#endregion
86295
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/productivityCommands.js
87012
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/productivityCommands.js
86296
87013
  /** `/copy` argument is a one-based reply age; omission selects the latest. */
86297
87014
  function parseCopyIndex(raw, count) {
86298
87015
  const value = raw.trim();
@@ -86345,7 +87062,7 @@ function gitDiffLines(report, labels) {
86345
87062
  ];
86346
87063
  }
86347
87064
  //#endregion
86348
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/sessionOrganizationCommands.js
87065
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/sessionOrganizationCommands.js
86349
87066
  /** Compact duration suitable for a terminal report row. */
86350
87067
  function formatStatsDuration(ms) {
86351
87068
  if (ms < 1e3) return `${Math.round(ms)} ms`;
@@ -86391,7 +87108,7 @@ function parsePresetManagement(input) {
86391
87108
  return { kind: "invalid" };
86392
87109
  }
86393
87110
  //#endregion
86394
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/workflowCommands.js
87111
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/workflowCommands.js
86395
87112
  const ALIASES = {
86396
87113
  map: "inspect",
86397
87114
  fixit: "repair",
@@ -86446,7 +87163,7 @@ function buildWorkflowCommand(name, rawInput = "") {
86446
87163
  };
86447
87164
  }
86448
87165
  //#endregion
86449
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/urlGuard.js
87166
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/utils/urlGuard.js
86450
87167
  const EXTERNAL_SCHEME = /^https?:\/\//i;
86451
87168
  /**
86452
87169
  * Classify a clicked link target. Mirrors the previous handleOpenTarget
@@ -86471,7 +87188,7 @@ function classifyOpenTarget(url) {
86471
87188
  return { kind: "rejected" };
86472
87189
  }
86473
87190
  //#endregion
86474
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/hooks/useExternalVersion.js
87191
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/hooks/useExternalVersion.js
86475
87192
  /**
86476
87193
  * Subscribe to an external store's version counter at DEFAULT lane.
86477
87194
  *
@@ -86520,7 +87237,7 @@ function useExternalVersion(subscribe, getVersion, enabled = true) {
86520
87237
  return version;
86521
87238
  }
86522
87239
  //#endregion
86523
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/trajectory/WaveBand.js
87240
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/trajectory/WaveBand.js
86524
87241
  /**
86525
87242
  * The wake — the whole session drawn as one row of glyphs.
86526
87243
  *
@@ -86657,7 +87374,7 @@ function toHex(colour) {
86657
87374
  return `#${hex(parsed.r)}${hex(parsed.g)}${hex(parsed.b)}`;
86658
87375
  }
86659
87376
  //#endregion
86660
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/trajectory/Ledger.js
87377
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/trajectory/Ledger.js
86661
87378
  /**
86662
87379
  * The ledger — one line per event, columns aligned across every row.
86663
87380
  *
@@ -86903,7 +87620,7 @@ function Ledger({ rows, start, height, cursor, width, tick, arrivalTick, arrival
86903
87620
  });
86904
87621
  }
86905
87622
  //#endregion
86906
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/trajectory/Inspector.js
87623
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/trajectory/Inspector.js
86907
87624
  /**
86908
87625
  * The inspector — full detail for the focused row, in a fixed-height slot.
86909
87626
  *
@@ -87009,7 +87726,7 @@ function Inspector({ node, detail, height, width, expanded, scroll }) {
87009
87726
  });
87010
87727
  }
87011
87728
  //#endregion
87012
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/trajectory/HotspotView.js
87729
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/components/trajectory/HotspotView.js
87013
87730
  /**
87014
87731
  * The hotspot view — the session ranked by cost instead of ordered by time.
87015
87732
  *
@@ -87172,7 +87889,7 @@ function HotspotView({ agg, sort, width, height, cursor, tick, switchTick, onRow
87172
87889
  });
87173
87890
  }
87174
87891
  //#endregion
87175
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/trajectory/query.js
87892
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/trajectory/query.js
87176
87893
  /**
87177
87894
  * Trajectory query — whole-session structured filtering.
87178
87895
  *
@@ -87368,7 +88085,7 @@ function applyQuery(nodes, query) {
87368
88085
  };
87369
88086
  }
87370
88087
  //#endregion
87371
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/TrajectoryScene.js
88088
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/TrajectoryScene.js
87372
88089
  /**
87373
88090
  * The trajectory scene — the session's own screen.
87374
88091
  *
@@ -87856,7 +88573,7 @@ function TrajectoryScene({ channel, build, onClose }) {
87856
88573
  });
87857
88574
  }
87858
88575
  //#endregion
87859
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/LoadedContextScene.js
88576
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/LoadedContextScene.js
87860
88577
  /** Build the non-empty pages shown by the loaded-context inspector. */
87861
88578
  function contextPages(context) {
87862
88579
  const pages = [];
@@ -88040,7 +88757,7 @@ function LoadedContextScene({ context, onClose }) {
88040
88757
  });
88041
88758
  }
88042
88759
  //#endregion
88043
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/AgentView.js
88760
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/AgentView.js
88044
88761
  /** Rows the layout cannot do without: header, model/cwd line, dispatch
88045
88762
  * input, hints. */
88046
88763
  const MANDATORY_LINES = 4;
@@ -88644,7 +89361,7 @@ function AgentView({ channel, home, approval, onApprove, returnSessionId, onClos
88644
89361
  });
88645
89362
  }
88646
89363
  //#endregion
88647
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/trajectoryPrefs.js
89364
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/trajectoryPrefs.js
88648
89365
  /**
88649
89366
  * Persisted "the user has seen the trajectory" flag, at
88650
89367
  * `~/.chatcode-cli/tui/trajectory.json`.
@@ -88704,7 +89421,7 @@ function writeTrajectorySeen(dir = DATA_DIR) {
88704
89421
  }
88705
89422
  }
88706
89423
  //#endregion
88707
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/chatOverlay.js
89424
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/chatOverlay.js
88708
89425
  const NO_OVERLAY = { kind: "none" };
88709
89426
  /**
88710
89427
  * One-step wrap-around cursor move — the single source of the wrapping rule
@@ -88814,7 +89531,7 @@ function dialogOverlayVisible(overlay, gates) {
88814
89531
  }
88815
89532
  }
88816
89533
  //#endregion
88817
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/Chat.js
89534
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/screens/Chat.js
88818
89535
  const LOGOUT_EXIT_DELAY_MS = 200;
88819
89536
  /** Shared empty snapshot for hosts whose channel has no event log. */
88820
89537
  const NO_EVENTS = [];
@@ -92611,7 +93328,7 @@ function ModelPickerLoading() {
92611
93328
  });
92612
93329
  }
92613
93330
  //#endregion
92614
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/webLauncher.js
93331
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/webLauncher.js
92615
93332
  const MAIN_CLI_PACKAGE = "@chatcode/chatcode-cli";
92616
93333
  function asError(value) {
92617
93334
  return value instanceof Error ? value : new Error(String(value));
@@ -92732,7 +93449,7 @@ function launchWebFrontend(cwd, options = {}) {
92732
93449
  }
92733
93450
  }
92734
93451
  //#endregion
92735
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/inject-channel.js
93452
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/inject-channel.js
92736
93453
  /**
92737
93454
  * External injection channel — lets an out-of-process editor integration
92738
93455
  * (e.g. the `dsh.nvim` Neovim plugin) push text into the running TUI's
@@ -92927,8 +93644,9 @@ function openInjectChannel(sessionId, cwd, handlers, onError) {
92927
93644
  };
92928
93645
  }
92929
93646
  //#endregion
92930
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/chatcode-auth.js
93647
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/chatcode-auth.js
92931
93648
  const CHATCODE_CLI_OAUTH_TOKEN = "CHATCODE_CLI_OAUTH_TOKEN";
93649
+ const DEFAULT_SERVICE_WAIT_MS = 75e3;
92932
93650
  function authService(ctx) {
92933
93651
  return ctx.get("chatcodeAuth");
92934
93652
  }
@@ -93009,7 +93727,7 @@ const promptStartupGateFailure = () => promptChoice(t("startup-gate-prompt"), t(
93009
93727
  async function requireLaunchAccess(ctx, options) {
93010
93728
  let service = launchService(ctx);
93011
93729
  if (service === void 0 && !chatCodeAuthExpected(ctx)) return "ready";
93012
- if (service === void 0) service = await waitForLaunchService(ctx, options.serviceWaitMs ?? 1e4, options.servicePollMs ?? 25);
93730
+ if (service === void 0) service = await waitForLaunchService(ctx, options.serviceWaitMs ?? DEFAULT_SERVICE_WAIT_MS, options.servicePollMs ?? 25);
93013
93731
  if (service === void 0) throw new Error(t("startup-gate-service-missing"));
93014
93732
  while (true) {
93015
93733
  options.report(t("startup-gate-checking"));
@@ -93068,7 +93786,7 @@ async function requireChatCodeStartupLogin(ctx, options) {
93068
93786
  if (await requireLaunchAccess(ctx, options) === "blocked") return "blocked";
93069
93787
  let service = authService(ctx);
93070
93788
  if (service === void 0 && !chatCodeAuthExpected(ctx)) return "ready";
93071
- if (service === void 0) service = await waitForAuthService(ctx, options.serviceWaitMs ?? 1e4, options.servicePollMs ?? 25);
93789
+ if (service === void 0) service = await waitForAuthService(ctx, options.serviceWaitMs ?? DEFAULT_SERVICE_WAIT_MS, options.servicePollMs ?? 25);
93072
93790
  if (service === void 0) throw new Error(t("login-gate-service-missing"));
93073
93791
  options.report(t("login-gate-checking"));
93074
93792
  let status = await readAvailableStatus(service, options);
@@ -93104,7 +93822,7 @@ async function requireChatCodeStartupLogin(ctx, options) {
93104
93822
  return "ready";
93105
93823
  }
93106
93824
  //#endregion
93107
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/chatcode-api.js
93825
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/chatcode-api.js
93108
93826
  /** Bind authenticated statistics requests to one TUI lifetime. */
93109
93827
  function createChatCodeAuthorizedPost(ctx) {
93110
93828
  const lifetime = new AbortController();
@@ -93143,7 +93861,7 @@ function createChatCodeAuthorizedPost(ctx) {
93143
93861
  };
93144
93862
  }
93145
93863
  //#endregion
93146
- //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.12_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/plugin.js
93864
+ //#region ../../node_modules/.pnpm/@chatcode+cco-tui@0.10.0-rc.14_08ea48c8555976e562c6368d51cb542b/node_modules/@chatcode/cco-tui/lib/types/dsh-adapter/plugin.js
93147
93865
  /**
93148
93866
  * Interactive TUI front door for ChatCode CLI agents.
93149
93867
  *
@@ -93420,7 +94138,7 @@ async function apply(ctx, config) {
93420
94138
  });
93421
94139
  ctx.inject(["settings"], (settingsCtx) => {
93422
94140
  const tuiSettingsNs = "dsh-tui";
93423
- const scope = settingsCtx.settings.register(tuiSettingsNs, z.object({
94141
+ const scope = displaySettingsScope(ctx, settingsCtx, tuiSettingsNs, z.object({
93424
94142
  diffLayout: z.union([
93425
94143
  "auto",
93426
94144
  "split",
@@ -93463,11 +94181,12 @@ async function apply(ctx, config) {
93463
94181
  shortcutHint: z.boolean().default(DEFAULT_STATUS_BAR.shortcutHint)
93464
94182
  }).default({ ...DEFAULT_STATUS_BAR }),
93465
94183
  whale: z.boolean().default(true),
94184
+ recapOnOpen: z.boolean().default(true),
93466
94185
  minimal: z.boolean().default(false),
93467
94186
  lang: z.union(["zh", "en"]),
93468
94187
  fullscreen: z.boolean(),
93469
94188
  shortcuts: z.object(Object.fromEntries(SHORTCUT_ACTIONS.map((action) => [action.id, z.string().required(false)]))).required(false)
93470
- }));
94189
+ }), config);
93471
94190
  const applyLayout = (value) => {
93472
94191
  channel.setDiffLayout(value.diffLayout ?? config.diffLayout ?? "auto");
93473
94192
  };
@@ -93521,7 +94240,7 @@ async function apply(ctx, config) {
93521
94240
  applyFullscreen(next);
93522
94241
  };
93523
94242
  const bootSettings = scope.get();
93524
- const fullscreenMigration = planFullscreenFactoryMigration(bootSettings.fullscreen, readAppliedMigrations());
94243
+ const fullscreenMigration = scope.legacy ? planFullscreenFactoryMigration(bootSettings.fullscreen, readAppliedMigrations()) : "done";
93525
94244
  commitFullscreenFactoryMigration(fullscreenMigration, { unset: () => settingsCtx.settings.mutate(tuiSettingsNs, [{
93526
94245
  op: "unset",
93527
94246
  path: ["fullscreen"]