@jetcrab/pi-desk 1.1.12 → 1.1.16-dev

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 (340) hide show
  1. package/docs/plugins.md +21 -1
  2. package/package.json +2 -2
  3. package/src/app/api/model-settings/preview/route.ts +1 -0
  4. package/src/app/api/work-sessions/rename/route.ts +1 -0
  5. package/src/client/l2_biz/auth/l2-login.tsx +1 -1
  6. package/src/client/l2_biz/plugin-host/l2-plugin-session-sidebar-tab.tsx +6 -2
  7. package/src/client/l2_biz/settings/hooks/l2-use-model-provider-settings.ts +54 -10
  8. package/src/client/l2_biz/settings/hooks/l2-use-model-settings.ts +37 -9
  9. package/src/client/l2_biz/settings/l2-auth-settings.tsx +1 -1
  10. package/src/client/l2_biz/settings/l2-model-settings-biz.ts +26 -12
  11. package/src/client/l2_biz/settings/views/l2-appearance-settings.tsx +1 -16
  12. package/src/client/l2_biz/settings/views/l2-model-provider-settings.tsx +3 -2
  13. package/src/client/l2_biz/settings/views/l2-model-replacement-preview.tsx +34 -0
  14. package/src/client/l2_biz/task-center/l2-task-center.tsx +4 -30
  15. package/src/client/l2_biz/workbench/file-workspace/l2-plugin-standalone-file-preview.tsx +45 -7
  16. package/src/client/l2_biz/workbench/hooks/l2-work-session-rename.ts +57 -0
  17. package/src/client/l2_biz/workbench/l2-work-session-columns.tsx +0 -11
  18. package/src/client/l2_biz/workbench/l2-work-session-sidebar.tsx +107 -6
  19. package/src/client/l2_biz/workbench/l2-workbench-biz.ts +5 -0
  20. package/src/client/l2_biz/workbench/l2-workbench-chat-composer.tsx +333 -350
  21. package/src/client/l2_biz/workbench/l2-workbench.tsx +46 -1
  22. package/src/client/l2_biz/workbench/views/l2-work-session-rename-dialog.tsx +88 -0
  23. package/src/client/l3_modules/project-files/l3-markdown-preview.module.css +81 -0
  24. package/src/client/l3_modules/project-files/l3-markdown-preview.tsx +52 -0
  25. package/src/client/l3_modules/project-files/l3-project-document-view.tsx +26 -8
  26. package/src/client/l3_modules/project-files/l3-project-file-runtime.ts +16 -1
  27. package/src/client/l3_modules/project-files/l3-project-text-preview.ts +5 -0
  28. package/src/client/l3_modules/work-session-visual/l3-work-session-visual-effects.module.css +0 -36
  29. package/src/client/l3_modules/work-session-visual/l3-work-session-visual-view.tsx +0 -5
  30. package/src/client/l4_foundation/plugin-host/l4-plugin-host-runtime.ts +71 -1
  31. package/src/client/l4_foundation/styles/l4-globals.css +0 -19
  32. package/src/client/l4_foundation/ui/code/l4-code-preview.tsx +2 -1
  33. package/src/client/l4_foundation/ui/l4-confirm-dialog.tsx +9 -1
  34. package/src/common/l2_biz/auth/l2-auth-contract.ts +2 -2
  35. package/src/common/l2_biz/auth/l2-auth-messages.ts +2 -2
  36. package/src/common/l2_biz/model-settings/l2-model-settings-contract.ts +23 -1
  37. package/src/common/l2_biz/settings/l2-settings-messages.ts +8 -6
  38. package/src/common/l2_biz/work-session/l2-work-session-contract.ts +9 -0
  39. package/src/common/l2_biz/workbench/l2-workbench-locale-messages.ts +6 -0
  40. package/src/common/l3_modules/project-files/l3-project-files-locale-messages.ts +4 -0
  41. package/src/common/l4_foundation/locale/l4-host-error-messages.ts +6 -0
  42. package/src/server/l1_entry/api/l1-model-settings-preview-route.ts +32 -0
  43. package/src/server/l1_entry/api/l1-work-session-rename-route.ts +52 -0
  44. package/src/server/l2_biz/model-settings/l2-model-settings.ts +9 -0
  45. package/src/server/l2_biz/plugin-management/l2-plugin-management.ts +159 -52
  46. package/src/server/l2_biz/work-session/l2-work-session-chat-runtime.ts +5 -0
  47. package/src/server/l2_biz/work-session/l2-work-session-manage.ts +13 -0
  48. package/src/server/l3_modules/work-session/l3-work-session.ts +4 -0
  49. package/src/server/l4_foundation/model-settings/l4-model-settings-store.ts +161 -38
  50. package/src/server/l4_foundation/model-settings/l4-model-settings-types.ts +11 -0
  51. package/src/server/l4_foundation/model-settings/l4-model-settings.ts +1 -0
  52. package/src/server/l4_foundation/pi/l4-pi-chat-worker.ts +12 -1
  53. package/src/server/l4_foundation/pi/l4-pi-package-maintenance-runner.mts +56 -65
  54. package/src/server/l4_foundation/pi/l4-pi-package-maintenance.ts +2 -0
  55. package/src/server/l4_foundation/pi/l4-pi-package-reinstall-runner.mts +49 -0
  56. package/src/server/l4_foundation/pi/l4-pi-package-root-consistency.ts +6 -2
  57. package/src/server/l4_foundation/pi/l4-pi-plugin-probe.ts +3 -1
  58. package/src/server/l4_foundation/pi/l4-pi-runner-process.ts +9 -0
  59. package/src/server/l4_foundation/pi/l4-pi-work-session-runtime.ts +5 -0
  60. package/temp/build/pi-desk/release/.next/BUILD_ID +1 -1
  61. package/temp/build/pi-desk/release/.next/app-path-routes-manifest.json +2 -0
  62. package/temp/build/pi-desk/release/.next/build-manifest.json +3 -3
  63. package/temp/build/pi-desk/release/.next/prerender-manifest.json +3 -3
  64. package/temp/build/pi-desk/release/.next/react-loadable-manifest.json +1 -2
  65. package/temp/build/pi-desk/release/.next/required-server-files.js +3 -3
  66. package/temp/build/pi-desk/release/.next/required-server-files.json +3 -3
  67. package/temp/build/pi-desk/release/.next/routes-manifest.json +12 -0
  68. package/temp/build/pi-desk/release/.next/server/app/_global-error/page.js +1 -1
  69. package/temp/build/pi-desk/release/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  70. package/temp/build/pi-desk/release/.next/server/app/_global-error.html +1 -1
  71. package/temp/build/pi-desk/release/.next/server/app/_global-error.rsc +1 -1
  72. package/temp/build/pi-desk/release/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  73. package/temp/build/pi-desk/release/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  74. package/temp/build/pi-desk/release/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  75. package/temp/build/pi-desk/release/.next/server/app/_not-found/page.js +1 -1
  76. package/temp/build/pi-desk/release/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  77. package/temp/build/pi-desk/release/.next/server/app/api/auth/login/route.js +2 -2
  78. package/temp/build/pi-desk/release/.next/server/app/api/auth/logout/route.js +1 -1
  79. package/temp/build/pi-desk/release/.next/server/app/api/auth-settings/get/route.js +1 -1
  80. package/temp/build/pi-desk/release/.next/server/app/api/auth-settings/replace/route.js +1 -1
  81. package/temp/build/pi-desk/release/.next/server/app/api/capability-modes/get/route.js +1 -1
  82. package/temp/build/pi-desk/release/.next/server/app/api/capability-modes/replace/route.js +1 -1
  83. package/temp/build/pi-desk/release/.next/server/app/api/chat/context/get/route.js +1 -1
  84. package/temp/build/pi-desk/release/.next/server/app/api/chat/images/get/route.js +1 -1
  85. package/temp/build/pi-desk/release/.next/server/app/api/chat/messages/get/route.js +1 -1
  86. package/temp/build/pi-desk/release/.next/server/app/api/health/route.js +1 -1
  87. package/temp/build/pi-desk/release/.next/server/app/api/mcp-check/get/route.js +1 -1
  88. package/temp/build/pi-desk/release/.next/server/app/api/mcp-settings/del/route.js +1 -1
  89. package/temp/build/pi-desk/release/.next/server/app/api/mcp-settings/get/route.js +1 -1
  90. package/temp/build/pi-desk/release/.next/server/app/api/mcp-settings/replace/route.js +1 -1
  91. package/temp/build/pi-desk/release/.next/server/app/api/model-catalog/list/route.js +1 -1
  92. package/temp/build/pi-desk/release/.next/server/app/api/model-settings/get/route.js +1 -1
  93. package/temp/build/pi-desk/release/.next/server/app/api/model-settings/preview/route.js +1 -0
  94. package/temp/build/pi-desk/release/.next/server/app/api/model-settings/preview/route_client-reference-manifest.js +1 -0
  95. package/temp/build/pi-desk/release/.next/server/app/api/model-settings/replace/route.js +1 -1
  96. package/temp/build/pi-desk/release/.next/server/app/api/pi/directories/list/route.js +1 -1
  97. package/temp/build/pi-desk/release/.next/server/app/api/pi/directory-entries/list/route.js +1 -1
  98. package/temp/build/pi-desk/release/.next/server/app/api/pi/directory-ignores/list/route.js +1 -1
  99. package/temp/build/pi-desk/release/.next/server/app/api/pi/directory-ignores/replace/route.js +1 -1
  100. package/temp/build/pi-desk/release/.next/server/app/api/pi/models/list/route.js +1 -1
  101. package/temp/build/pi-desk/release/.next/server/app/api/pi/session-user-messages/list/route.js +1 -1
  102. package/temp/build/pi-desk/release/.next/server/app/api/pi/sessions/list/route.js +1 -1
  103. package/temp/build/pi-desk/release/.next/server/app/api/plugin-catalog/get/route.js +1 -1
  104. package/temp/build/pi-desk/release/.next/server/app/api/plugin-catalog/search/route.js +1 -1
  105. package/temp/build/pi-desk/release/.next/server/app/api/plugin-catalog/settings-get/route.js +1 -1
  106. package/temp/build/pi-desk/release/.next/server/app/api/plugin-catalog/settings-replace/route.js +1 -1
  107. package/temp/build/pi-desk/release/.next/server/app/api/plugins/add/route.js +1 -1
  108. package/temp/build/pi-desk/release/.next/server/app/api/plugins/apply/route.js +1 -1
  109. package/temp/build/pi-desk/release/.next/server/app/api/plugins/batch/route.js +1 -1
  110. package/temp/build/pi-desk/release/.next/server/app/api/plugins/browser-resources/[resourceGroup]/[...resourcePath]/route.js +1 -1
  111. package/temp/build/pi-desk/release/.next/server/app/api/plugins/del/route.js +1 -1
  112. package/temp/build/pi-desk/release/.next/server/app/api/plugins/enabled-set/route.js +1 -1
  113. package/temp/build/pi-desk/release/.next/server/app/api/plugins/get/route.js +1 -1
  114. package/temp/build/pi-desk/release/.next/server/app/api/plugins/host-runtime/[runtimeVersion]/[...resourcePath]/route.js +1 -1
  115. package/temp/build/pi-desk/release/.next/server/app/api/plugins/list/route.js +1 -1
  116. package/temp/build/pi-desk/release/.next/server/app/api/plugins/reload/route.js +1 -1
  117. package/temp/build/pi-desk/release/.next/server/app/api/plugins/update/route.js +1 -1
  118. package/temp/build/pi-desk/release/.next/server/app/api/project-files/get/route.js +1 -1
  119. package/temp/build/pi-desk/release/.next/server/app/api/project-files/list/route.js +1 -1
  120. package/temp/build/pi-desk/release/.next/server/app/api/project-files/reveal/route.js +1 -1
  121. package/temp/build/pi-desk/release/.next/server/app/api/project-files/search/route.js +1 -1
  122. package/temp/build/pi-desk/release/.next/server/app/api/project-git/get/route.js +1 -1
  123. package/temp/build/pi-desk/release/.next/server/app/api/project-git-branches/list/route.js +1 -1
  124. package/temp/build/pi-desk/release/.next/server/app/api/project-git-changes/list/route.js +1 -1
  125. package/temp/build/pi-desk/release/.next/server/app/api/project-git-diff/get/route.js +1 -1
  126. package/temp/build/pi-desk/release/.next/server/app/api/project-git-heads/get/route.js +1 -1
  127. package/temp/build/pi-desk/release/.next/server/app/api/project-git-log/list/route.js +1 -1
  128. package/temp/build/pi-desk/release/.next/server/app/api/project-model-default/get/route.js +1 -1
  129. package/temp/build/pi-desk/release/.next/server/app/api/project-model-default/replace/route.js +1 -1
  130. package/temp/build/pi-desk/release/.next/server/app/api/skill-files/get/route.js +1 -1
  131. package/temp/build/pi-desk/release/.next/server/app/api/skill-files/list/route.js +1 -1
  132. package/temp/build/pi-desk/release/.next/server/app/api/skill-files/replace/route.js +1 -1
  133. package/temp/build/pi-desk/release/.next/server/app/api/skills/list/route.js +1 -1
  134. package/temp/build/pi-desk/release/.next/server/app/api/task-center/images/get/route.js +1 -1
  135. package/temp/build/pi-desk/release/.next/server/app/api/task-center/messages/get/route.js +1 -1
  136. package/temp/build/pi-desk/release/.next/server/app/api/work-session-git-branch/add/route.js +1 -1
  137. package/temp/build/pi-desk/release/.next/server/app/api/work-session-git-branch/replace/route.js +1 -1
  138. package/temp/build/pi-desk/release/.next/server/app/api/work-session-tree/get/route.js +1 -1
  139. package/temp/build/pi-desk/release/.next/server/app/api/work-session-tree-entry/get/route.js +1 -1
  140. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/add/route.js +1 -1
  141. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/branch/route.js +1 -1
  142. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/del/route.js +1 -1
  143. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/rename/route.js +1 -0
  144. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/rename/route_client-reference-manifest.js +1 -0
  145. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/replace/route.js +1 -1
  146. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/sort/route.js +1 -1
  147. package/temp/build/pi-desk/release/.next/server/app/favicon.ico/route.js +1 -1
  148. package/temp/build/pi-desk/release/.next/server/app/login/page.js +1 -1
  149. package/temp/build/pi-desk/release/.next/server/app/login/page_client-reference-manifest.js +1 -1
  150. package/temp/build/pi-desk/release/.next/server/app/page.js +72 -306
  151. package/temp/build/pi-desk/release/.next/server/app/page_client-reference-manifest.js +1 -1
  152. package/temp/build/pi-desk/release/.next/server/app-paths-manifest.json +2 -0
  153. package/temp/build/pi-desk/release/.next/server/chunks/23054.js +1 -1
  154. package/temp/build/pi-desk/release/.next/server/chunks/25406.js +8 -8
  155. package/temp/build/pi-desk/release/.next/server/chunks/33658.js +296 -0
  156. package/temp/build/pi-desk/release/.next/server/chunks/35985.js +5 -5
  157. package/temp/build/pi-desk/release/.next/server/chunks/48180.js +1 -1
  158. package/temp/build/pi-desk/release/.next/server/chunks/49900.js +2 -2
  159. package/temp/build/pi-desk/release/.next/server/chunks/50520.js +5 -5
  160. package/temp/build/pi-desk/release/.next/server/chunks/6917.js +1 -1
  161. package/temp/build/pi-desk/release/.next/server/chunks/78262.js +3 -3
  162. package/temp/build/pi-desk/release/.next/server/chunks/82499.js +6 -6
  163. package/temp/build/pi-desk/release/.next/server/chunks/92386.js +3 -3
  164. package/temp/build/pi-desk/release/.next/server/chunks/94296.js +2 -2
  165. package/temp/build/pi-desk/release/.next/server/middleware-build-manifest.js +1 -1
  166. package/temp/build/pi-desk/release/.next/server/middleware-react-loadable-manifest.js +1 -1
  167. package/temp/build/pi-desk/release/.next/server/pages/500.html +1 -1
  168. package/temp/build/pi-desk/release/.next/server/server-reference-manifest.json +1 -1
  169. package/temp/build/pi-desk/release/.next/static/chunks/31087-ba426d09d6f68bfd.js +1 -0
  170. package/temp/build/pi-desk/release/.next/static/chunks/39654-b5fedd762ea0312e.js +238 -0
  171. package/temp/build/pi-desk/release/.next/static/chunks/49516-cc4dcd84d64ab4fe.js +81 -0
  172. package/temp/build/pi-desk/release/.next/static/chunks/75130-d2ca74894aff8085.js +13 -0
  173. package/temp/build/pi-desk/release/.next/static/chunks/app/_global-error/page-9969fe0baa238786.js +1 -0
  174. package/temp/build/pi-desk/release/.next/static/chunks/app/_not-found/page-9969fe0baa238786.js +1 -0
  175. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth/login/route-9969fe0baa238786.js +1 -0
  176. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth/logout/route-9969fe0baa238786.js +1 -0
  177. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth-settings/get/route-9969fe0baa238786.js +1 -0
  178. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth-settings/replace/route-9969fe0baa238786.js +1 -0
  179. package/temp/build/pi-desk/release/.next/static/chunks/app/api/capability-modes/get/route-9969fe0baa238786.js +1 -0
  180. package/temp/build/pi-desk/release/.next/static/chunks/app/api/capability-modes/replace/route-9969fe0baa238786.js +1 -0
  181. package/temp/build/pi-desk/release/.next/static/chunks/app/api/chat/context/get/route-9969fe0baa238786.js +1 -0
  182. package/temp/build/pi-desk/release/.next/static/chunks/app/api/chat/images/get/route-9969fe0baa238786.js +1 -0
  183. package/temp/build/pi-desk/release/.next/static/chunks/app/api/chat/messages/get/route-9969fe0baa238786.js +1 -0
  184. package/temp/build/pi-desk/release/.next/static/chunks/app/api/health/route-9969fe0baa238786.js +1 -0
  185. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-check/get/route-9969fe0baa238786.js +1 -0
  186. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-settings/del/route-9969fe0baa238786.js +1 -0
  187. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-settings/get/route-9969fe0baa238786.js +1 -0
  188. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-settings/replace/route-9969fe0baa238786.js +1 -0
  189. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-catalog/list/route-9969fe0baa238786.js +1 -0
  190. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-settings/get/route-9969fe0baa238786.js +1 -0
  191. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-settings/preview/route-9969fe0baa238786.js +1 -0
  192. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-settings/replace/route-9969fe0baa238786.js +1 -0
  193. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directories/list/route-9969fe0baa238786.js +1 -0
  194. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directory-entries/list/route-9969fe0baa238786.js +1 -0
  195. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directory-ignores/list/route-9969fe0baa238786.js +1 -0
  196. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directory-ignores/replace/route-9969fe0baa238786.js +1 -0
  197. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/models/list/route-9969fe0baa238786.js +1 -0
  198. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/session-user-messages/list/route-9969fe0baa238786.js +1 -0
  199. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/sessions/list/route-9969fe0baa238786.js +1 -0
  200. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/get/route-9969fe0baa238786.js +1 -0
  201. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/search/route-9969fe0baa238786.js +1 -0
  202. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/settings-get/route-9969fe0baa238786.js +1 -0
  203. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/settings-replace/route-9969fe0baa238786.js +1 -0
  204. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/add/route-9969fe0baa238786.js +1 -0
  205. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/apply/route-9969fe0baa238786.js +1 -0
  206. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/batch/route-9969fe0baa238786.js +1 -0
  207. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/browser-resources/[resourceGroup]/[...resourcePath]/route-9969fe0baa238786.js +1 -0
  208. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/del/route-9969fe0baa238786.js +1 -0
  209. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/enabled-set/route-9969fe0baa238786.js +1 -0
  210. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/get/route-9969fe0baa238786.js +1 -0
  211. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/host-runtime/[runtimeVersion]/[...resourcePath]/route-9969fe0baa238786.js +1 -0
  212. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/list/route-9969fe0baa238786.js +1 -0
  213. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/reload/route-9969fe0baa238786.js +1 -0
  214. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/update/route-9969fe0baa238786.js +1 -0
  215. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/get/route-9969fe0baa238786.js +1 -0
  216. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/list/route-9969fe0baa238786.js +1 -0
  217. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/reveal/route-9969fe0baa238786.js +1 -0
  218. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/search/route-9969fe0baa238786.js +1 -0
  219. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git/get/route-9969fe0baa238786.js +1 -0
  220. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-branches/list/route-9969fe0baa238786.js +1 -0
  221. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-changes/list/route-9969fe0baa238786.js +1 -0
  222. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-diff/get/route-9969fe0baa238786.js +1 -0
  223. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-heads/get/route-9969fe0baa238786.js +1 -0
  224. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-log/list/route-9969fe0baa238786.js +1 -0
  225. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-model-default/get/route-9969fe0baa238786.js +1 -0
  226. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-model-default/replace/route-9969fe0baa238786.js +1 -0
  227. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skill-files/get/route-9969fe0baa238786.js +1 -0
  228. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skill-files/list/route-9969fe0baa238786.js +1 -0
  229. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skill-files/replace/route-9969fe0baa238786.js +1 -0
  230. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skills/list/route-9969fe0baa238786.js +1 -0
  231. package/temp/build/pi-desk/release/.next/static/chunks/app/api/task-center/images/get/route-9969fe0baa238786.js +1 -0
  232. package/temp/build/pi-desk/release/.next/static/chunks/app/api/task-center/messages/get/route-9969fe0baa238786.js +1 -0
  233. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-git-branch/add/route-9969fe0baa238786.js +1 -0
  234. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-git-branch/replace/route-9969fe0baa238786.js +1 -0
  235. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-tree/get/route-9969fe0baa238786.js +1 -0
  236. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-tree-entry/get/route-9969fe0baa238786.js +1 -0
  237. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/add/route-9969fe0baa238786.js +1 -0
  238. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/branch/route-9969fe0baa238786.js +1 -0
  239. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/del/route-9969fe0baa238786.js +1 -0
  240. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/rename/route-9969fe0baa238786.js +1 -0
  241. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/replace/route-9969fe0baa238786.js +1 -0
  242. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/sort/route-9969fe0baa238786.js +1 -0
  243. package/temp/build/pi-desk/release/.next/static/chunks/app/layout-c0e1c5cef8620cf8.js +3 -0
  244. package/temp/build/pi-desk/release/.next/static/chunks/app/login/page-84892b06243891f0.js +1 -0
  245. package/temp/build/pi-desk/release/.next/static/chunks/app/page-df6045b319f52088.js +158 -0
  246. package/temp/build/pi-desk/release/.next/static/chunks/next/dist/client/components/builtin/app-error-9969fe0baa238786.js +1 -0
  247. package/temp/build/pi-desk/release/.next/static/chunks/next/dist/client/components/builtin/forbidden-9969fe0baa238786.js +1 -0
  248. package/temp/build/pi-desk/release/.next/static/chunks/next/dist/client/components/builtin/unauthorized-9969fe0baa238786.js +1 -0
  249. package/temp/build/pi-desk/release/.next/static/chunks/webpack-40a782fc8a3535b9.js +1 -0
  250. package/temp/build/pi-desk/release/.next/static/css/6427d02b6edf406f.css +1 -0
  251. package/temp/build/pi-desk/release/.next/static/css/{adb1d4e48dd43c0a.css → 949d0d1a99d5de92.css} +1 -1
  252. package/temp/build/pi-desk/release/.next/static/uj2IMtGMwxhDXhTVi7sw5/_buildManifest.js +1 -0
  253. package/temp/build/pi-desk/release/.next/trace-build +1 -1
  254. package/src/client/l2_biz/workbench/hooks/l2-work-session-column-motion.ts +0 -87
  255. package/src/client/l3_modules/work-session-visual/l3-work-session-status-border.tsx +0 -66
  256. package/src/client/l4_foundation/ui/l4-power-saving.ts +0 -45
  257. package/src/client/l4_foundation/ui/l4-window-reveal.ts +0 -30
  258. package/temp/build/pi-desk/release/.next/server/chunks/56284.js +0 -62
  259. package/temp/build/pi-desk/release/.next/static/96geGVI-j_dC6I3k-XFCB/_buildManifest.js +0 -1
  260. package/temp/build/pi-desk/release/.next/static/chunks/31087-333cae396a52f232.js +0 -1
  261. package/temp/build/pi-desk/release/.next/static/chunks/45992-92d8b8b10fcfbb6b.js +0 -13
  262. package/temp/build/pi-desk/release/.next/static/chunks/47340-c1c09c77c1a88514.js +0 -318
  263. package/temp/build/pi-desk/release/.next/static/chunks/57208-d6d38167dabb91e4.js +0 -1
  264. package/temp/build/pi-desk/release/.next/static/chunks/app/_global-error/page-dde4fd973791f7f7.js +0 -1
  265. package/temp/build/pi-desk/release/.next/static/chunks/app/_not-found/page-dde4fd973791f7f7.js +0 -1
  266. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth/login/route-dde4fd973791f7f7.js +0 -1
  267. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth/logout/route-dde4fd973791f7f7.js +0 -1
  268. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth-settings/get/route-dde4fd973791f7f7.js +0 -1
  269. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth-settings/replace/route-dde4fd973791f7f7.js +0 -1
  270. package/temp/build/pi-desk/release/.next/static/chunks/app/api/capability-modes/get/route-dde4fd973791f7f7.js +0 -1
  271. package/temp/build/pi-desk/release/.next/static/chunks/app/api/capability-modes/replace/route-dde4fd973791f7f7.js +0 -1
  272. package/temp/build/pi-desk/release/.next/static/chunks/app/api/chat/context/get/route-dde4fd973791f7f7.js +0 -1
  273. package/temp/build/pi-desk/release/.next/static/chunks/app/api/chat/images/get/route-dde4fd973791f7f7.js +0 -1
  274. package/temp/build/pi-desk/release/.next/static/chunks/app/api/chat/messages/get/route-dde4fd973791f7f7.js +0 -1
  275. package/temp/build/pi-desk/release/.next/static/chunks/app/api/health/route-dde4fd973791f7f7.js +0 -1
  276. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-check/get/route-dde4fd973791f7f7.js +0 -1
  277. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-settings/del/route-dde4fd973791f7f7.js +0 -1
  278. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-settings/get/route-dde4fd973791f7f7.js +0 -1
  279. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-settings/replace/route-dde4fd973791f7f7.js +0 -1
  280. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-catalog/list/route-dde4fd973791f7f7.js +0 -1
  281. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-settings/get/route-dde4fd973791f7f7.js +0 -1
  282. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-settings/replace/route-dde4fd973791f7f7.js +0 -1
  283. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directories/list/route-dde4fd973791f7f7.js +0 -1
  284. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directory-entries/list/route-dde4fd973791f7f7.js +0 -1
  285. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directory-ignores/list/route-dde4fd973791f7f7.js +0 -1
  286. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directory-ignores/replace/route-dde4fd973791f7f7.js +0 -1
  287. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/models/list/route-dde4fd973791f7f7.js +0 -1
  288. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/session-user-messages/list/route-dde4fd973791f7f7.js +0 -1
  289. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/sessions/list/route-dde4fd973791f7f7.js +0 -1
  290. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/get/route-dde4fd973791f7f7.js +0 -1
  291. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/search/route-dde4fd973791f7f7.js +0 -1
  292. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/settings-get/route-dde4fd973791f7f7.js +0 -1
  293. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/settings-replace/route-dde4fd973791f7f7.js +0 -1
  294. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/add/route-dde4fd973791f7f7.js +0 -1
  295. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/apply/route-dde4fd973791f7f7.js +0 -1
  296. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/batch/route-dde4fd973791f7f7.js +0 -1
  297. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/browser-resources/[resourceGroup]/[...resourcePath]/route-dde4fd973791f7f7.js +0 -1
  298. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/del/route-dde4fd973791f7f7.js +0 -1
  299. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/enabled-set/route-dde4fd973791f7f7.js +0 -1
  300. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/get/route-dde4fd973791f7f7.js +0 -1
  301. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/host-runtime/[runtimeVersion]/[...resourcePath]/route-dde4fd973791f7f7.js +0 -1
  302. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/list/route-dde4fd973791f7f7.js +0 -1
  303. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/reload/route-dde4fd973791f7f7.js +0 -1
  304. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/update/route-dde4fd973791f7f7.js +0 -1
  305. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/get/route-dde4fd973791f7f7.js +0 -1
  306. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/list/route-dde4fd973791f7f7.js +0 -1
  307. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/reveal/route-dde4fd973791f7f7.js +0 -1
  308. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/search/route-dde4fd973791f7f7.js +0 -1
  309. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git/get/route-dde4fd973791f7f7.js +0 -1
  310. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-branches/list/route-dde4fd973791f7f7.js +0 -1
  311. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-changes/list/route-dde4fd973791f7f7.js +0 -1
  312. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-diff/get/route-dde4fd973791f7f7.js +0 -1
  313. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-heads/get/route-dde4fd973791f7f7.js +0 -1
  314. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-log/list/route-dde4fd973791f7f7.js +0 -1
  315. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-model-default/get/route-dde4fd973791f7f7.js +0 -1
  316. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-model-default/replace/route-dde4fd973791f7f7.js +0 -1
  317. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skill-files/get/route-dde4fd973791f7f7.js +0 -1
  318. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skill-files/list/route-dde4fd973791f7f7.js +0 -1
  319. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skill-files/replace/route-dde4fd973791f7f7.js +0 -1
  320. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skills/list/route-dde4fd973791f7f7.js +0 -1
  321. package/temp/build/pi-desk/release/.next/static/chunks/app/api/task-center/images/get/route-dde4fd973791f7f7.js +0 -1
  322. package/temp/build/pi-desk/release/.next/static/chunks/app/api/task-center/messages/get/route-dde4fd973791f7f7.js +0 -1
  323. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-git-branch/add/route-dde4fd973791f7f7.js +0 -1
  324. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-git-branch/replace/route-dde4fd973791f7f7.js +0 -1
  325. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-tree/get/route-dde4fd973791f7f7.js +0 -1
  326. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-tree-entry/get/route-dde4fd973791f7f7.js +0 -1
  327. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/add/route-dde4fd973791f7f7.js +0 -1
  328. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/branch/route-dde4fd973791f7f7.js +0 -1
  329. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/del/route-dde4fd973791f7f7.js +0 -1
  330. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/replace/route-dde4fd973791f7f7.js +0 -1
  331. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/sort/route-dde4fd973791f7f7.js +0 -1
  332. package/temp/build/pi-desk/release/.next/static/chunks/app/layout-839162b6cfae8347.js +0 -3
  333. package/temp/build/pi-desk/release/.next/static/chunks/app/login/page-4532a3bbee48e219.js +0 -1
  334. package/temp/build/pi-desk/release/.next/static/chunks/app/page-4b6367cde5c04597.js +0 -158
  335. package/temp/build/pi-desk/release/.next/static/chunks/next/dist/client/components/builtin/app-error-dde4fd973791f7f7.js +0 -1
  336. package/temp/build/pi-desk/release/.next/static/chunks/next/dist/client/components/builtin/forbidden-dde4fd973791f7f7.js +0 -1
  337. package/temp/build/pi-desk/release/.next/static/chunks/next/dist/client/components/builtin/unauthorized-dde4fd973791f7f7.js +0 -1
  338. package/temp/build/pi-desk/release/.next/static/chunks/webpack-735430d61da52e9d.js +0 -1
  339. package/temp/build/pi-desk/release/.next/static/css/4a5dda7ff3a82c4a.css +0 -1
  340. /package/temp/build/pi-desk/release/.next/static/{96geGVI-j_dC6I3k-XFCB → uj2IMtGMwxhDXhTVi7sw5}/_ssgManifest.js +0 -0
