@linghun/tui 0.1.1 → 0.1.2

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 (186) hide show
  1. package/dist/agent-completion-finalizer.js +3 -3
  2. package/dist/background-control-runtime.js +52 -52
  3. package/dist/cache-command-runtime.js +3 -3
  4. package/dist/capability-runtime.js +32 -32
  5. package/dist/{chunk-TJLC3QAS.js → chunk-36ZWUJQS.js} +1 -1
  6. package/dist/{chunk-624A7BBJ.js → chunk-3MRYQO7X.js} +4 -4
  7. package/dist/{chunk-QJTET7EZ.js → chunk-3PG7I3LA.js} +4 -4
  8. package/dist/{chunk-J7ZE2JKP.js → chunk-42ZZUF7P.js} +3 -3
  9. package/dist/{chunk-DTK5NBTV.js → chunk-4BFCUJX6.js} +95 -11
  10. package/dist/{chunk-YH6UIHNF.js → chunk-4QWCNMP6.js} +2 -2
  11. package/dist/{chunk-WKMBK5UP.js → chunk-4TO2LDMP.js} +1 -1
  12. package/dist/{chunk-5CXN4JLE.js → chunk-5IFNLTOF.js} +4 -4
  13. package/dist/{chunk-W3KHJNSH.js → chunk-6CHUZ2NF.js} +2 -2
  14. package/dist/{chunk-I3NTAIMF.js → chunk-6DBBXNEG.js} +3 -3
  15. package/dist/{chunk-GDQQNPBP.js → chunk-6GXIGN5W.js} +1 -1
  16. package/dist/{chunk-QLRTQHTR.js → chunk-6JGRNES6.js} +2 -2
  17. package/dist/{chunk-WOBNOBB5.js → chunk-7BHMBWG2.js} +3 -3
  18. package/dist/{chunk-KO64OFSG.js → chunk-7C6T7RKJ.js} +1 -1
  19. package/dist/{chunk-RFSSKGCE.js → chunk-7R4YXN7Z.js} +176 -37
  20. package/dist/{chunk-LDABZV5V.js → chunk-7RZE45OT.js} +1 -1
  21. package/dist/{chunk-MLUIOBKL.js → chunk-7ZMDQZ22.js} +4 -4
  22. package/dist/{chunk-X7A22JHP.js → chunk-A4H3UTJZ.js} +1 -1
  23. package/dist/{chunk-QG2FJ3NR.js → chunk-AGI6GFFL.js} +3 -3
  24. package/dist/{chunk-D3UTL2QX.js → chunk-ATY7WBIT.js} +1 -1
  25. package/dist/{chunk-ZOSK2UEU.js → chunk-BBK5BA5C.js} +99 -117
  26. package/dist/{chunk-SRZIA6B4.js → chunk-BNC4F63N.js} +1 -1
  27. package/dist/{chunk-4E56DWEZ.js → chunk-CJRJR7TP.js} +4 -4
  28. package/dist/{chunk-SILJJAK2.js → chunk-DIDRFIIW.js} +1 -1
  29. package/dist/{chunk-HIIYRATQ.js → chunk-EKYXI6C7.js} +11 -7
  30. package/dist/{chunk-Y5ZV47XC.js → chunk-FGGY5KNM.js} +7 -7
  31. package/dist/{chunk-APJIC2O5.js → chunk-GTIZNO5O.js} +84 -0
  32. package/dist/{chunk-UOHZQIVL.js → chunk-GXFYUZAM.js} +1 -1
  33. package/dist/{chunk-DDXS2RDZ.js → chunk-HGCTHBUY.js} +1 -1
  34. package/dist/{chunk-QTDGRZMZ.js → chunk-HJOC5WUV.js} +1 -1
  35. package/dist/{chunk-DYDTLRHB.js → chunk-HPIHFENG.js} +2 -2
  36. package/dist/{chunk-SYBNJZEL.js → chunk-HPMBSOQ4.js} +1 -1
  37. package/dist/{chunk-LIPZJNXS.js → chunk-HPQ2IHOW.js} +4 -4
  38. package/dist/{chunk-KOULRCYJ.js → chunk-HZ5XNKWS.js} +1 -1
  39. package/dist/{chunk-4K6UB524.js → chunk-IPZZGDUU.js} +1 -1
  40. package/dist/{chunk-6CI6TKLN.js → chunk-JAVRQ3LM.js} +1 -1
  41. package/dist/{chunk-VCSRBS47.js → chunk-JLAJZPOC.js} +1 -1
  42. package/dist/{chunk-UN53MBAR.js → chunk-JY3LI63F.js} +2 -2
  43. package/dist/{chunk-RMLTVKOY.js → chunk-L4YVE3RG.js} +2 -2
  44. package/dist/{chunk-P277M7Z5.js → chunk-LBC75QAB.js} +1 -1
  45. package/dist/{chunk-F6TVBCZV.js → chunk-LWW2IAFC.js} +1 -1
  46. package/dist/{chunk-L2GU3PWU.js → chunk-NK4NMYF5.js} +49 -7
  47. package/dist/{chunk-MXPBYB54.js → chunk-O2U4XQVM.js} +2 -2
  48. package/dist/{chunk-LQTVYUT3.js → chunk-OJTMM5CV.js} +2 -2
  49. package/dist/{chunk-HW2TBXVK.js → chunk-OPVRII63.js} +1 -1
  50. package/dist/{chunk-CDVYF7RU.js → chunk-OSFBVVEP.js} +4 -4
  51. package/dist/{chunk-F43AMWLZ.js → chunk-PDTJVJVD.js} +1 -1
  52. package/dist/{chunk-UDQT5CWK.js → chunk-PI6T2AGS.js} +1 -1
  53. package/dist/{chunk-AZU7HXIT.js → chunk-PPUOHBAK.js} +17 -17
  54. package/dist/{chunk-33E6RDCY.js → chunk-QD4SCW4A.js} +229 -192
  55. package/dist/{chunk-SOPYWTFV.js → chunk-RRUI3VWQ.js} +1 -1
  56. package/dist/{chunk-IN42UISW.js → chunk-SRJ4XWOR.js} +10 -5
  57. package/dist/{chunk-6RJVTUWI.js → chunk-T6UOCF5D.js} +5 -1
  58. package/dist/{chunk-VTQL23UM.js → chunk-TVNWAEJR.js} +1 -1
  59. package/dist/chunk-TY4KIVA6.js +50 -0
  60. package/dist/{chunk-UT2TYK2A.js → chunk-TYTVAFGB.js} +1 -1
  61. package/dist/{chunk-OMZYPQVA.js → chunk-UGYFQF6M.js} +1 -1
  62. package/dist/{chunk-VAGL7CNR.js → chunk-UIKN3CDF.js} +4 -4
  63. package/dist/{chunk-JGDIO2NF.js → chunk-UO3KYTBU.js} +1 -1
  64. package/dist/{chunk-KI7C6ZOD.js → chunk-VIJ7GDKI.js} +1 -1
  65. package/dist/{chunk-NKFKOEYX.js → chunk-WCMHJ6SS.js} +1 -1
  66. package/dist/{chunk-EORRZP3F.js → chunk-WX2OTJXL.js} +1 -1
  67. package/dist/{chunk-BOV4K7FP.js → chunk-WXTHKLNH.js} +9 -1
  68. package/dist/{chunk-CRQORMFF.js → chunk-X37FSYAX.js} +1 -1
  69. package/dist/{chunk-XWRHWM4H.js → chunk-X7E34LKV.js} +11 -11
  70. package/dist/chunk-X7HMDZZQ.js +85 -0
  71. package/dist/{chunk-CD54BQJ5.js → chunk-YDTJ7UBG.js} +4 -4
  72. package/dist/{chunk-K56D3X7S.js → chunk-YKOXJQGX.js} +34 -2
  73. package/dist/{chunk-7TYK55JT.js → chunk-YLOJWSHB.js} +5 -5
  74. package/dist/{chunk-O6MKVGVK.js → chunk-YMEMN5FG.js} +1 -1
  75. package/dist/chunk-YQNK7HK3.js +87 -0
  76. package/dist/{chunk-KJVHLTQR.js → chunk-Z265MCGC.js} +12 -8
  77. package/dist/{chunk-3BPKJMIV.js → chunk-ZF36LULR.js} +4 -4
  78. package/dist/{chunk-JJQETFCR.js → chunk-ZJDPYOTK.js} +4 -4
  79. package/dist/{chunk-RM5QMOFY.js → chunk-ZKPQ4KLK.js} +1 -1
  80. package/dist/command-panel-runtime.js +31 -31
  81. package/dist/compact-cache-command-runtime.js +52 -52
  82. package/dist/compact-preflight-runtime.js +20 -20
  83. package/dist/connector-runtime.js +33 -33
  84. package/dist/deep-compact-runtime.js +6 -6
  85. package/dist/deferred-tools-catalog.js +5 -5
  86. package/dist/details-status-runtime.js +31 -31
  87. package/dist/evidence-runtime.d.ts.map +1 -1
  88. package/dist/evidence-runtime.js +11 -11
  89. package/dist/extension-command-runtime.js +6 -6
  90. package/dist/extension-slash-runtime.js +32 -32
  91. package/dist/failure-learning-command-runtime.js +33 -33
  92. package/dist/failure-learning-presenter.js +4 -4
  93. package/dist/failure-learning-runtime.js +3 -3
  94. package/dist/final-answer-gate.js +2 -2
  95. package/dist/git-command-runtime.js +32 -32
  96. package/dist/handoff-session-runtime.js +8 -8
  97. package/dist/index-result-presenter.js +5 -5
  98. package/dist/index-runtime.js +5 -5
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +65 -59
  101. package/dist/job-agent-command-runtime.js +31 -31
  102. package/dist/job-runner-presenter.js +3 -3
  103. package/dist/job-runtime.js +8 -8
  104. package/dist/mcp-index-command-runtime.js +4 -4
  105. package/dist/mcp-index-runtime.js +36 -36
  106. package/dist/mcp-sse-runtime.js +3 -3
  107. package/dist/mcp-stdio-runtime.js +3 -3
  108. package/dist/memory-command-runtime.js +33 -33
  109. package/dist/memory-extraction-runtime.js +3 -3
  110. package/dist/memory-rules-runtime.js +3 -3
  111. package/dist/model-command-runtime.js +32 -32
  112. package/dist/model-loop-runtime.d.ts +1 -1
  113. package/dist/model-loop-runtime.d.ts.map +1 -1
  114. package/dist/model-loop-runtime.js +1 -1
  115. package/dist/model-prompt-runtime.js +10 -10
  116. package/dist/model-stream-runtime.js +52 -52
  117. package/dist/model-tool-runtime.d.ts +1 -0
  118. package/dist/model-tool-runtime.d.ts.map +1 -1
  119. package/dist/model-tool-runtime.js +54 -52
  120. package/dist/pending-details-presenter.js +3 -3
  121. package/dist/permission-approval-runtime.js +52 -52
  122. package/dist/permission-continuation-runtime.d.ts.map +1 -1
  123. package/dist/permission-continuation-runtime.js +4 -4
  124. package/dist/process-command-runtime.js +3 -3
  125. package/dist/provider-loop-runtime.js +3 -3
  126. package/dist/remote-command-runtime.js +32 -32
  127. package/dist/runner-runtime.js +7 -7
  128. package/dist/runtime-status-presenter.js +3 -3
  129. package/dist/runtime-status-snapshot.js +4 -4
  130. package/dist/shell/components/AgentProgressTree.js +2 -2
  131. package/dist/shell/components/BackgroundTaskOverlay.js +2 -2
  132. package/dist/shell/components/BtwPanel.js +2 -2
  133. package/dist/shell/components/CommandPanel.js +2 -2
  134. package/dist/shell/components/Composer.d.ts +16 -2
  135. package/dist/shell/components/Composer.d.ts.map +1 -1
  136. package/dist/shell/components/Composer.js +9 -7
  137. package/dist/shell/components/ConfigPanel.js +2 -2
  138. package/dist/shell/components/HelpPanel.js +2 -2
  139. package/dist/shell/components/HistorySearchPanel.js +2 -2
  140. package/dist/shell/components/MessageMarkdown.d.ts +23 -0
  141. package/dist/shell/components/MessageMarkdown.d.ts.map +1 -1
  142. package/dist/shell/components/MessageMarkdown.js +5 -3
  143. package/dist/shell/components/MouseInputRouter.js +5 -80
  144. package/dist/shell/components/OutputLine.d.ts.map +1 -1
  145. package/dist/shell/components/OutputLine.js +5 -3
  146. package/dist/shell/components/ProductBlock.d.ts.map +1 -1
  147. package/dist/shell/components/ProductBlock.js +4 -4
  148. package/dist/shell/components/ScrollViewport.js +3 -82
  149. package/dist/shell/components/SessionsPanel.js +2 -2
  150. package/dist/shell/components/ShellApp.d.ts.map +1 -1
  151. package/dist/shell/components/ShellApp.js +28 -23
  152. package/dist/shell/components/SlashSuggestions.js +2 -2
  153. package/dist/shell/components/StatusFooter.js +2 -2
  154. package/dist/shell/components/StatusTray.d.ts.map +1 -1
  155. package/dist/shell/components/StatusTray.js +2 -1
  156. package/dist/shell/components/StructuredDiff.js +2 -2
  157. package/dist/shell/components/TaskListView.js +2 -2
  158. package/dist/shell/components/TaskSuggestionBar.js +2 -2
  159. package/dist/shell/components/WorkflowProgressView.js +2 -2
  160. package/dist/shell/components/useAnchoredCursor.d.ts +6 -9
  161. package/dist/shell/components/useAnchoredCursor.d.ts.map +1 -1
  162. package/dist/shell/components/useAnchoredCursor.js +1 -1
  163. package/dist/shell/ink-renderer.d.ts.map +1 -1
  164. package/dist/shell/ink-renderer.js +28 -23
  165. package/dist/shell/models/transcript-selection-state.js +2 -2
  166. package/dist/shell/plain-renderer.d.ts.map +1 -1
  167. package/dist/shell/plain-renderer.js +2 -2
  168. package/dist/shell/text-utils.d.ts +16 -0
  169. package/dist/shell/text-utils.d.ts.map +1 -1
  170. package/dist/shell/text-utils.js +3 -1
  171. package/dist/shell/view-model.js +14 -14
  172. package/dist/slash-command-runtime.js +52 -52
  173. package/dist/slash-dispatch.js +4 -4
  174. package/dist/startup-runtime.js +2 -2
  175. package/dist/tool-output-presenter.d.ts.map +1 -1
  176. package/dist/tool-output-presenter.js +1 -1
  177. package/dist/tui-agent-job-runtime.js +10 -10
  178. package/dist/tui-details-runtime.js +9 -9
  179. package/dist/tui-memory-runtime.js +5 -5
  180. package/dist/tui-output-surface.js +15 -15
  181. package/dist/tui-permission-runtime.js +5 -5
  182. package/dist/tui-state-runtime.js +4 -4
  183. package/dist/verification-command-runtime.js +11 -11
  184. package/dist/workflow-command-runtime.js +31 -31
  185. package/package.json +4 -4
  186. package/dist/chunk-GW5YDCRZ.js +0 -42
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  codebaseMemoryRequiredArgs
3
- } from "./chunk-QLRTQHTR.js";
3
+ } from "./chunk-6JGRNES6.js";
4
4
  import {
5
5
  truncateDisplay
6
- } from "./chunk-OMZYPQVA.js";
6
+ } from "./chunk-UGYFQF6M.js";
7
7
 
