@agi-fans/dsh-tui 0.3.0 → 0.5.0

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 (238) hide show
  1. package/README.md +43 -7
  2. package/lib/CHANGELOG.md +145 -0
  3. package/lib/{box.d.ts → chrome/box.d.ts} +7 -0
  4. package/lib/{box.js → chrome/box.js} +49 -31
  5. package/lib/chrome/box.js.map +1 -0
  6. package/lib/chrome/command-output.js.map +1 -0
  7. package/lib/chrome/diff-render.d.ts +39 -0
  8. package/lib/chrome/diff-render.js +274 -0
  9. package/lib/chrome/diff-render.js.map +1 -0
  10. package/lib/chrome/markdown.d.ts +17 -0
  11. package/lib/chrome/markdown.js +537 -0
  12. package/lib/chrome/markdown.js.map +1 -0
  13. package/lib/chrome/path-mentions.js.map +1 -0
  14. package/lib/chrome/relative-time.js.map +1 -0
  15. package/lib/chrome/renderer.js.map +1 -0
  16. package/lib/chrome/status-config.d.ts +70 -0
  17. package/lib/chrome/status-config.js +147 -0
  18. package/lib/chrome/status-config.js.map +1 -0
  19. package/lib/{status-line.d.ts → chrome/status-line.d.ts} +23 -2
  20. package/lib/chrome/status-line.js +436 -0
  21. package/lib/chrome/status-line.js.map +1 -0
  22. package/lib/chrome/style.js.map +1 -0
  23. package/lib/{theme.d.ts → chrome/theme.d.ts} +5 -3
  24. package/lib/chrome/theme.js +708 -0
  25. package/lib/chrome/theme.js.map +1 -0
  26. package/lib/{tool-renderers.d.ts → chrome/tool-renderers.d.ts} +6 -1
  27. package/lib/{tool-renderers.js → chrome/tool-renderers.js} +69 -36
  28. package/lib/chrome/tool-renderers.js.map +1 -0
  29. package/lib/chrome/tools-list.js.map +1 -0
  30. package/lib/{welcome-tips.js → chrome/welcome-tips.js} +6 -2
  31. package/lib/chrome/welcome-tips.js.map +1 -0
  32. package/lib/chrome/width.js.map +1 -0
  33. package/lib/{command-auth.js → commands/auth.js} +2 -2
  34. package/lib/commands/auth.js.map +1 -0
  35. package/lib/{command-export.js → commands/export.js} +3 -3
  36. package/lib/commands/export.js.map +1 -0
  37. package/lib/{command-integrations.js → commands/integrations.js} +2 -2
  38. package/lib/commands/integrations.js.map +1 -0
  39. package/lib/commands/loop.d.ts +52 -0
  40. package/lib/commands/loop.js +307 -0
  41. package/lib/commands/loop.js.map +1 -0
  42. package/lib/{command-model.js → commands/model.js} +15 -11
  43. package/lib/commands/model.js.map +1 -0
  44. package/lib/{command-permission.js → commands/permission.js} +13 -8
  45. package/lib/commands/permission.js.map +1 -0
  46. package/lib/{command-registration.js → commands/registration.js} +1 -1
  47. package/lib/commands/registration.js.map +1 -0
  48. package/lib/commands/session-configuration.d.ts +5 -0
  49. package/lib/commands/session-configuration.js +108 -0
  50. package/lib/commands/session-configuration.js.map +1 -0
  51. package/lib/{command-session.js → commands/session.js} +11 -7
  52. package/lib/commands/session.js.map +1 -0
  53. package/lib/{command-steer.js → commands/steer.js} +10 -4
  54. package/lib/commands/steer.js.map +1 -0
  55. package/lib/definition.d.ts +20 -1
  56. package/lib/definition.js.map +1 -1
  57. package/lib/index.d.ts +1 -1
  58. package/lib/index.js +1 -1
  59. package/lib/index.js.map +1 -1
  60. package/lib/input/clipboard.js.map +1 -0
  61. package/lib/input/editor.js.map +1 -0
  62. package/lib/input/external-editor.js.map +1 -0
  63. package/lib/{image-paste.d.ts → input/image-paste.d.ts} +1 -1
  64. package/lib/input/image-paste.js.map +1 -0
  65. package/lib/input/keybindings-config.js.map +1 -0
  66. package/lib/input/keys.js.map +1 -0
  67. package/lib/runtime/agent-profile.d.ts +10 -0
  68. package/lib/runtime/agent-profile.js +9 -0
  69. package/lib/runtime/agent-profile.js.map +1 -0
  70. package/lib/{human-interaction.js → runtime/human-interaction.js} +1 -1
  71. package/lib/runtime/human-interaction.js.map +1 -0
  72. package/lib/{provider-local.d.ts → runtime/provider-local.d.ts} +10 -9
  73. package/lib/{provider-local.js → runtime/provider-local.js} +77 -29
  74. package/lib/runtime/provider-local.js.map +1 -0
  75. package/lib/{runner.js → runtime/runner.js} +11 -2
  76. package/lib/runtime/runner.js.map +1 -0
  77. package/lib/{session-runtime.d.ts → runtime/session-runtime.d.ts} +2 -2
  78. package/lib/{session-runtime.js → runtime/session-runtime.js} +3 -3
  79. package/lib/runtime/session-runtime.js.map +1 -0
  80. package/lib/runtime/startup-notices.d.ts +20 -0
  81. package/lib/runtime/startup-notices.js +146 -0
  82. package/lib/runtime/startup-notices.js.map +1 -0
  83. package/lib/{tool-presentation.d.ts → runtime/tool-presentation.d.ts} +1 -1
  84. package/lib/runtime/tool-presentation.js.map +1 -0
  85. package/lib/{interaction-adapter.d.ts → session/interaction-adapter.d.ts} +1 -1
  86. package/lib/session/interaction-adapter.js.map +1 -0
  87. package/lib/session/package-metadata.d.ts +4 -0
  88. package/lib/session/package-metadata.js +11 -0
  89. package/lib/session/package-metadata.js.map +1 -0
  90. package/lib/session/project-context.js.map +1 -0
  91. package/lib/session/project-file-search.js.map +1 -0
  92. package/lib/session/release-notes.d.ts +31 -0
  93. package/lib/session/release-notes.js +120 -0
  94. package/lib/session/release-notes.js.map +1 -0
  95. package/lib/session/session-configuration.d.ts +25 -0
  96. package/lib/session/session-configuration.js +46 -0
  97. package/lib/session/session-configuration.js.map +1 -0
  98. package/lib/{session-controller.d.ts → session/session-controller.d.ts} +13 -2
  99. package/lib/{session-controller.js → session/session-controller.js} +181 -11
  100. package/lib/session/session-controller.js.map +1 -0
  101. package/lib/{tui-settings.d.ts → session/tui-settings.d.ts} +5 -2
  102. package/lib/session/tui-settings.js +42 -0
  103. package/lib/session/tui-settings.js.map +1 -0
  104. package/lib/session/update-check.d.ts +16 -0
  105. package/lib/session/update-check.js +33 -0
  106. package/lib/session/update-check.js.map +1 -0
  107. package/lib/{autocomplete.d.ts → views/autocomplete.d.ts} +1 -1
  108. package/lib/{autocomplete.js → views/autocomplete.js} +17 -18
  109. package/lib/views/autocomplete.js.map +1 -0
  110. package/lib/{copy-selector.d.ts → views/copy-selector.d.ts} +2 -2
  111. package/lib/{copy-selector.js → views/copy-selector.js} +2 -2
  112. package/lib/views/copy-selector.js.map +1 -0
  113. package/lib/views/copy-targets.js.map +1 -0
  114. package/lib/{event-views.d.ts → views/event-views.d.ts} +11 -8
  115. package/lib/{event-views.js → views/event-views.js} +92 -23
  116. package/lib/views/event-views.js.map +1 -0
  117. package/lib/{history-search.d.ts → views/history-search.d.ts} +2 -2
  118. package/lib/{history-search.js → views/history-search.js} +3 -3
  119. package/lib/views/history-search.js.map +1 -0
  120. package/lib/views/history-store.js.map +1 -0
  121. package/lib/{hotkeys.d.ts → views/hotkeys.d.ts} +3 -1
  122. package/lib/{hotkeys.js → views/hotkeys.js} +15 -1
  123. package/lib/views/hotkeys.js.map +1 -0
  124. package/lib/{path-complete.d.ts → views/path-complete.d.ts} +2 -2
  125. package/lib/{path-complete.js → views/path-complete.js} +1 -1
  126. package/lib/views/path-complete.js.map +1 -0
  127. package/lib/{prompt-selector.d.ts → views/prompt-selector.d.ts} +2 -2
  128. package/lib/{prompt-selector.js → views/prompt-selector.js} +4 -4
  129. package/lib/views/prompt-selector.js.map +1 -0
  130. package/lib/{settings-list.d.ts → views/settings-list.d.ts} +13 -5
  131. package/lib/{settings-list.js → views/settings-list.js} +238 -85
  132. package/lib/views/settings-list.js.map +1 -0
  133. package/lib/views/transcript-export.js.map +1 -0
  134. package/package.json +69 -51
  135. package/lib/autocomplete.js.map +0 -1
  136. package/lib/box.js.map +0 -1
  137. package/lib/clipboard.js.map +0 -1
  138. package/lib/command-auth.js.map +0 -1
  139. package/lib/command-export.js.map +0 -1
  140. package/lib/command-integrations.js.map +0 -1
  141. package/lib/command-model.js.map +0 -1
  142. package/lib/command-output.js.map +0 -1
  143. package/lib/command-permission.js.map +0 -1
  144. package/lib/command-registration.js.map +0 -1
  145. package/lib/command-session.js.map +0 -1
  146. package/lib/command-steer.js.map +0 -1
  147. package/lib/copy-selector.js.map +0 -1
  148. package/lib/copy-targets.js.map +0 -1
  149. package/lib/editor.js.map +0 -1
  150. package/lib/event-views.js.map +0 -1
  151. package/lib/external-editor.js.map +0 -1
  152. package/lib/history-search.js.map +0 -1
  153. package/lib/history-store.js.map +0 -1
  154. package/lib/hotkeys.js.map +0 -1
  155. package/lib/human-interaction.js.map +0 -1
  156. package/lib/image-paste.js.map +0 -1
  157. package/lib/interaction-adapter.js.map +0 -1
  158. package/lib/keybindings-config.js.map +0 -1
  159. package/lib/keys.js.map +0 -1
  160. package/lib/markdown.d.ts +0 -13
  161. package/lib/markdown.js +0 -453
  162. package/lib/markdown.js.map +0 -1
  163. package/lib/path-complete.js.map +0 -1
  164. package/lib/path-mentions.js.map +0 -1
  165. package/lib/project-context.js.map +0 -1
  166. package/lib/project-file-search.js.map +0 -1
  167. package/lib/prompt-selector.js.map +0 -1
  168. package/lib/provider-local.js.map +0 -1
  169. package/lib/relative-time.js.map +0 -1
  170. package/lib/renderer.js.map +0 -1
  171. package/lib/runner.js.map +0 -1
  172. package/lib/session-controller.js.map +0 -1
  173. package/lib/session-runtime.js.map +0 -1
  174. package/lib/settings-list.js.map +0 -1
  175. package/lib/status-config.d.ts +0 -32
  176. package/lib/status-config.js +0 -52
  177. package/lib/status-config.js.map +0 -1
  178. package/lib/status-line.js +0 -351
  179. package/lib/status-line.js.map +0 -1
  180. package/lib/style.js.map +0 -1
  181. package/lib/theme.js +0 -317
  182. package/lib/theme.js.map +0 -1
  183. package/lib/tool-presentation.js.map +0 -1
  184. package/lib/tool-renderers.js.map +0 -1
  185. package/lib/tools-list.js.map +0 -1
  186. package/lib/transcript-export.js.map +0 -1
  187. package/lib/tui-settings.js +0 -23
  188. package/lib/tui-settings.js.map +0 -1
  189. package/lib/welcome-tips.js.map +0 -1
  190. package/lib/width.js.map +0 -1
  191. /package/lib/{command-output.d.ts → chrome/command-output.d.ts} +0 -0
  192. /package/lib/{command-output.js → chrome/command-output.js} +0 -0
  193. /package/lib/{path-mentions.d.ts → chrome/path-mentions.d.ts} +0 -0
  194. /package/lib/{path-mentions.js → chrome/path-mentions.js} +0 -0
  195. /package/lib/{relative-time.d.ts → chrome/relative-time.d.ts} +0 -0
  196. /package/lib/{relative-time.js → chrome/relative-time.js} +0 -0
  197. /package/lib/{renderer.d.ts → chrome/renderer.d.ts} +0 -0
  198. /package/lib/{renderer.js → chrome/renderer.js} +0 -0
  199. /package/lib/{style.d.ts → chrome/style.d.ts} +0 -0
  200. /package/lib/{style.js → chrome/style.js} +0 -0
  201. /package/lib/{tools-list.d.ts → chrome/tools-list.d.ts} +0 -0
  202. /package/lib/{tools-list.js → chrome/tools-list.js} +0 -0
  203. /package/lib/{welcome-tips.d.ts → chrome/welcome-tips.d.ts} +0 -0
  204. /package/lib/{width.d.ts → chrome/width.d.ts} +0 -0
  205. /package/lib/{width.js → chrome/width.js} +0 -0
  206. /package/lib/{command-auth.d.ts → commands/auth.d.ts} +0 -0
  207. /package/lib/{command-export.d.ts → commands/export.d.ts} +0 -0
  208. /package/lib/{command-integrations.d.ts → commands/integrations.d.ts} +0 -0
  209. /package/lib/{command-model.d.ts → commands/model.d.ts} +0 -0
  210. /package/lib/{command-permission.d.ts → commands/permission.d.ts} +0 -0
  211. /package/lib/{command-registration.d.ts → commands/registration.d.ts} +0 -0
  212. /package/lib/{command-session.d.ts → commands/session.d.ts} +0 -0
  213. /package/lib/{command-steer.d.ts → commands/steer.d.ts} +0 -0
  214. /package/lib/{clipboard.d.ts → input/clipboard.d.ts} +0 -0
  215. /package/lib/{clipboard.js → input/clipboard.js} +0 -0
  216. /package/lib/{editor.d.ts → input/editor.d.ts} +0 -0
  217. /package/lib/{editor.js → input/editor.js} +0 -0
  218. /package/lib/{external-editor.d.ts → input/external-editor.d.ts} +0 -0
  219. /package/lib/{external-editor.js → input/external-editor.js} +0 -0
  220. /package/lib/{image-paste.js → input/image-paste.js} +0 -0
  221. /package/lib/{keybindings-config.d.ts → input/keybindings-config.d.ts} +0 -0
  222. /package/lib/{keybindings-config.js → input/keybindings-config.js} +0 -0
  223. /package/lib/{keys.d.ts → input/keys.d.ts} +0 -0
  224. /package/lib/{keys.js → input/keys.js} +0 -0
  225. /package/lib/{human-interaction.d.ts → runtime/human-interaction.d.ts} +0 -0
  226. /package/lib/{runner.d.ts → runtime/runner.d.ts} +0 -0
  227. /package/lib/{tool-presentation.js → runtime/tool-presentation.js} +0 -0
  228. /package/lib/{interaction-adapter.js → session/interaction-adapter.js} +0 -0
  229. /package/lib/{project-context.d.ts → session/project-context.d.ts} +0 -0
  230. /package/lib/{project-context.js → session/project-context.js} +0 -0
  231. /package/lib/{project-file-search.d.ts → session/project-file-search.d.ts} +0 -0
  232. /package/lib/{project-file-search.js → session/project-file-search.js} +0 -0
  233. /package/lib/{copy-targets.d.ts → views/copy-targets.d.ts} +0 -0
  234. /package/lib/{copy-targets.js → views/copy-targets.js} +0 -0
  235. /package/lib/{history-store.d.ts → views/history-store.d.ts} +0 -0
  236. /package/lib/{history-store.js → views/history-store.js} +0 -0
  237. /package/lib/{transcript-export.d.ts → views/transcript-export.d.ts} +0 -0
  238. /package/lib/{transcript-export.js → views/transcript-export.js} +0 -0