@@ -40,10 +40,6 @@ import { cn } from '@client/l4_foundation/lib/l4-utils'
40
40
  import type { L4PluginBrowserContributionDescriptor } from '@client/l4_foundation/plugin-host/l4-plugin-host-runtime'
41
41
  import { useL4PluginRegistry } from '@client/l4_foundation/plugin-host/l4-plugin-host-context'
42
42
  import { L4PluginIcon } from '@client/l4_foundation/plugin-host/l4-plugin-icon'
43
- import {
44
- getL3WorkSessionSurfacePresentation,
45
- L3WorkSessionStatusBorder
46
- } from '@client/l3_modules/work-session-visual/l3-work-session-visual-view'
47
43
  import {
48
44
  PromptInputButton,
49
45
  PromptInputFooter,
@@ -51,7 +47,6 @@ import {
51
47
  } from '@client/l4_foundation/ui/ai-elements/prompt-input'
52
48
  import { L4ImageViewer, type L4ImageViewerSlide } from '@client/l4_foundation/ui/l4-image-viewer'
53
49
  import { useL4AppToast } from '@client/l4_foundation/ui/l4-app-toast'
54
- import { useL4PowerSaving } from '@client/l4_foundation/ui/l4-power-saving'
55
50
  import { Button } from '@client/l4_foundation/ui/shadcn/button'
56
51
  import {
57
52
  DropdownMenu,
@@ -186,7 +181,6 @@ function L2WorkbenchChatComposerComponent({
186
181
  const { t } = useTranslation('workbench')
187
182
  const toast = useL4AppToast()
188
183
  const pluginDescriptors = useL4PluginRegistry()
189
- const powerSaving = useL4PowerSaving()
190
184
  const source = useMemo(
191
185
  () =>
192
186
  L2ChatSourceSchema.parse({
@@ -364,8 +358,6 @@ function L2WorkbenchChatComposerComponent({
364
358
  : t('selectModel')
365
359
  const modelTooltip = currentModel ? t('modelTooltip', { model: modelLabel }) : t('chooseModel')
366
360
  const displayedError = localError ?? inputState.error
367
- const visualState = workSessionRunning ? 'running' : completionPending ? 'completed' : 'idle'
368
- const surface = getL3WorkSessionSurfacePresentation(workSession.cwd)
369
361
 
370
362
  const runAction = useCallback(
371
363
  async (action: () => Promise<void>, successMessage?: string): Promise<void> => {
@@ -649,10 +641,9 @@ function L2WorkbenchChatComposerComponent({
649
641
  ? t('composerCompleted')
650
642
  : t('composer')
651
643
  }
652
- className={cn(styles.inputFrame, surface.className)}
644
+ className={styles.inputFrame}
653
645
  data-composer-mobile={mobile ? 'true' : 'false'}
654
646
  data-composer-metadata-row={desktopMetadataRow ? 'true' : 'false'}
655
- style={surface.style}
656
647
  onSubmit={handleSubmit}
657
648
  onDragOver={(event) => {
658
649
  if (event.dataTransfer.types.includes('Files')) event.preventDefault()
@@ -679,364 +670,356 @@ function L2WorkbenchChatComposerComponent({
679
670
  event.currentTarget.value = ''
680
671
  }}
681
672
  />
682
- {/* 巡边与内容裁切分层,避免描线被裁细;禁用工具只弱化自身,不连带输入区。 */}
683
- <div className="relative rounded-xl">
684
- <InputGroup
685
- className="relative z-[1] overflow-hidden rounded-xl border-border bg-card shadow-xs transition-[background-color,border-color] duration-150 ease-out has-disabled:bg-card has-disabled:opacity-100 dark:shadow-none motion-reduce:transition-none"
686
- aria-busy={idleSending}
687
- >
688
- {composerImages.length > 0 ? (
689
- <InputGroupAddon
690
- align="block-start"
691
- className="pi-desk-chat-scrollbar gap-2 overflow-x-auto px-3 pt-3 pb-1"
692
- >
693
- {composerImages.map((image) => (
694
- <div
695
- key={image.localId}
696
- className="relative size-16 shrink-0 overflow-hidden rounded-md border bg-muted"
697
- title={`${image.name} · ${image.width}×${image.height} · ${formatBytes(image.blob.size)}`}
673
+ {/* 禁用工具只弱化自身,不连带输入区。 */}
674
+ <InputGroup
675
+ className="overflow-hidden rounded-xl border-border bg-card shadow-xs transition-[background-color,border-color] duration-150 ease-out has-disabled:bg-card has-disabled:opacity-100 dark:shadow-none motion-reduce:transition-none"
676
+ aria-busy={idleSending}
677
+ >
678
+ {composerImages.length > 0 ? (
679
+ <InputGroupAddon
680
+ align="block-start"
681
+ className="pi-desk-chat-scrollbar gap-2 overflow-x-auto px-3 pt-3 pb-1"
682
+ >
683
+ {composerImages.map((image) => (
684
+ <div
685
+ key={image.localId}
686
+ className="relative size-16 shrink-0 overflow-hidden rounded-md border bg-muted"
687
+ title={`${image.name} · ${image.width}×${image.height} · ${formatBytes(image.blob.size)}`}
688
+ >
689
+ <button
690
+ type="button"
691
+ disabled={image.status !== 'ready'}
692
+ aria-label={t('imagePreview', { name: image.name })}
693
+ className="group size-full cursor-zoom-in outline-none disabled:cursor-default focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset"
694
+ onClick={() => openImagePreview(image.localId)}
698
695
  >
699
- <button
700
- type="button"
701
- disabled={image.status !== 'ready'}
702
- aria-label={t('imagePreview', { name: image.name })}
703
- className="group size-full cursor-zoom-in outline-none disabled:cursor-default focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset"
704
- onClick={() => openImagePreview(image.localId)}
705
- >
706
- {/* Blob 已在浏览器压缩,且 URL 会随 Draft 生命周期主动释放。 */}
707
- {/* eslint-disable-next-line @next/next/no-img-element */}
708
- <img
709
- src={image.objectUrl}
710
- alt={image.name}
711
- className="size-full object-cover transition-transform duration-200 group-hover:scale-105 motion-reduce:transition-none"
712
- />
713
- </button>
714
- {image.status === 'optimizing' ? (
715
- <div className="pointer-events-none absolute inset-0 grid place-items-center bg-background/85 text-xs">
716
- {t('imageProcessing')}
717
- </div>
718
- ) : null}
719
- {image.status === 'error' ? (
720
- <div className="pointer-events-none absolute inset-x-0 bottom-0 bg-popover px-1 py-0.5 text-xs text-destructive">
721
- {t('imageFailed')}
722
- </div>
723
- ) : null}
724
- <button
725
- type="button"
726
- aria-label={t('imageRemove', { name: image.name })}
727
- aria-disabled={idleSending}
728
- className="absolute right-0.5 top-0.5 z-10 grid size-6 cursor-pointer place-items-center rounded-md bg-popover text-popover-foreground shadow-sm hover:bg-accent"
729
- onClick={() => {
730
- if (!idleSending) inputRuntime.removeImage(source, image.localId)
731
- }}
732
- >
733
- <XIcon className="size-3" />
734
- </button>
735
- </div>
736
- ))}
737
- <span className="self-end whitespace-nowrap text-xs text-muted-foreground">
738
- {composerImages.length}/10 · {formatBytes(composerImageBytes)}
739
- </span>
740
- </InputGroupAddon>
741
- ) : null}
696
+ {/* Blob 已在浏览器压缩,且 URL 会随 Draft 生命周期主动释放。 */}
697
+ {/* eslint-disable-next-line @next/next/no-img-element */}
698
+ <img
699
+ src={image.objectUrl}
700
+ alt={image.name}
701
+ className="size-full object-cover transition-transform duration-200 group-hover:scale-105 motion-reduce:transition-none"
702
+ />
703
+ </button>
704
+ {image.status === 'optimizing' ? (
705
+ <div className="pointer-events-none absolute inset-0 grid place-items-center bg-background/85 text-xs">
706
+ {t('imageProcessing')}
707
+ </div>
708
+ ) : null}
709
+ {image.status === 'error' ? (
710
+ <div className="pointer-events-none absolute inset-x-0 bottom-0 bg-popover px-1 py-0.5 text-xs text-destructive">
711
+ {t('imageFailed')}
712
+ </div>
713
+ ) : null}
714
+ <button
715
+ type="button"
716
+ aria-label={t('imageRemove', { name: image.name })}
717
+ aria-disabled={idleSending}
718
+ className="absolute right-0.5 top-0.5 z-10 grid size-6 cursor-pointer place-items-center rounded-md bg-popover text-popover-foreground shadow-sm hover:bg-accent"
719
+ onClick={() => {
720
+ if (!idleSending) inputRuntime.removeImage(source, image.localId)
721
+ }}
722
+ >
723
+ <XIcon className="size-3" />
724
+ </button>
725
+ </div>
726
+ ))}
727
+ <span className="self-end whitespace-nowrap text-xs text-muted-foreground">
728
+ {composerImages.length}/10 · {formatBytes(composerImageBytes)}
729
+ </span>
730
+ </InputGroupAddon>
731
+ ) : null}
742
732
 
743
- <InputGroupTextarea
744
- value={composerText}
745
- disabled={!inputState.loaded || inputState.loading}
746
- readOnly={idleSending}
747
- aria-disabled={idleSending}
748
- aria-autocomplete="list"
749
- aria-controls={slashCommands.open ? L2_WORKBENCH_SLASH_COMMAND_MENU_ID : undefined}
750
- aria-expanded={slashCommands.open}
751
- aria-activedescendant={
752
- slashCommands.open && slashCommands.commands.length > 0
753
- ? getL2WorkbenchSlashCommandOptionId(slashCommands.activeIndex)
754
- : undefined
755
- }
756
- placeholder={
757
- inputState.loading
758
- ? t('draftLoading')
759
- : !inputState.loaded && inputState.error
760
- ? t('draftFailed')
761
- : t('inputPlaceholder')
762
- }
763
- className={cn(
764
- styles.inputText,
765
- 'pi-desk-chat-scrollbar max-h-48 min-h-9 overflow-y-auto px-3 pt-3 pb-1'
766
- )}
767
- onChange={(event) => inputRuntime.setText(source, event.currentTarget.value)}
768
- onClick={slashCommands.reopen}
769
- onBlur={slashCommands.dismiss}
770
- onCompositionStart={slashCommands.handleCompositionStart}
771
- onCompositionEnd={slashCommands.handleCompositionEnd}
772
- onKeyDown={handleKeyDown}
773
- onPaste={handlePaste}
774
- />
733
+ <InputGroupTextarea
734
+ value={composerText}
735
+ disabled={!inputState.loaded || inputState.loading}
736
+ readOnly={idleSending}
737
+ aria-disabled={idleSending}
738
+ aria-autocomplete="list"
739
+ aria-controls={slashCommands.open ? L2_WORKBENCH_SLASH_COMMAND_MENU_ID : undefined}
740
+ aria-expanded={slashCommands.open}
741
+ aria-activedescendant={
742
+ slashCommands.open && slashCommands.commands.length > 0
743
+ ? getL2WorkbenchSlashCommandOptionId(slashCommands.activeIndex)
744
+ : undefined
745
+ }
746
+ placeholder={
747
+ inputState.loading
748
+ ? t('draftLoading')
749
+ : !inputState.loaded && inputState.error
750
+ ? t('draftFailed')
751
+ : t('inputPlaceholder')
752
+ }
753
+ className={cn(
754
+ styles.inputText,
755
+ 'pi-desk-chat-scrollbar max-h-48 min-h-9 overflow-y-auto px-3 pt-3 pb-1'
756
+ )}
757
+ onChange={(event) => inputRuntime.setText(source, event.currentTarget.value)}
758
+ onClick={slashCommands.reopen}
759
+ onBlur={slashCommands.dismiss}
760
+ onCompositionStart={slashCommands.handleCompositionStart}
761
+ onCompositionEnd={slashCommands.handleCompositionEnd}
762
+ onKeyDown={handleKeyDown}
763
+ onPaste={handlePaste}
764
+ />
775
765
 
776
- <PromptInputFooter ref={footerRef} className={styles.footer}>
777
- <PromptInputTools data-composer-tools="primary" className={styles.primaryTools}>
778
- <DropdownMenu>
779
- <DropdownMenuTrigger
780
- render={<PromptInputButton tooltip={t('more')} aria-label={t('moreActions')} />}
781
- >
782
- <EllipsisIcon className="size-4" />
783
- </DropdownMenuTrigger>
784
- <DropdownMenuContent align="start" side="top" className="w-52">
785
- <DropdownMenuGroup>
786
- <DropdownMenuLabel>{t('session')}</DropdownMenuLabel>
787
- <DropdownMenuItem
788
- aria-label={t('switchBranch')}
789
- disabled={!chatReady || !inputState.loaded || inputState.loading}
790
- onClick={() => onOpenBranchPicker(workSession.workId)}
791
- >
792
- <GitBranchIcon className="size-4" />
793
- {t('sessionBranch')}
794
- <span className="ml-auto text-xs text-muted-foreground">
795
- {t('escapeTwice')}
796
- </span>
797
- </DropdownMenuItem>
766
+ <PromptInputFooter ref={footerRef} className={styles.footer}>
767
+ <PromptInputTools data-composer-tools="primary" className={styles.primaryTools}>
768
+ <DropdownMenu>
769
+ <DropdownMenuTrigger
770
+ render={<PromptInputButton tooltip={t('more')} aria-label={t('moreActions')} />}
771
+ >
772
+ <EllipsisIcon className="size-4" />
773
+ </DropdownMenuTrigger>
774
+ <DropdownMenuContent align="start" side="top" className="w-52">
775
+ <DropdownMenuGroup>
776
+ <DropdownMenuLabel>{t('session')}</DropdownMenuLabel>
777
+ <DropdownMenuItem
778
+ aria-label={t('switchBranch')}
779
+ disabled={!chatReady || !inputState.loaded || inputState.loading}
780
+ onClick={() => onOpenBranchPicker(workSession.workId)}
781
+ >
782
+ <GitBranchIcon className="size-4" />
783
+ {t('sessionBranch')}
784
+ <span className="ml-auto text-xs text-muted-foreground">
785
+ {t('escapeTwice')}
786
+ </span>
787
+ </DropdownMenuItem>
788
+ <DropdownMenuItem
789
+ aria-label={t('clone')}
790
+ disabled={!chatReady || cloneDisabled || clonePending}
791
+ title={
792
+ workSession.messageCounts.total === 0 ? t('cloneEmpty') : t('cloneTip')
793
+ }
794
+ onClick={onCloneWorkSession}
795
+ >
796
+ {clonePending ? (
797
+ <LoaderCircleIcon className="size-4 animate-spin" />
798
+ ) : (
799
+ <CopyPlusIcon className="size-4" />
800
+ )}
801
+ {clonePending ? t('cloning') : t('clone')}
802
+ </DropdownMenuItem>
803
+ <DropdownMenuItem
804
+ aria-label={t('replaceSession')}
805
+ aria-busy={newSessionPending}
806
+ disabled={!chatReady || newSessionDisabled || newSessionPending}
807
+ onClick={onNewSession}
808
+ >
809
+ {newSessionPending ? (
810
+ <LoaderCircleIcon className="size-4 animate-spin" />
811
+ ) : (
812
+ <MessageSquarePlusIcon className="size-4" />
813
+ )}
814
+ {newSessionPending ? t('replacing') : t('replaceSession')}
815
+ </DropdownMenuItem>
816
+ </DropdownMenuGroup>
817
+ <DropdownMenuSeparator />
818
+ <DropdownMenuGroup>
819
+ <DropdownMenuLabel>{t('tools')}</DropdownMenuLabel>
820
+ {renderTaskMenu({
821
+ source,
822
+ cwd: workSession.cwd,
823
+ pluginState: taskCenterPluginState
824
+ })}
825
+ <DropdownMenuItem
826
+ aria-label={t('toolsAndContext', { defaultValue: '工具与上下文' })}
827
+ disabled={!chatReady || hasNativeQuestion}
828
+ onClick={() => setModelContextSourceKey(currentSourceKey)}
829
+ >
830
+ <FileTextIcon className="size-4" />
831
+ {t('toolsAndContext', { defaultValue: '工具与上下文' })}
832
+ </DropdownMenuItem>
833
+ <DropdownMenuItem
834
+ aria-label={t('reloadPi')}
835
+ disabled={
836
+ !inputState.loaded ||
837
+ inputState.loading ||
838
+ !chatReady ||
839
+ workSessionRunning ||
840
+ actionPending ||
841
+ reloadPending
842
+ }
843
+ title={t('reloadPiTip')}
844
+ onClick={() => void reloadPi(false)}
845
+ >
846
+ {reloadPending ? (
847
+ <LoaderCircleIcon className="size-4 animate-spin" />
848
+ ) : (
849
+ <RefreshCwIcon className="size-4" />
850
+ )}
851
+ {reloadPending ? t('reloadingPi') : t('reloadPi')}
852
+ </DropdownMenuItem>
853
+ {basicPresentation && !basicChat ? (
798
854
  <DropdownMenuItem
799
- aria-label={t('clone')}
800
- disabled={!chatReady || cloneDisabled || clonePending}
801
- title={
802
- workSession.messageCounts.total === 0 ? t('cloneEmpty') : t('cloneTip')
855
+ disabled={!chatReady || actionPending || reloadPending}
856
+ onClick={() =>
857
+ void runAction(() => chatRuntime.setPresentation(source, 'normal'))
803
858
  }
804
- onClick={onCloneWorkSession}
805
- >
806
- {clonePending ? (
807
- <LoaderCircleIcon className="size-4 animate-spin" />
808
- ) : (
809
- <CopyPlusIcon className="size-4" />
810
- )}
811
- {clonePending ? t('cloning') : t('clone')}
812
- </DropdownMenuItem>
813
- <DropdownMenuItem
814
- aria-label={t('replaceSession')}
815
- aria-busy={newSessionPending}
816
- disabled={!chatReady || newSessionDisabled || newSessionPending}
817
- onClick={onNewSession}
818
- >
819
- {newSessionPending ? (
820
- <LoaderCircleIcon className="size-4 animate-spin" />
821
- ) : (
822
- <MessageSquarePlusIcon className="size-4" />
823
- )}
824
- {newSessionPending ? t('replacing') : t('replaceSession')}
825
- </DropdownMenuItem>
826
- </DropdownMenuGroup>
827
- <DropdownMenuSeparator />
828
- <DropdownMenuGroup>
829
- <DropdownMenuLabel>{t('tools')}</DropdownMenuLabel>
830
- {renderTaskMenu({
831
- source,
832
- cwd: workSession.cwd,
833
- pluginState: taskCenterPluginState
834
- })}
835
- <DropdownMenuItem
836
- aria-label={t('toolsAndContext', { defaultValue: '工具与上下文' })}
837
- disabled={!chatReady || hasNativeQuestion}
838
- onClick={() => setModelContextSourceKey(currentSourceKey)}
839
859
  >
840
860
  <FileTextIcon className="size-4" />
841
- {t('toolsAndContext', { defaultValue: '工具与上下文' })}
842
- </DropdownMenuItem>
843
- <DropdownMenuItem
844
- aria-label={t('reloadPi')}
845
- disabled={
846
- !inputState.loaded ||
847
- inputState.loading ||
848
- !chatReady ||
849
- workSessionRunning ||
850
- actionPending ||
851
- reloadPending
852
- }
853
- title={t('reloadPiTip')}
854
- onClick={() => void reloadPi(false)}
855
- >
856
- {reloadPending ? (
857
- <LoaderCircleIcon className="size-4 animate-spin" />
858
- ) : (
859
- <RefreshCwIcon className="size-4" />
860
- )}
861
- {reloadPending ? t('reloadingPi') : t('reloadPi')}
861
+ {t('restorePluginPresentation')}
862
862
  </DropdownMenuItem>
863
- {basicPresentation && !basicChat ? (
864
- <DropdownMenuItem
865
- disabled={!chatReady || actionPending || reloadPending}
866
- onClick={() =>
867
- void runAction(() => chatRuntime.setPresentation(source, 'normal'))
868
- }
869
- >
870
- <FileTextIcon className="size-4" />
871
- {t('restorePluginPresentation')}
872
- </DropdownMenuItem>
873
- ) : null}
874
- </DropdownMenuGroup>
875
- {pluginPanels.length > 0 ? (
876
- <>
877
- <DropdownMenuSeparator />
878
- <DropdownMenuGroup>
879
- <DropdownMenuLabel>{t('plugins')}</DropdownMenuLabel>
880
- {pluginPanels.map((panel) => (
881
- <DropdownMenuItem
882
- key={`${panel.pluginName}:${panel.descriptor.contributionName}`}
883
- onClick={() =>
884
- setActivePluginPanel({
885
- pluginName: panel.pluginName,
886
- contributionName: panel.descriptor.contributionName,
887
- sourceKey: currentSourceKey
888
- })
889
- }
890
- >
891
- <L4PluginIcon icon={panel.descriptor.icon} className="size-4" />
892
- <span className="truncate">{panel.descriptor.label}</span>
893
- </DropdownMenuItem>
894
- ))}
895
- </DropdownMenuGroup>
896
- </>
897
863
  ) : null}
898
- </DropdownMenuContent>
899
- </DropdownMenu>
900
-
901
- <PromptInputButton
902
- tooltip={t('addImage')}
903
- aria-label={t('addImage')}
904
- disabled={inputState.images.length >= 10}
905
- aria-disabled={idleSending || inputState.images.length >= 10}
906
- onClick={() => {
907
- if (!idleSending) fileInputRef.current?.click()
908
- }}
909
- >
910
- <PaperclipIcon className="size-4" />
911
- </PromptInputButton>
864
+ </DropdownMenuGroup>
865
+ {pluginPanels.length > 0 ? (
866
+ <>
867
+ <DropdownMenuSeparator />
868
+ <DropdownMenuGroup>
869
+ <DropdownMenuLabel>{t('plugins')}</DropdownMenuLabel>
870
+ {pluginPanels.map((panel) => (
871
+ <DropdownMenuItem
872
+ key={`${panel.pluginName}:${panel.descriptor.contributionName}`}
873
+ onClick={() =>
874
+ setActivePluginPanel({
875
+ pluginName: panel.pluginName,
876
+ contributionName: panel.descriptor.contributionName,
877
+ sourceKey: currentSourceKey
878
+ })
879
+ }
880
+ >
881
+ <L4PluginIcon icon={panel.descriptor.icon} className="size-4" />
882
+ <span className="truncate">{panel.descriptor.label}</span>
883
+ </DropdownMenuItem>
884
+ ))}
885
+ </DropdownMenuGroup>
886
+ </>
887
+ ) : null}
888
+ </DropdownMenuContent>
889
+ </DropdownMenu>
912
890
 
913
- {contextUsage && currentModelOption?.contextWindow !== null ? (
914
- <L2WorkbenchContextUsage
915
- sessionId={workSession.sessionId}
916
- cwd={workSession.cwd}
917
- tokens={contextUsage.tokens}
918
- contextWindow={contextUsage.contextWindow}
919
- contextIgnorePlugin={chatRuntimeState.plugins['context-ignore']}
920
- ignoreDisabled={!chatReady || mainRunning || actionPending}
921
- ignorePending={contextIgnorePending}
922
- compactDisabled={!chatReady || mainRunning || actionPending}
923
- compactPending={contextCompactPending}
924
- onIgnoreContext={ignoreContext}
925
- onCompactContext={compactContext}
926
- />
927
- ) : currentModelOption?.contextWindow === null ? (
928
- <span className="px-1 text-xs text-muted-foreground">
929
- {t('modelContextUnknown', { defaultValue: '上下文未知' })}
930
- </span>
931
- ) : null}
932
- </PromptInputTools>
891
+ <PromptInputButton
892
+ tooltip={t('addImage')}
893
+ aria-label={t('addImage')}
894
+ disabled={inputState.images.length >= 10}
895
+ aria-disabled={idleSending || inputState.images.length >= 10}
896
+ onClick={() => {
897
+ if (!idleSending) fileInputRef.current?.click()
898
+ }}
899
+ >
900
+ <PaperclipIcon className="size-4" />
901
+ </PromptInputButton>
933
902
 
934
- <PromptInputTools data-composer-tools="metadata" className={styles.metadataTools}>
935
- <L2GitBranchButton
936
- workSession={workSession}
937
- runtime={gitRuntime}
938
- active={active}
939
- chatReady={chatReady}
940
- onOpen={onOpenGitBranchPicker}
903
+ {contextUsage && currentModelOption?.contextWindow !== null ? (
904
+ <L2WorkbenchContextUsage
905
+ sessionId={workSession.sessionId}
906
+ cwd={workSession.cwd}
907
+ tokens={contextUsage.tokens}
908
+ contextWindow={contextUsage.contextWindow}
909
+ contextIgnorePlugin={chatRuntimeState.plugins['context-ignore']}
910
+ ignoreDisabled={!chatReady || mainRunning || actionPending}
911
+ ignorePending={contextIgnorePending}
912
+ compactDisabled={!chatReady || mainRunning || actionPending}
913
+ compactPending={contextCompactPending}
914
+ onIgnoreContext={ignoreContext}
915
+ onCompactContext={compactContext}
941
916
  />
917
+ ) : currentModelOption?.contextWindow === null ? (
918
+ <span className="px-1 text-xs text-muted-foreground">
919
+ {t('modelContextUnknown', { defaultValue: '上下文未知' })}
920
+ </span>
921
+ ) : null}
922
+ </PromptInputTools>
942
923
 
943
- <L2WorkbenchCapabilityModePicker
944
- modes={capabilityModes}
945
- value={chatRuntimeState.capabilityMode}
946
- disabled={!chatReady}
947
- onChange={changeCapabilityMode}
948
- />
924
+ <PromptInputTools data-composer-tools="metadata" className={styles.metadataTools}>
925
+ <L2GitBranchButton
926
+ workSession={workSession}
927
+ runtime={gitRuntime}
928
+ active={active}
929
+ chatReady={chatReady}
930
+ onOpen={onOpenGitBranchPicker}
931
+ />
949
932
 
950
- <L2WorkbenchModelPicker
951
- key={currentSourceKey}
952
- source={source}
953
- runtime={inputRuntime}
954
- catalog={inputState.models}
955
- current={currentModel}
956
- label={modelLabel}
957
- title={modelTooltip}
958
- disabled={!chatReady || workSessionRunning || idleSending || actionPending}
959
- triggerClassName={styles.modelTrigger}
960
- detailsClassName={styles.modelTriggerDetails}
961
- onOpenSettings={onOpenSettings}
962
- />
963
- </PromptInputTools>
933
+ <L2WorkbenchCapabilityModePicker
934
+ modes={capabilityModes}
935
+ value={chatRuntimeState.capabilityMode}
936
+ disabled={!chatReady}
937
+ onChange={changeCapabilityMode}
938
+ />
964
939
 
965
- {mainRunning && idleSending ? (
966
- <span
967
- ref={statusRef}
968
- className="min-w-0 truncate px-2 text-xs text-muted-foreground"
969
- >
970
- {t('preparingContext')}
971
- </span>
972
- ) : null}
940
+ <L2WorkbenchModelPicker
941
+ key={currentSourceKey}
942
+ source={source}
943
+ runtime={inputRuntime}
944
+ catalog={inputState.models}
945
+ current={currentModel}
946
+ label={modelLabel}
947
+ title={modelTooltip}
948
+ disabled={!chatReady || workSessionRunning || idleSending || actionPending}
949
+ triggerClassName={styles.modelTrigger}
950
+ detailsClassName={styles.modelTriggerDetails}
951
+ onOpenSettings={onOpenSettings}
952
+ />
953
+ </PromptInputTools>
973
954
 
974
- <div ref={submitToolsRef} className={styles.submitTools}>
975
- <L2WorkbenchQueuePreview
976
- queues={queues}
977
- disabled={!chatReady || actionPending}
978
- onRestore={() =>
979
- void runAction(() => inputRuntime.restoreQueue(source), t('queuesRestored'))
980
- }
981
- />
955
+ {mainRunning && idleSending ? (
956
+ <span ref={statusRef} className="min-w-0 truncate px-2 text-xs text-muted-foreground">
957
+ {t('preparingContext')}
958
+ </span>
959
+ ) : null}
982
960
 
983
- {showRunningActions ? (
984
- <>
985
- <PromptInputButton
986
- tooltip={t('steerNow')}
987
- aria-label={t('steerNow')}
988
- variant="secondary"
989
- disabled={!canSend || sendActionPending}
990
- onClick={() => void send('auto')}
991
- >
992
- <ArrowRightIcon className="size-3.5" />
993
- </PromptInputButton>
994
- <PromptInputButton
995
- tooltip={t('sendFollowUp')}
996
- aria-label={t('sendFollowUp')}
997
- variant="outline"
998
- disabled={!canSend || sendActionPending}
999
- onClick={() => void send('follow_up')}
1000
- >
1001
- <ArrowUpToLineIcon className="size-3.5" />
1002
- </PromptInputButton>
1003
- <PromptInputButton
1004
- tooltip={t('stopResponse')}
1005
- aria-label={t('stopResponse')}
1006
- variant="destructive"
1007
- disabled={!chatReady || actionPending}
1008
- onClick={() => void runAction(() => inputRuntime.interrupt(source))}
1009
- >
1010
- <SquareIcon className="size-3.5 fill-current" />
1011
- </PromptInputButton>
1012
- </>
1013
- ) : (
1014
- <Button
1015
- type={idleSending ? 'button' : 'submit'}
1016
- size="icon"
1017
- disabled={!idleSending && (!canSend || sendActionPending)}
1018
- aria-disabled={idleSending || !canSend || sendActionPending}
1019
- aria-busy={idleSending}
1020
- aria-label={
1021
- idleSending ? t('sending') : chatReady ? t('send') : t('synchronizing')
1022
- }
961
+ <div ref={submitToolsRef} className={styles.submitTools}>
962
+ <L2WorkbenchQueuePreview
963
+ queues={queues}
964
+ disabled={!chatReady || actionPending}
965
+ onRestore={() =>
966
+ void runAction(() => inputRuntime.restoreQueue(source), t('queuesRestored'))
967
+ }
968
+ />
969
+
970
+ {showRunningActions ? (
971
+ <>
972
+ <PromptInputButton
973
+ tooltip={t('steerNow')}
974
+ aria-label={t('steerNow')}
975
+ variant="secondary"
976
+ disabled={!canSend || sendActionPending}
977
+ onClick={() => void send('auto')}
1023
978
  >
1024
- {idleSending ? (
1025
- <SendIcon
1026
- className={cn('size-4', !powerSaving && 'pi-desk-chat-send-icon')}
1027
- />
1028
- ) : !chatReady ? (
1029
- <LoaderCircleIcon className="size-4 animate-spin" />
1030
- ) : (
1031
- <CornerDownLeftIcon />
1032
- )}
1033
- </Button>
1034
- )}
1035
- </div>
1036
- </PromptInputFooter>
1037
- </InputGroup>
1038
- <L3WorkSessionStatusBorder state={visualState} powerSaving={powerSaving} />
1039
- </div>
979
+ <ArrowRightIcon className="size-3.5" />
980
+ </PromptInputButton>
981
+ <PromptInputButton
982
+ tooltip={t('sendFollowUp')}
983
+ aria-label={t('sendFollowUp')}
984
+ variant="outline"
985
+ disabled={!canSend || sendActionPending}
986
+ onClick={() => void send('follow_up')}
987
+ >
988
+ <ArrowUpToLineIcon className="size-3.5" />
989
+ </PromptInputButton>
990
+ <PromptInputButton
991
+ tooltip={t('stopResponse')}
992
+ aria-label={t('stopResponse')}
993
+ variant="destructive"
994
+ disabled={!chatReady || actionPending}
995
+ onClick={() => void runAction(() => inputRuntime.interrupt(source))}
996
+ >
997
+ <SquareIcon className="size-3.5 fill-current" />
998
+ </PromptInputButton>
999
+ </>
1000
+ ) : (
1001
+ <Button
1002
+ type={idleSending ? 'button' : 'submit'}
1003
+ size="icon"
1004
+ disabled={!idleSending && (!canSend || sendActionPending)}
1005
+ aria-disabled={idleSending || !canSend || sendActionPending}
1006
+ aria-busy={idleSending}
1007
+ aria-label={
1008
+ idleSending ? t('sending') : chatReady ? t('send') : t('synchronizing')
1009
+ }
1010
+ >
1011
+ {idleSending ? (
1012
+ <SendIcon className="size-4" />
1013
+ ) : !chatReady ? (
1014
+ <LoaderCircleIcon className="size-4 animate-spin" />
1015
+ ) : (
1016
+ <CornerDownLeftIcon />
1017
+ )}
1018
+ </Button>
1019
+ )}
1020
+ </div>
1021
+ </PromptInputFooter>
1022
+ </InputGroup>
1040
1023
  </form>
1041
1024
  <L2NativeUiExtras snapshot={nativeUi.state.snapshot} placement="belowEditor" />
1042
1025