8
8
  // src/deferred-tools-catalog.ts
9
9
  function codebaseMemoryRiskClass() {
@@ -235,7 +235,7 @@ function deferredToolListHashInput(tools) {
235
235
  }
236
236
  function formatDeferredToolsSystemReminder(language, snapshot) {
237
237
  if (snapshot.total === 0) return void 0;
238
- return language === "en-US" ? "Additional tools must be discovered via SearchExtraTools, then invoked via ExecuteExtraTool. Built-in tools (Read/Edit/Write/Bash/Grep/Glob/Todo) are still called directly." : "Additional tools must be discovered via SearchExtraTools, then invoked via ExecuteExtraTool.";
238
+ return language === "en-US" ? "Additional tools must be discovered via SearchExtraTools, then invoked via ExecuteExtraTool. Built-in tools (Read/ReadSnippets/SourcePack/Edit/Write/Bash/Grep/Glob/Todo) are still called directly." : "Additional tools must be discovered via SearchExtraTools, then invoked via ExecuteExtraTool.";
239
239
  }
240
240
  function isCodebaseMemoryToolName(name) {
241
241
  return name in codebaseMemoryRequiredArgs();
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-4T5DJW54.js";
4
4
  import {
5
5
  formatError
6
- } from "./chunk-OMZYPQVA.js";
6
+ } from "./chunk-UGYFQF6M.js";
7
7
 
8
8
  // src/failure-learning-runtime.ts
9
9
  import { randomUUID } from "crypto";
@@ -10,14 +10,14 @@ import {
10
10
  import {
11
11
  loadMemoryRulesFile,
12
12
  parseMemoryRuleFrontmatter
13
- } from "./chunk-EORRZP3F.js";
13
+ } from "./chunk-WX2OTJXL.js";
14
14
  import {
15
15
  createCacheFreshness
16
16
  } from "./chunk-4T5DJW54.js";
17
17
  import {
18
18
  formatError,
19
19
  truncateDisplay
20
- } from "./chunk-OMZYPQVA.js";
20
+ } from "./chunk-UGYFQF6M.js";
21
21
 
