@deepseek-harness-tui/dsh-tui 0.11.2 → 0.13.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 (786) hide show
  1. package/README.md +60 -8
  2. package/assets/deepy/README.md +60 -0
  3. package/assets/deepy/frames.json +1 -0
  4. package/assets/whale-girl/whale-girl-happy.png +0 -0
  5. package/assets/whaleGirl/README.md +7 -0
  6. package/assets/whaleGirl/frames.json +1 -0
  7. package/assets/whaleGirl/img/building/00.png +0 -0
  8. package/assets/whaleGirl/img/building/01.png +0 -0
  9. package/assets/whaleGirl/img/building/02.png +0 -0
  10. package/assets/whaleGirl/img/building/03.png +0 -0
  11. package/assets/whaleGirl/img/building/04.png +0 -0
  12. package/assets/whaleGirl/img/building/05.png +0 -0
  13. package/assets/whaleGirl/img/building/06.png +0 -0
  14. package/assets/whaleGirl/img/building/07.png +0 -0
  15. package/assets/whaleGirl/img/building/08.png +0 -0
  16. package/assets/whaleGirl/img/building/09.png +0 -0
  17. package/assets/whaleGirl/img/building/10.png +0 -0
  18. package/assets/whaleGirl/img/building/11.png +0 -0
  19. package/assets/whaleGirl/img/building/12.png +0 -0
  20. package/assets/whaleGirl/img/building/13.png +0 -0
  21. package/assets/whaleGirl/img/building/14.png +0 -0
  22. package/assets/whaleGirl/img/building/15.png +0 -0
  23. package/assets/whaleGirl/img/building/16.png +0 -0
  24. package/assets/whaleGirl/img/building/17.png +0 -0
  25. package/assets/whaleGirl/img/building/18.png +0 -0
  26. package/assets/whaleGirl/img/building/19.png +0 -0
  27. package/assets/whaleGirl/img/building/20.png +0 -0
  28. package/assets/whaleGirl/img/building/21.png +0 -0
  29. package/assets/whaleGirl/img/building/22.png +0 -0
  30. package/assets/whaleGirl/img/building/23.png +0 -0
  31. package/assets/whaleGirl/img/carrying/00.png +0 -0
  32. package/assets/whaleGirl/img/carrying/01.png +0 -0
  33. package/assets/whaleGirl/img/carrying/02.png +0 -0
  34. package/assets/whaleGirl/img/carrying/03.png +0 -0
  35. package/assets/whaleGirl/img/carrying/04.png +0 -0
  36. package/assets/whaleGirl/img/carrying/05.png +0 -0
  37. package/assets/whaleGirl/img/carrying/06.png +0 -0
  38. package/assets/whaleGirl/img/carrying/07.png +0 -0
  39. package/assets/whaleGirl/img/compacting/00.png +0 -0
  40. package/assets/whaleGirl/img/compacting/01.png +0 -0
  41. package/assets/whaleGirl/img/compacting/02.png +0 -0
  42. package/assets/whaleGirl/img/compacting/03.png +0 -0
  43. package/assets/whaleGirl/img/compacting/04.png +0 -0
  44. package/assets/whaleGirl/img/compacting/05.png +0 -0
  45. package/assets/whaleGirl/img/compacting/06.png +0 -0
  46. package/assets/whaleGirl/img/compacting/07.png +0 -0
  47. package/assets/whaleGirl/img/compacting/08.png +0 -0
  48. package/assets/whaleGirl/img/compacting/09.png +0 -0
  49. package/assets/whaleGirl/img/conducting/00.png +0 -0
  50. package/assets/whaleGirl/img/conducting/01.png +0 -0
  51. package/assets/whaleGirl/img/conducting/02.png +0 -0
  52. package/assets/whaleGirl/img/conducting/03.png +0 -0
  53. package/assets/whaleGirl/img/conducting/04.png +0 -0
  54. package/assets/whaleGirl/img/conducting/05.png +0 -0
  55. package/assets/whaleGirl/img/conducting/06.png +0 -0
  56. package/assets/whaleGirl/img/conducting/07.png +0 -0
  57. package/assets/whaleGirl/img/conducting/08.png +0 -0
  58. package/assets/whaleGirl/img/conducting/09.png +0 -0
  59. package/assets/whaleGirl/img/conducting/10.png +0 -0
  60. package/assets/whaleGirl/img/conducting/11.png +0 -0
  61. package/assets/whaleGirl/img/drag/00.png +0 -0
  62. package/assets/whaleGirl/img/drag/01.png +0 -0
  63. package/assets/whaleGirl/img/drag/02.png +0 -0
  64. package/assets/whaleGirl/img/drag/03.png +0 -0
  65. package/assets/whaleGirl/img/drag/04.png +0 -0
  66. package/assets/whaleGirl/img/drag/05.png +0 -0
  67. package/assets/whaleGirl/img/drag/06.png +0 -0
  68. package/assets/whaleGirl/img/drag/07.png +0 -0
  69. package/assets/whaleGirl/img/drag/08.png +0 -0
  70. package/assets/whaleGirl/img/drag/09.png +0 -0
  71. package/assets/whaleGirl/img/error/00.png +0 -0
  72. package/assets/whaleGirl/img/error/01.png +0 -0
  73. package/assets/whaleGirl/img/error/02.png +0 -0
  74. package/assets/whaleGirl/img/error/03.png +0 -0
  75. package/assets/whaleGirl/img/error/04.png +0 -0
  76. package/assets/whaleGirl/img/error/05.png +0 -0
  77. package/assets/whaleGirl/img/error/06.png +0 -0
  78. package/assets/whaleGirl/img/error/07.png +0 -0
  79. package/assets/whaleGirl/img/error/08.png +0 -0
  80. package/assets/whaleGirl/img/error/09.png +0 -0
  81. package/assets/whaleGirl/img/happy/00.png +0 -0
  82. package/assets/whaleGirl/img/happy/01.png +0 -0
  83. package/assets/whaleGirl/img/happy/02.png +0 -0
  84. package/assets/whaleGirl/img/happy/03.png +0 -0
  85. package/assets/whaleGirl/img/happy/04.png +0 -0
  86. package/assets/whaleGirl/img/happy/05.png +0 -0
  87. package/assets/whaleGirl/img/happy/06.png +0 -0
  88. package/assets/whaleGirl/img/happy/07.png +0 -0
  89. package/assets/whaleGirl/img/happy/08.png +0 -0
  90. package/assets/whaleGirl/img/happy/09.png +0 -0
  91. package/assets/whaleGirl/img/happy/10.png +0 -0
  92. package/assets/whaleGirl/img/idle/00.png +0 -0
  93. package/assets/whaleGirl/img/idle/01.png +0 -0
  94. package/assets/whaleGirl/img/idle/02.png +0 -0
  95. package/assets/whaleGirl/img/idle/03.png +0 -0
  96. package/assets/whaleGirl/img/idle/04.png +0 -0
  97. package/assets/whaleGirl/img/idle/05.png +0 -0
  98. package/assets/whaleGirl/img/idle/06.png +0 -0
  99. package/assets/whaleGirl/img/idle/07.png +0 -0
  100. package/assets/whaleGirl/img/idle/08.png +0 -0
  101. package/assets/whaleGirl/img/idle/09.png +0 -0
  102. package/assets/whaleGirl/img/idle/10.png +0 -0
  103. package/assets/whaleGirl/img/idle/11.png +0 -0
  104. package/assets/whaleGirl/img/idle/12.png +0 -0
  105. package/assets/whaleGirl/img/idle/13.png +0 -0
  106. package/assets/whaleGirl/img/idle/14.png +0 -0
  107. package/assets/whaleGirl/img/idle/15.png +0 -0
  108. package/assets/whaleGirl/img/idle/16.png +0 -0
  109. package/assets/whaleGirl/img/idle/17.png +0 -0
  110. package/assets/whaleGirl/img/idle/18.png +0 -0
  111. package/assets/whaleGirl/img/idle/19.png +0 -0
  112. package/assets/whaleGirl/img/idle/20.png +0 -0
  113. package/assets/whaleGirl/img/idle-look/00.png +0 -0
  114. package/assets/whaleGirl/img/idle-look/01.png +0 -0
  115. package/assets/whaleGirl/img/idle-look/02.png +0 -0
  116. package/assets/whaleGirl/img/idle-look/03.png +0 -0
  117. package/assets/whaleGirl/img/idle-look/04.png +0 -0
  118. package/assets/whaleGirl/img/idle-look/05.png +0 -0
  119. package/assets/whaleGirl/img/idle-look/06.png +0 -0
  120. package/assets/whaleGirl/img/idle-look/07.png +0 -0
  121. package/assets/whaleGirl/img/idle-look/08.png +0 -0
  122. package/assets/whaleGirl/img/idle-look/09.png +0 -0
  123. package/assets/whaleGirl/img/idle-look/10.png +0 -0
  124. package/assets/whaleGirl/img/idle-look/11.png +0 -0
  125. package/assets/whaleGirl/img/idle-look/12.png +0 -0
  126. package/assets/whaleGirl/img/idle-spout/00.png +0 -0
  127. package/assets/whaleGirl/img/idle-spout/01.png +0 -0
  128. package/assets/whaleGirl/img/idle-spout/02.png +0 -0
  129. package/assets/whaleGirl/img/idle-spout/03.png +0 -0
  130. package/assets/whaleGirl/img/idle-spout/04.png +0 -0
  131. package/assets/whaleGirl/img/idle-spout/05.png +0 -0
  132. package/assets/whaleGirl/img/idle-spout/06.png +0 -0
  133. package/assets/whaleGirl/img/idle-spout/07.png +0 -0
  134. package/assets/whaleGirl/img/idle-spout/08.png +0 -0
  135. package/assets/whaleGirl/img/idle-spout/09.png +0 -0
  136. package/assets/whaleGirl/img/idle-spout/10.png +0 -0
  137. package/assets/whaleGirl/img/music/00.png +0 -0
  138. package/assets/whaleGirl/img/music/01.png +0 -0
  139. package/assets/whaleGirl/img/music/02.png +0 -0
  140. package/assets/whaleGirl/img/music/03.png +0 -0
  141. package/assets/whaleGirl/img/music/04.png +0 -0
  142. package/assets/whaleGirl/img/music/05.png +0 -0
  143. package/assets/whaleGirl/img/music/06.png +0 -0
  144. package/assets/whaleGirl/img/music/07.png +0 -0
  145. package/assets/whaleGirl/img/notification/00.png +0 -0
  146. package/assets/whaleGirl/img/notification/01.png +0 -0
  147. package/assets/whaleGirl/img/notification/02.png +0 -0
  148. package/assets/whaleGirl/img/notification/03.png +0 -0
  149. package/assets/whaleGirl/img/notification/04.png +0 -0
  150. package/assets/whaleGirl/img/notification/05.png +0 -0
  151. package/assets/whaleGirl/img/notification/06.png +0 -0
  152. package/assets/whaleGirl/img/notification/07.png +0 -0
  153. package/assets/whaleGirl/img/poke-left/00.png +0 -0
  154. package/assets/whaleGirl/img/poke-left/01.png +0 -0
  155. package/assets/whaleGirl/img/poke-left/02.png +0 -0
  156. package/assets/whaleGirl/img/poke-left/03.png +0 -0
  157. package/assets/whaleGirl/img/poke-left/04.png +0 -0
  158. package/assets/whaleGirl/img/poke-left/05.png +0 -0
  159. package/assets/whaleGirl/img/poke-left/06.png +0 -0
  160. package/assets/whaleGirl/img/poke-left/07.png +0 -0
  161. package/assets/whaleGirl/img/poke-left/08.png +0 -0
  162. package/assets/whaleGirl/img/poke-left/09.png +0 -0
  163. package/assets/whaleGirl/img/poke-left/10.png +0 -0
  164. package/assets/whaleGirl/img/poke-right/00.png +0 -0
  165. package/assets/whaleGirl/img/poke-right/01.png +0 -0
  166. package/assets/whaleGirl/img/poke-right/02.png +0 -0
  167. package/assets/whaleGirl/img/poke-right/03.png +0 -0
  168. package/assets/whaleGirl/img/poke-right/04.png +0 -0
  169. package/assets/whaleGirl/img/poke-right/05.png +0 -0
  170. package/assets/whaleGirl/img/poke-right/06.png +0 -0
  171. package/assets/whaleGirl/img/poke-right/07.png +0 -0
  172. package/assets/whaleGirl/img/poke-right/08.png +0 -0
  173. package/assets/whaleGirl/img/poke-right/09.png +0 -0
  174. package/assets/whaleGirl/img/poke-right/10.png +0 -0
  175. package/assets/whaleGirl/img/sleeping/00.png +0 -0
  176. package/assets/whaleGirl/img/sleeping/01.png +0 -0
  177. package/assets/whaleGirl/img/sleeping/02.png +0 -0
  178. package/assets/whaleGirl/img/sleeping/03.png +0 -0
  179. package/assets/whaleGirl/img/sleeping/04.png +0 -0
  180. package/assets/whaleGirl/img/sleeping/05.png +0 -0
  181. package/assets/whaleGirl/img/smile-hearts/00.png +0 -0
  182. package/assets/whaleGirl/img/smile-hearts/01.png +0 -0
  183. package/assets/whaleGirl/img/smile-hearts/02.png +0 -0
  184. package/assets/whaleGirl/img/smile-hearts/03.png +0 -0
  185. package/assets/whaleGirl/img/smile-hearts/04.png +0 -0
  186. package/assets/whaleGirl/img/smile-hearts/05.png +0 -0
  187. package/assets/whaleGirl/img/smile-hearts/06.png +0 -0
  188. package/assets/whaleGirl/img/smile-hearts/07.png +0 -0
  189. package/assets/whaleGirl/img/smile-hearts/08.png +0 -0
  190. package/assets/whaleGirl/img/smile-hearts/09.png +0 -0
  191. package/assets/whaleGirl/img/smile-hearts/10.png +0 -0
  192. package/assets/whaleGirl/img/smile-hearts/11.png +0 -0
  193. package/assets/whaleGirl/img/smile-hearts/12.png +0 -0
  194. package/assets/whaleGirl/img/smile-hearts/13.png +0 -0
  195. package/assets/whaleGirl/img/smile-hearts/14.png +0 -0
  196. package/assets/whaleGirl/img/smile-hearts/15.png +0 -0
  197. package/assets/whaleGirl/img/swim/00.png +0 -0
  198. package/assets/whaleGirl/img/swim/01.png +0 -0
  199. package/assets/whaleGirl/img/swim/02.png +0 -0
  200. package/assets/whaleGirl/img/swim/03.png +0 -0
  201. package/assets/whaleGirl/img/swim/04.png +0 -0
  202. package/assets/whaleGirl/img/swim/05.png +0 -0
  203. package/assets/whaleGirl/img/swim/06.png +0 -0
  204. package/assets/whaleGirl/img/swim/07.png +0 -0
  205. package/assets/whaleGirl/img/thinking/00.png +0 -0
  206. package/assets/whaleGirl/img/thinking/01.png +0 -0
  207. package/assets/whaleGirl/img/thinking/02.png +0 -0
  208. package/assets/whaleGirl/img/thinking/03.png +0 -0
  209. package/assets/whaleGirl/img/thinking/04.png +0 -0
  210. package/assets/whaleGirl/img/thinking/05.png +0 -0
  211. package/assets/whaleGirl/img/thinking/06.png +0 -0
  212. package/assets/whaleGirl/img/thinking/07.png +0 -0
  213. package/assets/whaleGirl/img/thinking/08.png +0 -0
  214. package/assets/whaleGirl/img/thinking/09.png +0 -0
  215. package/assets/whaleGirl/img/thinking/10.png +0 -0
  216. package/assets/whaleGirl/img/thinking/11.png +0 -0
  217. package/assets/whaleGirl/img/thinking/12.png +0 -0
  218. package/assets/whaleGirl/img/thinking/13.png +0 -0
  219. package/assets/whaleGirl/img/thinking/14.png +0 -0
  220. package/assets/whaleGirl/img/thinking/15.png +0 -0
  221. package/assets/whaleGirl/img/thinking/16.png +0 -0
  222. package/assets/whaleGirl/img/thumbs-up/00.png +0 -0
  223. package/assets/whaleGirl/img/thumbs-up/01.png +0 -0
  224. package/assets/whaleGirl/img/thumbs-up/02.png +0 -0
  225. package/assets/whaleGirl/img/thumbs-up/03.png +0 -0
  226. package/assets/whaleGirl/img/thumbs-up/04.png +0 -0
  227. package/assets/whaleGirl/img/thumbs-up/05.png +0 -0
  228. package/assets/whaleGirl/img/thumbs-up/06.png +0 -0
  229. package/assets/whaleGirl/img/thumbs-up/07.png +0 -0
  230. package/assets/whaleGirl/img/thumbs-up/08.png +0 -0
  231. package/assets/whaleGirl/img/thumbs-up/09.png +0 -0
  232. package/assets/whaleGirl/img/thumbs-up/10.png +0 -0
  233. package/assets/whaleGirl/img/thumbs-up/11.png +0 -0
  234. package/assets/whaleGirl/img/thumbs-up/12.png +0 -0
  235. package/assets/whaleGirl/img/tickle/00.png +0 -0
  236. package/assets/whaleGirl/img/tickle/01.png +0 -0
  237. package/assets/whaleGirl/img/tickle/02.png +0 -0
  238. package/assets/whaleGirl/img/tickle/03.png +0 -0
  239. package/assets/whaleGirl/img/tickle/04.png +0 -0
  240. package/assets/whaleGirl/img/tickle/05.png +0 -0
  241. package/assets/whaleGirl/img/tickle/06.png +0 -0
  242. package/assets/whaleGirl/img/tickle/07.png +0 -0
  243. package/assets/whaleGirl/img/tickle/08.png +0 -0
  244. package/assets/whaleGirl/img/tickle/09.png +0 -0
  245. package/assets/whaleGirl/img/tickle/10.png +0 -0
  246. package/assets/whaleGirl/img/tickle/11.png +0 -0
  247. package/assets/whaleGirl/img/tickle/12.png +0 -0
  248. package/assets/whaleGirl/img/tickle/13.png +0 -0
  249. package/assets/whaleGirl/img/timings.json +1 -0
  250. package/assets/whaleGirl/img/typing/00.png +0 -0
  251. package/assets/whaleGirl/img/typing/01.png +0 -0
  252. package/assets/whaleGirl/img/typing/02.png +0 -0
  253. package/assets/whaleGirl/img/typing/03.png +0 -0
  254. package/assets/whaleGirl/img/typing/04.png +0 -0
  255. package/assets/whaleGirl/img/typing/05.png +0 -0
  256. package/assets/whaleGirl/img/typing/06.png +0 -0
  257. package/assets/whaleGirl/img/typing/07.png +0 -0
  258. package/assets/whaleGirl/img/typing/08.png +0 -0
  259. package/assets/whaleGirl/img/typing/09.png +0 -0
  260. package/assets/whaleGirl/img/typing/10.png +0 -0
  261. package/assets/whaleGirl/img/typing/11.png +0 -0
  262. package/assets/whaleGirl/img/typing/12.png +0 -0
  263. package/assets/whaleGirl/img/typing/13.png +0 -0
  264. package/assets/whaleGirl/img/waking/00.png +0 -0
  265. package/assets/whaleGirl/img/waking/01.png +0 -0
  266. package/assets/whaleGirl/img/waking/02.png +0 -0
  267. package/assets/whaleGirl/img/waking/03.png +0 -0
  268. package/assets/whaleGirl/img/waking/04.png +0 -0
  269. package/assets/whaleGirl/img/waking/05.png +0 -0
  270. package/assets/whaleGirl/img/waking/06.png +0 -0
  271. package/assets/whaleGirl/img/waking/07.png +0 -0
  272. package/assets/whaleGirl/img/waking/08.png +0 -0
  273. package/assets/whaleGirl/img/waking/09.png +0 -0
  274. package/assets/whaleGirl/img/waking/10.png +0 -0
  275. package/bin/dsh-tui.js +38 -6
  276. package/cordis.patch.yml +31 -6
  277. package/guide/dsh-tui-guide/SKILL.md +37 -0
  278. package/guide/dsh-tui-guide/configuration.en.md +415 -0
  279. package/guide/dsh-tui-guide/configuration.md +354 -0
  280. package/guide/dsh-tui-guide/getting-started.en.md +401 -0
  281. package/guide/dsh-tui-guide/getting-started.md +399 -0
  282. package/guide/dsh-tui-guide/interaction.en.md +738 -0
  283. package/guide/dsh-tui-guide/interaction.md +793 -0
  284. package/guide/dsh-tui-guide/migrate.en.md +166 -0
  285. package/guide/dsh-tui-guide/migrate.md +132 -0
  286. package/guide/dsh-tui-guide/plugins.en.md +78 -0
  287. package/guide/dsh-tui-guide/plugins.md +64 -0
  288. package/guide/dsh-tui-guide/themes.en.md +197 -0
  289. package/guide/dsh-tui-guide/themes.md +188 -0
  290. package/guide/dsh-tui-guide/user-guide.en.md +711 -0
  291. package/guide/dsh-tui-guide/user-guide.md +666 -0
  292. package/guide/dsh-tui-guide/vscode.en.md +301 -0
  293. package/guide/dsh-tui-guide/vscode.md +272 -0
  294. package/lib/settings.json +219 -5
  295. package/lib/types/adapter/channel/ui-policy.d.ts +7 -2
  296. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  297. package/lib/types/adapter/channel/ui-policy.js +18 -1
  298. package/lib/types/adapter/index.d.ts +1 -1
  299. package/lib/types/adapter/index.js +1 -1
  300. package/lib/types/adapter/kernel/host-facade.d.ts +4 -1
  301. package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -1
  302. package/lib/types/adapter/kernel/host-facade.js +8 -1
  303. package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
  304. package/lib/types/adapter/kernel/runtime.js +13 -0
  305. package/lib/types/adapter/kernel/slices/index.d.ts +1 -0
  306. package/lib/types/adapter/kernel/slices/index.d.ts.map +1 -1
  307. package/lib/types/adapter/kernel/slices/index.js +3 -0
  308. package/lib/types/adapter/kernel/slices/panels.d.ts +3 -0
  309. package/lib/types/adapter/kernel/slices/panels.d.ts.map +1 -0
  310. package/lib/types/adapter/kernel/slices/panels.js +14 -0
  311. package/lib/types/adapter/ports/channel-capabilities.d.ts +48 -0
  312. package/lib/types/adapter/ports/channel-capabilities.d.ts.map +1 -0
  313. package/lib/types/adapter/ports/channel-capabilities.js +2 -0
  314. package/lib/types/adapter/ports/channel-catalog.d.ts +7 -0
  315. package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
  316. package/lib/types/adapter/ports/channel-display.d.ts +10 -0
  317. package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
  318. package/lib/types/adapter/ports/channel-settings.d.ts +2 -1
  319. package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
  320. package/lib/types/adapter/ports/channel-ui.d.ts +91 -4
  321. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  322. package/lib/types/adapter/ports/channel-view.d.ts +137 -9
  323. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  324. package/lib/types/adapter/ports/channel.d.ts +1 -1
  325. package/lib/types/adapter/ports/channel.js +1 -1
  326. package/lib/types/adapter/ports/descriptor.d.ts +1 -1
  327. package/lib/types/adapter/ports/descriptor.js +1 -1
  328. package/lib/types/adapter/ports/index.d.ts +1 -1
  329. package/lib/types/adapter/ports/index.js +1 -1
  330. package/lib/types/adapter/ports/panels.d.ts +28 -0
  331. package/lib/types/adapter/ports/panels.d.ts.map +1 -0
  332. package/lib/types/adapter/ports/panels.js +8 -0
  333. package/lib/types/adapter/ports/workspace.d.ts +1 -1
  334. package/lib/types/adapter/ports/workspace.js +1 -1
  335. package/lib/types/adapter/spec/index.d.ts +2 -2
  336. package/lib/types/adapter/spec/index.js +2 -2
  337. package/lib/types/adapter/spec/profile.d.ts +6 -6
  338. package/lib/types/adapter/spec/profile.d.ts.map +1 -1
  339. package/lib/types/adapter/spec/profile.js +6 -6
  340. package/lib/types/adapter/spec/protocol-constants.d.ts +3 -3
  341. package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -1
  342. package/lib/types/adapter/spec/protocol-constants.js +5 -5
  343. package/lib/types/adapter/spec/tui-contributions.d.ts +4 -4
  344. package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -1
  345. package/lib/types/adapter/spec/tui-contributions.js +5 -5
  346. package/lib/types/adapter/standard/descriptor.js +1 -1
  347. package/lib/types/adapter/standard/index.d.ts +3 -3
  348. package/lib/types/adapter/standard/index.js +3 -3
  349. package/lib/types/adapter/standard/registry.d.ts +3 -2
  350. package/lib/types/adapter/standard/registry.d.ts.map +1 -1
  351. package/lib/types/adapter/standard/registry.js +6 -5
  352. package/lib/types/adapter/standard/tui-extension.d.ts +1 -1
  353. package/lib/types/adapter/standard/tui-extension.js +1 -1
  354. package/lib/types/adapter/upstream/index.d.ts +1 -0
  355. package/lib/types/adapter/upstream/index.d.ts.map +1 -1
  356. package/lib/types/adapter/upstream/index.js +1 -0
  357. package/lib/types/adapter/upstream/panels-driver.d.ts +18 -0
  358. package/lib/types/adapter/upstream/panels-driver.d.ts.map +1 -0
  359. package/lib/types/adapter/upstream/panels-driver.js +159 -0
  360. package/lib/types/api.d.ts +2 -0
  361. package/lib/types/api.d.ts.map +1 -1
  362. package/lib/types/api.js +3 -1
  363. package/lib/types/commands.d.ts.map +1 -1
  364. package/lib/types/commands.js +12 -4
  365. package/lib/types/components/ActivityLine.d.ts +6 -9
  366. package/lib/types/components/ActivityLine.d.ts.map +1 -1
  367. package/lib/types/components/ActivityLine.js +7 -8
  368. package/lib/types/components/Chat/JobCard.d.ts +27 -1
  369. package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
  370. package/lib/types/components/Chat/JobCard.js +128 -33
  371. package/lib/types/components/Chat/JobGroupHeader.d.ts +27 -0
  372. package/lib/types/components/Chat/JobGroupHeader.d.ts.map +1 -0
  373. package/lib/types/components/Chat/JobGroupHeader.js +62 -0
  374. package/lib/types/components/Chat/SubagentMessage.js +6 -6
  375. package/lib/types/components/GoalTodoPanel.d.ts +13 -1
  376. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
  377. package/lib/types/components/GoalTodoPanel.js +55 -14
  378. package/lib/types/components/JobsPanel.d.ts +42 -2
  379. package/lib/types/components/JobsPanel.d.ts.map +1 -1
  380. package/lib/types/components/JobsPanel.js +220 -40
  381. package/lib/types/components/LogoV2.d.ts +43 -3
  382. package/lib/types/components/LogoV2.d.ts.map +1 -1
  383. package/lib/types/components/LogoV2.js +42 -15
  384. package/lib/types/components/MessageList.d.ts +8 -2
  385. package/lib/types/components/MessageList.d.ts.map +1 -1
  386. package/lib/types/components/MessageList.js +215 -21
  387. package/lib/types/components/OverlayAbove.d.ts +11 -1
  388. package/lib/types/components/OverlayAbove.d.ts.map +1 -1
  389. package/lib/types/components/OverlayAbove.js +2 -12
  390. package/lib/types/components/PageMargin.d.ts.map +1 -1
  391. package/lib/types/components/PageMargin.js +3 -1
  392. package/lib/types/components/PluginSceneBoundary.d.ts +1 -1
  393. package/lib/types/components/PluginSceneBoundary.js +1 -1
  394. package/lib/types/components/PresetPicker.d.ts +4 -0
  395. package/lib/types/components/PresetPicker.d.ts.map +1 -1
  396. package/lib/types/components/PresetPicker.js +5 -1
  397. package/lib/types/components/PromptInput.d.ts +20 -22
  398. package/lib/types/components/PromptInput.d.ts.map +1 -1
  399. package/lib/types/components/PromptInput.js +425 -157
  400. package/lib/types/components/SearchBox.d.ts +22 -5
  401. package/lib/types/components/SearchBox.d.ts.map +1 -1
  402. package/lib/types/components/SearchBox.js +17 -13
  403. package/lib/types/components/StarPrompt.d.ts +6 -0
  404. package/lib/types/components/StarPrompt.d.ts.map +1 -1
  405. package/lib/types/components/StarPrompt.js +45 -0
  406. package/lib/types/components/SubagentCard.d.ts.map +1 -1
  407. package/lib/types/components/SubagentCard.js +24 -9
  408. package/lib/types/components/SubagentDashboard.d.ts +18 -3
  409. package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
  410. package/lib/types/components/SubagentDashboard.js +53 -5
  411. package/lib/types/components/SubagentDetailScene.d.ts +7 -1
  412. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  413. package/lib/types/components/SubagentDetailScene.js +160 -13
  414. package/lib/types/components/SurfaceEdges.d.ts +21 -0
  415. package/lib/types/components/SurfaceEdges.d.ts.map +1 -0
  416. package/lib/types/components/SurfaceEdges.js +7 -0
  417. package/lib/types/components/ThemePicker.d.ts +9 -0
  418. package/lib/types/components/ThemePicker.d.ts.map +1 -1
  419. package/lib/types/components/ThemePicker.js +74 -10
  420. package/lib/types/components/ThemePreviewPane.d.ts +26 -0
  421. package/lib/types/components/ThemePreviewPane.d.ts.map +1 -0
  422. package/lib/types/components/ThemePreviewPane.js +99 -0
  423. package/lib/types/components/WhaleGirl.d.ts +6 -0
  424. package/lib/types/components/WhaleGirl.d.ts.map +1 -1
  425. package/lib/types/components/WhaleGirl.js +18 -0
  426. package/lib/types/components/design-system/Divider.d.ts.map +1 -1
  427. package/lib/types/components/design-system/Divider.js +14 -9
  428. package/lib/types/components/launchpadActions.d.ts +73 -0
  429. package/lib/types/components/launchpadActions.d.ts.map +1 -0
  430. package/lib/types/components/launchpadActions.js +111 -0
  431. package/lib/types/components/launchpadLayout.d.ts +62 -0
  432. package/lib/types/components/launchpadLayout.d.ts.map +1 -0
  433. package/lib/types/components/launchpadLayout.js +176 -0
  434. package/lib/types/components/messages/AssistantThinkingMessage.js +4 -4
  435. package/lib/types/components/onboardingModel.d.ts +83 -0
  436. package/lib/types/components/onboardingModel.d.ts.map +1 -0
  437. package/lib/types/components/onboardingModel.js +128 -0
  438. package/lib/types/components/sidePanel/InfoPanel.d.ts +17 -0
  439. package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -0
  440. package/lib/types/components/sidePanel/InfoPanel.js +124 -0
  441. package/lib/types/components/sidePanel/PanelBar.d.ts +45 -0
  442. package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -0
  443. package/lib/types/components/sidePanel/PanelBar.js +104 -0
  444. package/lib/types/components/sidePanel/PanelErrorBoundary.d.ts +21 -0
  445. package/lib/types/components/sidePanel/PanelErrorBoundary.d.ts.map +1 -0
  446. package/lib/types/components/sidePanel/PanelErrorBoundary.js +30 -0
  447. package/lib/types/components/sidePanel/PanelHost.d.ts +36 -0
  448. package/lib/types/components/sidePanel/PanelHost.d.ts.map +1 -0
  449. package/lib/types/components/sidePanel/PanelHost.js +81 -0
  450. package/lib/types/components/sidePanel/PanelPicker.d.ts +24 -0
  451. package/lib/types/components/sidePanel/PanelPicker.d.ts.map +1 -0
  452. package/lib/types/components/sidePanel/PanelPicker.js +45 -0
  453. package/lib/types/components/sidePanel/PanelStore.d.ts +55 -0
  454. package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -0
  455. package/lib/types/components/sidePanel/PanelStore.js +109 -0
  456. package/lib/types/components/sidePanel/SidePanelColumn.d.ts +31 -0
  457. package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -0
  458. package/lib/types/components/sidePanel/SidePanelColumn.js +70 -0
  459. package/lib/types/components/sidePanel/SidePanelLayout.d.ts +54 -0
  460. package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -0
  461. package/lib/types/components/sidePanel/SidePanelLayout.js +81 -0
  462. package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts +43 -0
  463. package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts.map +1 -0
  464. package/lib/types/components/sidePanel/SidePanelRuntimeContext.js +26 -0
  465. package/lib/types/components/sidePanel/TrajectoryPanel.d.ts +7 -0
  466. package/lib/types/components/sidePanel/TrajectoryPanel.d.ts.map +1 -0
  467. package/lib/types/components/sidePanel/TrajectoryPanel.js +263 -0
  468. package/lib/types/components/sidePanel/WorkspacePanel.d.ts +4 -0
  469. package/lib/types/components/sidePanel/WorkspacePanel.d.ts.map +1 -0
  470. package/lib/types/components/sidePanel/WorkspacePanel.js +171 -0
  471. package/lib/types/components/sidePanel/builtinPanels.d.ts +3 -0
  472. package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -0
  473. package/lib/types/components/sidePanel/builtinPanels.js +229 -0
  474. package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts +53 -0
  475. package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -0
  476. package/lib/types/components/sidePanel/companion/CompanionPanel.js +528 -0
  477. package/lib/types/components/sidePanel/companion/SplashMascot.d.ts +32 -0
  478. package/lib/types/components/sidePanel/companion/SplashMascot.d.ts.map +1 -0
  479. package/lib/types/components/sidePanel/companion/SplashMascot.js +103 -0
  480. package/lib/types/components/sidePanel/companion/deepy.d.ts +75 -0
  481. package/lib/types/components/sidePanel/companion/deepy.d.ts.map +1 -0
  482. package/lib/types/components/sidePanel/companion/deepy.js +222 -0
  483. package/lib/types/components/sidePanel/companion/mood.d.ts +176 -0
  484. package/lib/types/components/sidePanel/companion/mood.d.ts.map +1 -0
  485. package/lib/types/components/sidePanel/companion/mood.js +212 -0
  486. package/lib/types/components/sidePanel/companion/pose.d.ts +43 -0
  487. package/lib/types/components/sidePanel/companion/pose.d.ts.map +1 -0
  488. package/lib/types/components/sidePanel/companion/pose.js +34 -0
  489. package/lib/types/components/sidePanel/companion/skins.d.ts +102 -0
  490. package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -0
  491. package/lib/types/components/sidePanel/companion/skins.js +408 -0
  492. package/lib/types/components/sidePanel/dimensions.d.ts +60 -0
  493. package/lib/types/components/sidePanel/dimensions.d.ts.map +1 -0
  494. package/lib/types/components/sidePanel/dimensions.js +75 -0
  495. package/lib/types/components/sidePanel/jobsFocusStore.d.ts +21 -0
  496. package/lib/types/components/sidePanel/jobsFocusStore.d.ts.map +1 -0
  497. package/lib/types/components/sidePanel/jobsFocusStore.js +30 -0
  498. package/lib/types/components/sidePanel/panelBridge.d.ts +44 -0
  499. package/lib/types/components/sidePanel/panelBridge.d.ts.map +1 -0
  500. package/lib/types/components/sidePanel/panelBridge.js +55 -0
  501. package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts +22 -0
  502. package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts.map +1 -0
  503. package/lib/types/components/sidePanel/pluginPanelAdapter.js +148 -0
  504. package/lib/types/components/sidePanel/types.d.ts +110 -0
  505. package/lib/types/components/sidePanel/types.d.ts.map +1 -0
  506. package/lib/types/components/sidePanel/types.js +1 -0
  507. package/lib/types/components/sidePanel/usePanelInput.d.ts +5 -0
  508. package/lib/types/components/sidePanel/usePanelInput.d.ts.map +1 -0
  509. package/lib/types/components/sidePanel/usePanelInput.js +44 -0
  510. package/lib/types/components/sidePanel/useSidePanel.d.ts +47 -0
  511. package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -0
  512. package/lib/types/components/sidePanel/useSidePanel.js +284 -0
  513. package/lib/types/components/trajectory/MiniWake.d.ts +11 -1
  514. package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -1
  515. package/lib/types/components/trajectory/MiniWake.js +9 -3
  516. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +3 -1
  517. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
  518. package/lib/types/components/workspaces/HomeWorkspaceRow.js +3 -2
  519. package/lib/types/deepseekPricing.d.ts +10 -9
  520. package/lib/types/deepseekPricing.d.ts.map +1 -1
  521. package/lib/types/deepseekPricing.js +18 -11
  522. package/lib/types/dsh-adapter/channel/attached-context.d.ts +58 -0
  523. package/lib/types/dsh-adapter/channel/attached-context.d.ts.map +1 -0
  524. package/lib/types/dsh-adapter/channel/attached-context.js +109 -0
  525. package/lib/types/dsh-adapter/channel/binding-events.d.ts +6 -0
  526. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  527. package/lib/types/dsh-adapter/channel/binding-events.js +43 -0
  528. package/lib/types/dsh-adapter/channel/capabilities.d.ts +82 -0
  529. package/lib/types/dsh-adapter/channel/capabilities.d.ts.map +1 -0
  530. package/lib/types/dsh-adapter/channel/capabilities.js +165 -0
  531. package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
  532. package/lib/types/dsh-adapter/channel/command-completions.js +8 -0
  533. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +4 -12
  534. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
  535. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +9 -4
  536. package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -1
  537. package/lib/types/dsh-adapter/channel/external-commands.js +8 -2
  538. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +13 -2
  539. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  540. package/lib/types/dsh-adapter/channel/input-delivery.js +18 -1
  541. package/lib/types/dsh-adapter/channel/job-projection.d.ts +1 -0
  542. package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -1
  543. package/lib/types/dsh-adapter/channel/job-projection.js +88 -3
  544. package/lib/types/dsh-adapter/channel/mode-actions.d.ts +13 -3
  545. package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -1
  546. package/lib/types/dsh-adapter/channel/mode-actions.js +55 -9
  547. package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +8 -1
  548. package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
  549. package/lib/types/dsh-adapter/channel/mode-permission-actions.js +25 -10
  550. package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
  551. package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
  552. package/lib/types/dsh-adapter/channel/preferences.js +26 -8
  553. package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
  554. package/lib/types/dsh-adapter/channel/projection.js +42 -37
  555. package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
  556. package/lib/types/dsh-adapter/channel/reports.js +13 -4
  557. package/lib/types/dsh-adapter/channel/session-reset.d.ts +5 -1
  558. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
  559. package/lib/types/dsh-adapter/channel/session-reset.js +1 -0
  560. package/lib/types/dsh-adapter/channel/state.d.ts +21 -3
  561. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
  562. package/lib/types/dsh-adapter/channel/state.js +3 -2
  563. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
  564. package/lib/types/dsh-adapter/channel/subagent-projection.js +5 -0
  565. package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
  566. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  567. package/lib/types/dsh-adapter/channel/usage.d.ts +18 -1
  568. package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -1
  569. package/lib/types/dsh-adapter/channel/usage.js +97 -2
  570. package/lib/types/dsh-adapter/channel.d.ts +1 -1
  571. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  572. package/lib/types/dsh-adapter/channel.js +72 -4
  573. package/lib/types/dsh-adapter/context-occupancy.d.ts +204 -0
  574. package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -0
  575. package/lib/types/dsh-adapter/context-occupancy.js +299 -0
  576. package/lib/types/dsh-adapter/contract.d.ts +19 -4
  577. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  578. package/lib/types/dsh-adapter/contract.js +33 -3
  579. package/lib/types/dsh-adapter/index.d.ts +32 -0
  580. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  581. package/lib/types/dsh-adapter/index.js +20 -1
  582. package/lib/types/dsh-adapter/jobs.d.ts +82 -16
  583. package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
  584. package/lib/types/dsh-adapter/jobs.js +104 -9
  585. package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -1
  586. package/lib/types/dsh-adapter/migrate/sessionize.js +11 -12
  587. package/lib/types/dsh-adapter/oauth/bonus.d.ts +27 -0
  588. package/lib/types/dsh-adapter/oauth/bonus.d.ts.map +1 -0
  589. package/lib/types/dsh-adapter/oauth/bonus.js +69 -0
  590. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/command.d.ts +2 -1
  591. package/lib/types/dsh-adapter/oauth/command.d.ts.map +1 -0
  592. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/command.js +7 -4
  593. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/credentials.d.ts +13 -10
  594. package/lib/types/dsh-adapter/oauth/credentials.d.ts.map +1 -0
  595. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/credentials.js +61 -23
  596. package/lib/types/dsh-adapter/oauth/deepseek.d.ts +39 -0
  597. package/lib/types/dsh-adapter/oauth/deepseek.d.ts.map +1 -0
  598. package/lib/types/dsh-adapter/oauth/deepseek.js +189 -0
  599. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/index.d.ts +24 -16
  600. package/lib/types/dsh-adapter/oauth/index.d.ts.map +1 -0
  601. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/index.js +34 -20
  602. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/interaction.d.ts +14 -12
  603. package/lib/types/dsh-adapter/oauth/interaction.d.ts.map +1 -0
  604. package/lib/types/dsh-adapter/oauth/interaction.js +283 -0
  605. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/opener.d.ts +2 -1
  606. package/lib/types/dsh-adapter/oauth/opener.d.ts.map +1 -0
  607. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/opener.js +1 -1
  608. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/pi-ai.d.ts +10 -3
  609. package/lib/types/dsh-adapter/oauth/pi-ai.d.ts.map +1 -0
  610. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/pi-ai.js +8 -3
  611. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/profiles.d.ts +6 -3
  612. package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -0
  613. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/profiles.js +11 -3
  614. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/service.d.ts +14 -7
  615. package/lib/types/dsh-adapter/oauth/service.d.ts.map +1 -0
  616. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/service.js +82 -17
  617. package/lib/types/dsh-adapter/panel-runtime-registry.d.ts +39 -0
  618. package/lib/types/dsh-adapter/panel-runtime-registry.d.ts.map +1 -0
  619. package/lib/types/dsh-adapter/panel-runtime-registry.js +84 -0
  620. package/lib/types/dsh-adapter/panels.d.ts +251 -0
  621. package/lib/types/dsh-adapter/panels.d.ts.map +1 -0
  622. package/lib/types/dsh-adapter/panels.js +407 -0
  623. package/lib/types/dsh-adapter/plugin-host.js +1 -1
  624. package/lib/types/dsh-adapter/plugin.d.ts +25 -2
  625. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  626. package/lib/types/dsh-adapter/plugin.js +241 -44
  627. package/lib/types/dsh-adapter/presets.d.ts +26 -4
  628. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  629. package/lib/types/dsh-adapter/presets.js +29 -5
  630. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
  631. package/lib/types/dsh-adapter/providerWizard.js +6 -2
  632. package/lib/types/dsh-adapter/startup-args.d.ts +8 -0
  633. package/lib/types/dsh-adapter/startup-args.d.ts.map +1 -0
  634. package/lib/types/dsh-adapter/startup-args.js +34 -0
  635. package/lib/types/dsh-adapter/subagents.d.ts +1 -0
  636. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  637. package/lib/types/dsh-adapter/subagents.js +10 -1
  638. package/lib/types/history.d.ts +24 -7
  639. package/lib/types/history.d.ts.map +1 -1
  640. package/lib/types/history.js +77 -18
  641. package/lib/types/i18n.d.ts +908 -33
  642. package/lib/types/i18n.d.ts.map +1 -1
  643. package/lib/types/i18n.js +355 -17
  644. package/lib/types/ink/components/App.d.ts +14 -1
  645. package/lib/types/ink/components/App.d.ts.map +1 -1
  646. package/lib/types/ink/components/App.js +71 -61
  647. package/lib/types/ink/components/TerminalSizeContext.d.ts +7 -0
  648. package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -1
  649. package/lib/types/ink/hooks/use-input.d.ts +11 -0
  650. package/lib/types/ink/hooks/use-input.d.ts.map +1 -1
  651. package/lib/types/ink/hooks/use-input.js +8 -2
  652. package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -1
  653. package/lib/types/ink/hooks/use-terminal-viewport.js +3 -1
  654. package/lib/types/ink/ink.d.ts +18 -0
  655. package/lib/types/ink/ink.d.ts.map +1 -1
  656. package/lib/types/ink/ink.js +51 -8
  657. package/lib/types/ink/output.d.ts +10 -1
  658. package/lib/types/ink/output.d.ts.map +1 -1
  659. package/lib/types/ink/output.js +3 -3
  660. package/lib/types/ink/parse-keypress.d.ts +71 -3
  661. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  662. package/lib/types/ink/parse-keypress.js +815 -133
  663. package/lib/types/ink/render-node-to-output.d.ts +1 -1
  664. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  665. package/lib/types/ink/render-node-to-output.js +37 -5
  666. package/lib/types/ink/screen.d.ts +26 -1
  667. package/lib/types/ink/screen.d.ts.map +1 -1
  668. package/lib/types/ink/screen.js +96 -1
  669. package/lib/types/ink/selection.d.ts +23 -1
  670. package/lib/types/ink/selection.d.ts.map +1 -1
  671. package/lib/types/ink/selection.js +102 -26
  672. package/lib/types/ink/sixel-codec.d.ts +11 -0
  673. package/lib/types/ink/sixel-codec.d.ts.map +1 -1
  674. package/lib/types/ink/sixel-codec.js +42 -8
  675. package/lib/types/ink/terminal-querier.d.ts +25 -0
  676. package/lib/types/ink/terminal-querier.d.ts.map +1 -1
  677. package/lib/types/ink/terminal-querier.js +42 -0
  678. package/lib/types/ink/update-overflow-guard.d.ts +24 -0
  679. package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
  680. package/lib/types/ink/update-overflow-guard.js +25 -3
  681. package/lib/types/math/renderer.d.ts +2 -0
  682. package/lib/types/math/renderer.d.ts.map +1 -1
  683. package/lib/types/math/renderer.js +4 -0
  684. package/lib/types/minimalUiMode.d.ts +19 -0
  685. package/lib/types/minimalUiMode.d.ts.map +1 -0
  686. package/lib/types/minimalUiMode.js +23 -0
  687. package/lib/types/oauth.d.ts +5 -10
  688. package/lib/types/oauth.d.ts.map +1 -1
  689. package/lib/types/oauth.js +5 -10
  690. package/lib/types/onboardingPrefs.d.ts +52 -0
  691. package/lib/types/onboardingPrefs.d.ts.map +1 -0
  692. package/lib/types/onboardingPrefs.js +107 -0
  693. package/lib/types/panels.d.ts +4 -0
  694. package/lib/types/panels.d.ts.map +1 -0
  695. package/lib/types/panels.js +4 -0
  696. package/lib/types/screens/Chat.d.ts +25 -1
  697. package/lib/types/screens/Chat.d.ts.map +1 -1
  698. package/lib/types/screens/Chat.js +1149 -302
  699. package/lib/types/screens/Launchpad.d.ts +194 -0
  700. package/lib/types/screens/Launchpad.d.ts.map +1 -0
  701. package/lib/types/screens/Launchpad.js +607 -0
  702. package/lib/types/screens/Onboarding.d.ts +37 -0
  703. package/lib/types/screens/Onboarding.d.ts.map +1 -0
  704. package/lib/types/screens/Onboarding.js +492 -0
  705. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  706. package/lib/types/screens/SessionSupervisor.js +18 -12
  707. package/lib/types/screens/StatusLine.d.ts +4 -0
  708. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  709. package/lib/types/screens/StatusLine.js +43 -25
  710. package/lib/types/screens/StatusMetrics.d.ts +22 -0
  711. package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
  712. package/lib/types/screens/StatusMetrics.js +20 -0
  713. package/lib/types/screens/chatOverlay.d.ts +18 -1
  714. package/lib/types/screens/chatOverlay.d.ts.map +1 -1
  715. package/lib/types/screens/chatOverlay.js +3 -0
  716. package/lib/types/screens/sessionSupervisor/model.d.ts +1 -2
  717. package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -1
  718. package/lib/types/screens/sessionSupervisor/model.js +4 -2
  719. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
  720. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +7 -3
  721. package/lib/types/settings/definitions.d.ts +93 -0
  722. package/lib/types/settings/definitions.d.ts.map +1 -1
  723. package/lib/types/settings/definitions.js +87 -4
  724. package/lib/types/tips.d.ts.map +1 -1
  725. package/lib/types/tips.js +13 -7
  726. package/lib/types/tuiDisplayPrefs.d.ts +42 -2
  727. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  728. package/lib/types/tuiDisplayPrefs.js +74 -0
  729. package/lib/types/update.d.ts +53 -9
  730. package/lib/types/update.d.ts.map +1 -1
  731. package/lib/types/update.js +103 -46
  732. package/lib/types/utils/bmp.d.ts.map +1 -1
  733. package/lib/types/utils/bmp.js +8 -1
  734. package/lib/types/utils/clipboard.d.ts.map +1 -1
  735. package/lib/types/utils/clipboard.js +25 -6
  736. package/lib/types/utils/credentials.d.ts.map +1 -1
  737. package/lib/types/utils/credentials.js +5 -1
  738. package/lib/types/utils/draftWordBoundary.d.ts +23 -0
  739. package/lib/types/utils/draftWordBoundary.d.ts.map +1 -0
  740. package/lib/types/utils/draftWordBoundary.js +161 -0
  741. package/lib/types/utils/fileTarget.d.ts.map +1 -1
  742. package/lib/types/utils/fileTarget.js +7 -9
  743. package/lib/types/utils/inputPaste.d.ts +62 -0
  744. package/lib/types/utils/inputPaste.d.ts.map +1 -0
  745. package/lib/types/utils/inputPaste.js +111 -0
  746. package/lib/types/utils/intl.d.ts +8 -0
  747. package/lib/types/utils/intl.d.ts.map +1 -1
  748. package/lib/types/utils/intl.js +11 -0
  749. package/lib/types/utils/keymap.d.ts +13 -3
  750. package/lib/types/utils/keymap.d.ts.map +1 -1
  751. package/lib/types/utils/keymap.js +27 -5
  752. package/lib/types/utils/pastedImagePath.d.ts +8 -0
  753. package/lib/types/utils/pastedImagePath.d.ts.map +1 -1
  754. package/lib/types/utils/pastedImagePath.js +29 -5
  755. package/package.json +128 -106
  756. package/presets/liangshen/agent.cordis.yml +4 -1
  757. package/presets/liangshen/preset.yml +1 -1
  758. package/{dsh-ecosystem-spec → tui-profile}/registry/README.md +1 -1
  759. package/{dsh-ecosystem-spec → tui-profile}/registry/registry-0.15.json +1 -1
  760. package/lib/types/minimalMode.d.ts +0 -13
  761. package/lib/types/minimalMode.d.ts.map +0 -1
  762. package/lib/types/minimalMode.js +0 -17
  763. package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +0 -21
  764. package/node_modules/@deepseek-harness-tui/dsh-auth/README.md +0 -143
  765. package/node_modules/@deepseek-harness-tui/dsh-auth/cordis.patch.yml +0 -11
  766. package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +0 -44
  767. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.js +0 -193
  768. package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +0 -69
  769. /package/{dsh-ecosystem-spec → tui-profile}/protocols/profile-definitions.d.ts +0 -0
  770. /package/{dsh-ecosystem-spec → tui-profile}/protocols/profile-definitions.js +0 -0
  771. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel-http.d.ts +0 -0
  772. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel-http.js +0 -0
  773. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel.d.ts +0 -0
  774. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel.js +0 -0
  775. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-contributions.d.ts +0 -0
  776. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-contributions.js +0 -0
  777. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/decision-events-v1alpha1.json +0 -0
  778. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/scene-v1alpha1.json +0 -0
  779. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/settings-section-v1alpha1.json +0 -0
  780. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/tui-channel-v1alpha1.json +0 -0
  781. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/workspace-provider-v1alpha1.json +0 -0
  782. /package/{dsh-ecosystem-spec → tui-profile}/registry/host-descriptor.tui.example.json +0 -0
  783. /package/{dsh-ecosystem-spec → tui-profile}/registry/permissions-0.1.json +0 -0
  784. /package/{dsh-ecosystem-spec → tui-profile}/schemas/conformance-claim.schema.json +0 -0
  785. /package/{dsh-ecosystem-spec → tui-profile}/schemas/effect-ledger-record.schema.json +0 -0
  786. /package/{dsh-ecosystem-spec → tui-profile}/schemas/host-descriptor.schema.json +0 -0