package/README.md CHANGED
@@ -1,13 +1,49 @@
1
+ <!-- npm-package-role: library -->
2
+
1
3
  # @agi-fans/dsh-tui
2
4
 
3
- The omdsh TUI capability seam: terminal presentation for the DeepSeek Harness core runtime. One capability seam, three roles, complete:
5
+ Reusable terminal UI plugins for applications built on the DeepSeek Harness runtime.
6
+
7
+ **This is a library package. It does not install the `omdsh` command and is not intended to be run directly.**
8
+
9
+ If you want the complete oh-my-dsh application, install the CLI package instead:
10
+
11
+ ```sh
12
+ npm install --global @agi-fans/oh-my-dsh
13
+ omdsh
14
+ ```
15
+
16
+ See the [oh-my-dsh project overview](https://github.com/agi-fans/oh-my-dsh#readme) for screenshots, tutorials, configuration, and end-user features.
17
+
18
+ ## Library purpose
19
+
20
+ `@agi-fans/dsh-tui` supplies the terminal presentation and interaction layer used by `@agi-fans/oh-my-dsh`. It is useful to developers composing a custom Harness application that needs local terminal input, transcript rendering, interactive prompts, and TUI-owned command surfaces.
21
+
22
+ The package contains three main roles:
23
+
24
+ - **Service definition:** the transport-neutral `tui` context service and its event, status, model, input, interrupt, rewind, and disposal contracts.
25
+ - **Local provider:** exclusive ownership of raw terminal input, editing, history, completion, scrolling, image paste, resize handling, and differential rendering.
26
+ - **Interactive runner:** creation of an Agent through the Harness registry and coordination of session events with the input loop.
27
+
28
+ The rendering pipeline is pure and exported for testing and alternative providers. Additional exports expose session integration, human-interaction adapters, tool presentation, startup notices, and the command plugins used by omdsh.
29
+
30
+ ## Integration
31
+
32
+ Install the library only when building your own Harness composition:
33
+
34
+ ```sh
35
+ npm install @agi-fans/dsh-tui @deepseek-ai/cordis
36
+ ```
37
+
38
+ Mount the exports you need as ordinary Cordis plugins. The working application composition is available in [`apps/omdsh/config/cordis.yml`](https://github.com/agi-fans/oh-my-dsh/blob/main/apps/omdsh/config/cordis.yml); application boot, model providers, persistence, tools, and the executable remain the responsibility of the host application.
4
39
 
5
- - **Service Definition** (`src/definition.ts`) — the `tui` context service: `event`, `setStatus`, `setModel`, `readInput`, `onInterrupt`, `onRewind`, `dispose`. The vocabulary mirrors the SDK wire surface (`session.event`, `session.status`), so a remote UI can reuse the definition unchanged.
6
- - **Service Provider** (`src/provider-local.ts`) — owns the tty: raw-mode key input (editing, history, slash/tab, Ctrl-R prompt-history search, double-Escape conversation rewind, PgUp/PgDn transcript scroll, bracketed paste, Ctrl-C interrupt, Ctrl-D quit), SIGWINCH reflow, and the differential renderer. Non-tty streams degrade to line input with plain append-only printing of settled blocks.
7
- - **Consumer** (`src/runner.ts`) — the interactive driver in the `@deepseek-ai/dsh-headless` pattern: creates one Agent through the core registry, forwards its session events, and loops on `readline`.
40
+ ## Documentation
8
41
 
9
- The rendering pipeline (`renderer`, `style`, `event-views`) is pure and exported for tests and alternative providers.
42
+ - [Architecture](https://github.com/agi-fans/oh-my-dsh/blob/main/docs/architecture.md)
43
+ - [Skills and MCP](https://github.com/agi-fans/oh-my-dsh/blob/main/docs/skills-and-mcp.md)
44
+ - [Performance](https://github.com/agi-fans/oh-my-dsh/blob/main/docs/performance.md)
45
+ - [Changelog](https://github.com/agi-fans/oh-my-dsh/blob/main/CHANGELOG.md)
10
46
 
11
- ## Usage
47
+ ## License
12
48
 
13
- Mount the provider and runner as ordinary cordis.yml rows (see `apps/omdsh/config/cordis.yml`); the app package owns the `omdsh` bin.
49
+ MIT
@@ -0,0 +1,145 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.5.0] - 2026-08-18
10
+
11
+ ### Added
12
+
13
+ - Added four independent, Harness-backed session controls: Agent presets (Standard, PTC, Minimal, and Cordis), Workflow (Default or Plan), tool presentation (Native, Code, or Both), and Access (Read only, Workspace write, or Full access).
14
+ - Added `/settings` Status line items that match the preview: each of Model, Effort, Path, Git, and the telemetry groups has its own color, left/right column, show/hide, and order.
15
+ - Show the session permission mode on the top-right of the composer, opposite the whale label.
16
+ - Add catppuccin, dracula, nord, gruvbox, and rose-pine palettes from the oh-my-pi coding themes.
17
+
18
+ ### Changed
19
+
20
+ - Upgraded every direct DeepSeek Harness dependency to the coherent `0.1.0-rc.7` release and adopted its published Agent preset and Code runtime packages.
21
+ - Keep the lowercase Agent mode visible in the fixed footer, reveal Workflow only while Plan is active, show non-default tool presentation without category labels, keep lowercase Access on the composer boundary, and report all four separately in `/session`.
22
+ - Reset SGR attributes independently so nested color, bold, italic, and underline no longer wipe each other.
23
+ - Paint thinking traces in a quieter gray italic so they stay distinct from assistant body text, including after inline Markdown.
24
+ - Let the terminal own body ink across every palette while keeping thinking traces explicitly muted, so themes respect the user's foreground and background pairing.
25
+ - Paint thinking traces as readable comment-gray italic on dark palettes, including code, links, and headings inside those traces, so they recede from body text without collapsing into the background or being boosted to white.
26
+ - Use a quieter muted border for idle frames, quotes, rules, and tables, and complete the midnight and solarized palettes.
27
+
28
+ ### Fixed
29
+
30
+ - Refresh the footer's Agent and tool-presentation labels immediately after `/agent` changes a blank session's composition.
31
+ - Restore distinct Header title, body, metadata, and frame tones across every palette, including monochrome and 16-color terminals.
32
+ - Keep the welcome card on the visible dim frame so Tips, Recent sessions, and the slogan do not sit on a near-invisible border.
33
+ - Paint fenced-code keywords with a dedicated syntax color instead of the UI accent.
34
+ - Soften inline Markdown code so codespans use a muted gray instead of accent-like orange or lavender; fenced blocks keep a separate, slightly stronger color.
35
+ - Render transcript Markdown through a GFM lexer so paragraphs reflow, nested emphasis and escapes stay intact, list items keep their continuations, and reference links resolve.
36
+ - Paint file-edit tool cards as aligned diffs: unchanged context stays dim, deletions are red, additions are green, one-line replacements mark the changed tokens, and the header shows `+N/-M`.
37
+ - Generate the CLI package README from the repository overview during packing, with npm-safe GitHub links, so npm documentation stays synchronized with the project homepage.
38
+ - Clarify that `@agi-fans/dsh-tui` is a non-executable integration library, direct end users to `@agi-fans/oh-my-dsh`, and enforce that distinction during package checks.
39
+
40
+ ## [0.4.0] - 2026-08-16
41
+
42
+ ### Added
43
+
44
+ - Added an oh-my-pi-inspired `/loop [count|duration] [prompt]` plugin with atomic next-prompt capture, actionable waiting guidance, explicit repeat progress, duration countdown, Ctrl-C pause and resume guidance, transient completion feedback, active-session isolation, and no routine control-message transcript noise.
45
+ - Added one-time startup release summaries, `/changelog [full]`, and cached non-blocking npm update notifications with controls in `/settings`.
46
+ - Added repository-local Skills for change validation, architecture and UX review, simplification audits, prose maintenance, bilingual documentation synchronization, and reproducible TUI demonstrations.
47
+
48
+ ### Changed
49
+
50
+ - Made `/help` a compact command directory with essential shortcuts by default, added `/help full` for the complete key catalog, and limited the default `/changelog` view to the latest release.
51
+ - Adapted model selectors to use compact prompt cards for short lists and searchable full-screen pages only when the option set is large.
52
+ - Clarified that `/steer` affects the active turn's next model step, rejected idle steering, and normalized `/session` permission and token labels with the fixed footer.
53
+ - Made the repository release Skill hand npm publication to the user for interactive OTP completion, then resume registry verification and GitHub finalization without repeating completed work.
54
+ - Separated tool-call input from output in a single framed card, preserving long inputs after settlement and giving terminal output its own labeled, tail-focused preview.
55
+ - Consolidated architecture guidance into one current-state reference covering plugin ownership, runtime composition, data flow, terminal guarantees, public exports, and verification boundaries.
56
+
57
+ ### Fixed
58
+
59
+ - Made the startup header read the current TUI package version instead of retaining the original `0.1.0` placeholder after releases.
60
+
61
+ ### Removed
62
+
63
+ - Removed completed implementation plans, a stale oh-my-pi feature-gap snapshot, and the superseded plugin-migration review after preserving their durable constraints in the architecture reference.
64
+
65
+ ## [0.3.0] - 2026-08-16
66
+
67
+ ### Changed
68
+
69
+ - Replaced `/mode` with an agent-scoped `/permission` selector that offers fixed Harness permission presets and requires confirmation before enabling full access.
70
+ - Refined the composer Todo HUD into a bounded tree preview with completion progress, active-work visibility, completed-item strikethrough, and overflow summaries.
71
+
72
+ ### Fixed
73
+
74
+ - Restored the latest Harness Todo projection above the composer, including live updates, replay restoration, and turn-boundary clearing.
75
+ - Prevented stale transcript viewport indicators from stacking after terminal cursor drift by absolutely reanchoring changed paints and filtering content-owned cursor controls.
76
+
77
+ ## [0.2.0] - 2026-08-16
78
+
79
+ ### Added
80
+
81
+ - Repository-local `publish-oh-my-dsh` Skill for preparing, publishing, recovering, and verifying synchronized npm and GitHub releases.
82
+ - Double-Escape conversation rewind with an interactive human-turn selector, non-destructive session forks, and editable restoration of the selected text and images.
83
+
84
+ ### Changed
85
+
86
+ - Replaced `/queue` and `/dequeue` with a composer-level view of the durable Harness inbox; repeated `↑` presses walk backward through follow-ups for editing without changing their send order.
87
+ - Merged the keyboard-shortcut catalog into `/help` so commands and controls live in one discoverable surface.
88
+ - Manual `/compact` now enters a visible `Compacting` state, locks composer actions until settlement, and remains cancellable with `Ctrl+C`.
89
+
90
+ ### Fixed
91
+
92
+ - Prevented exact-width terminal paints from triggering pending-wrap phantom rows, including duplicate `Deep Driving` indicators.
93
+ - Removed long-session input and activity lag by caching transcript layout per immutable message block and recomputing only animated or changed blocks.
94
+ - Reduced large-session resume work from quadratic to linear by using a private mutable replay builder with indexed tool-call lookup while preserving immutable live updates.
95
+ - Avoided rescanning the complete event log for every streaming update when durable Harness statistics, token usage, and context projections are available.
96
+
97
+ ### Removed
98
+
99
+ - Removed the redundant `/pwd` and `/dirs` commands because the fixed status footer already shows workspace, model, and Git context.
100
+ - Removed `/search` and its SQLite session index; prompt-history search remains available through `Ctrl+R`.
101
+
102
+ ## [0.1.1] - 2026-08-15
103
+
104
+ ### Added
105
+
106
+ - DeepSeek `/login` and `/logout` flows with masked input, API-key validation, persistent Harness credentials, user-selected credential priority, and environment fallback.
107
+
108
+ ### Changed
109
+
110
+ - Made the model selector skip a sole provider, use compact option rows, and preserve the current model and reasoning choices.
111
+ - Made ordinary notices unframed by default while retaining explicit frames for real component and interaction boundaries.
112
+
113
+ ### Fixed
114
+
115
+ - Isolated settings and credentials under `OMDSH_HOME` so tests and alternate profiles do not read the user's default Harness state.
116
+
117
+ ## [0.1.0] - 2026-08-15
118
+
119
+ ### Added
120
+
121
+ - Plugin-first `omdsh` terminal application built on the published DeepSeek Harness runtime.
122
+ - Durable conversations with resume, search, retry, compaction, Markdown export, prompt history, and queued follow-up messages.
123
+ - Interactive model, reasoning-effort, access-mode, settings, tools, hotkeys, Skills, and MCP surfaces.
124
+ - Project-aware `@` file search, highlighted path mentions, and clipboard image paste.
125
+ - Fixed two-line status footer with model, reasoning, workspace, Git, context, token, latency, cache, timing, turn, and step information.
126
+
127
+ ### Changed
128
+
129
+ - Split the TUI into Cordis plugins for presentation, session runtime, human interaction, tool presentation, commands, and the runner.
130
+ - Redesigned the startup header, composer, status footer, command output, tools, hotkeys, settings, resume, and model-selection experiences around compact terminal interaction.
131
+
132
+ ### Fixed
133
+
134
+ - Preserved terminal-cell alignment and right padding for long commands, CJK text, emoji, ANSI styling, and narrow viewports.
135
+ - Stabilized incremental rendering, transcript scrolling, cursor placement, tool-output folding, and queued input during active turns.
136
+
137
+ [Unreleased]: https://github.com/agi-fans/oh-my-dsh/compare/v0.5.0...HEAD
138
+ [0.5.0]: https://github.com/agi-fans/oh-my-dsh/compare/v0.4.0...v0.5.0
139
+ [0.4.0]: https://github.com/agi-fans/oh-my-dsh/compare/v0.3.0...v0.4.0
140
+ [0.3.0]: https://github.com/agi-fans/oh-my-dsh/compare/v0.2.0...v0.3.0
141
+ [0.2.0]: https://github.com/agi-fans/oh-my-dsh/compare/v0.1.1...v0.2.0
142
+ [0.1.1]: https://github.com/agi-fans/oh-my-dsh/compare/v0.1.0...v0.1.1
143
+ [0.1.0]: https://github.com/agi-fans/oh-my-dsh/releases/tag/v0.1.0
144
+ [Keep a Changelog]: https://keepachangelog.com/en/1.1.0/
145
+ [Semantic Versioning]: https://semver.org/spec/v2.0.0.html
@@ -13,6 +13,11 @@ export interface FramedBlockOptions {
13
13
  headerMeta?: string;
14
14
  state?: BoxState;
15
15
  lines?: readonly string[];
16
+ /** Ordered body regions; labeled regions receive a full-width divider. */
17
+ sections?: readonly {
18
+ label?: string;
19
+ lines: readonly string[];
20
+ }[];
16
21
  width: number;
17
22
  applyBg?: boolean;
18
23
  }
@@ -47,6 +52,8 @@ export interface EditorOptions {
47
52
  input: string;
48
53
  inputCursor: number;
49
54
  status: string;
55
+ /** Optional right-aligned cap on the top border (permission mode). */
56
+ statusRight?: string;
50
57
  border: ThemeColor;
51
58
  /** Dim ghost text painted after the caret (slash-arg hint). */
52
59
  inlineHint?: string;
@@ -16,7 +16,7 @@ function borderColorFor(state) {
16
16
  return 'warning';
17
17
  if (state === 'running')
18
18
  return 'accent';
19
- return 'dim';
19
+ return 'borderMuted';
20
20
  }
21
21
  function bgColorFor(state) {
22
22
  if (state === 'error')
@@ -62,23 +62,31 @@ export function renderFramedBlock(options, theme) {
62
62
  const bg = options.applyBg === false ? undefined : bgColorFor(options.state);
63
63
  const paint = (line) => (bg ? applyBg(line, theme, bg, width) : padToWidth(line, width));
64
64
  const cap = h.repeat(3);
65
- const labelParts = [options.header, options.headerMeta].filter((part) => Boolean(part));
66
- const labelChromeWidth = visibleWidth(BOX.topLeft + cap + ' ' + cap + BOX.topRight);
67
- const top = labelParts.length === 0 || width < labelChromeWidth
68
- ? border(BOX.topLeft + h.repeat(Math.max(0, width - 2)) + BOX.topRight)
69
- : (() => {
70
- // The spaces and three-glyph caps belong to the frame, not the label's
71
- // truncation budget. A long command can consume only the middle span.
72
- const maxLabel = Math.max(0, width - labelChromeWidth);
73
- const label = truncateToWidth(labelParts.join(' · '), maxLabel);
74
- const fill = Math.max(0, maxLabel - visibleWidth(label));
75
- return border(BOX.topLeft + cap) + ' ' + label + ' ' + border(h.repeat(fill) + cap + BOX.topRight);
76
- })();
65
+ const bar = (left, right, labelParts) => {
66
+ const labels = labelParts.filter((part) => Boolean(part));
67
+ const labelChromeWidth = visibleWidth(left + cap + ' ' + cap + right);
68
+ if (labels.length === 0 || width < labelChromeWidth) {
69
+ return border(left + h.repeat(Math.max(0, width - 2)) + right);
70
+ }
71
+ // Spaces and three-glyph caps are frame chrome, not label budget. This
72
+ // keeps both caps visible even when a command or section label is long.
73
+ const maxLabel = Math.max(0, width - labelChromeWidth);
74
+ const label = truncateToWidth(labels.join(' · '), maxLabel);
75
+ const fill = Math.max(0, maxLabel - visibleWidth(label));
76
+ return border(left + cap) + ' ' + label + ' ' + border(h.repeat(fill) + cap + right);
77
+ };
78
+ const top = bar(BOX.topLeft, BOX.topRight, [options.header, options.headerMeta]);
77
79
  const contentWidth = Math.max(1, width - 4);
78
80
  const body = [];
79
- for (const raw of options.lines ?? []) {
80
- for (const wrapped of wrapText(expandTabs(raw, 8, 2), contentWidth)) {
81
- body.push(border(v) + ' ' + padToWidth(wrapped, contentWidth) + ' ' + border(v));
81
+ const sections = options.sections ?? [{ lines: options.lines ?? [] }];
82
+ for (const [index, section] of sections.entries()) {
83
+ if (section.label !== undefined && (index > 0 || section.label !== '')) {
84
+ body.push(bar(BOX.teeRight, BOX.teeLeft, [section.label]));
85
+ }
86
+ for (const raw of section.lines) {
87
+ for (const wrapped of wrapText(expandTabs(raw, 8, 2), contentWidth)) {
88
+ body.push(border(v) + ' ' + padToWidth(wrapped, contentWidth) + ' ' + border(v));
89
+ }
82
90
  }
83
91
  }
84
92
  const bottomFill = Math.max(0, width - 2);
@@ -131,24 +139,25 @@ export function renderWelcome(options, theme) {
131
139
  })),
132
140
  ]
133
141
  : [];
134
- const h = theme.fg('dim', BOX.horizontal);
135
- const v = theme.fg('dim', BOX.vertical);
136
- const tl = theme.fg('dim', BOX.topLeft);
137
- const tr = theme.fg('dim', BOX.topRight);
138
- const bl = theme.fg('dim', BOX.bottomLeft);
139
- const br = theme.fg('dim', BOX.bottomRight);
140
- const teeUp = theme.fg('dim', BOX.teeUp);
141
- const teeDown = theme.fg('dim', BOX.teeDown);
142
- const teeLeft = theme.fg('dim', BOX.teeLeft);
143
- const teeRight = theme.fg('dim', BOX.teeRight);
142
+ const chrome = (text) => theme.fg('dim', text);
143
+ const h = chrome(BOX.horizontal);
144
+ const v = chrome(BOX.vertical);
145
+ const tl = chrome(BOX.topLeft);
146
+ const tr = chrome(BOX.topRight);
147
+ const bl = chrome(BOX.bottomLeft);
148
+ const br = chrome(BOX.bottomRight);
149
+ const teeUp = chrome(BOX.teeUp);
150
+ const teeDown = chrome(BOX.teeDown);
151
+ const teeLeft = chrome(BOX.teeLeft);
152
+ const teeRight = chrome(BOX.teeRight);
144
153
  const title = ` ${options.appName} v${options.version} `;
145
154
  const titlePrefix = BOX.horizontal.repeat(3);
146
- const titleStyled = theme.fg('dim', titlePrefix) + theme.fg('muted', title);
155
+ const titleStyled = chrome(titlePrefix) + theme.fg('muted', title);
147
156
  const titleWidth = showRight ? leftCol : boxWidth - 2;
148
157
  const afterTitle = Math.max(0, titleWidth - visibleWidth(titlePrefix) - visibleWidth(title));
149
158
  const titleSegment = visibleWidth(titleStyled) >= titleWidth
150
159
  ? truncateToWidth(titleStyled, titleWidth)
151
- : titleStyled + theme.fg('dim', BOX.horizontal.repeat(afterTitle));
160
+ : titleStyled + chrome(BOX.horizontal.repeat(afterTitle));
152
161
  const lines = [showRight
153
162
  ? tl + titleSegment + teeDown + h.repeat(rightCol) + tr
154
163
  : tl + titleSegment + tr];
@@ -186,9 +195,18 @@ export function renderEditor(options, theme) {
186
195
  const topLeft = border(BOX.topLeft + h.repeat(padX));
187
196
  const topRight = border(h.repeat(padX) + BOX.topRight);
188
197
  const fillWidth = Math.max(0, width - visibleWidth(BOX.topLeft + h.repeat(padX)) - visibleWidth(h.repeat(padX) + BOX.topRight));
189
- const status = truncateToWidth(options.status, fillWidth);
190
- const statusFill = Math.max(0, fillWidth - visibleWidth(status));
191
- const top = topLeft + status + border(h.repeat(statusFill)) + topRight;
198
+ const statusRight = options.statusRight ?? '';
199
+ let status = options.status;
200
+ let trailing = statusRight;
201
+ if (visibleWidth(status) + visibleWidth(trailing) + (trailing === '' ? 0 : 1) > fillWidth) {
202
+ const rightBudget = Math.max(0, fillWidth - visibleWidth(status) - (status === '' || fillWidth === 0 ? 0 : 1));
203
+ trailing = truncateToWidth(statusRight, rightBudget);
204
+ if (visibleWidth(status) + visibleWidth(trailing) + (trailing === '' ? 0 : 1) > fillWidth) {
205
+ status = truncateToWidth(status, Math.max(0, fillWidth - visibleWidth(trailing) - (trailing === '' ? 0 : 1)));
206
+ }
207
+ }
208
+ const statusFill = Math.max(0, fillWidth - visibleWidth(status) - visibleWidth(trailing));
209
+ const top = topLeft + status + border(h.repeat(statusFill)) + trailing + topRight;
192
210
  const layout = wrapIndexed(options.input, contentWidth);
193
211
  const caret = cursorOnWrapped(layout, options.inputCursor, options.input);
194
212
  const rows = layout.length > 0 ? layout : [{ text: '', start: 0, end: 0 }];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box.js","sourceRoot":"","sources":["../../src/chrome/box.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,YAAY,EAA+B,MAAM,YAAY,CAAA;AAC1F,OAAO,EAAE,UAAU,E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C,IAAI,EAAE,CAAA;IACnC,MAAM,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;IAC7F,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,CAAC,OAAO,CAAC,CAAA;IACjC,OAAO,CAAC,OAAO,EAAE,EAAE,EAAE,GAAG,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAA;AAC/F,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,sBAAsB,CAAC,KAAY,EAAE,KAAa;IAChE,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,EAAE,CAAA;IACzB,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;IACvE,OAAO,GAAG,GAAG,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAA;AACzE,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Align Harness FileDiff hunks and paint them as a terminal edit card.
3
+ * Line LCS recovers context that the presenter stores on both sides; a 1:1
4
+ * replacement also marks changed tokens with inverse video.
5
+ */
6
+ import type { FileDiff } from '@deepseek-ai/dsh-tools';
7
+ import type { Theme } from './theme.ts';
8
+ /** One painted role inside an aligned diff. */
9
+ export type DiffKind = 'path' | 'gap' | 'ctx' | 'del' | 'add';
10
+ /** A word or whitespace run inside a changed line. */
11
+ export interface DiffToken {
12
+ readonly text: string;
13
+ readonly changed?: boolean;
14
+ }
15
+ /** One display row of an aligned file diff. */
16
+ export interface DiffRow {
17
+ readonly kind: DiffKind;
18
+ readonly tokens: readonly DiffToken[];
19
+ }
20
+ export interface DiffStats {
21
+ readonly added: number;
22
+ readonly removed: number;
23
+ }
24
+ /** Split a side's text into content lines. A trailing newline is a terminator. */
25
+ export declare function contentLines(text: string): string[];
26
+ export declare function rowText(row: DiffRow): string;
27
+ /** Align every hunk, inserting a path header or a same-file gap. */
28
+ export declare function alignFileDiffs(diffs: readonly FileDiff[]): DiffRow[];
29
+ export declare function countDiffStats(rows: readonly DiffRow[]): DiffStats;
30
+ /** Compact uncolored `+3/-1` label, omitted when both counts are zero. */
31
+ export declare function formatDiffStats(added: number, removed: number): string | undefined;
32
+ export declare function formatDiffRow(row: DiffRow): string;
33
+ export declare function formatDiffRows(rows: readonly DiffRow[]): string[];
34
+ /** Color a already-prefixed plain diff line (`- `, `+ `, ` `, path, or gap). */
35
+ export declare function paintPrefixedDiffLine(line: string, theme: Theme): string;
36
+ export declare function paintDiffRow(row: DiffRow, theme: Theme): string;
37
+ export declare function paintDiffStats(added: number, removed: number, theme: Theme): string;
38
+ /** Paint, expand tabs, wrap to the framed-body width, and close inverse per row. */
39
+ export declare function wrapPaintedDiffRows(rows: readonly DiffRow[], theme: Theme, width: number): string[];