22
22
  // src/tui-state-runtime.ts
23
23
  import { spawnSync } from "child_process";
@@ -11,11 +11,11 @@ import {
11
11
  } from "./chunk-NMNOAFFT.js";
12
12
  import {
13
13
  showCommandPanel
14
- } from "./chunk-AZU7HXIT.js";
14
+ } from "./chunk-PPUOHBAK.js";
15
15
  import {
16
16
  snapshotDeferredToolsSummary,
17
17
  snapshotDiscoveredDeferredToolsSummary
18
- } from "./chunk-I3NTAIMF.js";
18
+ } from "./chunk-6DBBXNEG.js";
19
19
  import {
20
20
  getContextWindowForModel
21
21
  } from "./chunk-K4FSYBSY.js";
@@ -32,7 +32,7 @@ import {
32
32
  } from "./chunk-2YL5VKJ5.js";
33
33
  import {
34
34
  writeLine
35
- } from "./chunk-OMZYPQVA.js";
35
+ } from "./chunk-UGYFQF6M.js";
36
36
 
37
37
  // src/model-command-runtime.ts
38
38
  import {
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-RBOQJFIZ.js";
8
8
  import {
9
9
  fitText
10
- } from "./chunk-APJIC2O5.js";
10
+ } from "./chunk-GTIZNO5O.js";
11
11
 
