@deepseek-harness-tui/dsh-tui 0.8.3 → 0.8.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 (198) hide show
  1. package/README.md +29 -10
  2. package/bin/dsh-tui.js +50 -11
  3. package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -13
  4. package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -59
  5. package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -15
  6. package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -32
  7. package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -59
  8. package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -166
  9. package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -42
  10. package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -143
  11. package/dsh-ecosystem-spec/registry/README.md +14 -14
  12. package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -56
  13. package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -13
  14. package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -149
  15. package/lib/types/activityPrefs.d.ts +10 -0
  16. package/lib/types/activityPrefs.d.ts.map +1 -1
  17. package/lib/types/activityPrefs.js +17 -0
  18. package/lib/types/commands.d.ts.map +1 -1
  19. package/lib/types/commands.js +1 -0
  20. package/lib/types/components/LogoV2.d.ts +4 -1
  21. package/lib/types/components/LogoV2.d.ts.map +1 -1
  22. package/lib/types/components/LogoV2.js +8 -3
  23. package/lib/types/components/MessageList.d.ts +4 -1
  24. package/lib/types/components/MessageList.d.ts.map +1 -1
  25. package/lib/types/components/MessageList.js +4 -4
  26. package/lib/types/components/PromptInput.d.ts.map +1 -1
  27. package/lib/types/components/PromptInput.js +1 -3
  28. package/lib/types/components/SplitDiffView.d.ts +3 -1
  29. package/lib/types/components/SplitDiffView.d.ts.map +1 -1
  30. package/lib/types/components/SplitDiffView.js +12 -5
  31. package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
  32. package/lib/types/components/StreamingMarkdown.js +10 -2
  33. package/lib/types/components/TipsPanel.d.ts +14 -0
  34. package/lib/types/components/TipsPanel.d.ts.map +1 -0
  35. package/lib/types/components/TipsPanel.js +37 -0
  36. package/lib/types/components/activityFrames.d.ts +7 -28
  37. package/lib/types/components/activityFrames.d.ts.map +1 -1
  38. package/lib/types/components/activityFrames.js +7 -84
  39. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
  40. package/lib/types/components/messages/AssistantThinkingMessage.js +1 -1
  41. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +4 -1
  42. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  43. package/lib/types/components/messages/AssistantToolUseMessage.js +14 -3
  44. package/lib/types/dsh-adapter/channel.d.ts +17 -0
  45. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  46. package/lib/types/dsh-adapter/channel.js +169 -33
  47. package/lib/types/dsh-adapter/index.d.ts +5 -0
  48. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  49. package/lib/types/dsh-adapter/index.js +19 -0
  50. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  51. package/lib/types/dsh-adapter/plugin.js +176 -4
  52. package/lib/types/dsh-adapter/settings-sections.d.ts +13 -0
  53. package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
  54. package/lib/types/dsh-adapter/settings-sections.js +31 -6
  55. package/lib/types/effortPrefs.d.ts +7 -6
  56. package/lib/types/effortPrefs.d.ts.map +1 -1
  57. package/lib/types/effortPrefs.js +7 -6
  58. package/lib/types/i18n.d.ts +42 -14
  59. package/lib/types/i18n.d.ts.map +1 -1
  60. package/lib/types/i18n.js +11 -4
  61. package/lib/types/ink/ink.d.ts +10 -0
  62. package/lib/types/ink/ink.d.ts.map +1 -1
  63. package/lib/types/ink/ink.js +35 -1
  64. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  65. package/lib/types/ink/parse-keypress.js +15 -0
  66. package/lib/types/screens/Chat.d.ts.map +1 -1
  67. package/lib/types/screens/Chat.js +44 -7
  68. package/lib/types/screens/Settings.d.ts.map +1 -1
  69. package/lib/types/screens/Settings.js +109 -50
  70. package/lib/types/screens/StatusLine.d.ts +8 -0
  71. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  72. package/lib/types/screens/StatusLine.js +65 -42
  73. package/lib/types/settings-sections.d.ts +1 -1
  74. package/lib/types/settings-sections.d.ts.map +1 -1
  75. package/lib/types/tips.d.ts +30 -0
  76. package/lib/types/tips.d.ts.map +1 -0
  77. package/lib/types/tips.js +575 -0
  78. package/lib/types/tuiDisplayPrefs.d.ts +47 -0
  79. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -0
  80. package/lib/types/tuiDisplayPrefs.js +60 -0
  81. package/node_modules/@dsh-std/command/CHANGELOG.md +8 -8
  82. package/node_modules/@dsh-std/command/LICENSE +21 -21
  83. package/node_modules/@dsh-std/command/README.md +26 -26
  84. package/node_modules/@dsh-std/command/README.zh.md +28 -28
  85. package/node_modules/@dsh-std/command/lib/index.js.map +1 -1
  86. package/node_modules/@dsh-std/command/package.json +22 -22
  87. package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  88. package/node_modules/@dsh-std/connection/LICENSE +21 -21
  89. package/node_modules/@dsh-std/connection/README.md +42 -42
  90. package/node_modules/@dsh-std/connection/README.zh.md +42 -42
  91. package/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  92. package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  93. package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  94. package/node_modules/@dsh-std/connection/package.json +20 -20
  95. package/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  96. package/node_modules/@dsh-std/core/LICENSE +21 -21
  97. package/node_modules/@dsh-std/core/README.md +13 -13
  98. package/node_modules/@dsh-std/core/README.zh.md +13 -13
  99. package/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  100. package/node_modules/@dsh-std/core/package.json +21 -21
  101. package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
  102. package/node_modules/@dsh-std/manifest/LICENSE +21 -21
  103. package/node_modules/@dsh-std/manifest/README.md +5 -5
  104. package/node_modules/@dsh-std/manifest/README.zh.md +5 -5
  105. package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
  106. package/node_modules/@dsh-std/manifest/package.json +20 -20
  107. package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
  108. package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -8
  109. package/node_modules/@dsh-std/messages/LICENSE +21 -21
  110. package/node_modules/@dsh-std/messages/README.md +5 -5
  111. package/node_modules/@dsh-std/messages/README.zh.md +7 -7
  112. package/node_modules/@dsh-std/messages/lib/index.js.map +1 -1
  113. package/node_modules/@dsh-std/messages/package.json +20 -20
  114. package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -54
  115. package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
  116. package/node_modules/@dsh-std/presentation/LICENSE +21 -21
  117. package/node_modules/@dsh-std/presentation/README.md +27 -27
  118. package/node_modules/@dsh-std/presentation/README.zh.md +29 -29
  119. package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
  120. package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
  121. package/node_modules/@dsh-std/presentation/package.json +25 -25
  122. package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -8
  123. package/node_modules/@dsh-std/storage/LICENSE +21 -21
  124. package/node_modules/@dsh-std/storage/README.md +5 -5
  125. package/node_modules/@dsh-std/storage/README.zh.md +7 -7
  126. package/node_modules/@dsh-std/storage/lib/index.js.map +1 -1
  127. package/node_modules/@dsh-std/storage/package.json +20 -20
  128. package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -56
  129. package/package.json +8 -3
  130. package/presets/liangshen/.dsh-tui-managed.json +1 -1
  131. package/presets/liangshen/agent.cordis.yml +7 -5
  132. package/presets/liangshen/custom-bash.mjs +184 -9
  133. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  134. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -21
  135. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -42
  136. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -42
  137. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  138. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  139. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  140. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -20
  141. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  142. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -21
  143. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -13
  144. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -13
  145. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  146. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -21
  147. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
  148. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -21
  149. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -5
  150. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -5
  151. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
  152. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -20
  153. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
  154. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
  155. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -21
  156. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -27
  157. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -29
  158. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
  159. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
  160. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -25
  161. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  162. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -21
  163. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -13
  164. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -13
  165. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  166. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -21
  167. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  168. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -21
  169. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -13
  170. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -13
  171. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  172. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -21
  173. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  174. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -21
  175. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -13
  176. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -13
  177. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  178. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -21
  179. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  180. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -21
  181. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -42
  182. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -42
  183. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  184. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  185. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  186. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -20
  187. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  188. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -21
  189. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -13
  190. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -13
  191. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  192. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -21
  193. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  194. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -21
  195. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -13
  196. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -13
  197. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  198. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -21