@@ -3,11 +3,14 @@ import React from 'react';
3
3
  import { Box, Text, useInput, ScrollBox, useTerminalSize } from '../ui.js';
4
4
  import { t } from '../i18n.js';
5
5
  import { Divider } from './design-system/Divider.js';
6
- import { ExitButton } from './SubagentDashboard.js';
6
+ import { ExitButton, isPanelPlainReturn } from './SubagentDashboard.js';
7
7
  import { isPlainReturnInput } from '../utils/modifiers.js';
8
8
  import { toolNameColor } from './messages/AssistantToolUseMessage.js';
9
+ import { Markdown } from './Markdown.js';
9
10
  import { getCliHighlightPromise } from '../terminal-utils/cliHighlight.js';
10
- import { isMinimalMode } from '../minimalMode.js';
11
+ import { isMinimalUiMode } from '../minimalUiMode.js';
12
+ import { usePanelInput } from './sidePanel/usePanelInput.js';
13
+ import { THINKING_SETTLED_MARKER } from '../terminal-utils/figures.js';
11
14
  function formatDuration(ms) {
12
15
  if (ms < 1000)
13
16
  return `${ms}ms`;
@@ -21,16 +24,16 @@ function formatTimestamp(ts) {
21
24
  return new Date(ts).toLocaleTimeString();
22
25
  }
23
26
  function statusGlyph(status) {
24
- const minimal = isMinimalMode();
27
+ const minimalUi = isMinimalUiMode();
25
28
  if (status === 'completed')
26
- return { glyph: minimal ? '✓' : '🟢', color: minimal ? undefined : 'success', label: 'done' };
29
+ return { glyph: minimalUi ? '✓' : '🟢', color: minimalUi ? undefined : 'success', label: 'done' };
27
30
  if (status === 'failed')
28
- return { glyph: minimal ? '×' : '🔴', color: minimal ? undefined : 'error', label: 'failed' };
31
+ return { glyph: minimalUi ? '×' : '🔴', color: minimalUi ? undefined : 'error', label: 'failed' };
29
32
  if (status === 'cancelled')
30
- return { glyph: minimal ? '×' : '🔴', color: minimal ? undefined : 'error', label: 'cancelled' };
33
+ return { glyph: minimalUi ? '×' : '🔴', color: minimalUi ? undefined : 'error', label: 'cancelled' };
31
34
  if (status === 'unknown')
32
- return { glyph: minimal ? '·' : '⚪', color: minimal ? undefined : 'subtle', label: 'history' };
33
- return { glyph: minimal ? '·' : '🟡', color: minimal ? undefined : 'warning', label: 'running' };
35
+ return { glyph: minimalUi ? '·' : '⚪', color: minimalUi ? undefined : 'subtle', label: 'history' };
36
+ return { glyph: minimalUi ? '·' : '🟡', color: minimalUi ? undefined : 'warning', label: 'running' };
34
37
  }
35
38
  const PAGES = ['summary', 'output', 'tools'];
36
39
  /** One label/value row of the summary stats card. */
@@ -67,6 +70,39 @@ function JsonArgsText({ raw }) {
67
70
  return _jsx(Text, { wrap: "wrap", children: highlighted });
68
71
  return _jsx(Text, { dimColor: true, wrap: "wrap", children: flat });
69
72
  }
73
+ function groupOutputEvents(events) {
74
+ const blocks = [];
75
+ for (const line of events) {
76
+ if (line.kind === 'thinking') {
77
+ const last = blocks[blocks.length - 1];
78
+ if (last !== undefined && last.kind === 'thinking')
79
+ last.lines.push(line);
80
+ else
81
+ blocks.push({ kind: 'thinking', lines: [line] });
82
+ continue;
83
+ }
84
+ // Consecutive prose lines are ONE markdown document: without the fold a
85
+ // `**bold**` line, its list items and its paragraph break would render as
86
+ // raw syntax separated by blank rows. Activity pointers and tool/error
87
+ // rows stay independent single lines.
88
+ if (line.kind === 'text' && !isActivityLine(line.text)) {
89
+ const last = blocks[blocks.length - 1];
90
+ if (last !== undefined && last.kind === 'prose')
91
+ last.lines.push(line);
92
+ else
93
+ blocks.push({ kind: 'prose', lines: [line] });
94
+ continue;
95
+ }
96
+ blocks.push({ kind: 'line', line });
97
+ }
98
+ return blocks;
99
+ }
100
+ /** The child's own status line reaches us as a text delta (\`⏵ reading …\`);
101
+ * it is activity, not prose, so it renders as a dim pointer row. */
102
+ const ACTIVITY_GLYPHS = ['⏵', '▶', '▸', '»'];
103
+ function isActivityLine(text) {
104
+ return ACTIVITY_GLYPHS.includes(text.trimStart().slice(0, 1));
105
+ }
70
106
  /**
71
107
  * SubagentDetailScene — full-screen paged detail view for one subagent.
72
108
  * Header block (identity + stats) stays fixed; the body pages through
@@ -74,7 +110,8 @@ function JsonArgsText({ raw }) {
74
110
  * seam only accepts continuable children, and one-shot spawn children are
75
111
  * disposed at settlement, so the affordance would be a dead control.
76
112
  */
77
- export function SubagentDetailScene({ subagent, onBack, onInterrupt, }) {
113
+ export function SubagentDetailScene({ subagent, onBack, onInterrupt, variant = 'default', focused = true, visible = true, }) {
114
+ const panelMode = variant === 'panel';
78
115
  const scrollRef = React.useRef(null);
79
116
  const { rows, columns } = useTerminalSize();
80
117
  const [page, setPage] = React.useState('summary');
@@ -86,6 +123,27 @@ export function SubagentDetailScene({ subagent, onBack, onInterrupt, }) {
86
123
  const info = statusGlyph(subagent.status);
87
124
  const totalTokens = subagent.tokens?.total ?? ((subagent.tokens?.input ?? 0) + (subagent.tokens?.output ?? 0) || 0);
88
125
  const pageIndex = PAGES.indexOf(page);
126
+ /** Folded reasoning runs (the transcript's thinking grammar). Enter flips
127
+ * every run at once so one key stays predictable across thought steps. */
128
+ const [thinkingOpen, setThinkingOpen] = React.useState(false);
129
+ const blocks = groupOutputEvents(subagent.outputEvents);
130
+ const hasThinking = blocks.some(block => block.kind === 'thinking');
131
+ const settled = !isRunning;
132
+ // The deliverable is the LAST prose block: a `── Conclusion ──` rule goes in
133
+ // front of it once the run settles, so the answer is never the last line of
134
+ // a wall of reasoning.
135
+ const answerBlock = (() => {
136
+ if (!settled)
137
+ return -1;
138
+ for (let i = blocks.length - 1; i >= 0; i--) {
139
+ const block = blocks[i];
140
+ if (block.kind === 'prose' && block.lines.some(p => p.text.trim() !== ''))
141
+ return i;
142
+ if (block.kind === 'line' && block.line.kind === 'text' && block.line.text.trim() !== '')
143
+ return i;
144
+ }
145
+ return -1;
146
+ })();
89
147
  const turnPage = (delta) => {
90
148
  const next = (pageIndex + delta + PAGES.length) % PAGES.length;
91
149
  setPage(PAGES[next]);
@@ -94,6 +152,17 @@ export function SubagentDetailScene({ subagent, onBack, onInterrupt, }) {
94
152
  // tail -f: while the subagent runs and the output page is showing, follow
95
153
  // the newest streamed line. Page switches or settlement stop the follow so
96
154
  // manual ↑ scrolling wins.
155
+ // Expanding the reasoning grows the box past its viewport, and the renderer
156
+ // then treats the growth as "was at bottom" (maxScroll was 0 while the folded
157
+ // body fit) and re-pins the view to the bottom — pushing the fold header out
158
+ // of sight. Re-anchor AFTER that frame: the first immediate lands behind the
159
+ // renderer's own scheduling, and the second behind the re-pin frame it caused.
160
+ React.useEffect(() => {
161
+ if (page !== 'output')
162
+ return;
163
+ const first = setImmediate(() => scrollRef.current?.scrollTo?.(0));
164
+ return () => clearImmediate(first);
165
+ }, [thinkingOpen, page]);
97
166
  const outputLength = subagent.outputEvents.length;
98
167
  React.useEffect(() => {
99
168
  if (page !== 'output' || !isRunning)
@@ -101,6 +170,8 @@ export function SubagentDetailScene({ subagent, onBack, onInterrupt, }) {
101
170
  scrollRef.current?.scrollToBottom();
102
171
  }, [page, isRunning, outputLength]);
103
172
  useInput((input, key, event) => {
173
+ if (panelMode)
174
+ return;
104
175
  if (key.escape || (key.ctrl && input === 'c')) {
105
176
  event.stopImmediatePropagation();
106
177
  onBack();
@@ -133,15 +204,91 @@ export function SubagentDetailScene({ subagent, onBack, onInterrupt, }) {
133
204
  }
134
205
  if (isPlainReturnInput(input, key)) {
135
206
  event.stopImmediatePropagation();
136
- onBack();
207
+ // Enter folds the reasoning while the output page is showing (the
208
+ // transcript's ctrl+o equivalent). Elsewhere it keeps its "leave the
209
+ // detail" meaning, which Esc and the ✕ button still provide.
210
+ if (page === 'output' && hasThinking)
211
+ setThinkingOpen(open => !open);
212
+ else
213
+ onBack();
137
214
  return;
138
215
  }
139
216
  event.stopImmediatePropagation();
140
- });
217
+ }, { isActive: !panelMode });
218
+ // Panel form(v2.1 键盘契约):这一层自己吃掉整个业务键面。Esc/Ctrl+C 必须
219
+ // 返回 true —— Detail → Dashboard 是面板内部的一级,绝不能落给宿主(宿主
220
+ // 的 Esc 回退是「焦点回聊天」)。其余未认的键返回 false,让 [/]、数字、
221
+ // z、+/- 继续可用。
222
+ const panelKeyHandler = (input, key) => {
223
+ if (key.escape === true || (key.ctrl === true && input === 'c')) {
224
+ onBack();
225
+ return true;
226
+ }
227
+ if (key.leftArrow === true) {
228
+ turnPage(-1);
229
+ return true;
230
+ }
231
+ if (key.rightArrow === true) {
232
+ turnPage(1);
233
+ return true;
234
+ }
235
+ if (key.upArrow === true) {
236
+ scrollRef.current?.scrollBy(-3);
237
+ return true;
238
+ }
239
+ if (key.downArrow === true) {
240
+ scrollRef.current?.scrollBy(3);
241
+ return true;
242
+ }
243
+ if (input.toLowerCase() === 'x' && isRunning && onInterrupt !== undefined) {
244
+ onInterrupt(subagent.agentId);
245
+ return true;
246
+ }
247
+ if (isPanelPlainReturn(input, key)) {
248
+ // Enter 与整屏形态同义:输出页有思考块时先折叠它,别处退回 Dashboard。
249
+ if (page === 'output' && hasThinking)
250
+ setThinkingOpen(open => !open);
251
+ else
252
+ onBack();
253
+ return true;
254
+ }
255
+ return false;
256
+ };
257
+ usePanelInput(panelKeyHandler, { active: panelMode && focused && visible });
141
258
  const tab = (name, label) => {
142
259
  const active = page === name;
143
260
  return (_jsxs(React.Fragment, { children: [_jsx(Box, { onClick: () => setPage(name), backgroundColor: !active ? 'userMessageBackgroundHover' : undefined, children: _jsx(Text, { color: active ? 'accent' : undefined, bold: active, inverse: active, children: ` ${label} ` }) }), _jsx(Text, { dimColor: true, children: name === PAGES[PAGES.length - 1] ? '' : '│' })] }, name));
144
261
  };
145
- return (_jsxs(Box, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsx(Text, { color: info.color, bold: true, children: info.glyph }), _jsx(Text, { bold: true, children: `${t('subagent-card-prefix')}${subagent.description}` }), _jsx(Text, { dimColor: true, children: "\u00B7" }), _jsx(Text, { color: info.color, children: info.label }), _jsx(Box, { flexGrow: 1 }), _jsx(ExitButton, { onClick: onBack })] }), _jsxs(Text, { children: [_jsx(Text, { children: subagent.model ?? subagent.provider ?? 'default' }), _jsxs(Text, { dimColor: true, children: [elapsed !== undefined ? ` · ${formatDuration(elapsed)} · ` : ' · ', totalTokens || '—', " tok \u00B7 ", subagent.toolCalls.length, " tools"] })] }), _jsxs(Text, { dimColor: true, children: [`${t('subagent-started')} ${formatTimestamp(subagent.startedAt)}`
146
- + (subagent.completedAt ? ` · ${t('subagent-completed')} ${formatTimestamp(subagent.completedAt)}` : ''), ` · id ${subagent.agentId}`] }), subagent.error && (_jsx(Box, { marginTop: 0, children: _jsx(Text, { color: "error", wrap: "wrap", children: `${t('subagent-error-label')}: ${subagent.error}` }) })), _jsxs(Box, { flexDirection: "row", gap: 0, marginTop: 1, children: [tab('summary', t('subagent-tab-summary')), tab('output', t('subagent-output-label')), tab('tools', t('subagent-tools')), _jsx(Text, { dimColor: true, children: ` ${pageIndex + 1}/${PAGES.length}` })] }), _jsx(Text, { dimColor: true, children: '─'.repeat(Math.max(20, Math.min(72, columns - 6))) }), _jsx(Box, { flexDirection: "column", paddingX: 1, maxHeight: Math.max(10, rows - 14), children: _jsxs(ScrollBox, { ref: scrollRef, flexDirection: "column", flexGrow: 1, children: [page === 'summary' && (_jsxs(Box, { flexDirection: "column", children: [_jsx(StatGrid, { subagent: subagent, totalTokens: totalTokens, elapsed: elapsed, statusLabel: info.label, statusColor: info.color }), subagent.summary && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { dimColor: true, bold: true, children: '─ summary ' }), _jsx(Text, { wrap: "wrap", children: subagent.summary })] })), !subagent.summary && (_jsx(Text, { dimColor: true, children: isRunning ? t('subagent-no-output') : t('subagent-no-summary') }))] })), page === 'output' && (subagent.outputEvents.length === 0 && subagent.output.length === 0 ? (_jsx(Text, { dimColor: true, children: t('subagent-no-output') })) : (subagent.outputEvents.map((line, index) => (_jsxs(Text, { wrap: "wrap", dimColor: line.kind === 'thinking' || line.kind === 'system', color: line.kind === 'error' ? 'error' : undefined, children: [line.kind === 'thinking' ? ' ⌁ ' : ' ', line.text, !line.settled && isRunning ? ' ▍' : ''] }, index))))), page === 'tools' && (subagent.toolCalls.length === 0 ? (_jsx(Text, { dimColor: true, children: t('subagent-no-tools') })) : (subagent.toolCalls.map((tool, index) => (_jsxs(Box, { flexDirection: "column", marginTop: index === 0 ? 0 : 1, children: [_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsx(Text, { color: tool.status === 'failed' ? 'error' : tool.status === 'running' ? 'warning' : 'success', children: tool.status === 'running' ? '·' : tool.status === 'failed' ? '×' : '✓' }), _jsx(Text, { color: toolNameColor(tool.name), children: tool.name }), tool.endedAt && _jsx(Text, { dimColor: true, children: formatDuration(tool.endedAt - tool.startedAt) })] }), tool.argsPreview && (_jsx(Box, { flexDirection: "row", paddingLeft: 2, children: _jsx(JsonArgsText, { raw: tool.argsPreview }) })), tool.resultPreview && (_jsx(Box, { flexDirection: "row", paddingLeft: 2, children: _jsx(Text, { dimColor: true, wrap: "wrap", children: `⎿ ${tool.resultPreview}` }) })), tool.error && (_jsx(Box, { flexDirection: "row", paddingLeft: 2, children: _jsx(Text, { color: "error", wrap: "wrap", children: tool.error }) }))] }, tool.id ?? index)))))] }) }), _jsx(Divider, { color: "subtle", title: "" }), _jsxs(Box, { marginTop: 0, flexDirection: "row", children: [_jsx(Text, { dimColor: true, children: `←/→ ${t('subagent-hint-page')} · ↑/↓ ${t('subagent-hint-scroll')}` }), isRunning && onInterrupt && (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: ' · ' }), _jsx(Box, { onClick: () => onInterrupt(subagent.agentId), children: _jsx(Text, { dimColor: true, bold: true, color: "warning", children: "X interrupt" }) })] })), _jsx(Text, { dimColor: true, children: ` · Esc ${t('subagent-hint-back')}` })] })] }));
262
+ // 外层留白:整屏形态保持原样;侧栏形态只留左右各 1 格(PanelBar 与宿主
263
+ // 提示行已经承担其余 chrome)。
264
+ const outer = panelMode
265
+ ? { paddingLeft: 1, paddingRight: 1, paddingTop: 0 }
266
+ : { paddingX: 2, paddingY: 1 };
267
+ return (_jsxs(Box, { flexDirection: "column", ...outer, children: [_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsx(Text, { color: info.color, bold: true, children: info.glyph }), _jsx(Text, { bold: true, children: `${t('subagent-card-prefix')}${subagent.description}` }), _jsx(Text, { dimColor: true, children: "\u00B7" }), _jsx(Text, { color: info.color, children: info.label }), subagent.mode === 'continuable' && _jsx(Text, { color: "warning", children: t('subagent-mode-continuable') }), subagent.mode === 'one-shot' && _jsx(Text, { dimColor: true, children: t('subagent-mode-one-shot') }), _jsx(Box, { flexGrow: 1 }), _jsx(ExitButton, { onClick: onBack })] }), _jsxs(Text, { children: [_jsx(Text, { children: subagent.model ?? subagent.provider ?? 'default' }), _jsxs(Text, { dimColor: true, children: [elapsed !== undefined ? ` · ${formatDuration(elapsed)} · ` : ' · ', totalTokens || '—', " tok \u00B7 ", subagent.toolCalls.length, " tools"] })] }), _jsxs(Text, { dimColor: true, children: [`${t('subagent-started')} ${formatTimestamp(subagent.startedAt)}`
268
+ + (subagent.completedAt ? ` · ${t('subagent-completed')} ${formatTimestamp(subagent.completedAt)}` : ''), ` · id ${subagent.agentId.slice(0, 8)}`] }), subagent.error && (_jsx(Box, { marginTop: 0, children: _jsx(Text, { color: "error", wrap: "wrap", children: `${t('subagent-error-label')}: ${subagent.error}` }) })), _jsxs(Box, { flexDirection: "row", gap: 0, marginTop: 1, children: [tab('summary', t('subagent-tab-summary')), tab('output', subagent.outputEvents.length > 0 ? `${t('subagent-output-label')} ${subagent.outputEvents.length}` : t('subagent-output-label')), tab('tools', subagent.toolCalls.length > 0 ? `${t('subagent-tools')} ${subagent.toolCalls.length}` : t('subagent-tools')), _jsx(Text, { dimColor: true, children: ` ${pageIndex + 1}/${PAGES.length}` })] }), _jsx(Text, { dimColor: true, children: '─'.repeat(Math.max(20, Math.min(72, columns - 6))) }), _jsx(Box, { flexDirection: "column", paddingX: 1, maxHeight: panelMode ? Math.max(6, rows - 10) : Math.max(10, rows - 14), children: _jsxs(ScrollBox, { ref: scrollRef, flexDirection: "column", flexGrow: 1, children: [page === 'summary' && (_jsxs(Box, { flexDirection: "column", children: [_jsx(StatGrid, { subagent: subagent, totalTokens: totalTokens, elapsed: elapsed, statusLabel: info.label, statusColor: info.color }), subagent.summary && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { dimColor: true, bold: true, children: '─ summary ' }), _jsx(Text, { wrap: "wrap", children: subagent.summary })] })), !subagent.summary && (_jsx(Text, { dimColor: true, children: isRunning ? t('subagent-no-output') : t('subagent-no-summary') }))] })), page === 'output' && (subagent.outputEvents.length === 0 && subagent.output.length === 0 ? (_jsx(Text, { dimColor: true, children: t('subagent-no-output') })) : (blocks.map((block, index) => {
269
+ if (block.kind === 'thinking') {
270
+ const text = block.lines.map(line => line.text).join('\n');
271
+ const chars = text.replace(/\s+/g, '').length;
272
+ const label = `${THINKING_SETTLED_MARKER} ${t('subagent-thinking-fold', { count: block.lines.length, chars })}`;
273
+ const hint = thinkingOpen ? t('subagent-thinking-collapse') : t('subagent-thinking-expand');
274
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { italic: true, dimColor: true, children: `${label} · ${hint}` }), thinkingOpen ? (_jsx(Box, { flexDirection: "column", paddingLeft: 2, children: block.lines.map((line, i) => (_jsx(Text, { dimColor: true, italic: true, wrap: "wrap", children: line.text }, i))) })) : (_jsx(Text, { dimColor: true, italic: true, wrap: "truncate-end", children: ` ${block.lines[0]?.text.replace(/\s+/g, ' ').trim() ?? ''}` }))] }, `think-${index}`));
275
+ }
276
+ if (block.kind === 'prose') {
277
+ const proseText = block.lines.map(p => p.text).join('\n');
278
+ const proseUnsettled = isRunning && block.lines.some(p => p.settled === false);
279
+ const isProseAnswer = index === answerBlock;
280
+ return (_jsxs(Box, { flexDirection: "column", marginTop: index === 0 ? 0 : 1, children: [isProseAnswer && (_jsx(Text, { dimColor: true, children: `── ${t('subagent-conclusion')} ${'─'.repeat(Math.max(8, Math.min(60, columns - 16)))}` })), _jsx(Markdown, { dimColor: false, cacheTokens: true, children: proseText }), proseUnsettled && _jsx(Text, { dimColor: true, children: '▌' })] }, `prose-${index}`));
281
+ }
282
+ const line = block.line;
283
+ const unsettled = !line.settled && isRunning ? ' ▍' : '';
284
+ if (line.kind === 'text' && isActivityLine(line.text)) {
285
+ return (_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsx(Text, { color: "accent", children: '⏵' }), _jsxs(Text, { dimColor: true, wrap: "truncate-end", children: [line.text.replace(/^[\s⏵▶▸»]+/, ''), unsettled] })] }, `act-${index}`));
286
+ }
287
+ const isAnswer = index === answerBlock;
288
+ // Tool / error / system rows get a leading row gap so a wall
289
+ // of streamed rows stops reading as one cramped paragraph.
290
+ const rowGap = line.kind === 'tool' || line.kind === 'error' || line.kind === 'system';
291
+ return (_jsxs(Box, { flexDirection: "column", marginTop: rowGap && index !== 0 ? 1 : 0, children: [isAnswer && (_jsx(Text, { dimColor: true, children: `── ${t('subagent-conclusion')} ${'─'.repeat(Math.max(8, Math.min(60, columns - 16)))}` })), _jsxs(Text, { wrap: "wrap", bold: isAnswer, dimColor: line.kind === 'system', color: line.kind === 'error' ? 'error' : line.kind === 'tool' ? 'accent' : undefined, children: [line.kind === 'tool' ? `● ${line.text}` : line.text, unsettled] })] }, `line-${index}`));
292
+ }))), page === 'tools' && (subagent.toolCalls.length === 0 ? (_jsx(Text, { dimColor: true, children: t('subagent-no-tools') })) : (subagent.toolCalls.map((tool, index) => (_jsxs(Box, { flexDirection: "column", marginTop: index === 0 ? 0 : 1, children: [_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsx(Text, { color: tool.status === 'failed' ? 'error' : tool.status === 'running' ? 'warning' : 'success', children: tool.status === 'running' ? '·' : tool.status === 'failed' ? '×' : '✓' }), _jsx(Text, { color: toolNameColor(tool.name), children: tool.name }), tool.endedAt && _jsx(Text, { dimColor: true, children: formatDuration(tool.endedAt - tool.startedAt) })] }), tool.argsPreview && (_jsx(Box, { flexDirection: "row", paddingLeft: 2, children: _jsx(JsonArgsText, { raw: tool.argsPreview }) })), tool.resultPreview && (_jsx(Box, { flexDirection: "row", paddingLeft: 2, children: _jsx(Text, { dimColor: true, wrap: "wrap", children: `⎿ ${tool.resultPreview}` }) })), tool.error && (_jsx(Box, { flexDirection: "row", paddingLeft: 2, children: _jsx(Text, { color: "error", wrap: "wrap", children: tool.error }) }))] }, tool.id ?? index)))))] }) }), _jsx(Divider, { color: "subtle", title: "" }), _jsxs(Box, { marginTop: 0, flexDirection: "row", children: [_jsx(Text, { dimColor: true, children: `←/→ ${t('subagent-hint-page')} · ↑/↓ ${t('subagent-hint-scroll')}`
293
+ + (page === 'output' && hasThinking ? ` · ${t('subagent-hint-fold')}` : '') }), isRunning && onInterrupt && (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: ' · ' }), _jsx(Box, { onClick: () => onInterrupt(subagent.agentId), children: _jsx(Text, { dimColor: true, bold: true, color: "warning", children: "X interrupt" }) })] })), _jsx(Text, { dimColor: true, children: ` · Esc ${t('subagent-hint-back')}` })] })] }));
147
294
  }
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ /**
3
+ * How many columns a surface may "bleed" past its own box on each side
4
+ * (see the side-panel design doc §4.4). Structural chrome — page-level
5
+ * dividers, the transcript gutter — runs straight to the surface edge
6
+ * while content keeps its inset, the standard print-layout convention.
7
+ *
8
+ * PageMargin provides the default ({ left: x, right: x } of its inset).
9
+ * SidePanelLayout re-provides per column: the chat column may bleed left
10
+ * into the page margin but stops at the divider ({ left: x, right: 0 }),
11
+ * the panel column vice versa ({ left: 0, right: x }).
12
+ */
13
+ export interface SurfaceEdges {
14
+ readonly left: number;
15
+ readonly right: number;
16
+ }
17
+ export declare const NO_BLEED: SurfaceEdges;
18
+ export declare const SurfaceEdgesContext: React.Context<SurfaceEdges>;
19
+ /** Bleed allowance of the nearest surface (columns, per side). */
20
+ export declare function useSurfaceEdges(): SurfaceEdges;
21
+ //# sourceMappingURL=SurfaceEdges.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SurfaceEdges.d.ts","sourceRoot":"","sources":["../../../src/components/SurfaceEdges.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,eAAO,MAAM,QAAQ,EAAE,YAAmD,CAAA;AAE1E,eAAO,MAAM,mBAAmB,6BAA8C,CAAA;AAE9E,kEAAkE;AAClE,wBAAgB,eAAe,IAAI,YAAY,CAE9C"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export const NO_BLEED = Object.freeze({ left: 0, right: 0 });
3
+ export const SurfaceEdgesContext = React.createContext(NO_BLEED);
4
+ /** Bleed allowance of the nearest surface (columns, per side). */
5
+ export function useSurfaceEdges() {
6
+ return React.useContext(SurfaceEdgesContext);
7
+ }
@@ -14,6 +14,15 @@ export declare function getThemeOptions(themeHost?: TuiThemeHost): SelectOption[
14
14
  * three key color swatches; `❯` marks focus, `✓` the active theme. Enter
15
15
  * applies through the ThemeProvider setter (persists to ~/.dsh-tui/theme.json
16
16
  * and hot swaps), Esc cancels.
17
+ *
18
+ * 宽终端(≥ MIN_SIDE_BY_SIDE_COLUMNS 列)在列表右侧并排一列预览:用**焦点行**
19
+ * 主题的调色板实渲染代码块 + 代码操作工具卡 + diff(见 ThemePreviewPane)。
20
+ * 列表只有三个色块,挑主题时看不到语法色、diff 色与工具卡底色——预览让
21
+ * 「移动光标」就等于「试主题」,不必先 Enter 应用再后悔。键位语义不变
22
+ * (↑↓ 移焦点、Enter 应用、Esc 取消),预览只是同一焦点索引的另一种投影。
23
+ *
24
+ * 窄终端把预览堆叠在列表下方;高度预算不够时预览整块让位——浮层向上生长,
25
+ * 探出帧顶的行会被裁掉,宁可少画预览,也不能把列表顶出可视区(见 OverlayAbove)。
17
26
  */
18
27
  export declare function ThemePicker({ focusIndex, currentTheme, themeHost, onPick, }: {
19
28
  focusIndex: number;
@@ -1 +1 @@
1
- {"version":3,"file":"ThemePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ThemePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAIvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAqC5D;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAYxE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,YAAY,EACZ,SAAS,EACT,MAAM,GACP,EAAE;IACD,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,kEAAkE;IAClE,SAAS,CAAC,EAAE,YAAY,CAAA;IACxB;qDACiD;IACjD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACjC,GAAG,KAAK,CAAC,SAAS,CA2BlB"}
1
+ {"version":3,"file":"ThemePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ThemePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAMvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAiF5D;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAExE;AAgBD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,YAAY,EACZ,SAAS,EACT,MAAM,GACP,EAAE;IACD,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,kEAAkE;IAClE,SAAS,CAAC,EAAE,YAAY,CAAA;IACxB;qDACiD;IACjD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACjC,GAAG,KAAK,CAAC,SAAS,CA+DlB"}
@@ -1,16 +1,41 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { t } from '../i18n.js';
4
- import { Box, Text } from '../ui.js';
4
+ import { Box, Text, useTerminalSize } from '../ui.js';
5
5
  import { Pane } from './design-system/Pane.js';
6
6
  import { Select } from './Select.js';
7
7
  import { HintLine } from './design-system/HintLine.js';
8
+ import { ThemePreviewPane } from './ThemePreviewPane.js';
9
+ import { useOverlayListRows } from './OverlayAbove.js';
8
10
  import { listThemeCatalog } from '../themeCatalog.js';
9
11
  import { useRuntimeThemeSnapshot } from '../hooks/useRuntimeThemeSnapshot.js';
10
12
  /** One double-block swatch character per preview key, in a row. */
11
13
  const SWATCH = '██';
12
14
  /** Theme keys previewed in the picker, chosen for visual contrast. */
13
15
  const SWATCH_KEYS = ['accent', 'text', 'success'];
16
+ /** 列表窗口行数(Select visibleOptionCount)——也是堆叠布局里列表占的行数。 */
17
+ const LIST_ROWS = 6;
18
+ /**
19
+ * 面板自占的行数(不含列表/预览本体):Pane 的上边距 + 分隔线 2 行、标题 1 行、
20
+ * 标题下边距 1 行、底部提示 1 行。用来把浮层高度预算换算成"内容可用行数"。
21
+ */
22
+ const FRAME_ROWS = 5;
23
+ /**
24
+ * 并排布局的最小终端列数:Pane 左右各 2 列内边距后,列表列 ≥34 列、预览列
25
+ * ≥34 列、中间 2 列间隔。更窄时预览改为堆叠在列表下方(见 ThemePicker)。
26
+ */
27
+ const MIN_SIDE_BY_SIDE_COLUMNS = 76;
28
+ /** 预览列宽度区间:最窄 34 列(代码行 + 2 列缩进放得下),最宽 48 列后不再长胖。 */
29
+ const PREVIEW_MIN_COLUMNS = 34;
30
+ const PREVIEW_MAX_COLUMNS = 48;
31
+ /** 预览少于这个行数就整块不画:画半张工具卡比不画更难看,还白占浮层高度。 */
32
+ const PREVIEW_MIN_ROWS = 5;
33
+ /**
34
+ * 堆叠布局里列表真实占的行数:每项 2 行(label + 描述),窗口最多 LIST_ROWS 项,
35
+ * 另留 2 行给描述换行与滚动箭头。**不能按 LIST_ROWS 算**——浮层的溢出方向是
36
+ * 从顶部裁,少算的每一行都会把列表本身顶出可视区(verify-theme-preview 的 F 组)。
37
+ */
38
+ const LIST_RESERVE_ROWS = 2 * LIST_ROWS + 2;
14
39
  function swatches(theme) {
15
40
  return (_jsx(_Fragment, { children: SWATCH_KEYS.map(key => (_jsx(Text, { color: theme[key], children: SWATCH }, key))) }));
16
41
  }
@@ -22,13 +47,9 @@ function optionFor(name, displayName, theme, description) {
22
47
  description,
23
48
  };
24
49
  }
25
- /**
26
- * Build the full selectable list from the shared catalog: `auto`, built-ins,
27
- * static JSON themes, and optional plugin themes. Shared by ThemePicker (render)
28
- * and the /theme command (focus index), so both always see the same ordering.
29
- */
30
- export function getThemeOptions(themeHost) {
31
- return listThemeCatalog(themeHost).map(item => {
50
+ /** 目录条目 → 选择行。列表渲染与焦点预览读同一份条目,顺序不可能分叉。 */
51
+ function optionsFrom(entries) {
52
+ return entries.map(item => {
32
53
  const base = item.base ?? 'dark';
33
54
  const description = item.source === 'auto'
34
55
  ? t('theme-auto-base')
@@ -40,6 +61,24 @@ export function getThemeOptions(themeHost) {
40
61
  return optionFor(item.name, item.displayName, item.theme, description);
41
62
  });
42
63
  }
64
+ /**
65
+ * Build the full selectable list from the shared catalog: `auto`, built-ins,
66
+ * static JSON themes, and optional plugin themes. Shared by ThemePicker (render)
67
+ * and the /theme command (focus index), so both always see the same ordering.
68
+ */
69
+ export function getThemeOptions(themeHost) {
70
+ return optionsFrom(listThemeCatalog(themeHost));
71
+ }
72
+ /**
73
+ * 并排时的列表列/预览列宽度。预览先按内容宽度的 45% 取(钳在 34–48 列),
74
+ * 剩下的留给列表——列表永远比预览宽,且宽终端上 `auto` 那条最长的描述行
75
+ * 仍能整行显示(100 列时列表 51 列,描述 47 列)。再宽预览也不再长胖,
76
+ * 免得工具卡底色带拉成一条长横幅。
77
+ */
78
+ function columnsFor(contentColumns) {
79
+ const preview = Math.min(PREVIEW_MAX_COLUMNS, Math.max(PREVIEW_MIN_COLUMNS, Math.floor(contentColumns * 0.45)));
80
+ return { list: Math.max(contentColumns - preview - 2, PREVIEW_MIN_COLUMNS), preview };
81
+ }
43
82
  /**
44
83
  * Color-theme picker in the ActivityPicker style: a permission-colored Pane
45
84
  * listing the `auto` pseudo-theme and built-in palettes first, followed by
@@ -47,9 +86,34 @@ export function getThemeOptions(themeHost) {
47
86
  * three key color swatches; `❯` marks focus, `✓` the active theme. Enter
48
87
  * applies through the ThemeProvider setter (persists to ~/.dsh-tui/theme.json
49
88
  * and hot swaps), Esc cancels.
89
+ *
90
+ * 宽终端(≥ MIN_SIDE_BY_SIDE_COLUMNS 列)在列表右侧并排一列预览:用**焦点行**
91
+ * 主题的调色板实渲染代码块 + 代码操作工具卡 + diff(见 ThemePreviewPane)。
92
+ * 列表只有三个色块,挑主题时看不到语法色、diff 色与工具卡底色——预览让
93
+ * 「移动光标」就等于「试主题」,不必先 Enter 应用再后悔。键位语义不变
94
+ * (↑↓ 移焦点、Enter 应用、Esc 取消),预览只是同一焦点索引的另一种投影。
95
+ *
96
+ * 窄终端把预览堆叠在列表下方;高度预算不够时预览整块让位——浮层向上生长,
97
+ * 探出帧顶的行会被裁掉,宁可少画预览,也不能把列表顶出可视区(见 OverlayAbove)。
50
98
  */
51
99
  export function ThemePicker({ focusIndex, currentTheme, themeHost, onPick, }) {
52
100
  const runtimeThemeSnapshot = useRuntimeThemeSnapshot(themeHost);
53
- const options = React.useMemo(() => getThemeOptions(themeHost), [runtimeThemeSnapshot, themeHost]);
54
- return (_jsx(Pane, { color: "permission", children: _jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "remember", bold: true, children: t('picker-title-theme') }) }), _jsx(Select, { options: options, focusIndex: focusIndex, selectedValue: currentTheme, visibleOptionCount: 6, onPick: onPick ? index => onPick(index) : undefined }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: t('hint-confirm-exit') }) })] }) }));
101
+ // 目录只读一次:列表行与预览抬头/调色板同源,焦点索引在两边的含义必然一致。
102
+ const entries = React.useMemo(() => listThemeCatalog(themeHost), [runtimeThemeSnapshot, themeHost]);
103
+ const options = React.useMemo(() => optionsFrom(entries), [entries]);
104
+ const { columns } = useTerminalSize();
105
+ const contentColumns = Math.max(columns - 4, 1);
106
+ const sideBySide = columns >= MIN_SIDE_BY_SIDE_COLUMNS;
107
+ const { list: listColumns, preview: previewColumns } = columnsFor(contentColumns);
108
+ // 浮层给内容的总行数。并排时预览只占列表旁边的列,面板高度仍是
109
+ // max(列表, 预览)——预览比列表矮就一分高度都不加,所以直接吃满预算;
110
+ // 堆叠时预览是**加在列表下面**的净增量,必须先扣掉列表真实占的行数和
111
+ // 那 1 行间隔,否则多出来的预览会把列表顶出浮层(溢出从顶部裁)。
112
+ const contentRows = useOverlayListRows(FRAME_ROWS);
113
+ const previewRows = sideBySide ? contentRows : contentRows - LIST_RESERVE_ROWS - 1;
114
+ const focused = entries[focusIndex] ?? entries[0];
115
+ const preview = focused !== undefined && previewRows >= PREVIEW_MIN_ROWS
116
+ ? (_jsx(ThemePreviewPane, { entry: focused, rows: previewRows, width: sideBySide ? previewColumns : contentColumns }))
117
+ : undefined;
118
+ return (_jsxs(Pane, { color: "permission", children: [_jsxs(Box, { flexDirection: sideBySide ? 'row' : 'column', children: [_jsxs(Box, { flexDirection: "column", width: sideBySide ? listColumns : undefined, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "remember", bold: true, children: t('picker-title-theme') }) }), _jsx(Select, { options: options, focusIndex: focusIndex, selectedValue: currentTheme, visibleOptionCount: LIST_ROWS, onPick: onPick ? index => onPick(index) : undefined }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: t('hint-confirm-exit') }) })] }), sideBySide && preview !== undefined && (_jsx(Box, { flexDirection: "column", marginLeft: 2, width: previewColumns, children: preview }))] }), !sideBySide && preview !== undefined && (_jsx(Box, { flexDirection: "column", marginTop: 1, children: preview }))] }));
55
119
  }
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import type { ThemeCatalogEntry } from '../themeCatalog.js';
3
+ /**
4
+ * `/theme` 右列的预览面板:用**被预览主题**的调色板(而不是当前生效主题)
5
+ * 实渲染一段语法高亮代码块、一张代码操作工具卡和三行 diff。
6
+ *
7
+ * 为什么要有它:列表行只有 accent/text/success 三个色块,挑主题时看不到
8
+ * 语法色(syntax*)、diff 色(diffAdded/diffRemoved)和工具卡底色
9
+ * (toolCard 族/toolDot 族)——而那才是每天盯着的部分。预览跟随焦点行,移动
10
+ * 光标即可比较,不必先 Enter 应用再后悔。
11
+ *
12
+ * 颜色全部走**显式色值**:调色板里的 hex/`ansi:` 值经 ThemedText/ThemedBox
13
+ * 的 resolveColor 原样透传(那里只解析主题键名),于是预览列抹的是候选主题
14
+ * 的色,而外层列表仍是当前主题——不需要给 design-system 加调色板覆盖层。
15
+ * 同理这里一律不写 `dimColor`:ThemedText 的 dimColor 会盖掉传入的 color,
16
+ * 把候选色换成**当前主题**的 inactive。
17
+ */
18
+ export declare function ThemePreviewPane({ entry, rows, width, }: {
19
+ /** 焦点行主题(目录条目自带已解析的完整调色板)。 */
20
+ entry: ThemeCatalogEntry;
21
+ /** 预览列可用行数(已按浮层高度预算钳过);装不下的块从底部裁掉。 */
22
+ rows: number;
23
+ /** 预览列宽度(终端列数):抬头主题名与跟随提示按它截断,不换行。 */
24
+ width: number;
25
+ }): React.ReactNode;
26
+ //# sourceMappingURL=ThemePreviewPane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemePreviewPane.d.ts","sourceRoot":"","sources":["../../../src/components/ThemePreviewPane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAiB3D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,IAAI,EACJ,KAAK,GACN,EAAE;IACD,8BAA8B;IAC9B,KAAK,EAAE,iBAAiB,CAAA;IACxB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,KAAK,CAAC,SAAS,CA0ElB"}
@@ -0,0 +1,99 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { t } from '../i18n.js';
4
+ import { Box, Text } from '../ui.js';
5
+ import { buildSyntaxTheme } from '../terminal-utils/syntaxTheme.js';
6
+ import { getCliHighlightPromise } from '../terminal-utils/cliHighlight.js';
7
+ import { stringWidth } from '../ink/stringWidth.js';
8
+ import { truncateMiddle } from '../utils/truncateMiddle.js';
9
+ /**
10
+ * 调色板键 → 渲染原语接受的显式色值:Theme 的值是宽松 string(hex 或
11
+ * `ansi:<name>`),而 Text/Box 的 color 联合类型要 Color。与 ThemePicker 的
12
+ * swatches 同一个断言(`theme[key] as Color`)——resolveColor 对 `#`/`rgb(`/
13
+ * `ansi256(`/`ansi:` 前缀原样透传,所以候选主题的色不会被当前主题改写。
14
+ */
15
+ function ink(color) {
16
+ return color;
17
+ }
18
+ /**
19
+ * `/theme` 右列的预览面板:用**被预览主题**的调色板(而不是当前生效主题)
20
+ * 实渲染一段语法高亮代码块、一张代码操作工具卡和三行 diff。
21
+ *
22
+ * 为什么要有它:列表行只有 accent/text/success 三个色块,挑主题时看不到
23
+ * 语法色(syntax*)、diff 色(diffAdded/diffRemoved)和工具卡底色
24
+ * (toolCard 族/toolDot 族)——而那才是每天盯着的部分。预览跟随焦点行,移动
25
+ * 光标即可比较,不必先 Enter 应用再后悔。
26
+ *
27
+ * 颜色全部走**显式色值**:调色板里的 hex/`ansi:` 值经 ThemedText/ThemedBox
28
+ * 的 resolveColor 原样透传(那里只解析主题键名),于是预览列抹的是候选主题
29
+ * 的色,而外层列表仍是当前主题——不需要给 design-system 加调色板覆盖层。
30
+ * 同理这里一律不写 `dimColor`:ThemedText 的 dimColor 会盖掉传入的 color,
31
+ * 把候选色换成**当前主题**的 inactive。
32
+ */
33
+ export function ThemePreviewPane({ entry, rows, width, }) {
34
+ const palette = entry.theme;
35
+ const [highlight, setHighlight] = React.useState(null);
36
+ React.useEffect(() => {
37
+ let alive = true;
38
+ // cli-highlight 是懒加载的(与 markdown.ts 的 fenced code 同一条路径):
39
+ // 首帧先上纯文本,加载完成后原位补色——不为预览阻塞浮层打开,也不改
40
+ // 代码块在转录里的首帧行为。
41
+ void getCliHighlightPromise().then((loaded) => {
42
+ if (alive)
43
+ setHighlight(loaded);
44
+ });
45
+ return () => {
46
+ alive = false;
47
+ };
48
+ }, []);
49
+ const codeLines = React.useMemo(() => {
50
+ const plain = SAMPLE_CODE.split('\n');
51
+ if (highlight === null)
52
+ return plain;
53
+ try {
54
+ return highlight
55
+ .highlight(SAMPLE_CODE, { language: 'typescript', theme: buildSyntaxTheme(palette) })
56
+ .replace(/\n+$/u, '')
57
+ .split('\n');
58
+ }
59
+ catch {
60
+ // 高亮抛错(语言表缺失等)只降级为纯文本,绝不把浮层带崩。
61
+ return plain;
62
+ }
63
+ }, [highlight, palette]);
64
+ const label = t('theme-preview-title');
65
+ const name = truncateMiddle(entry.displayName, Math.max(width - stringWidth(label) - 4, 4));
66
+ const body = [
67
+ _jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: ink(palette.accent), bold: true, children: label }), _jsx(Text, { color: ink(palette.subtle), children: ' · ' }), _jsx(Text, { color: ink(palette.text), children: name })] }, "head"),
68
+ _jsx(Text, { color: ink(palette.subtle), children: truncateMiddle(t('theme-preview-follow'), Math.max(width, 1)) }, "follow"),
69
+ _jsx(Text, { color: ink(palette.subtle), children: '```ts' }, "fence"),
70
+ ...codeLines.map((line, index) => (_jsx(Text, { children: `${CODE_INDENT}${line}` }, `code-${index}`))),
71
+ _jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: ink(palette.toolDotWrite), children: '● ' }), _jsx(Text, { color: ink(palette.toolNameMutate), children: 'Write' }), _jsx(Text, { color: ink(palette.subtle), children: ' src/theme.ts' })] }, "card"),
72
+ ...SAMPLE_DIFF.map((row, index) => (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: ink(row.tone === 'add' ? palette.diffAddedWord : palette.diffRemovedWord), children: index === 0 ? GUTTER_FIRST : GUTTER_REST }), _jsx(Text, { color: ink(row.tone === 'add' ? palette.diffAddedWord : palette.diffRemovedWord), children: row.text })] }, `diff-${index}`))),
73
+ ];
74
+ // 行预算是硬约束:浮层向上生长且探出帧顶的行会被裁掉,超出预算的块宁可
75
+ // 不画,也不能把上方的主题列表顶出可视区。
76
+ const shown = body.slice(0, Math.max(rows, 0));
77
+ if (shown.length === 0)
78
+ return null;
79
+ return _jsx(Box, { flexDirection: "column", children: shown });
80
+ }
81
+ /** 预览代码块示例:每行 ≤ 30 列(最窄的预览列 34 列,留 2 列缩进),同时覆盖
82
+ * 注释/关键字/字符串/类型四类 token,语法色的差异一眼可见。 */
83
+ const SAMPLE_CODE = [
84
+ '// dsh-tui palette',
85
+ "const theme = pick('dark')",
86
+ 'type Swatch = { hex: string }',
87
+ ].join('\n');
88
+ /** 代码操作工具卡的示例 diff:一行删除 + 两行新增,覆盖 diffRemoved/diffAdded
89
+ * 的词级变体(真机转录里工具卡正文用的就是这两个键)。 */
90
+ const SAMPLE_DIFF = [
91
+ { tone: 'del', text: "- accent: '#3b4252'" },
92
+ { tone: 'add', text: "+ accent: '#7aa2f7'" },
93
+ { tone: 'add', text: "+ text: '#e5e9f0'" },
94
+ ];
95
+ /** 代码块正文缩进:与 markdown.ts 的 fenced code 同一约定(2 空格)。 */
96
+ const CODE_INDENT = ' ';
97
+ /** 工具卡正文左侧沟槽:首行 ⎿、其余行同宽空格(真机转录的 GUTTER_FIRST/REST)。 */
98
+ const GUTTER_FIRST = ' ⎿ ';
99
+ const GUTTER_REST = ' ';
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type { TerminalImageSource } from '../ink/terminal-image.js';
2
3
  /**
3
4
  * The maid portrait (鲸鱼娘) that can stand in for the header's pixel whale
4
5
  * (settings `dsh-tui.whaleGirl`): the author-designed 30×30 true-color
@@ -26,4 +27,9 @@ export declare const WHALE_GIRL_CENTER = 19.5;
26
27
  export declare function WhaleGirlArt({ width }: {
27
28
  width?: number;
28
29
  }): React.ReactNode;
30
+ /** The same heart-pose portrait used by the Star celebration, rendered as cells when image protocols are absent. */
31
+ export declare function WhaleGirlHappyArt({ source, width }: {
32
+ source?: TerminalImageSource;
33
+ width?: number;
34
+ }): React.ReactNode;
29
35
  //# sourceMappingURL=WhaleGirl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WhaleGirl.d.ts","sourceRoot":"","sources":["../../../src/components/WhaleGirl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB;;;;;;;;GAQG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAI5C,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAA;AAErC;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAC,SAAS,CAW3E"}