12
12
  // src/shell/components/WorkflowProgressView.tsx
13
13
  import { Box, Text } from "@linghun/ink-runtime";
@@ -10,18 +10,18 @@ import {
10
10
  import {
11
11
  createRuntimeStatusSnapshot,
12
12
  formatRuntimeStatusSnapshotForBtw
13
- } from "./chunk-RM5QMOFY.js";
13
+ } from "./chunk-ZKPQ4KLK.js";
14
14
  import {
15
15
  checkAndWriteProviderCooldown,
16
16
  recordProviderFallbackAttempt,
17
17
  resolveRuntimeFallback
18
- } from "./chunk-WKMBK5UP.js";
18
+ } from "./chunk-4TO2LDMP.js";
19
19
  import {
20
20
  configureRemoteCommandRuntime,
21
21
  consumeRemoteInboundMessage,
22
22
  processRemoteInbound,
23
23
  validateRemotePairingEnvelope
24
- } from "./chunk-JJQETFCR.js";
24
+ } from "./chunk-ZJDPYOTK.js";
25
25
  import {
26
26
  formatLocalToolPermissionPrompt,
27
27
  formatModelToolPermissionPrompt
@@ -30,13 +30,13 @@ import {
30
30
  formatPendingApprovalDetails,
31
31
  formatPendingNaturalCommandDetails,
32
32
  formatWorkspaceTrustStatus
33
- } from "./chunk-QTDGRZMZ.js";
33
+ } from "./chunk-HJOC5WUV.js";
34
34
  import {
35
35
  configureMemoryCommandRuntime,
36
36
  executeMemoryMutation,
37
37
  resumeSessionWithHandoff,
38
38
  runAutoLearningOnTurnEnd
39
- } from "./chunk-Y5ZV47XC.js";
39
+ } from "./chunk-FGGY5KNM.js";
40
40
  import {
41
41
  evaluateMetaScheduler,
42
42
  formatMetaSchedulerDirective,
@@ -47,7 +47,7 @@ import {
47
47
  import {
48
48
  configureModelCommandRuntime,
49
49
  startModelSetup
50
- } from "./chunk-WOBNOBB5.js";
50
+ } from "./chunk-7BHMBWG2.js";
51
51
  import {
52
52
  looksLikeModelSetupInput,
53
53
  parseModelSetupPrefill
@@ -59,18 +59,18 @@ import {
59
59
  refreshIndexStatus,
60
60
  runIndexRepository,
61
61
  stabilizeMcpToolList
62
- } from "./chunk-XWRHWM4H.js";
62
+ } from "./chunk-X7E34LKV.js";
63
63
  import {
64
64
  formatIndexRefreshSummary
65
- } from "./chunk-MXPBYB54.js";
65
+ } from "./chunk-O2U4XQVM.js";
66
66
  import {
67
67
  isIgnoredIndexPath
68
- } from "./chunk-W3KHJNSH.js";
68
+ } from "./chunk-6CHUZ2NF.js";
69
69
  import {
70
70
  checkClaimSupport,
71
71
  formatClaimCheck,
72
72
  runArchitectureAndCompletenessFinalGate
73
- } from "./chunk-P277M7Z5.js";
73
+ } from "./chunk-LBC75QAB.js";
74
74
  import {
75
75
  executeGitToolUse,
76
76
  resolveStablePointApprove,
@@ -80,10 +80,10 @@ import {
80
80
  } from "./chunk-7ZE5JFAZ.js";
81
81
  import {
82
82
  configureExtensionSlashRuntime
83
- } from "./chunk-3BPKJMIV.js";
83
+ } from "./chunk-ZF36LULR.js";
84
84
  import {
85
85
  configureFailureLearningCommandRuntime
86
- } from "./chunk-QJTET7EZ.js";
86
+ } from "./chunk-3PG7I3LA.js";
87
87
  import {
88
88
  startFeishuLongConnection
89
89
  } from "./chunk-WJWYRBWH.js";