@@ -21,6 +21,15 @@ export interface TuiSettingsFieldOption {
21
21
  /** Provider-owned translations for the label. */
22
22
  descriptions?: LocalizedDescriptions;
23
23
  }
24
+ /** Optional navigation group inside one settings section. */
25
+ export interface TuiSettingsGroup {
26
+ /** Stable identifier, unique inside the section. */
27
+ id: string;
28
+ /** Group title (English; also the fallback). */
29
+ title: string;
30
+ /** Provider-owned translations for the title. */
31
+ descriptions?: LocalizedDescriptions;
32
+ }
24
33
  /** The write one field's draft stages when the section is saved. */
25
34
  export type TuiSettingsFieldWrite = {
26
35
  kind: 'set';
@@ -42,6 +51,8 @@ export interface TuiSettingsField {
42
51
  hint?: string;
43
52
  /** Provider-owned translations for the hint. */
44
53
  hintDescriptions?: LocalizedDescriptions;
54
+ /** Optional group id; grouped fields render on that group's subpage. */
55
+ group?: string;
45
56
  kind: TuiSettingsFieldKind;
46
57
  /** Choices for `kind: 'select'` (ignored otherwise). */
47
58
  options?: readonly TuiSettingsFieldOption[];
@@ -83,6 +94,8 @@ export interface TuiSettingsSection {
83
94
  title: string;
84
95
  /** Provider-owned translations for the title. */
85
96
  descriptions?: LocalizedDescriptions;
97
+ /** Optional navigation groups, in display order. */
98
+ groups?: readonly TuiSettingsGroup[];
86
99
  /** Editable fields, in display order. */
87
100
  fields: readonly TuiSettingsField[];
88
101
  }
@@ -1 +1 @@
1
- {"version":3,"file":"settings-sections.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/settings-sections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gB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0B,CAAA"}
@@ -88,12 +88,30 @@ function registerSection(runtime, section, owner) {
88
88
  throw new TypeError(`invalid TUI settings-section namespace: ${section.ns}`);
89
89
  if (state.sections.has(ns))
90
90
  throw new Error(`TUI settings section "${ns}" is already registered`);
91
- const normalized = Object.freeze({
92
- ...section,
93
- ns,
94
- descriptions: section.descriptions === undefined ? undefined : Object.freeze({ ...section.descriptions }),
95
- fields: Object.freeze(section.fields.map(field => Object.freeze({
91
+ const groupIds = new Set();
92
+ const groups = section.groups === undefined
93
+ ? undefined
94
+ : Object.freeze(section.groups.map(group => {
95
+ const id = group.id.trim();
96
+ if (!/^[a-z][a-z0-9_-]*$/u.test(id))
97
+ throw new TypeError(`invalid TUI settings group id: ${group.id}`);
98
+ if (groupIds.has(id))
99
+ throw new Error(`TUI settings group "${id}" is already declared in section "${ns}"`);
100
+ groupIds.add(id);
101
+ return Object.freeze({
102
+ ...group,
103
+ id,
104
+ descriptions: group.descriptions === undefined ? undefined : Object.freeze({ ...group.descriptions }),
105
+ });
106
+ }));
107
+ const fields = Object.freeze(section.fields.map(field => {
108
+ const group = field.group?.trim();
109
+ if (group !== undefined && !groupIds.has(group)) {
110
+ throw new TypeError(`TUI settings field "${field.path.join('.')}" references unknown group "${field.group}" in section "${ns}"`);
111
+ }
112
+ return Object.freeze({
96
113
  ...field,
114
+ group,
97
115
  path: Object.freeze([...field.path]),
98
116
  descriptions: field.descriptions === undefined ? undefined : Object.freeze({ ...field.descriptions }),
99
117
  hintDescriptions: field.hintDescriptions === undefined ? undefined : Object.freeze({ ...field.hintDescriptions }),
@@ -101,7 +119,14 @@ function registerSection(runtime, section, owner) {
101
119
  ? undefined
102
120
  : Object.freeze(field.options.map(option => Object.freeze({ ...option, descriptions: option.descriptions === undefined ? undefined : Object.freeze({ ...option.descriptions }) }))),
103
121
  secret: field.secret === undefined ? undefined : Object.freeze({ ...field.secret }),
104
- }))),
122
+ });
123
+ }));
124
+ const normalized = Object.freeze({
125
+ ...section,
126
+ ns,
127
+ descriptions: section.descriptions === undefined ? undefined : Object.freeze({ ...section.descriptions }),
128
+ groups,
129
+ fields,
105
130
  });
106
131
  state.sections.set(ns, normalized);
107
132
  if (owner !== undefined)
@@ -1,10 +1,11 @@
1
1
  /**
2
- * Persisted reasoning-effort preference (`~/.dsh-tui/effort.json`). Shift+Tab
3
- * cycles the live route's adapter-owned levels (dsh-llm `LlmModelReasoningInfo`);
4
- * the choice lands here so the next boot starts on it. The file is
5
- * best-effort: a missing/corrupt file or a level the current adapter does not
6
- * offer just falls back to the provider default — the first request/header
7
- * event always re-asserts the truth on the status line.
2
+ * Persisted reasoning-effort preference (`~/.dsh-tui/effort.json`). Set via
3
+ * `/effort` (slider or `/effort <id>`; `/effort status` reports the current
4
+ * level) — note Shift+Tab cycles session modes (default/plan/full), not
5
+ * effort levels. The choice lands here so the next boot starts on it. The
6
+ * file is best-effort: a missing/corrupt file or a level the current adapter
7
+ * does not offer just falls back to the provider default — the first
8
+ * request/header event always re-asserts the truth on the status line.
8
9
  */
9
10
  /**
10
11
  * The persisted reasoning-effort id, or undefined when unset or invalid.
@@ -1 +1 @@
1
- {"version":3,"file":"effortPrefs.d.ts","sourceRoot":"","sources":["../../src/effortPrefs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAkB,GAAG,MAAM,GAAG,SAAS,CAS1E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAQhF"}
1
+ {"version":3,"file":"effortPrefs.d.ts","sourceRoot":"","sources":["../../src/effortPrefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAkB,GAAG,MAAM,GAAG,SAAS,CAS1E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAQhF"}
@@ -1,10 +1,11 @@
1
1
  /**
2
- * Persisted reasoning-effort preference (`~/.dsh-tui/effort.json`). Shift+Tab
3
- * cycles the live route's adapter-owned levels (dsh-llm `LlmModelReasoningInfo`);
4
- * the choice lands here so the next boot starts on it. The file is
5
- * best-effort: a missing/corrupt file or a level the current adapter does not
6
- * offer just falls back to the provider default — the first request/header
7
- * event always re-asserts the truth on the status line.
2
+ * Persisted reasoning-effort preference (`~/.dsh-tui/effort.json`). Set via
3
+ * `/effort` (slider or `/effort <id>`; `/effort status` reports the current
4
+ * level) — note Shift+Tab cycles session modes (default/plan/full), not
5
+ * effort levels. The choice lands here so the next boot starts on it. The
6
+ * file is best-effort: a missing/corrupt file or a level the current adapter
7
+ * does not offer just falls back to the provider default — the first
8
+ * request/header event always re-asserts the truth on the status line.
8
9
  */
9
10
  import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
10
11
  import { join } from 'node:path';
@@ -867,6 +867,14 @@ declare const dict: {
867
867
  readonly zh: "再次按 Ctrl+C 退出";
868
868
  readonly en: "Press Ctrl+C again to exit";
869
869
  };
870
+ readonly 'esc-again-rewind': {
871
+ readonly zh: "再次按 Esc 时间回溯";
872
+ readonly en: "Press Esc again to rewind";
873
+ };
874
+ readonly 'esc-again-clear': {
875
+ readonly zh: "再次按 Esc 清空";
876
+ readonly en: "Press Esc again to clear";
877
+ };
870
878
  readonly 'new-session-started': {
871
879
  readonly zh: "已新建会话";
872
880
  readonly en: "New session started";
@@ -987,22 +995,14 @@ declare const dict: {
987
995
  readonly zh: "探索未至之境!";
988
996
  readonly en: "Explore the uncharted!";
989
997
  };
990
- readonly 'logo-tip-model': {
991
- readonly zh: "切换模型";
992
- readonly en: "switch model";
993
- };
994
- readonly 'logo-tip-help': {
995
- readonly zh: "查看命令";
996
- readonly en: "view commands";
997
- };
998
- readonly 'logo-tip-tab': {
999
- readonly zh: "自动补全";
1000
- readonly en: "autocomplete";
1001
- };
1002
998
  readonly 'logo-tip-prefix': {
1003
999
  readonly zh: "提示:";
1004
1000
  readonly en: "Tip: ";
1005
1001
  };
1002
+ readonly 'logo-tip-more': {
1003
+ readonly zh: "更多技巧";
1004
+ readonly en: "more tips";
1005
+ };
1006
1006
  readonly 'input-sent-after-turn': {
1007
1007
  readonly zh: "已发送,当前回合结束后处理";
1008
1008
  readonly en: "Sent, processed after the current turn";
@@ -1187,6 +1187,14 @@ declare const dict: {
1187
1187
  readonly zh: "命令:";
1188
1188
  readonly en: "commands:";
1189
1189
  };
1190
+ readonly 'tips-title': {
1191
+ readonly zh: "使用技巧(快捷键 · 命令 · 工作流 · 个性化 · 避坑)";
1192
+ readonly en: "Usage tips (shortcuts · commands · workflow · display · gotchas)";
1193
+ };
1194
+ readonly 'tips-hint': {
1195
+ readonly zh: "↑/↓ 滚动 · Esc 关闭";
1196
+ readonly en: "↑/↓ scroll · Esc to close";
1197
+ };
1190
1198
  readonly 'interrupted-by-user': {
1191
1199
  readonly zh: "已打断 ";
1192
1200
  readonly en: "Interrupted ";
@@ -1255,6 +1263,10 @@ declare const dict: {
1255
1263
  readonly zh: "没有可配置的插件设置(尚无插件注册设置区块)";
1256
1264
  readonly en: "No configurable plugin settings (no plugin has registered a section)";
1257
1265
  };
1266
+ readonly 'settings-group-empty': {
1267
+ readonly zh: "此分组没有可配置字段";
1268
+ readonly en: "No configurable fields in this group";
1269
+ };
1258
1270
  readonly 'settings-section-unavailable': {
1259
1271
  readonly zh: "命名空间未注册";
1260
1272
  readonly en: "namespace not served";
@@ -1320,8 +1332,12 @@ declare const dict: {
1320
1332
  readonly en: "Discarded all unsaved edits";
1321
1333
  };
1322
1334
  readonly 'settings-hint-list': {
1323
- readonly zh: "**Enter** 编辑/切换 · s 保存 · d 放弃 · Esc 放弃/退出";
1324
- readonly en: "**Enter** edit/toggle · s save · d discard · Esc discard/exit";
1335
+ readonly zh: "**Enter** 进入/编辑/切换 · s 保存 · d 放弃 · Esc 放弃/退出";
1336
+ readonly en: "**Enter** open/edit/toggle · s save · d discard · Esc discard/exit";
1337
+ };
1338
+ readonly 'settings-hint-group': {
1339
+ readonly zh: "**Enter** 编辑/切换 · s 保存 · d 放弃 · Esc 返回";
1340
+ readonly en: "**Enter** edit/toggle · s save · d discard · Esc back";
1325
1341
  };
1326
1342
  readonly 'settings-hint-edit': {
1327
1343
  readonly zh: "**Enter** 确认 · Esc 取消";
@@ -1459,6 +1475,18 @@ declare const dict: {
1459
1475
  readonly zh: "**Enter** 回退 · Esc 返回";
1460
1476
  readonly en: "**Enter** to rewind · Esc to back";
1461
1477
  };
1478
+ readonly 'statusline-hint-select': {
1479
+ readonly zh: "esc 返回输入";
1480
+ readonly en: "esc to return to input";
1481
+ };
1482
+ readonly 'statusline-hint-working': {
1483
+ readonly zh: "esc 中断";
1484
+ readonly en: "esc to interrupt";
1485
+ };
1486
+ readonly 'statusline-hint-shortcuts': {
1487
+ readonly zh: "? 查看快捷键";
1488
+ readonly en: "? for shortcuts";
1489
+ };
1462
1490
  readonly 'hint-ext-dialog-input': {
1463
1491
  readonly zh: "**Enter** 确认 · Esc 取消";
1464
1492
  readonly en: "**Enter** to confirm · Esc to cancel";
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAI9B,+DAA+D;AAC/D,eAAO,MAAM,KAAK,uBAAwB,CAAA;AAE1C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,UAAe,GAAG,MAAM,CAM/D;AAED;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGzD;AAID;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAS5D;AAED,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,GAAG,GAAE,MAAkB,GAAG,IAAI,GAAG,SAAS,CAMtE;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAQ1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAavC;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC"}
package/lib/types/i18n.js CHANGED
@@ -239,6 +239,8 @@ const dict = {
239
239
  'btw-hint-done': { zh: '↑/↓ 滚动 · Space/Enter/Esc 关闭 · c 复制', en: '↑/↓ scroll · Space/Enter/Esc dismiss · c copy' },
240
240
  'btw-llm-unavailable': { zh: '侧问不可用(llm 服务未挂载)', en: 'Side question unavailable (llm service not mounted)' },
241
241
  'exit-press-again': { zh: '再次按 Ctrl+C 退出', en: 'Press Ctrl+C again to exit' },
242
+ 'esc-again-rewind': { zh: '再次按 Esc 时间回溯', en: 'Press Esc again to rewind' },
243
+ 'esc-again-clear': { zh: '再次按 Esc 清空', en: 'Press Esc again to clear' },
242
244
  'new-session-started': { zh: '已新建会话', en: 'New session started' },
243
245
  'command-not-found': { zh: '/{{name}}:没有这个命令', en: '/{{name}}: no such command' },
244
246
  'thinking-toggled': { zh: '思考模式:{{state}}', en: 'Thinking {{state}}' },
@@ -285,10 +287,8 @@ const dict = {
285
287
  'mode-plan-unavailable': { zh: '当前 preset 未注册 /plan 命令,无法切换计划模式', en: 'The active preset does not register /plan; cannot toggle plan mode' },
286
288
  // ── components/LogoV2.tsx ───────────────────────────────────────────
287
289
  'logo-tagline': { zh: '探索未至之境!', en: 'Explore the uncharted!' },
288
- 'logo-tip-model': { zh: '切换模型', en: 'switch model' },
289
- 'logo-tip-help': { zh: '查看命令', en: 'view commands' },
290
- 'logo-tip-tab': { zh: '自动补全', en: 'autocomplete' },
291
290
  'logo-tip-prefix': { zh: '提示:', en: 'Tip: ' },
291
+ 'logo-tip-more': { zh: '更多技巧', en: 'more tips' },
292
292
  // ── components/PromptInput.tsx ──────────────────────────────────────
293
293
  'input-sent-after-turn': { zh: '已发送,当前回合结束后处理', en: 'Sent, processed after the current turn' },
294
294
  'input-interrupted-next': { zh: '已插话 · 下一步立即处理', en: 'Interrupted · processed next' },
@@ -338,6 +338,8 @@ const dict = {
338
338
  'help-cycle-mode': { zh: 'shift+tab 切换模式', en: 'shift+tab to cycle mode' },
339
339
  'help-open-editor': { zh: 'ctrl+x 打开编辑器', en: 'ctrl+x to open editor' },
340
340
  'help-commands-title': { zh: '命令:', en: 'commands:' },
341
+ 'tips-title': { zh: '使用技巧(快捷键 · 命令 · 工作流 · 个性化 · 避坑)', en: 'Usage tips (shortcuts · commands · workflow · display · gotchas)' },
342
+ 'tips-hint': { zh: '↑/↓ 滚动 · Esc 关闭', en: '↑/↓ scroll · Esc to close' },
341
343
  // ── components/InterruptedByUser.tsx ────────────────────────────────
342
344
  'interrupted-by-user': { zh: '已打断 ', en: 'Interrupted ' },
343
345
  'interrupted-ask-next': { zh: '· 接下来想让 DeepSeek 做什么?', en: '· What should DeepSeek do instead?' },
@@ -359,6 +361,7 @@ const dict = {
359
361
  'settings-title': { zh: '插件设置', en: 'Plugin settings' },
360
362
  'settings-unavailable': { zh: '设置服务未挂载——只读', en: 'settings service absent — read-only' },
361
363
  'settings-empty': { zh: '没有可配置的插件设置(尚无插件注册设置区块)', en: 'No configurable plugin settings (no plugin has registered a section)' },
364
+ 'settings-group-empty': { zh: '此分组没有可配置字段', en: 'No configurable fields in this group' },
362
365
  'settings-section-unavailable': { zh: '命名空间未注册', en: 'namespace not served' },
363
366
  'settings-readonly-heading': { zh: '其他设置命名空间(只读)', en: 'Other settings namespaces (read-only)' },
364
367
  'settings-readonly-hint': { zh: '以上命名空间尚无 TUI 设置区块,可手工编辑 {{path}}', en: 'No TUI section for these namespaces yet — edit {{path}} by hand' },
@@ -375,7 +378,8 @@ const dict = {
375
378
  'settings-saved': { zh: '已保存 {{ns}}', en: 'Saved {{ns}}' },
376
379
  'settings-save-failed': { zh: '保存 {{ns}} 失败——请重试', en: 'Saving {{ns}} failed — please retry' },
377
380
  'settings-discarded': { zh: '已放弃所有未保存的修改', en: 'Discarded all unsaved edits' },
378
- 'settings-hint-list': { zh: '**Enter** 编辑/切换 · s 保存 · d 放弃 · Esc 放弃/退出', en: '**Enter** edit/toggle · s save · d discard · Esc discard/exit' },
381
+ 'settings-hint-list': { zh: '**Enter** 进入/编辑/切换 · s 保存 · d 放弃 · Esc 放弃/退出', en: '**Enter** open/edit/toggle · s save · d discard · Esc discard/exit' },
382
+ 'settings-hint-group': { zh: '**Enter** 编辑/切换 · s 保存 · d 放弃 · Esc 返回', en: '**Enter** edit/toggle · s save · d discard · Esc back' },
379
383
  'settings-hint-edit': { zh: '**Enter** 确认 · Esc 取消', en: '**Enter** to confirm · Esc to cancel' },
380
384
  // ── 会话浏览器:行、计数、筛选、预览 ───────────────────────────────
381
385
  'session-loading': { zh: '正在读取会话…', en: 'Reading sessions…' },
@@ -415,6 +419,9 @@ const dict = {
415
419
  'hint-select-exit': { zh: '**Enter** 选择 · Esc 退出', en: '**Enter** to select · Esc to exit' },
416
420
  'hint-fill-exit': { zh: '**Enter** 填入命令 · Esc 退出', en: '**Enter** to insert · Esc to exit' },
417
421
  'hint-rewind-back': { zh: '**Enter** 回退 · Esc 返回', en: '**Enter** to rewind · Esc to back' },
422
+ 'statusline-hint-select': { zh: 'esc 返回输入', en: 'esc to return to input' },
423
+ 'statusline-hint-working': { zh: 'esc 中断', en: 'esc to interrupt' },
424
+ 'statusline-hint-shortcuts': { zh: '? 查看快捷键', en: '? for shortcuts' },
418
425
  'hint-ext-dialog-input': { zh: '**Enter** 确认 · Esc 取消', en: '**Enter** to confirm · Esc to cancel' },
419
426
  'hint-adjust-done': { zh: '**←/→** 调整 · Enter/Esc 完成', en: '**←/→** to adjust · Enter/Esc to done' },
420
427
  'hint-history-search': { zh: '↑/↓ 选择 · **Enter** 确认 · Esc 取消', en: '↑/↓ to navigate · **Enter** to select · Esc to cancel' },
@@ -54,6 +54,7 @@ export default class Ink {
54
54
  private needsEraseBeforePaint;
55
55
  private cursorDeclaration;
56
56
  private displayCursor;
57
+ private handleStdinError;
57
58
  constructor(options: Options);
58
59
  private handleResume;
59
60
  private handleResize;
@@ -112,6 +113,15 @@ export default class Ink {
112
113
  * unchanged cells don't need repainting. Scrollback is preserved.
113
114
  */
114
115
  forceRedraw(): void;
116
+ /**
117
+ * Establish a genuinely fresh terminal page: clear both the visible screen
118
+ * and native scrollback, reset frame correspondence, then redraw the current
119
+ * React tree. This is intentionally stronger than Ctrl+L/forceRedraw(),
120
+ * which preserves history; use it only at a destructive UI boundary such as
121
+ * `/new`, where showing the previous conversation above the new session is
122
+ * misleading.
123
+ */
124
+ clearScrollbackAndRedraw(): void;
115
125
  /**
116
126
  * Mark the previous frame as untrustworthy for blit, forcing the next
117
127
  * render to do a full-damage diff instead of the per-node fast path.
@@ -1 +1 @@
1
- {"version":3,"file":"ink.d.ts","sourceRoot":"","sources":["../../../src/ink/ink.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAa9C,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAA0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I,CAsDzE"}
@@ -32,7 +32,7 @@ import { CharPool, cellAt, createScreen, HyperlinkPool, isEmptyCellAt, migrateSc
32
32
  import { applySearchHighlight } from './searchHighlight.js';
33
33
  import { applySelectionOverlay, captureScrolledRows, clearSelection, createSelectionState, extendSelection, findPlainTextUrlAt, getSelectedText, hasSelection, moveFocus, selectLineAt, selectWordAt, shiftAnchor, shiftSelection, shiftSelectionForFollow, startSelection, updateSelection } from './selection.js';
34
34
  import { isDecstbmSafe, SYNC_OUTPUT_SUPPORTED, supportsExtendedKeys, supportsWin32InputMode, writeDiffToTerminal } from './terminal.js';
35
- import { CURSOR_HOME, cursorMove, cursorPosition, DISABLE_KITTY_KEYBOARD, DISABLE_MODIFY_OTHER_KEYS, DISABLE_WIN32_INPUT_MODE, ENABLE_KITTY_KEYBOARD, ENABLE_MODIFY_OTHER_KEYS, ENABLE_WIN32_INPUT_MODE, ERASE_SCREEN, SGR_RESET } from './termio/csi.js';
35
+ import { CURSOR_HOME, cursorMove, cursorPosition, DISABLE_KITTY_KEYBOARD, DISABLE_MODIFY_OTHER_KEYS, DISABLE_WIN32_INPUT_MODE, ENABLE_KITTY_KEYBOARD, ENABLE_MODIFY_OTHER_KEYS, ENABLE_WIN32_INPUT_MODE, ERASE_SCREEN, ERASE_SCROLLBACK, SGR_RESET } from './termio/csi.js';
36
36
  import { DBP, DFE, DISABLE_MOUSE_TRACKING, ENABLE_MOUSE_TRACKING, ENTER_ALT_SCREEN, EXIT_ALT_SCREEN, SHOW_CURSOR } from './termio/dec.js';
37
37
  import { CLEAR_ITERM2_PROGRESS, CLEAR_TAB_STATUS, setClipboard, supportsTabStatus, wrapForMultiplexer } from './termio/osc.js';
38
38
  import { TerminalWriteProvider } from './useTerminalNotification.js';
@@ -153,9 +153,20 @@ export default class Ink {
153
153
  // for log-update's relative-move invariants). Alt-screen doesn't need
154
154
  // this — every frame begins with CSI H. null = no move emitted last frame.
155
155
  displayCursor = null;
156
+ handleStdinError(error) {
157
+ if (this.isUnmounted && error.code === 'EIO') {
158
+ return;
159
+ }
160
+ throw error;
161
+ }
156
162
  constructor(options) {
157
163
  this.options = options;
158
164
  autoBind(this);
165
+ if (options.stdin.isTTY) {
166
+ // Keep this listener through teardown: a pending libuv TTY read can
167
+ // report EIO only after raw mode and React have already been released.
168
+ options.stdin.on('error', this.handleStdinError);
169
+ }
159
170
  if (this.options.patchConsole) {
160
171
  this.restoreConsole = this.patchConsole();
161
172
  this.restoreStderr = this.patchStderr();
@@ -863,6 +874,29 @@ export default class Ink {
863
874
  }
864
875
  this.onRender();
865
876
  }
877
+ /**
878
+ * Establish a genuinely fresh terminal page: clear both the visible screen
879
+ * and native scrollback, reset frame correspondence, then redraw the current
880
+ * React tree. This is intentionally stronger than Ctrl+L/forceRedraw(),
881
+ * which preserves history; use it only at a destructive UI boundary such as
882
+ * `/new`, where showing the previous conversation above the new session is
883
+ * misleading.
884
+ */
885
+ clearScrollbackAndRedraw() {
886
+ if (!this.options.stdout.isTTY || this.isUnmounted || this.isPaused)
887
+ return;
888
+ // Keep 3J outside synchronized output. Windows Terminal can relocate the
889
+ // viewport when erase-buffer commands execute inside BSU/ESU.
890
+ this.options.stdout.write(SGR_RESET + ERASE_SCROLLBACK + ERASE_SCREEN + CURSOR_HOME);
891
+ if (this.altScreenActive) {
892
+ this.resetFramesForAltScreen();
893
+ }
894
+ else {
895
+ this.repaint();
896
+ this.prevFrameContaminated = true;
897
+ }
898
+ this.onRender();
899
+ }
866
900
  /**
867
901
  * Mark the previous frame as untrustworthy for blit, forcing the next
868
902
  * render to do a full-damage diff instead of the per-node fast path.
@@ -1 +1 @@
1
- {"version":3,"file":"parse-keypress.d.ts","sourceRoot":"","sources":["../../../src/ink/parse-keypress.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAkJtE,gDAAgD;AAChD,e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AA;IAC5B,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;6BAE6B;AAC7B,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,gBAAgB,CAAA;CAC3B,CAAA;AAED;;0DAE0D;AAC1D,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,OAAO,CAAA;IACb;4DACwD;IACxD,MAAM,EAAE,MAAM,CAAA;IACd,2DAA2D;IAC3D,MAAM,EAAE,OAAO,GAAG,SAAS,CAAA;IAC3B,uCAAuC;IACvC,GAAG,EAAE,MAAM,CAAA;IACX,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;2EAC2E;AAC3E,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,cAAc,CAAA"}
@@ -42,6 +42,8 @@ const MODIFY_OTHER_KEYS_RE = /^\x1b\[27;(\d+);(\d+)~/;
42
42
  // win32 instead of kitty/modifyOtherKeys.
43
43
  // eslint-disable-next-line no-control-regex
44
44
  const WIN32_INPUT_RE = /^\x1b\[([\d;]*)_$/;
45
+ const WIN32_INPUT_TAIL_RE = /\[\d*;\d*;\d*;[01](?:;\d*){0,2}_/g;
46
+ const WIN32_INPUT_TAILS_RE = /^(?:\[\d*;\d*;\d*;[01](?:;\d*){0,2}_)+$/;
45
47
  // dwControlKeyState modifier bits (others — NUMLOCK_ON 0x20, CAPSLOCK_ON
46
48
  // 0x80, ENHANCED_KEY 0x100 — are state indicators, not pressed modifiers)
47
49
  const WIN32_CS_ALT = 0x01 | 0x02;
@@ -623,6 +625,19 @@ export function parseMultipleKeypresses(prevState, input = '') {
623
625
  if (inPaste) {
624
626
  pasteBuffer += token.value;
625
627
  }
628
+ else if (WIN32_INPUT_TAILS_RE.test(token.value)) {
629
+ // A delayed win32-input-mode continuation can arrive after App's
630
+ // escape timer has already flushed its ESC prefix. Recover complete
631
+ // record tails so their protocol bytes do not leak into the prompt.
632
+ for (const tail of token.value.match(WIN32_INPUT_TAIL_RE) ?? []) {
633
+ const win32 = parseWin32KeyEvent('\x1b' + tail, win32Ctx);
634
+ if (win32 !== undefined && win32 !== null) {
635
+ for (let i = 0; i < win32.repeat; i++) {
636
+ keys.push(...feedWin32Paste(win32Paste, win32.key));
637
+ }
638
+ }
639
+ }
640
+ }
626
641
  else if (/^\[<\d+;\d+;\d+[Mm]$/.test(token.value) ||
627
642
  /^\[M[\x60-\x7f][\x20-\uffff]{2}$/.test(token.value)) {
628
643
  // Orphaned SGR/X10 mouse tail (fullscreen only — mouse tracking is off
@@ -1 +1 @@
1
- {"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/screens/Chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,OAAO,EAAqB,KAAK,OAAO,EAAsE,MAAM,2BAA2B,CAAA;AAC/I,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAGlE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAwI3D,wBAAgB,IAAI,CAAC,EACnB,OAAO,EACP,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,MAAM,EACN,QAAQ,EACR,UAAkB,EAClB,cAAc,EAAE,kBAAkB,GACnC,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,aAAa,EAAE,aAAa,CAAA;IAC5B;;;;OAIG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cAAc,CAAA;IAChC,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,eAAe,CAAA;IACpC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,qBAioEA"}
@@ -46,6 +46,7 @@ import { ThinkingToggle } from '../components/ThinkingToggle.js';
46
46
  import { HistorySearchDialog } from '../components/HistorySearchDialog.js';
47
47
  import { RewindPicker } from '../components/RewindPicker.js';
48
48
  import { BtwPanel } from '../components/BtwPanel.js';
49
+ import { TipsPanel } from '../components/TipsPanel.js';
49
50
  import { setClipboard } from '../ink/termio/osc.js';
50
51
  import instances from '../ink/instances.js';
51
52
  import { useAnimationFrame } from '../ink/hooks/use-animation-frame.js';
@@ -262,6 +263,8 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
262
263
  btwAbortRef.current = null;
263
264
  setBtw(null);
264
265
  };
266
+ /** /tips usage-tips overlay: pure UI state, no session side effects. */
267
+ const [tipsOpen, setTipsOpen] = React.useState(false);
265
268
  React.useEffect(() => () => btwAbortRef.current?.abort(), []);
266
269
  /**
267
270
  * The trajectory scene (issue #80 evolution). Unlike every other overlay
@@ -295,6 +298,18 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
295
298
  const loadedContextVisible = channel.rows.length === 0 && channel.loadedContext !== undefined;
296
299
  /** Startup context panel: collapsed by default, toggled with Ctrl+P. */
297
300
  const [loadedContextOpen, setLoadedContextOpen] = React.useState(false);
301
+ /**
302
+ * The context panel changes the height of the main-screen transcript by a
303
+ * large amount. In inline mode that invalidates the renderer's previous
304
+ * scrollback/layout correspondence; asking it to repaint from the physical
305
+ * viewport prevents the collapsed frame from reusing stale blank cells.
306
+ */
307
+ const toggleLoadedContext = React.useCallback(() => {
308
+ setLoadedContextOpen(previous => !previous);
309
+ const ink = instances.get(process.stdout) ?? instances.values().next().value;
310
+ ink?.invalidatePrevFrame();
311
+ ink?.reanchorViewport();
312
+ }, []);
298
313
  /** `/` transcript search (less-style incsearch, ported from CC's REPL). */
299
314
  const [searchOpen, setSearchOpen] = React.useState(false);
300
315
  const [searchQuery, setSearchQuery] = React.useState('');
@@ -656,8 +671,26 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
656
671
  // non-destructive — no CC-style "press /new again" confirmation.
657
672
  setHelpOpen(false);
658
673
  void channel.newSession().then((ok) => {
659
- if (ok)
660
- channel.notify(t('new-session-started'));
674
+ if (!ok)
675
+ return;
676
+ // A new session is a fresh terminal page, not merely an emptied
677
+ // transcript. Reset view-local state, return the ScrollBox to the
678
+ // top, then clear native scrollback and repaint the whale homepage.
679
+ setExpanded(false);
680
+ setExpandedRows(new Set());
681
+ setSelectedId(null);
682
+ setSelectionActive(false);
683
+ setShowAllMessages(false);
684
+ setLoadedContextOpen(false);
685
+ handle?.scrollTo(0);
686
+ channel.notify(t('new-session-started'));
687
+ const ink = instances.get(process.stdout) ?? instances.values().next().value;
688
+ // Wait one task so React commits the empty transcript/homepage tree;
689
+ // clearing before that would immediately repaint the old session.
690
+ setTimeout(() => {
691
+ handle?.scrollTo(0);
692
+ ink?.clearScrollbackAndRedraw();
693
+ }, 0);
661
694
  });
662
695
  return true;
663
696
  }
@@ -1030,6 +1063,10 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
1030
1063
  });
1031
1064
  return true;
1032
1065
  }
1066
+ case 'tips':
1067
+ setHelpOpen(false);
1068
+ setTipsOpen(true);
1069
+ return true;
1033
1070
  case 'connect':
1034
1071
  setHelpOpen(false);
1035
1072
  channel.pushLocal('/connect', [t('connect-none')]);
@@ -1817,7 +1854,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
1817
1854
  // Ctrl+P toggles the startup loaded-context panel while it is on
1818
1855
  // screen (transcript still empty); once rows take over and the
1819
1856
  // panel disappears the key has nothing left to do.
1820
- setLoadedContextOpen(previous => !previous);
1857
+ toggleLoadedContext();
1821
1858
  return;
1822
1859
  }
1823
1860
  if (isMod(key) && input === 'r' && !helpOpen) {
@@ -1977,7 +2014,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
1977
2014
  /** Prompt input is inert while a modal dialog owns the keyboard. */
1978
2015
  const promptSelectionActive = selectionActive || modelPickerOpen || skillsPickerOpen || workspacePickerOpen || workspaceFlow !== null || activityPickerOpen ||
1979
2016
  effortSliderOpen || presetPickerOpen || themePickerOpen || thinkingOpen || historyOpen || rewindOpen || searchOpen ||
1980
- btw !== null;
2017
+ btw !== null || tipsOpen;
1981
2018
  // The trajectory scene replaces the conversation for as long as it is open.
1982
2019
  // Rendering it INSTEAD of (not above) the transcript is what makes it a
1983
2020
  // screen rather than an overlay: it owns the full viewport, and the
@@ -1999,7 +2036,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
1999
2036
  modelPickerOpen || skillsPickerOpen ||
2000
2037
  activityPickerOpen || (effortSliderOpen && effortOptions.length > 1) ||
2001
2038
  (presetPickerOpen && presetOptions.length > 0) || themePickerOpen || historyOpen ||
2002
- rewindOpen || searchOpen;
2039
+ rewindOpen || searchOpen || tipsOpen;
2003
2040
  return (_jsxs(Box, { ref: wakeTickRef, flexDirection: "column", flexGrow: 1, width: "100%", children: [!isSticky && channel.lastUserText && (_jsx(StickyPromptHeader, { text: channel.lastUserText, onClick: () => {
2004
2041
  // Click jumps back to the pinned prompt (CC's StickyPromptHeader).
2005
2042
  const lastUser = [...channel.rows].reverse().find(row => row.kind === 'user');
@@ -2007,7 +2044,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
2007
2044
  seekRow(lastUser.id);
2008
2045
  else
2009
2046
  handle?.scrollToBottom();
2010
- } })), _jsxs(ScrollBox, { ref: setHandle, flexDirection: "column", flexGrow: 1, flexShrink: 1, stickyScroll: true, children: [_jsx(LogoHeader, { model: channel.model, effort: channel.reasoningEffort, cwd: channel.displayCwd }), loadedContextVisible && (_jsx(LoadedContextPanel, { context: channel.loadedContext, open: loadedContextOpen, onToggle: () => { setLoadedContextOpen(previous => !previous); } })), _jsx(MessageList, { rows: channel.rows, failureHintRowId: failureHintRowId, failureHint: t('traj-hint-failure', { key: `${modLabel}t` }), expanded: expanded, expandedRows: expandedRows, selectedId: selectionActive ? selectedId : null, onToggleRow: toggleRowExpanded, model: channel.model, diffLayout: channel.diffLayout, thinkingFold: channel.thinkingFold, showAll: showAllMessages, thinkingVisible: thinkingVisible, onToggleAll: () => { setShowAllMessages(previous => !previous); }, onLoadOlder: () => channel.loadOlder(), registerRowRef: registerRowRef, scrollHandle: handle, forceMountRowId: forceMountRowId, newSinceRowId: isSticky ? null : lastSeenRowIdRef.current, onUnseenCount: setUnseenCount })] }), _jsxs(Box, { flexDirection: "column", flexShrink: 0, children: [showPill && (_jsx(NewMessagesPill, { count: unseenCount, onClick: () => handle?.scrollToBottom() })), channel.working &&
2047
+ } })), _jsxs(ScrollBox, { ref: setHandle, flexDirection: "column", flexGrow: 1, flexShrink: 1, stickyScroll: true, children: [_jsx(LogoHeader, { model: channel.model, effort: channel.reasoningEffort, cwd: channel.displayCwd }), loadedContextVisible && (_jsx(LoadedContextPanel, { context: channel.loadedContext, open: loadedContextOpen, onToggle: toggleLoadedContext })), _jsx(MessageList, { rows: channel.rows, failureHintRowId: failureHintRowId, failureHint: t('traj-hint-failure', { key: `${modLabel}t` }), expanded: expanded, expandedRows: expandedRows, selectedId: selectionActive ? selectedId : null, onToggleRow: toggleRowExpanded, model: channel.model, diffLayout: channel.diffLayout, thinkingFold: channel.thinkingFold, toolBackground: channel.toolBackground, showAll: showAllMessages, thinkingVisible: thinkingVisible, onToggleAll: () => { setShowAllMessages(previous => !previous); }, onLoadOlder: () => channel.loadOlder(), registerRowRef: registerRowRef, scrollHandle: handle, forceMountRowId: forceMountRowId, newSinceRowId: isSticky ? null : lastSeenRowIdRef.current, onUnseenCount: setUnseenCount })] }), _jsxs(Box, { flexDirection: "column", flexShrink: 0, children: [showPill && (_jsx(NewMessagesPill, { count: unseenCount, onClick: () => handle?.scrollToBottom() })), channel.working &&
2011
2048
  (channel.activityEnabled &&
2012
2049
  channel.workingActivity !== undefined &&
2013
2050
  channel.workingActivity.line !== '' &&
@@ -2016,7 +2053,7 @@ export function Chat({ channel, questionStore, approvalStore, extensionDialogs,
2016
2053
  // the animated chars/4 estimate, matching the classic
2017
2054
  // spinner's counter (the suffix used raw chars before,
2018
2055
  // inflating the reading next to a real upload number).
2019
- suffix: `${lastUploadTokens > 0 ? ` · ↑ ${formatTokens(lastUploadTokens)}` : ''} · ↓ ${formatTokens(Math.round(channel.responseChars / 4))} tokens` }) })) : (_jsx(WorkingSpinner, { mode: channel.spinnerMode, hasActiveTools: channel.activeToolCount > 0, responseLengthRef: responseLengthRef, uploadTokensRef: uploadTokensRef, loadingStartTimeRef: loadingStartTimeRef, totalPausedMsRef: totalPausedMsRef, pauseStartTimeRef: pauseStartTimeRef, thinkingStatus: thinkingStatus }))), _jsx(GoalTodoPanel, { channel: channel }), statusEntries.length > 0 && (_jsx(Text, { dimColor: true, wrap: "truncate", children: statusEntries.map(entry => entry.text).join(' · ') })), approvalSnapshot !== null ? (_jsx(ApprovalPanel, { approval: approvalSnapshot, onDecide: outcome => approvals.decide(outcome) }, approvalSnapshot.key)) : dialogSnapshot !== null ? (_jsx(ExtensionDialog, { dialog: dialogSnapshot, onDecide: value => dialogs.decide(dialogSnapshot.key, value), onCancel: () => dialogs.cancel(dialogSnapshot.key) }, dialogSnapshot.key)) : btw !== null ? (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(BtwPanel, { question: btw.question, answer: btw.answer, error: btw.error, streaming: !btw.done, onClose: closeBtw, onCopy: () => {
2056
+ suffix: `${lastUploadTokens > 0 ? ` · ↑ ${formatTokens(lastUploadTokens)}` : ''} · ↓ ${formatTokens(Math.round(channel.responseChars / 4))} tokens` }) })) : (_jsx(WorkingSpinner, { mode: channel.spinnerMode, hasActiveTools: channel.activeToolCount > 0, responseLengthRef: responseLengthRef, uploadTokensRef: uploadTokensRef, loadingStartTimeRef: loadingStartTimeRef, totalPausedMsRef: totalPausedMsRef, pauseStartTimeRef: pauseStartTimeRef, thinkingStatus: thinkingStatus }))), _jsx(GoalTodoPanel, { channel: channel }), statusEntries.length > 0 && (_jsx(Text, { dimColor: true, wrap: "truncate", children: statusEntries.map(entry => entry.text).join(' · ') })), approvalSnapshot !== null ? (_jsx(ApprovalPanel, { approval: approvalSnapshot, onDecide: outcome => approvals.decide(outcome) }, approvalSnapshot.key)) : dialogSnapshot !== null ? (_jsx(ExtensionDialog, { dialog: dialogSnapshot, onDecide: value => dialogs.decide(dialogSnapshot.key, value), onCancel: () => dialogs.cancel(dialogSnapshot.key) }, dialogSnapshot.key)) : tipsOpen ? (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(TipsPanel, { onClose: () => setTipsOpen(false) }) })) : btw !== null ? (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(BtwPanel, { question: btw.question, answer: btw.answer, error: btw.error, streaming: !btw.done, onClose: closeBtw, onCopy: () => {
2020
2057
  void setClipboard(btw.answer ?? '').then(raw => { if (raw)
2021
2058
  process.stdout.write(raw); });
2022
2059
  channel.notify(t('copied-chars', { n: (btw.answer ?? '').length }), { timeoutMs: 1500 });