1
+ {"version":3,"file":"WhaleGirl.d.ts","sourceRoot":"","sources":["../../../src/components/WhaleGirl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAEnE;;;;;;;;GAQG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAI5C,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAA;AAErC;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAC,SAAS,CAW3E;AAED,oHAAoH;AACpH,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,KAAU,EAAE,EAAE;IACxD,MAAM,CAAC,EAAE,mBAAmB,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,KAAK,CAAC,SAAS,CAoBlB"}
@@ -1,4 +1,5 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
2
3
  import { Box, Text } from '../ui.js';
3
4
  import { renderCellRows } from './Whale.js';
4
5
  import { WHALE_GIRL_COLS, WHALE_GIRL_SPRITE, WHALE_GIRL_SPRITE_ROWS } from './whaleGirlSprite.js';
@@ -30,3 +31,20 @@ export function WhaleGirlArt({ width }) {
30
31
  const pad = width === undefined ? 0 : Math.max(0, Math.floor((width - WHALE_GIRL_COLS) / 2));
31
32
  return (_jsx(Box, { flexDirection: "column", flexShrink: 0, width: width, children: WHALE_GIRL_ROWS.map((row, index) => (_jsxs(Text, { wrap: "truncate-end", children: [pad > 0 ? ' '.repeat(pad) : '', row] }, index))) }));
32
33
  }
34
+ /** The same heart-pose portrait used by the Star celebration, rendered as cells when image protocols are absent. */
35
+ export function WhaleGirlHappyArt({ source, width = 40 }) {
36
+ const rows = React.useMemo(() => {
37
+ if (source === undefined)
38
+ return WHALE_GIRL_ROWS;
39
+ return renderCellRows(WHALE_GIRL_COLS, 32, (x, y) => {
40
+ const sx = Math.min(source.width - 1, Math.floor((x + 0.5) * source.width / WHALE_GIRL_COLS));
41
+ const sy = Math.min(source.height - 1, Math.floor((y + 0.5) * source.height / 32));
42
+ const at = (sy * source.width + sx) * 4;
43
+ if ((source.data[at + 3] ?? 0) < 80)
44
+ return undefined;
45
+ return [source.data[at] ?? 0, source.data[at + 1] ?? 0, source.data[at + 2] ?? 0];
46
+ });
47
+ }, [source]);
48
+ const pad = Math.max(0, Math.floor((width - WHALE_GIRL_COLS) / 2));
49
+ return (_jsxs(Box, { flexDirection: "column", flexShrink: 0, width: width, children: [source === undefined && _jsx(Text, { color: "#f477a7", wrap: "truncate-end", children: ' ♥ ♥' }), rows.map((row, index) => (_jsxs(Text, { wrap: "truncate-end", children: [' '.repeat(pad), row] }, index)))] }));
50
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/components/design-system/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAA;AAQhE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAE3C,KAAK,YAAY,GAAG;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,KAAK,CAAA;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AASD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,IAAU,EACV,OAAW,EACX,KAAK,EACL,KAAa,GACd,EAAE,YAAY,GAAG,KAAK,CAAC,SAAS,CAoFhC"}
1
+ {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/components/design-system/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAA;AAQhE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAE3C,KAAK,YAAY,GAAG;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,KAAK,CAAA;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AASD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,IAAU,EACV,OAAW,EACX,KAAK,EACL,KAAa,GACd,EAAE,YAAY,GAAG,KAAK,CAAC,SAAS,CAyFhC"}