@@ -97,7 +97,7 @@ import {
97
97
  inspectToolPairingSafety,
98
98
  prepareMessagesForProviderPreflight,
99
99
  recordCompactBoundary
100
- } from "./chunk-5CXN4JLE.js";
100
+ } from "./chunk-5IFNLTOF.js";
101
101
  import {
102
102
  appendBreakCacheEvent,
103
103
  buildPromptCacheRequestFields,
@@ -113,7 +113,7 @@ import {
113
113
  formatCacheLog,
114
114
  formatCompactStatus,
115
115
  writeLightHints
116
- } from "./chunk-LDABZV5V.js";
116
+ } from "./chunk-7RZE45OT.js";
117
117
  import {
118
118
  cancelAgentByRef,
119
119
  cancelAllAgents,
@@ -144,13 +144,13 @@ import {
144
144
  transitionDurableJob,
145
145
  upsertWorkflowBackgroundTask,
146
146
  writeStatus
147
- } from "./chunk-AZU7HXIT.js";
147
+ } from "./chunk-PPUOHBAK.js";
148
148
  import {
149
149
  addAllowRule,
150
150
  decidePermission,
151
151
  savePermissionState,
152
152
  toPermissionPromptView
153
- } from "./chunk-DDXS2RDZ.js";
153
+ } from "./chunk-HGCTHBUY.js";
154
154
  import {
155
155
  createReviewReport,
156
156
  createVerificationPlan,
@@ -160,7 +160,7 @@ import {
160
160
  formatVerificationTaskSummary,
161
161
  runVerificationCommand,
162
162
  runVerificationPlan
163
- } from "./chunk-4E56DWEZ.js";
163
+ } from "./chunk-CJRJR7TP.js";
164
164
  import {
165
165
  abortBackgroundTask,
166
166
  clearBackgroundAbortController,
@@ -175,7 +175,7 @@ import {
175
175
  listCancellableAgents,
176
176
  registerBackgroundAbortController,
177
177
  rememberBackgroundTask
178
- } from "./chunk-CDVYF7RU.js";
178
+ } from "./chunk-OSFBVVEP.js";
179
179
  import {
180
180
  ShellBlockOutput,
181
181
  beginAssistantStream,
@@ -185,7 +185,7 @@ import {
185
185
  writeAssistantDelta,
186
186
  writeErrorLine,
187
187
  writeLocalCommandOutputLine
188
- } from "./chunk-DYDTLRHB.js";
188
+ } from "./chunk-HPIHFENG.js";
189
189
  import {
190
190
  createTerminalReadinessView
191
191
  } from "./chunk-PBIPV4LD.js";
@@ -193,26 +193,26 @@ import {
193
193
  appendJobLog,
194
194
  parseJobRunOptions,
195
195
  rescheduleDurableJobAgents
196
- } from "./chunk-VAGL7CNR.js";
196
+ } from "./chunk-UIKN3CDF.js";
197
197
  import {
198
198
  refreshRunnerStatusForJob,
199
199
  resolveNativeRunner,
200
200
  startRunnerForDurableJob,
201
201
  stopRunnerForDurableJob
202
- } from "./chunk-CD54BQJ5.js";
202
+ } from "./chunk-YDTJ7UBG.js";
203
203
  import {
204
204
  detectEngineeringTaskProfile
205
205
  } from "./chunk-4UER2AKI.js";
