@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
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Pure derivation for the first-run onboarding wizard, kept free of React and
3
+ * channel state so `scripts/verify-onboarding-wizard.tsx` can drive it
4
+ * headless (the `modelGroups.ts` precedent, for the same reason: the parts
5
+ * worth pinning are the ones with an opinion, not the JSX).
6
+ *
7
+ * @module dsh-tui/components/onboardingModel
8
+ */
9
+ import { t } from '../i18n.js';
10
+ /** 引导的四个配置域,按"先解决拦路的事、再解决好不好看、最后解决怎么用"排。 */
11
+ export const ONBOARDING_STEPS = ['apikey', 'look', 'model', 'keys'];
12
+ /**
13
+ * 步骤条需要的**最小**尺寸:四步的标题横排(`❯ API Key 与连通性 · ...`)
14
+ * 在 76 列下会被截成残句,在 8 行下会把内容挤没——那时整条不画,进度改由
15
+ * 头部那行"第 N / 4 步"承担(信息不丢,只是换了个地方)。
16
+ */
17
+ export const STEP_BAR_MIN_COLUMNS = 76;
18
+ export const STEP_BAR_MIN_ROWS = 10;
19
+ /**
20
+ * 招式卡表:四张能**直接试用**的命令卡 + 两张只能读的键位卡。
21
+ * 顺序 = 使用频率,不按重要性;第一张是用户最先会需要的。
22
+ */
23
+ export const TUTORIAL_CARDS = [
24
+ { id: 'cmd', titleKey: 'onboarding-card-cmd-title', descKey: 'onboarding-card-cmd-desc', literal: '/' },
25
+ { id: 'help', titleKey: 'onboarding-card-help-title', descKey: 'onboarding-card-help-desc', command: 'help', literal: '?' },
26
+ { id: 'model', titleKey: 'onboarding-card-model-title', descKey: 'onboarding-card-model-desc', command: 'model' },
27
+ { id: 'sessions', titleKey: 'onboarding-card-sessions-title', descKey: 'onboarding-card-sessions-desc', command: 'home' },
28
+ { id: 'rewind', titleKey: 'onboarding-card-rewind-title', descKey: 'onboarding-card-rewind-desc', command: 'rewind' },
29
+ { id: 'interrupt', titleKey: 'onboarding-card-interrupt-title', descKey: 'onboarding-card-interrupt-desc', action: 'cancel' },
30
+ ];
31
+ /**
32
+ * 每一步的标题与说明 key,**写成字面量表而不是拼串**。
33
+ *
34
+ * 拼串(`` `onboarding-step-${step}-title` ``)能跑,但 `verify-i18n` 的死键
35
+ * 检查是**文本**检查:它按引号字面量找引用,拼出来的键在源码里不存在,只能
36
+ * 靠登记 `DYNAMIC_PREFIXES` 放行——那是一张"这里不检查"的白名单,放行一次就
37
+ * 少一处保护。这里总共只有八条,写成表既能被检查器看见,也让"哪一步用哪条
38
+ * 文案"一眼可读。
39
+ */
40
+ const STEP_TEXT = {
41
+ apikey: { title: 'onboarding-step-apikey-title', desc: 'onboarding-step-apikey-desc' },
42
+ look: { title: 'onboarding-step-look-title', desc: 'onboarding-step-look-desc' },
43
+ model: { title: 'onboarding-step-model-title', desc: 'onboarding-step-model-desc' },
44
+ keys: { title: 'onboarding-step-keys-title', desc: 'onboarding-step-keys-desc' },
45
+ };
46
+ /**
47
+ * 某一步的标题 key。
48
+ * @param step - 步骤 id。
49
+ * @returns 该步标题的 i18n key。
50
+ */
51
+ export function stepTitleKey(step) {
52
+ return STEP_TEXT[step].title;
53
+ }
54
+ /**
55
+ * 某一步的说明 key。
56
+ * @param step - 步骤 id。
57
+ * @returns 该步说明的 i18n key。
58
+ */
59
+ export function stepDescKey(step) {
60
+ return STEP_TEXT[step].desc;
61
+ }
62
+ /** provider 分组(首现顺序,名字用注册表的,取不到就退回 route key)。 */
63
+ export function modelGroupsOf(models, providers) {
64
+ const order = [];
65
+ const counts = new Map();
66
+ for (const model of models) {
67
+ if (!counts.has(model.provider)) {
68
+ order.push(model.provider);
69
+ counts.set(model.provider, 0);
70
+ }
71
+ counts.set(model.provider, counts.get(model.provider) + 1);
72
+ }
73
+ return order.map(provider => ({
74
+ provider,
75
+ label: providers.find(info => info.id === provider)?.name ?? provider,
76
+ count: counts.get(provider),
77
+ }));
78
+ }
79
+ /**
80
+ * 余额显示串:取第一条,币种码直接用接口给的(不猜符号)。
81
+ *
82
+ * @param result - `channel.balanceInfo()` 的返回值。
83
+ * @returns `"CNY 110.00"` 这类串;没有可用条目时 `null`。
84
+ */
85
+ export function formatBalance(result) {
86
+ if (!result.ok)
87
+ return null;
88
+ const first = result.balances[0];
89
+ if (first === undefined)
90
+ return null;
91
+ return `${first.currency} ${first.total.toFixed(2)}`;
92
+ }
93
+ /**
94
+ * 连通性失败分类 → 可执行的下一步。
95
+ *
96
+ * 分类口径与 `BalanceResult.reason` 一一对应,因为"检查网络"这种话对
97
+ * `unauthorized` 的用户毫无用处——五种原因要指向五个不同的动作,这正是
98
+ * `BalanceResult` 分了五类的原因。
99
+ *
100
+ * @param reason - `BalanceResult.reason`。
101
+ * @param status - 非 2xx 时的状态码。
102
+ * @returns 给用户看的排查方向。
103
+ */
104
+ export function connFailText(reason, status) {
105
+ switch (reason) {
106
+ case 'no-key': return t('onboarding-conn-fail-no-key');
107
+ case 'network': return t('onboarding-conn-fail-network');
108
+ case 'unauthorized': return t('onboarding-conn-fail-unauthorized');
109
+ case 'http': return t('onboarding-conn-fail-http', { status: status ?? 0 });
110
+ case 'invalid': return t('onboarding-conn-fail-invalid');
111
+ default: return t('onboarding-conn-fail-unknown');
112
+ }
113
+ }
114
+ /**
115
+ * 凭证来源的显示文案。`CredentialStatus.source` 是 adapter 自己的口径
116
+ * (`'env'` / `'config'` / 其他),这里只做展示映射,认不出的值一律走
117
+ * "未知"而不是把原始串丢到界面上——那个串属于 adapter 内部词汇。
118
+ *
119
+ * @param source - `CredentialStatus.source`。
120
+ * @returns 一句中文/英文来源说明。
121
+ */
122
+ export function credentialSourceText(source) {
123
+ if (source === 'env')
124
+ return t('onboarding-key-source-env');
125
+ if (source === 'config')
126
+ return t('onboarding-key-source-config');
127
+ return t('onboarding-key-source-unknown');
128
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * InfoPanel — 侧栏「信息」面板:把当前会话的运行信息分组、紧凑地列出。
3
+ *
4
+ * 口径与状态栏完全一致:上下文占用(formatContextUsage + contextPressureStep
5
+ * 阈值配色)、缓存命中(formatCacheHitRate)、TPS(tpsStats / speedColor)、
6
+ * 花费(estimateSessionCostSnapshotCny 同一套门控)、模式名(modeDisplayName)、
7
+ * cwd 展示折叠(formatProject)。本组件不推导任何新口径,只重排布局。
8
+ *
9
+ * 布局:键值两列,标签列定宽截断、值列悬挂缩进并 truncate——长 cwd /
10
+ * 长标题在 28 列也不会把列挤爆。内容超高时 ScrollBox 滚动:滚轮由
11
+ * ScrollBox 自带(位置路由),↑/↓ 经 usePanelInput(v2.1 键盘契约)。
12
+ * visible=false 时不挂任何定时器 / 高频订阅(本面板本来就是纯读渲染)。
13
+ */
14
+ import React from 'react';
15
+ import type { PanelProps } from './types.js';
16
+ export declare function InfoPanel({ width, height, focused, visible }: PanelProps): React.ReactNode;
17
+ //# sourceMappingURL=InfoPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/InfoPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAezB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAwB5C,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,GAAG,KAAK,CAAC,SAAS,CAsJ1F"}
@@ -0,0 +1,124 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * InfoPanel — 侧栏「信息」面板:把当前会话的运行信息分组、紧凑地列出。
4
+ *
5
+ * 口径与状态栏完全一致:上下文占用(formatContextUsage + contextPressureStep
6
+ * 阈值配色)、缓存命中(formatCacheHitRate)、TPS(tpsStats / speedColor)、
7
+ * 花费(estimateSessionCostSnapshotCny 同一套门控)、模式名(modeDisplayName)、
8
+ * cwd 展示折叠(formatProject)。本组件不推导任何新口径,只重排布局。
9
+ *
10
+ * 布局:键值两列,标签列定宽截断、值列悬挂缩进并 truncate——长 cwd /
11
+ * 长标题在 28 列也不会把列挤爆。内容超高时 ScrollBox 滚动:滚轮由
12
+ * ScrollBox 自带(位置路由),↑/↓ 经 usePanelInput(v2.1 键盘契约)。
13
+ * visible=false 时不挂任何定时器 / 高频订阅(本面板本来就是纯读渲染)。
14
+ */
15
+ import React from 'react';
16
+ import { Box, Text, ScrollBox } from '../../ui.js';
17
+ import { stringWidth } from '../../ink/stringWidth.js';
18
+ import { t } from '../../i18n.js';
19
+ import { formatTokens } from '../../terminal-utils/format.js';
20
+ import { formatContextUsage } from '../../tuiDisplayPrefs.js';
21
+ import { modeDisplayName } from '../../sessionModes.js';
22
+ import { estimateSessionCostSnapshotCny, isDeepSeekOfficialProvider, isPeakHour } from '../../deepseekPricing.js';
23
+ import { formatCacheHitRate } from '../../screens/StatusLine.js';
24
+ import { contextPressureStep, speedColor } from '../../screens/StatusMetrics.js';
25
+ import { formatProject } from '../../sessions/format.js';
26
+ import { homeDir } from '../../utils/paths.js';
27
+ import { Divider } from '../design-system/Divider.js';
28
+ import { useSidePanelChannel } from './SidePanelRuntimeContext.js';
29
+ import { usePanelInput } from './usePanelInput.js';
30
+ /** 与状态栏同一口径的上下文已用量:最近一次请求的 input+cacheRead+cacheWrite。 */
31
+ function contextUsedOf(channel) {
32
+ const usage = channel.lastUsage;
33
+ if (usage === undefined)
34
+ return undefined;
35
+ return usage.input + usage.cacheRead + usage.cacheWrite;
36
+ }
37
+ /** 权限行取值:durable preset 身份优先,否则 sandbox·approval 原子拼合。 */
38
+ function approvalOf(mode) {
39
+ if (mode.permission !== undefined)
40
+ return mode.permission;
41
+ if (mode.sandbox === undefined && mode.approval === undefined)
42
+ return undefined;
43
+ return [mode.sandbox, mode.approval].filter(Boolean).join('·');
44
+ }
45
+ /** 非默认模式的显式标记(与状态栏 modeNeedsExplicitMarker 同判)。 */
46
+ function modeNeedsExplicitMarker(mode) {
47
+ return mode.plan === true
48
+ || mode.sandbox === 'danger-full-access'
49
+ || mode.approval === 'never';
50
+ }
51
+ export function InfoPanel({ width, height, focused, visible }) {
52
+ const channel = useSidePanelChannel();
53
+ const scrollRef = React.useRef(null);
54
+ // 面板业务键:↑/↓ 滚动(内容超高才有意义);Esc 等一律让出给宿主回退。
55
+ const panelKeyHandler = (input, key) => {
56
+ if (key.escape === true || (key.ctrl === true && input === 'c'))
57
+ return false;
58
+ if (key.upArrow === true) {
59
+ scrollRef.current?.scrollBy(-1);
60
+ return true;
61
+ }
62
+ if (key.downArrow === true) {
63
+ scrollRef.current?.scrollBy(1);
64
+ return true;
65
+ }
66
+ return false;
67
+ };
68
+ usePanelInput(panelKeyHandler, { active: focused && visible });
69
+ const usage = channel.lastUsage;
70
+ const used = contextUsedOf(channel);
71
+ const displayCwd = channel.displayCwd === channel.cwd
72
+ ? formatProject(channel.displayCwd, homeDir())
73
+ : channel.displayCwd;
74
+ // --- 值构造(全部复用状态栏口径) -------------------------------------
75
+ const none = t('info-value-none');
76
+ const modeName = modeDisplayName(channel.mode);
77
+ const approval = approvalOf(channel.mode);
78
+ const contextText = formatContextUsage(used, channel.contextWindow, true);
79
+ const contextPct = used !== undefined && channel.contextWindow !== undefined && channel.contextWindow > 0
80
+ ? (used / channel.contextWindow) * 100
81
+ : undefined;
82
+ const contextStep = contextPct !== undefined ? contextPressureStep(contextPct) : undefined;
83
+ const cacheText = formatCacheHitRate(usage) ?? none;
84
+ // 花费:与状态栏同门控——官方 DeepSeek 路由 + 有计价金额或未计价 token。
85
+ const estimate = isDeepSeekOfficialProvider(channel.provider)
86
+ ? estimateSessionCostSnapshotCny({
87
+ provider: channel.provider,
88
+ main: channel.mainCost ?? {},
89
+ subagents: channel.subagentCost ?? [],
90
+ fallbackTokens: channel.tokens,
91
+ fallbackModel: channel.model,
92
+ })
93
+ : undefined;
94
+ const costText = estimate !== undefined && (estimate.total > 0 || estimate.unpricedTokens > 0)
95
+ ? estimate.total > 0
96
+ ? '¥' + estimate.total.toFixed(2) + ' ' + t(isPeakHour() ? 'cost-now-peak' : 'cost-now-idle')
97
+ : t('cost-unpriced', { tokens: formatTokens(estimate.unpricedTokens) })
98
+ : none;
99
+ const tpsText = channel.tps !== undefined
100
+ ? speedColor(channel.tps, String(Math.round(channel.tps))) + ' tps'
101
+ : none;
102
+ const jobs = channel.backgroundJobs;
103
+ const jobsLive = (jobs ?? []).filter(job => job.status === 'running' || job.status === 'stopping').length;
104
+ const jobsText = jobs !== undefined ? jobsLive + '/' + jobs.length : none;
105
+ const subagents = channel.subagents;
106
+ const subagentsText = subagents !== undefined ? String(subagents.length) : none;
107
+ // 标签列取「本语言最长标签」与「内容宽一半」的较小者:28 列时标签
108
+ // 先让路(截断),值列保住至少一半——点名字段的前缀必须仍可读。
109
+ const contentWidth = Math.max(10, width - 2);
110
+ const labelWidth = Math.min(Math.max(...[
111
+ t('info-row-title'), t('info-row-session-id'), t('info-row-agent-id'), t('info-row-cwd'),
112
+ t('info-row-branch'), t('info-row-model'), t('info-row-effort'), t('info-row-mode'),
113
+ t('info-row-approval'), t('info-row-context'), t('info-row-window'), t('info-row-tokens'),
114
+ t('info-row-cache'), t('info-row-cost'), t('info-row-tps'), t('info-row-status'),
115
+ t('info-row-activity'), t('info-row-jobs'), t('info-row-subagents'),
116
+ ].map(s => stringWidth(s))), Math.max(6, Math.floor(contentWidth / 2)));
117
+ function Row({ label, value, valueColor }) {
118
+ return (_jsxs(Box, { flexDirection: "row", gap: 1, width: "100%", children: [_jsx(Box, { width: labelWidth, flexShrink: 0, children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: label }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", children: _jsx(Text, { color: valueColor, wrap: "truncate-end", children: value }) })] }));
119
+ }
120
+ function Section({ title, children }) {
121
+ return (_jsxs(Box, { flexDirection: "column", marginTop: 1, width: "100%", children: [_jsx(Divider, { title: title }), _jsx(Box, { flexDirection: "column", marginTop: 0, width: "100%", children: children })] }));
122
+ }
123
+ return (_jsx(Box, { flexDirection: "column", paddingLeft: 1, paddingRight: 1, width: width, flexShrink: 0, children: _jsxs(ScrollBox, { ref: scrollRef, flexDirection: "column", maxHeight: Math.max(3, height), flexGrow: 1, children: [_jsxs(Section, { title: t('info-section-session'), children: [_jsx(Row, { label: t('info-row-title'), value: channel.sessionTitle !== '' ? channel.sessionTitle : none }), _jsx(Row, { label: t('info-row-session-id'), value: channel.sessionId !== '' ? '#' + channel.sessionId.slice(0, 8) : none }), _jsx(Row, { label: t('info-row-agent-id'), value: channel.agentId !== '' ? '#' + channel.agentId.slice(0, 8) : none }), _jsx(Row, { label: t('info-row-cwd'), value: displayCwd !== '' ? displayCwd : none }), _jsx(Row, { label: t('info-row-branch'), value: channel.gitBranch !== undefined && channel.gitBranch !== '' ? channel.gitBranch : none })] }), _jsxs(Section, { title: t('info-section-model'), children: [_jsx(Row, { label: t('info-row-model'), value: channel.model !== '' ? channel.model : none }), _jsx(Row, { label: t('info-row-effort'), value: channel.reasoningEffort !== undefined && channel.reasoningEffort !== '' ? channel.reasoningEffort : none }), _jsx(Row, { label: t('info-row-mode'), value: modeName, valueColor: channel.mode.plan === true ? 'planMode' : modeNeedsExplicitMarker(channel.mode) ? 'warning' : undefined }), _jsx(Row, { label: t('info-row-approval'), value: approval !== undefined && approval !== '' ? approval : none, valueColor: modeNeedsExplicitMarker(channel.mode) ? 'warning' : undefined })] }), _jsxs(Section, { title: t('info-section-context'), children: [_jsx(Row, { label: t('info-row-context'), value: contextText ?? none, valueColor: contextStep }), _jsx(Row, { label: t('info-row-window'), value: channel.contextWindow !== undefined ? formatTokens(channel.contextWindow) : none }), _jsx(Row, { label: t('info-row-tokens'), value: formatTokens(channel.tokens.input) + '→' + formatTokens(channel.tokens.output) }), _jsx(Row, { label: t('info-row-cache'), value: cacheText }), _jsx(Row, { label: t('info-row-cost'), value: costText }), _jsx(Row, { label: t('info-row-tps'), value: tpsText })] }), _jsxs(Section, { title: t('info-section-runtime'), children: [_jsx(Row, { label: t('info-row-status'), value: String(channel.status) }), _jsx(Row, { label: t('info-row-activity'), value: channel.working ? channel.spinnerMode : none, valueColor: channel.working ? 'success' : undefined }), _jsx(Row, { label: t('info-row-jobs'), value: jobsText }), _jsx(Row, { label: t('info-row-subagents'), value: subagentsText })] })] }) }));
124
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * PanelBar: the 1-row tab strip on top of the side panel (design doc §6.1).
3
+ *
4
+ * Visual language:
5
+ * - the ACTIVE panel is a capsule: ‹ Title ›, accent + bold — one glance
6
+ * tells you where you are;
7
+ * - inactive panels collapse to their single-cell icon (or first letter),
8
+ * dim, with a status dot only when the panel has something to say
9
+ * (● unread/active, ! warning, × error — theme colors, never emoji);
10
+ * - overflow is windowed, never a trail of dots: what does not fit
11
+ * becomes a dim +N on the right edge.
12
+ *
13
+ * The bar's width demand is content-independent (capsule titles truncate
14
+ * to a fixed budget, icons are fixed cells) — a panel MUST never make the
15
+ * column want to resize (design doc §16.6).
16
+ */
17
+ import React from 'react';
18
+ export type PanelBadgeLevel = 'info' | 'warning' | 'error';
19
+ export interface PanelBarTab {
20
+ readonly id: string;
21
+ readonly title: string;
22
+ /** Single-cell glyph; falls back to the title's first letter. */
23
+ readonly icon?: string;
24
+ readonly badge?: {
25
+ readonly level: PanelBadgeLevel;
26
+ readonly unread: number;
27
+ } | null;
28
+ }
29
+ export interface PanelBarProps {
30
+ readonly tabs: readonly PanelBarTab[];
31
+ readonly activeId: string | undefined;
32
+ readonly width: number;
33
+ /** Focus is in the right column: the bar brightens to match the divider. */
34
+ readonly focused: boolean;
35
+ /** The ACTIVE panel has a fullscreen form (capabilities.fullscreen): the
36
+ * bar reserves the two trailing cells and draws the clickable ⤢. */
37
+ readonly canExpand?: boolean;
38
+ /** Click/Enter on ⤢: switch the active panel to its fullscreen surface. */
39
+ readonly onExpand?: () => void;
40
+ /** Click on a tab (icon or capsule): make that panel active. The host
41
+ * funnels this into the same openPanel() path the keyboard uses. */
42
+ readonly onSelect?: (id: string) => void;
43
+ }
44
+ export declare function PanelBar({ tabs, activeId, width, focused, canExpand, onExpand, onSelect }: PanelBarProps): React.ReactNode;
45
+ //# sourceMappingURL=PanelBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PanelBar.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/PanelBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAE1D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,iEAAiE;IACjE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACrF;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,SAAS,WAAW,EAAE,CAAA;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB;yEACqE;IACrE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B;yEACqE;IACrE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACzC;AA8BD,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,aAAa,GAAG,KAAK,CAAC,SAAS,CAqH1H"}
@@ -0,0 +1,104 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * PanelBar: the 1-row tab strip on top of the side panel (design doc §6.1).
4
+ *
5
+ * Visual language:
6
+ * - the ACTIVE panel is a capsule: ‹ Title ›, accent + bold — one glance
7
+ * tells you where you are;
8
+ * - inactive panels collapse to their single-cell icon (or first letter),
9
+ * dim, with a status dot only when the panel has something to say
10
+ * (● unread/active, ! warning, × error — theme colors, never emoji);
11
+ * - overflow is windowed, never a trail of dots: what does not fit
12
+ * becomes a dim +N on the right edge.
13
+ *
14
+ * The bar's width demand is content-independent (capsule titles truncate
15
+ * to a fixed budget, icons are fixed cells) — a panel MUST never make the
16
+ * column want to resize (design doc §16.6).
17
+ */
18
+ import React from 'react';
19
+ import { Box, Text } from '../../ui.js';
20
+ import { stringWidth } from '../../ink/stringWidth.js';
21
+ /** Capsule title budget keeps one long plugin title from eating the bar. */
22
+ const ACTIVE_TITLE_MAX = 12;
23
+ function badgeGlyph(level) {
24
+ if (level === 'warning')
25
+ return '!';
26
+ if (level === 'error')
27
+ return '×';
28
+ return '●';
29
+ }
30
+ function badgeColor(level) {
31
+ if (level === 'warning')
32
+ return 'warning';
33
+ if (level === 'error')
34
+ return 'error';
35
+ return 'accent';
36
+ }
37
+ function truncateCells(text, maxCells) {
38
+ if (stringWidth(text) <= maxCells)
39
+ return text;
40
+ let out = '';
41
+ let cells = 0;
42
+ for (const char of text) {
43
+ const w = stringWidth(char);
44
+ if (cells + w > Math.max(1, maxCells - 1))
45
+ break;
46
+ out += char;
47
+ cells += w;
48
+ }
49
+ return out + '…';
50
+ }
51
+ export function PanelBar({ tabs, activeId, width, focused, canExpand, onExpand, onSelect }) {
52
+ const [expandHovered, setExpandHovered] = React.useState(false);
53
+ // Mouse feedback is per-tab: the bar is the only place where a click
54
+ // switches WHAT the whole right column shows, so it must read as clickable
55
+ // (hover brightens the glyph; the click path mirrors the ←/→ host keys).
56
+ const [hoveredTab, setHoveredTab] = React.useState(null);
57
+ // The ⤢ affordance lives in the bar's own row (design: the panel column's
58
+ // chrome is fixed-height — a panel must never make the column want to
59
+ // resize). Reserve its two cells (one gap + one glyph) up front so tab
60
+ // windowing and the +N marker stay honest at every width.
61
+ const barWidth = Math.max(0, width - (canExpand === true ? 2 : 0));
62
+ // Windowing: the active tab is always rendered; inactive tabs fit in
63
+ // order around it and whatever remains folds into +N on the right.
64
+ const active = tabs.find(tab => tab.id === activeId) ?? tabs[0];
65
+ const segments = [];
66
+ let hidden = 0;
67
+ let used = 0;
68
+ const moreCells = (n) => stringWidth('+' + String(n)) + 1;
69
+ for (const tab of tabs) {
70
+ const isActive = active !== undefined && tab.id === active.id;
71
+ // Budget per segment includes the 1-col gap rendered between them
72
+ // (marginRight), otherwise the +N badge gets clipped at full bars.
73
+ const cells = (isActive ? Math.min(stringWidth(tab.title), ACTIVE_TITLE_MAX) + 4 : 2) + (segments.length > 0 ? 1 : 0);
74
+ // Reserve room for the eventual +N badge while tabs remain after this one.
75
+ const remaining = tabs.length - segments.length - hidden - 1;
76
+ const reserve = remaining > 0 ? moreCells(remaining) : 0;
77
+ if (!isActive && used + cells + reserve > barWidth) {
78
+ hidden += 1;
79
+ continue;
80
+ }
81
+ used += cells;
82
+ const hovered = hoveredTab === tab.id;
83
+ segments.push({
84
+ key: tab.id,
85
+ node: isActive ? (_jsxs(Text, { bold: true, underline: hovered, color: hovered || focused ? 'accent' : 'inactive', wrap: "truncate-end", children: ['‹ ', truncateCells(tab.title, ACTIVE_TITLE_MAX), ' ›'] })) : (_jsxs(Text, { bold: hovered, dimColor: !hovered && tab.badge == null, color: tab.badge != null ? badgeColor(tab.badge.level) : hovered ? 'accent' : undefined, children: [(tab.icon ?? tab.title.slice(0, 1)).slice(0, 1), tab.badge != null ? badgeGlyph(tab.badge.level) : ''] })),
86
+ // Every tab is clickable: on an inactive one it switches the column,
87
+ // on the active one it just takes the focus (same three-state as the
88
+ // Ctrl+B smart toggle, minus the closing step).
89
+ clickable: onSelect !== undefined,
90
+ onHover: (next) => setHoveredTab(previous => (next ? tab.id : previous === tab.id ? null : previous)),
91
+ });
92
+ }
93
+ return (_jsxs(Box, { height: 1, flexShrink: 0, paddingX: 1, overflow: "hidden", children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", children: segments.map((segment, index) => (_jsx(Box, { flexShrink: 0, marginRight: index < segments.length - 1 ? 1 : 0, onMouseEnter: () => { segment.onHover(true); }, onMouseLeave: () => { segment.onHover(false); }, onClick: segment.clickable
94
+ ? (event) => {
95
+ // Mouse contract: without this the page-level "click the
96
+ // column to focus it" fallback also fires on the same event.
97
+ event.stopImmediatePropagation();
98
+ onSelect?.(segment.key);
99
+ }
100
+ : undefined, children: segment.node }, segment.key))) }), hidden > 0 && (_jsxs(Text, { dimColor: true, children: ['+', hidden] })), canExpand === true && (_jsx(Box, { flexShrink: 0, marginLeft: 1, onMouseEnter: () => { setExpandHovered(true); }, onMouseLeave: () => { setExpandHovered(false); }, onClick: (event) => {
101
+ event.stopImmediatePropagation();
102
+ onExpand?.();
103
+ }, children: _jsx(Text, { bold: expandHovered, color: expandHovered ? 'accent' : 'inactive', children: '⤢' }) }))] }));
104
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * PanelErrorBoundary(照 PluginStatusViewBoundary 的约定):出错只隐藏
3
+ * 该 Panel、记 reportError,同 key 重注册用 registrationId 重挂。插件
4
+ * Panel 崩溃时,Chat 的输入、流式、工具卡必须完全不受影响——硬要求。
5
+ */
6
+ import React from 'react';
7
+ interface BoundaryProps {
8
+ readonly panelId: string;
9
+ readonly children: React.ReactNode;
10
+ }
11
+ interface BoundaryState {
12
+ readonly error: Error | null;
13
+ }
14
+ export declare class PanelErrorBoundary extends React.Component<BoundaryProps, BoundaryState> {
15
+ state: BoundaryState;
16
+ static getDerivedStateFromError(error: Error): BoundaryState;
17
+ componentDidCatch(error: Error): void;
18
+ render(): React.ReactNode;
19
+ }
20
+ export {};
21
+ //# sourceMappingURL=PanelErrorBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PanelErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/PanelErrorBoundary.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,UAAU,aAAa;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CACnC;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAC7B;AAED,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC;IAC1E,KAAK,EAAE,aAAa,CAAkB;IAE/C,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,aAAa;IAInD,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAOrC,MAAM,IAAI,KAAK,CAAC,SAAS;CAenC"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * PanelErrorBoundary(照 PluginStatusViewBoundary 的约定):出错只隐藏
4
+ * 该 Panel、记 reportError,同 key 重注册用 registrationId 重挂。插件
5
+ * Panel 崩溃时,Chat 的输入、流式、工具卡必须完全不受影响——硬要求。
6
+ */
7
+ import React from 'react';
8
+ import { Box, Text } from '../../ui.js';
9
+ import { t } from '../../i18n.js';
10
+ import { logError } from '../../utils/log.js';
11
+ import { panelStore } from './PanelStore.js';
12
+ export class PanelErrorBoundary extends React.Component {
13
+ state = { error: null };
14
+ static getDerivedStateFromError(error) {
15
+ return { error };
16
+ }
17
+ componentDidCatch(error) {
18
+ // 卡片上只显示截断的 message,卸载即失忆——落盘一份带边界的完整
19
+ // 错误(含堆栈),否则"面板渲染出错"永远无法事后归因。
20
+ logError(new Error(`side panel "${this.props.panelId}" render error: ${error.message}`, { cause: error }));
21
+ panelStore.reportError(this.props.panelId, error);
22
+ }
23
+ render() {
24
+ const { error } = this.state;
25
+ if (error !== null) {
26
+ return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, alignItems: "center", justifyContent: "center", paddingX: 1, children: [_jsx(Text, { color: "error", children: t('panel-error-title') }), _jsx(Box, { height: 1 }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: error.message }), _jsx(Box, { height: 1 }), _jsx(Text, { dimColor: true, children: t('panel-error-hint') })] }));
27
+ }
28
+ return this.props.children;
29
+ }
30
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * PanelHost(设计文档 §6.3 + v2.1 修订):
3
+ * - 计算 bounds 并以 PanelProps 传入;为 Panel 子树再嵌套一层
4
+ * TerminalSizeContext(columns = panel width),现有组件直接放进来
5
+ * 就能拿到正确宽度。
6
+ * - 每个 Panel 独立 PanelErrorBoundary(registrationId 重挂)。
7
+ * - mountPolicy(v2.1):active=只挂 active(插件默认);enabled=启用
8
+ * 即挂载,非 active 时 display:none + focused/visible=false——状态
9
+ * 保留但不动画、不收键(内置 todo/jobs/agents/companion)。
10
+ * - 不自动包 ScrollBox(v2.1):滚动由 Panel 自己决定(右栏内的
11
+ * ScrollBox 按命中节点接收滚轮)。
12
+ * - 打开某 Panel 时清它的 badge(soft follow:后台更新只亮点不切换)。
13
+ * - 键盘:焦点在右栏时,useSidePanel 先经 SidePanelRuntime.dispatchKey
14
+ * 问活动 Panel(usePanelInput 注册),Panel 没吃才轮到宿主回退键。
15
+ * - 不知道 Chat 消息、输入、Thinking、工具。
16
+ */
17
+ import React from 'react';
18
+ import type { ChannelUi } from '../../adapter/channel/ui-policy.js';
19
+ import type { SidePanelController } from './useSidePanel.js';
20
+ export interface PanelHostProps {
21
+ readonly controller: SidePanelController;
22
+ readonly channel: ChannelUi;
23
+ readonly width: number;
24
+ readonly height: number;
25
+ readonly activity?: import('../../dsh-adapter/activity-store.js').ActivityView;
26
+ readonly attention?: {
27
+ readonly approvals: number;
28
+ readonly questions: number;
29
+ };
30
+ /** 会话轨迹投影(Chat 折好的那一份;轨迹 Panel 直接渲染)。 */
31
+ readonly trajectory?: import('../../dsh-adapter/trajectory/index.js').TrajBuild;
32
+ /** 宿主「全屏」出口(PanelBar 的 ⤢ 经 SidePanelColumn 传进来)。 */
33
+ readonly openFullscreen?: (panelId: string) => void;
34
+ }
35
+ export declare function PanelHost({ controller, channel, width, height, activity, attention, trajectory, openFullscreen }: PanelHostProps): React.ReactNode;
36
+ //# sourceMappingURL=PanelHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PanelHost.d.ts","sourceRoot":"","sources":["../../../../src/components/sidePanel/PanelHost.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAA;AAKnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAE5D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAA;IACxC,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,qCAAqC,EAAE,YAAY,CAAA;IAC9E,QAAQ,CAAC,SAAS,CAAC,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/E,yCAAyC;IACzC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,uCAAuC,EAAE,SAAS,CAAA;IAC/E,oDAAoD;IACpD,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACpD;AA4BD,wBAAgB,SAAS,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,EAAE,cAAc,GAAG,KAAK,CAAC,SAAS,CAiFlJ"}
@@ -0,0 +1,81 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * PanelHost(设计文档 §6.3 + v2.1 修订):
4
+ * - 计算 bounds 并以 PanelProps 传入;为 Panel 子树再嵌套一层
5
+ * TerminalSizeContext(columns = panel width),现有组件直接放进来
6
+ * 就能拿到正确宽度。
7
+ * - 每个 Panel 独立 PanelErrorBoundary(registrationId 重挂)。
8
+ * - mountPolicy(v2.1):active=只挂 active(插件默认);enabled=启用
9
+ * 即挂载,非 active 时 display:none + focused/visible=false——状态
10
+ * 保留但不动画、不收键(内置 todo/jobs/agents/companion)。
11
+ * - 不自动包 ScrollBox(v2.1):滚动由 Panel 自己决定(右栏内的
12
+ * ScrollBox 按命中节点接收滚轮)。
13
+ * - 打开某 Panel 时清它的 badge(soft follow:后台更新只亮点不切换)。
14
+ * - 键盘:焦点在右栏时,useSidePanel 先经 SidePanelRuntime.dispatchKey
15
+ * 问活动 Panel(usePanelInput 注册),Panel 没吃才轮到宿主回退键。
16
+ * - 不知道 Chat 消息、输入、Thinking、工具。
17
+ */
18
+ import React from 'react';
19
+ import { Box, Text } from '../../ui.js';
20
+ import { t } from '../../i18n.js';
21
+ import { TerminalSizeContext } from '../../ink/components/TerminalSizeContext.js';
22
+ import { useTerminalSize } from '../../ink/hooks/use-terminal-size.js';
23
+ import { panelStore } from './PanelStore.js';
24
+ import { PanelContext, SidePanelRuntimeContext } from './SidePanelRuntimeContext.js';
25
+ import { PanelErrorBoundary } from './PanelErrorBoundary.js';
26
+ function TooNarrow({ minColumns }) {
27
+ return (_jsx(Box, { flexDirection: "column", flexGrow: 1, alignItems: "center", justifyContent: "center", paddingX: 1, children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: t('panel-too-narrow', { min: minColumns }) }) }));
28
+ }
29
+ /** 插件 Panel 连续崩溃后的会话内禁用卡(§18.4):不再挂载插件组件,只
30
+ * 提示原因;toast 一次(每 Panel 每会话)。 */
31
+ const disabledToasted = new Set();
32
+ function PluginDisabled({ panelId, channel }) {
33
+ React.useEffect(() => {
34
+ if (disabledToasted.has(panelId))
35
+ return;
36
+ disabledToasted.add(panelId);
37
+ channel.notify(t('panel-plugin-disabled-toast'));
38
+ }, [panelId, channel]);
39
+ return (_jsxs(Box, { flexDirection: "column", flexGrow: 1, alignItems: "center", justifyContent: "center", paddingX: 1, children: [_jsx(Text, { color: "warning", children: t('panel-plugin-disabled') }), _jsx(Box, { height: 1 }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: t('panel-plugin-disabled-hint') })] }));
40
+ }
41
+ export function PanelHost({ controller, channel, width, height, activity, attention, trajectory, openFullscreen }) {
42
+ const entries = React.useSyncExternalStore(panelStore.subscribe, () => panelStore.list());
43
+ // Forward the real screen rows so panel animations (useAnimationFrame →
44
+ // useTerminalViewport) measure visibility against the screen, not the
45
+ // host's narrowed rows.
46
+ const parentSize = useTerminalSize();
47
+ const screenRows = parentSize.screenRows ?? parentSize.rows;
48
+ const enabledIds = controller.enabledPanelIds;
49
+ // 只画「已启用 ∩ 已注册」的 Panel,顺序 = 设置里的启用顺序。
50
+ const visibleEntries = React.useMemo(() => enabledIds
51
+ .map(id => entries.find(entry => entry.definition.id === id))
52
+ .filter((entry) => entry !== undefined), [enabledIds, entries]);
53
+ const activeEntry = visibleEntries.find(entry => entry.definition.id === controller.activePanelId)
54
+ ?? visibleEntries[0];
55
+ // Soft follow:后台更新只亮 PanelBar 状态点;用户打开该 Panel 时清零。
56
+ const activeId = activeEntry?.definition.id;
57
+ React.useEffect(() => {
58
+ if (activeId !== undefined)
59
+ panelStore.clearBadge(activeId);
60
+ }, [activeId]);
61
+ const mode = controller.zoom ? 'zoom' : 'split';
62
+ const runtimeContext = React.useMemo(() => ({ runtime: controller.runtime, channel, activity, attention, trajectory, openFullscreen }), [controller.runtime, channel, activity, attention, trajectory, openFullscreen]);
63
+ return (_jsx(SidePanelRuntimeContext.Provider, { value: runtimeContext, children: visibleEntries.map(entry => {
64
+ const def = entry.definition;
65
+ const isActive = activeEntry !== undefined && def.id === activeEntry.definition.id;
66
+ if (!isActive && def.mountPolicy !== 'enabled')
67
+ return null;
68
+ if (entry.disabled === true) {
69
+ return (_jsx(Box, { flexDirection: "column", flexGrow: 1, overflow: "hidden", display: isActive ? 'flex' : 'none', children: _jsx(PluginDisabled, { panelId: def.id, channel: channel }) }, def.id));
70
+ }
71
+ const tooNarrow = def.minColumns !== undefined && width < def.minColumns;
72
+ const body = tooNarrow ? (_jsx(TooNarrow, { minColumns: def.minColumns })) : (_jsx(PanelErrorBoundary, { panelId: def.id, children: _jsx(PanelContext.Provider, { value: { panelId: def.id }, children: _jsx(TerminalSizeContext.Provider, { value: { columns: width, rows: height, screenRows }, children: React.createElement(def.component, {
73
+ width,
74
+ height,
75
+ focused: controller.focus === 'panel' && isActive,
76
+ visible: isActive,
77
+ mode,
78
+ }) }) }) }, entry.registrationId));
79
+ return (_jsx(Box, { flexDirection: "column", flexGrow: 1, overflow: "hidden", display: isActive ? 'flex' : 'none', children: body }, def.id));
80
+ }) }));
81
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * /panel 无参的面板选择器:Pane + Select 行列出「已启用 ∩ 已注册」的
3
+ * 面板(内置与插件同席——图标、标题、badge 状态点都来自 PanelStore),
4
+ * 当前活动面板带 current 标记。Enter 打开并聚焦,Esc 取消。
5
+ */
6
+ import React from 'react';
7
+ import type { SidePanelController } from './useSidePanel.js';
8
+ export interface PanelPickerRow {
9
+ readonly id: string;
10
+ readonly title: string;
11
+ readonly icon?: string;
12
+ readonly badge?: {
13
+ readonly level: 'info' | 'warning' | 'error';
14
+ readonly unread: number;
15
+ } | null;
16
+ }
17
+ export declare function usePanelPickerRows(controller: SidePanelController): readonly PanelPickerRow[];
18
+ export declare function PanelPicker({ rows, focusIndex, activeId, onPick, }: {
19
+ readonly rows: readonly PanelPickerRow[];
20
+ readonly focusIndex: number;
21
+ readonly activeId: string | undefined;
22
+ readonly onPick?: (index: number) => void;
23
+ }): React.ReactNode;
24
+ //# sourceMappingURL=PanelPicker.d.ts.map