206
206
  import {
207
207
  formatHooksDoctor
208
- } from "./chunk-QG2FJ3NR.js";
208
+ } from "./chunk-AGI6GFFL.js";
209
209
  import {
210
210
  runCommandCapture
211
- } from "./chunk-KOULRCYJ.js";
211
+ } from "./chunk-HZ5XNKWS.js";
212
212
  import {
213
213
  createModelSystemPrompt,
214
214
  sanitizeMainScreenLeakage
215
- } from "./chunk-7TYK55JT.js";
215
+ } from "./chunk-YLOJWSHB.js";
216
216
  import {
217
217
  collectInputFiles,
218
218
  createReportFinalReferenceReminder,
@@ -230,11 +230,11 @@ import {
230
230
  shouldSendReportEvidenceReminder,
231
231
  shouldSendReportFinalReferenceReminder,
232
232
  shouldSendReportWriteReminder
233
- } from "./chunk-J7ZE2JKP.js";
233
+ } from "./chunk-42ZZUF7P.js";
234
234
  import {
235
235
  createAssistantPrimaryTextSanitizer,
236
236
  formatToolOutput
237
- } from "./chunk-BOV4K7FP.js";
237
+ } from "./chunk-WXTHKLNH.js";
238
238
  import {
239
239
  buildRuntimeStatusForModel,
240
240
  createModelCapabilitySummary,
@@ -243,13 +243,13 @@ import {
243
243
  import {
244
244
  formatBackgroundTask,
245
245
  formatRunnerDoctor
246
- } from "./chunk-UDQT5CWK.js";
246
+ } from "./chunk-PI6T2AGS.js";
247
247
  import {
248
248
  deferredToolListHashInput,
249
249
  getCodebaseMemoryToolRisk,
250
250
  isCodebaseMemoryToolName,
251
251
  listDeferredTools
252
- } from "./chunk-I3NTAIMF.js";
252
+ } from "./chunk-6DBBXNEG.js";
253
253
  import {
254
254
  appendBackgroundTaskEvent,
255
255
  appendDeferredToolResultEvent,
@@ -273,7 +273,7 @@ import {
273
273
  recordVerificationEvidence,
274
274
  rememberEvidence,
275
275
  truncateRoundAssistantForProvider
276
- } from "./chunk-L2GU3PWU.js";
276
+ } from "./chunk-NK4NMYF5.js";
277
277
  import {
278
278
  BACKGROUND_KIND_CAPS,
279
279
  BACKGROUND_RUNNING_GLOBAL_CAP,
@@ -295,10 +295,10 @@ import {
295
295
  loadOrCreateHandoffPacket,
296
296
  validateHandoffPacket,
297
297
  writeHandoffPacket
298
- } from "./chunk-MLUIOBKL.js";
298
+ } from "./chunk-7ZMDQZ22.js";
299
299
  import {
300
300
  createLinghunMdTemplate
301
- } from "./chunk-LQTVYUT3.js";
301
+ } from "./chunk-OJTMM5CV.js";
302
302
  import {
303
303
  AGENT_CONTROL_TOOL_NAME,
304
304
  COMMAND_PROPOSAL_TOOL_NAME,
@@ -320,7 +320,7 @@ import {
320
320
  extractFileMentions,
321
321
  sanitizeDeferredToolPrimaryText,
322
322
  stripStructuredFinalAnswerClaims
323
- } from "./chunk-K56D3X7S.js";
323
+ } from "./chunk-YKOXJQGX.js";
324
324
  import {
325
325
  INDEX_REFRESH,
326
326
  INDEX_REPAIR,
@@ -344,14 +344,14 @@ import {
344
344
  import {
345
345
  buildFailureLearningSummaryForPrompt,
346
346
  recordFailureLearningDegradedWarning
347
- } from "./chunk-GDQQNPBP.js";
347
+ } from "./chunk-6GXIGN5W.js";
348
348
  import {
349
349
  runDeepCompact
350
- } from "./chunk-RMLTVKOY.js";
350
+ } from "./chunk-L4YVE3RG.js";
351
351
  import {
352
352
  normalizeMemoryStatus,
353
353
  pathExists
354
- } from "./chunk-QLRTQHTR.js";
354
+ } from "./chunk-6JGRNES6.js";
355
355
  import {
356
356
  getWorkspaceReferenceSnapshot,
357
357
  workspaceReferenceHash
@@ -402,7 +402,7 @@ import {
402
402
  truncateDisplay,
403
403
  uniqueStrings,
404
404
  writeLine
405
- } from "./chunk-OMZYPQVA.js";
405
+ } from "./chunk-UGYFQF6M.js";
406
406
  import {
407
407
  checkBoundaryEditPreflight,
408
408
  detectBashFileWriteTargets
@@ -6569,7 +6569,7 @@ async function executeApprovedModelToolUse(toolCall, toolName, context, sessionI
6569
6569
  result.output,
6570
6570
  toolCall.input
6571
6571
  );
6572
- if (reportWriteGuard && (toolName === "Read" || toolName === "Glob" || toolName === "Grep")) {
6572
+ if (reportWriteGuard && (toolName === "Read" || toolName === "ReadSnippets" || toolName === "SourcePack" || toolName === "Glob" || toolName === "Grep")) {
6573
6573
  reportWriteGuard.evidenceRead = true;
6574
6574
  }
6575
6575
  rememberToolFiles(context, toolName, toolCall.input, result.output);
@@ -6822,6 +6822,7 @@ async function executeDeferredDispatchToolUse(toolCall, context, sessionId, outp
6822
6822
  );
6823
6823
  return { ok: false, tool: dispatchName, text: result.text, evidenceId: evidence2.id };
6824
6824
  }
6825
+ rememberSourcePackCandidatesFromToolData(context, input.tool_name, result.data);
6825
6826
  const evidence = await recordToolEvidence(context, sessionId, "Read", {
6826
6827
  text: result.text,
6827
6828
  data: result.data
@@ -7752,9 +7753,15 @@ function rememberToolFiles(context, name, input, output) {
7752
7753
  paths.push(path.replaceAll("\\", "/"));
7753
7754
  }
7754
7755
  }
7756
+ if (name === "ReadSnippets" && typeof input === "object" && input !== null) {
7757
+ paths.push(...extractPathsFromRanges(input.ranges));
7758
+ }
7755
7759
  if (Array.isArray(output.changedFiles)) {
7756
7760
  paths.push(...output.changedFiles);
7757
7761
  }
7762
+ if (name === "SourcePack" || name === "ReadSnippets") {
7763
+ paths.push(...extractPathsFromToolData(output.data));
7764
+ }
7758
7765
  if (name === "Glob" || name === "Grep") {
7759
7766
  paths.push(...extractFileMentions(output.text));
7760
7767
  }
@@ -7763,6 +7770,137 @@ function rememberToolFiles(context, name, input, output) {
7763
7770
  ...context.recentlyMentionedFiles
7764
7771
  ]).slice(0, 10);
7765
7772
  }
7773
+ function rememberSourcePackCandidatesFromToolData(context, toolName, data) {
7774
+ if (!isSourcePackCandidateProducer(toolName)) {
7775
+ return;
7776
+ }
7777
+ const candidates = extractSourcePackCandidates(data);
7778
+ context.tools.sourcePackCandidates = candidates.length > 0 ? candidates : void 0;
7779
+ }
7780
+ function isSourcePackCandidateProducer(toolName) {
7781
+ if (typeof toolName !== "string") return false;
7782
+ const name = toolName.includes(".") ? toolName.split(".").at(-1) : toolName;
7783
+ return name === "search_code" || name === "search_graph" || name === "get_code_snippet" || name === "get_architecture";
7784
+ }
7785
+ function extractSourcePackCandidates(data) {
7786
+ const candidates = [];
7787
+ const seen = /* @__PURE__ */ new Set();
7788
+ visitSourcePackCandidateData(data, 0, (record) => {
7789
+ const path = readCandidatePath(record);
7790
+ if (!path) return;
7791
+ const start = readCandidateStart(record);
7792
+ const end = readCandidateEnd(record, start);
7793
+ const key = `${path}:${start}:${end}`;
7794
+ if (seen.has(key)) return;
7795
+ seen.add(key);
7796
+ candidates.push({
7797
+ path,
7798
+ start,
7799
+ end,
7800
+ reason: readCandidateReason(record),
7801
+ confidence: readCandidateConfidence(record)
7802
+ });
7803
+ });
7804
+ return candidates.slice(0, 12);
7805
+ }
7806
+ function visitSourcePackCandidateData(value, depth, visit) {
7807
+ if (depth > 5 || value === null || value === void 0) return;
7808
+ if (Array.isArray(value)) {
7809
+ for (const item of value.slice(0, 40)) {
7810
+ visitSourcePackCandidateData(item, depth + 1, visit);
7811
+ }
7812
+ return;
7813
+ }
7814
+ if (typeof value !== "object") return;
7815
+ const record = value;
7816
+ visit(record);
7817
+ for (const item of Object.values(record).slice(0, 40)) {
7818
+ visitSourcePackCandidateData(item, depth + 1, visit);
7819
+ }
7820
+ }
7821
+ function readCandidatePath(record) {
7822
+ for (const key of ["path", "file", "file_path", "filepath", "source_path", "relative_path"]) {
7823
+ const value = record[key];
7824
+ if (typeof value !== "string") continue;
7825
+ const normalized = value.replaceAll("\\", "/").replace(/^\.\//u, "").trim();
7826
+ if (normalized && normalized !== "unknown" && !normalized.includes("\n") && !/^https?:\/\//iu.test(normalized)) {
7827
+ return normalized;
7828
+ }
7829
+ }
7830
+ return void 0;
7831
+ }
7832
+ function readCandidateStart(record) {
7833
+ const direct = readPositiveNumberField(record, [
7834
+ "start",
7835
+ "line",
7836
+ "line_number",
7837
+ "lineNumber",
7838
+ "start_line",
7839
+ "startLine",
7840
+ "lineno"
7841
+ ]);
7842
+ if (direct !== void 0) return direct;
7843
+ const range = typeof record.range === "string" ? record.range.match(/(\d+)(?:\D+(\d+))?/u) : null;
7844
+ if (range?.[1]) return Math.max(1, Number.parseInt(range[1], 10));
7845
+ return 1;
7846
+ }
7847
+ function readCandidateEnd(record, start) {
7848
+ const direct = readPositiveNumberField(record, [
7849
+ "end",
7850
+ "end_line",
7851
+ "endLine",
7852
+ "line_end",
7853
+ "lineEnd"
7854
+ ]);
7855
+ if (direct !== void 0) return Math.max(start, direct);
7856
+ const range = typeof record.range === "string" ? record.range.match(/(\d+)(?:\D+(\d+))?/u) : null;
7857
+ if (range?.[2]) return Math.max(start, Number.parseInt(range[2], 10));
7858
+ return start + 24;
7859
+ }
7860
+ function readPositiveNumberField(record, keys) {
7861
+ for (const key of keys) {
7862
+ const value = record[key];
7863
+ if (typeof value === "number" && Number.isFinite(value) && value >= 1) {
7864
+ return Math.trunc(value);
7865
+ }
7866
+ if (typeof value === "string" && /^\d+$/u.test(value)) {
7867
+ return Number.parseInt(value, 10);
7868
+ }
7869
+ }
7870
+ return void 0;
7871
+ }
7872
+ function readCandidateReason(record) {
7873
+ const parts = ["symbol", "name", "qualified_name", "kind", "type", "label"].map((key) => record[key]).filter((value) => typeof value === "string" || typeof value === "number").map((value) => String(value).trim()).filter(Boolean);
7874
+ return parts.length > 0 ? `index candidate: ${parts.slice(0, 3).join(" ")}` : "index candidate";
7875
+ }
7876
+ function readCandidateConfidence(record) {
7877
+ for (const key of ["confidence", "score", "similarity"]) {
7878
+ const value = record[key];
7879
+ if (typeof value === "number" && Number.isFinite(value)) {
7880
+ if (value < 0) return void 0;
7881
+ return value > 1 ? Math.min(0.95, value / 100) : Math.min(0.95, value);
7882
+ }
7883
+ }
7884
+ return void 0;
7885
+ }
7886
+ function extractPathsFromRanges(ranges) {
7887
+ if (!Array.isArray(ranges)) return [];
7888
+ return ranges.map(
7889
+ (item) => item && typeof item === "object" && typeof item.path === "string" ? item.path.replaceAll("\\", "/") : void 0
7890
+ ).filter((item) => Boolean(item));
7891
+ }
7892
+ function extractPathsFromToolData(data) {
7893
+ if (!data || typeof data !== "object" || Array.isArray(data)) return [];
7894
+ const record = data;
7895
+ const candidatePaths = record.candidatePaths;
7896
+ if (Array.isArray(candidatePaths)) {
7897
+ return candidatePaths.filter((item) => typeof item === "string").map((item) => item.replaceAll("\\", "/"));
7898
+ }
7899
+ return [
7900
+ ...extractPathsFromRanges(record.ranges),
7901
+ ...extractPathsFromRanges(record.snippets)
7902
+ ];
7903
+ }
7766
7904
  async function recordReportIncompleteEvidence2(context, sessionId, guard) {
7767
7905
  const evidence = createEvidenceRecord(
7768
7906
  "command_output",
@@ -8135,6 +8273,7 @@ export {
8135
8273
  executeIndexToolUse,
8136
8274
  executeApprovedIndexToolUse,
8137
8275
  rememberToolFiles,
8276
+ rememberSourcePackCandidatesFromToolData,
8138
8277
  recordReportIncompleteEvidence2 as recordReportIncompleteEvidence,
8139
8278
  handleToolCommand,
8140
8279
  formatPlanProposal,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-4T5DJW54.js";
15
15
  import {
16
16
  sanitizeDiagnosticText
17
- } from "./chunk-OMZYPQVA.js";
17
+ } from "./chunk-UGYFQF6M.js";
18
18
 
19
19
  // src/cache-command-runtime.ts
20
20
  import { randomUUID } from "crypto";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  formatProjectRulesContext
3
- } from "./chunk-LQTVYUT3.js";
3
+ } from "./chunk-OJTMM5CV.js";
4
4
  import {
5
5
  isDeepCompactPacket
6
- } from "./chunk-RMLTVKOY.js";
6
+ } from "./chunk-L4YVE3RG.js";
7
7
  import {
8
8
  createIndexStatusSnapshot,
9
9
  formatIndexRuntimeRef
10
- } from "./chunk-UT2TYK2A.js";
10
+ } from "./chunk-TYTVAFGB.js";
11
11
  import {
12
12
  isRecord
13
- } from "./chunk-QLRTQHTR.js";
13
+ } from "./chunk-6JGRNES6.js";
14
14
  import {
15
15
  getRuntimeStatusProvider
16
16
  } from "./chunk-3LT6OWQ2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  selectActiveLessons
3
- } from "./chunk-GDQQNPBP.js";
3
+ } from "./chunk-6GXIGN5W.js";
4
4
 
5
5
  // src/failure-learning-presenter.ts
6
6
  var CATEGORY_LABEL_ZH = {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  redactedPath,
3
3
  runCommandCapture
4
- } from "./chunk-KOULRCYJ.js";
4
+ } from "./chunk-HZ5XNKWS.js";
5
5
  import {
6
6
  formatFeatureFlags,
7
7
  getFeatureFlags
@@ -11,7 +11,7 @@ import {
11
11
  createPluginState,
12
12
  createSkillState,
13
13
  stableId
14
- } from "./chunk-QLRTQHTR.js";
14
+ } from "./chunk-6JGRNES6.js";
15
15
  import {
16
16
  getRuntimeStatusProvider
17
17
  } from "./chunk-3LT6OWQ2.js";
@@ -22,7 +22,7 @@ import {
22
22
  formatError,
23
23
  sanitizeDiagnosticText,
24
24
  truncateDisplay
25
- } from "./chunk-OMZYPQVA.js";
25
+ } from "./chunk-UGYFQF6M.js";
26
26
 
27
27
  // src/extension-command-runtime.ts
28
28
  import { randomUUID } from "crypto";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-GC55DMZV.js";
4
4
  import {
5
5
  fitText
6
- } from "./chunk-APJIC2O5.js";
6
+ } from "./chunk-GTIZNO5O.js";
7
7
 
8
8
  // src/shell/components/HelpPanel.tsx
9
9
  import { Box, Text, useInput } from "@linghun/ink-runtime";