@shepai/cli 1.167.0-pr505.5cf8222 → 1.168.0-pr505.7d2bb14

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 (343) hide show
  1. package/dist/packages/core/src/application/ports/output/agents/interactive-agent-executor.interface.d.ts +38 -2
  2. package/dist/packages/core/src/application/ports/output/agents/interactive-agent-executor.interface.d.ts.map +1 -1
  3. package/dist/packages/core/src/application/ports/output/services/interactive-session-service.interface.d.ts +16 -1
  4. package/dist/packages/core/src/application/ports/output/services/interactive-session-service.interface.d.ts.map +1 -1
  5. package/dist/packages/core/src/application/use-cases/interactive/index.d.ts +2 -0
  6. package/dist/packages/core/src/application/use-cases/interactive/index.d.ts.map +1 -1
  7. package/dist/packages/core/src/application/use-cases/interactive/index.js +1 -0
  8. package/dist/packages/core/src/application/use-cases/interactive/respond-to-interaction.use-case.d.ts +17 -0
  9. package/dist/packages/core/src/application/use-cases/interactive/respond-to-interaction.use-case.d.ts.map +1 -0
  10. package/dist/packages/core/src/application/use-cases/interactive/respond-to-interaction.use-case.js +34 -0
  11. package/dist/packages/core/src/application/use-cases/repositories/delete-repository.use-case.d.ts.map +1 -1
  12. package/dist/packages/core/src/application/use-cases/repositories/delete-repository.use-case.js +6 -2
  13. package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
  14. package/dist/packages/core/src/infrastructure/di/container.js +5 -0
  15. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
  16. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +12 -3
  17. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.d.ts +3 -0
  18. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.d.ts.map +1 -1
  19. package/dist/packages/core/src/infrastructure/services/agents/common/executors/claude-code-interactive-executor.service.js +59 -6
  20. package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.d.ts +7 -0
  21. package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.d.ts.map +1 -1
  22. package/dist/packages/core/src/infrastructure/services/interactive/interactive-session.service.js +101 -1
  23. package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/respond/route.d.ts +19 -0
  24. package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/respond/route.d.ts.map +1 -0
  25. package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/respond/route.js +33 -0
  26. package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stream/route.d.ts.map +1 -1
  27. package/dist/src/presentation/web/app/api/interactive/chat/[featureId]/stream/route.js +7 -0
  28. package/dist/src/presentation/web/app/layout.d.ts +0 -1
  29. package/dist/src/presentation/web/app/layout.d.ts.map +1 -1
  30. package/dist/src/presentation/web/app/layout.js +0 -1
  31. package/dist/src/presentation/web/components/assistant-ui/thread.d.ts +3 -2
  32. package/dist/src/presentation/web/components/assistant-ui/thread.d.ts.map +1 -1
  33. package/dist/src/presentation/web/components/assistant-ui/thread.js +26 -3
  34. package/dist/src/presentation/web/components/common/react-file-manager-dialog/react-file-manager-dialog.d.ts.map +1 -1
  35. package/dist/src/presentation/web/components/common/react-file-manager-dialog/react-file-manager-dialog.js +68 -56
  36. package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.d.ts +1 -0
  37. package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.d.ts.map +1 -1
  38. package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.js +7 -1
  39. package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.stories.d.ts +1 -0
  40. package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.stories.d.ts.map +1 -1
  41. package/dist/src/presentation/web/components/features/chat/ChatDotIndicator.stories.js +3 -0
  42. package/dist/src/presentation/web/components/features/chat/ChatSheet.d.ts.map +1 -1
  43. package/dist/src/presentation/web/components/features/chat/ChatSheet.js +3 -1
  44. package/dist/src/presentation/web/components/features/chat/ChatTab.d.ts.map +1 -1
  45. package/dist/src/presentation/web/components/features/chat/ChatTab.js +3 -2
  46. package/dist/src/presentation/web/components/features/chat/InteractionBubble.d.ts +33 -0
  47. package/dist/src/presentation/web/components/features/chat/InteractionBubble.d.ts.map +1 -0
  48. package/dist/src/presentation/web/components/features/chat/InteractionBubble.js +155 -0
  49. package/dist/src/presentation/web/components/features/chat/InteractionBubble.stories.d.ts +22 -0
  50. package/dist/src/presentation/web/components/features/chat/InteractionBubble.stories.d.ts.map +1 -0
  51. package/dist/src/presentation/web/components/features/chat/InteractionBubble.stories.js +107 -0
  52. package/dist/src/presentation/web/components/features/chat/useChatRuntime.d.ts +16 -0
  53. package/dist/src/presentation/web/components/features/chat/useChatRuntime.d.ts.map +1 -1
  54. package/dist/src/presentation/web/components/features/chat/useChatRuntime.js +62 -1
  55. package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
  56. package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +18 -3
  57. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts +1 -0
  58. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
  59. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +1 -1
  60. package/dist/src/presentation/web/hooks/use-graph-state.d.ts.map +1 -1
  61. package/dist/src/presentation/web/hooks/use-graph-state.js +16 -0
  62. package/dist/src/presentation/web/hooks/use-turn-statuses.d.ts +1 -1
  63. package/dist/src/presentation/web/hooks/use-turn-statuses.d.ts.map +1 -1
  64. package/dist/src/presentation/web/hooks/use-turn-statuses.js +1 -1
  65. package/dist/tsconfig.build.tsbuildinfo +1 -1
  66. package/package.json +1 -1
  67. package/web/.next/BUILD_ID +1 -1
  68. package/web/.next/app-path-routes-manifest.json +1 -0
  69. package/web/.next/build-manifest.json +4 -4
  70. package/web/.next/fallback-build-manifest.json +2 -2
  71. package/web/.next/prerender-manifest.json +3 -3
  72. package/web/.next/required-server-files.js +2 -2
  73. package/web/.next/required-server-files.json +2 -2
  74. package/web/.next/routes-manifest.json +8 -0
  75. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/build-manifest.json +2 -2
  76. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/react-loadable-manifest.json +1 -8
  77. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  78. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  79. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/(dashboard)/@drawer/chat/page/build-manifest.json +2 -2
  81. package/web/.next/server/app/(dashboard)/@drawer/chat/page/react-loadable-manifest.json +1 -8
  82. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  83. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  84. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  85. package/web/.next/server/app/(dashboard)/@drawer/create/page/build-manifest.json +2 -2
  86. package/web/.next/server/app/(dashboard)/@drawer/create/page/react-loadable-manifest.json +1 -8
  87. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +30 -30
  88. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  89. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  90. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
  91. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/react-loadable-manifest.json +1 -8
  92. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +38 -38
  93. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  94. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  95. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/build-manifest.json +2 -2
  96. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/react-loadable-manifest.json +1 -8
  97. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +38 -38
  98. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  99. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  100. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/build-manifest.json +2 -2
  101. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +1 -8
  102. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  103. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  104. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  105. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/build-manifest.json +2 -2
  106. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/react-loadable-manifest.json +1 -8
  107. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  108. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  109. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  110. package/web/.next/server/app/(dashboard)/chat/page/build-manifest.json +2 -2
  111. package/web/.next/server/app/(dashboard)/chat/page/react-loadable-manifest.json +1 -8
  112. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  113. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  114. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  115. package/web/.next/server/app/(dashboard)/create/page/build-manifest.json +2 -2
  116. package/web/.next/server/app/(dashboard)/create/page/react-loadable-manifest.json +1 -8
  117. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +30 -30
  118. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  119. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  120. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/build-manifest.json +2 -2
  121. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/react-loadable-manifest.json +1 -8
  122. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +38 -38
  123. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  124. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  125. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/build-manifest.json +2 -2
  126. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/react-loadable-manifest.json +1 -8
  127. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +38 -38
  128. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  129. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  130. package/web/.next/server/app/(dashboard)/page/build-manifest.json +2 -2
  131. package/web/.next/server/app/(dashboard)/page/react-loadable-manifest.json +1 -8
  132. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  133. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  134. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  135. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/build-manifest.json +2 -2
  136. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +1 -8
  137. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  138. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  139. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  140. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/build-manifest.json +2 -2
  141. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/react-loadable-manifest.json +1 -8
  142. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  143. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  144. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  145. package/web/.next/server/app/_global-error/page/build-manifest.json +2 -2
  146. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  147. package/web/.next/server/app/_global-error.html +2 -2
  148. package/web/.next/server/app/_global-error.rsc +7 -7
  149. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  150. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  151. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  152. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  153. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  154. package/web/.next/server/app/_not-found/page/build-manifest.json +2 -2
  155. package/web/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -8
  156. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  157. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  158. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  159. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  160. package/web/.next/server/app/api/attachments/upload-from-path/route.js +1 -1
  161. package/web/.next/server/app/api/attachments/upload-from-path/route.js.nft.json +1 -1
  162. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  163. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  164. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  165. package/web/.next/server/app/api/interactive/chat/[featureId]/respond/route/app-paths-manifest.json +3 -0
  166. package/web/.next/server/app/api/interactive/chat/[featureId]/respond/route/build-manifest.json +11 -0
  167. package/web/.next/server/app/api/interactive/chat/[featureId]/respond/route/server-reference-manifest.json +4 -0
  168. package/web/.next/server/app/api/interactive/chat/[featureId]/respond/route.js +7 -0
  169. package/web/.next/server/app/api/interactive/chat/[featureId]/respond/route.js.map +5 -0
  170. package/web/.next/server/app/api/interactive/chat/[featureId]/respond/route.js.nft.json +1 -0
  171. package/web/.next/server/app/api/interactive/chat/[featureId]/respond/route_client-reference-manifest.js +2 -0
  172. package/web/.next/server/app/features/page/build-manifest.json +2 -2
  173. package/web/.next/server/app/features/page/react-loadable-manifest.json +1 -8
  174. package/web/.next/server/app/features/page/server-reference-manifest.json +6 -6
  175. package/web/.next/server/app/features/page.js.nft.json +1 -1
  176. package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
  177. package/web/.next/server/app/settings/page/build-manifest.json +2 -2
  178. package/web/.next/server/app/settings/page/react-loadable-manifest.json +1 -8
  179. package/web/.next/server/app/settings/page/server-reference-manifest.json +9 -9
  180. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  181. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  182. package/web/.next/server/app/skills/page/build-manifest.json +2 -2
  183. package/web/.next/server/app/skills/page/react-loadable-manifest.json +1 -8
  184. package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
  185. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  186. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  187. package/web/.next/server/app/tools/page/build-manifest.json +2 -2
  188. package/web/.next/server/app/tools/page/react-loadable-manifest.json +1 -8
  189. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  190. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  191. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  192. package/web/.next/server/app/version/page/build-manifest.json +2 -2
  193. package/web/.next/server/app/version/page/react-loadable-manifest.json +1 -8
  194. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  195. package/web/.next/server/app/version/page.js.nft.json +1 -1
  196. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  197. package/web/.next/server/app-paths-manifest.json +1 -0
  198. package/web/.next/server/chunks/8ba4b_server_app_api_interactive_chat_[featureId]_respond_route_actions_990d51bd.js +3 -0
  199. package/web/.next/server/chunks/8ba4b_server_app_api_interactive_chat_[featureId]_respond_route_actions_990d51bd.js.map +1 -0
  200. package/web/.next/server/chunks/[root-of-the-server]__31944fa2._.js +3 -0
  201. package/web/.next/server/chunks/[root-of-the-server]__31944fa2._.js.map +1 -0
  202. package/web/.next/server/chunks/[root-of-the-server]__8a281f8d._.js +9 -3
  203. package/web/.next/server/chunks/[root-of-the-server]__8a281f8d._.js.map +1 -1
  204. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  205. package/web/.next/server/chunks/{[root-of-the-server]__a5879003._.js → [root-of-the-server]__ea653642._.js} +2 -2
  206. package/web/.next/server/chunks/{[root-of-the-server]__a5879003._.js.map → [root-of-the-server]__ea653642._.js.map} +1 -1
  207. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  208. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  209. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  210. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  211. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +1 -1
  212. package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -1
  213. package/web/.next/server/chunks/ssr/[root-of-the-server]__20a36a42._.js +3 -0
  214. package/web/.next/server/chunks/ssr/[root-of-the-server]__20a36a42._.js.map +1 -0
  215. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  216. package/web/.next/server/chunks/ssr/[root-of-the-server]__4fb81977._.js +1 -1
  217. package/web/.next/server/chunks/ssr/[root-of-the-server]__4fb81977._.js.map +1 -1
  218. package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js +1 -1
  219. package/web/.next/server/chunks/ssr/[root-of-the-server]__6c7d3936._.js.map +1 -1
  220. package/web/.next/server/chunks/ssr/[root-of-the-server]__7dcd0917._.js +1 -1
  221. package/web/.next/server/chunks/ssr/[root-of-the-server]__7dcd0917._.js.map +1 -1
  222. package/web/.next/server/chunks/ssr/[root-of-the-server]__7ffd3598._.js +2 -2
  223. package/web/.next/server/chunks/ssr/[root-of-the-server]__7ffd3598._.js.map +1 -1
  224. package/web/.next/server/chunks/ssr/[root-of-the-server]__86ff0bc5._.js +2 -2
  225. package/web/.next/server/chunks/ssr/[root-of-the-server]__86ff0bc5._.js.map +1 -1
  226. package/web/.next/server/chunks/ssr/[root-of-the-server]__b020c17d._.js +2 -2
  227. package/web/.next/server/chunks/ssr/[root-of-the-server]__b020c17d._.js.map +1 -1
  228. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +1 -1
  229. package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -1
  230. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba7f5873._.js +1 -1
  231. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba7f5873._.js.map +1 -1
  232. package/web/.next/server/chunks/ssr/[root-of-the-server]__c5e09f6f._.js +1 -1
  233. package/web/.next/server/chunks/ssr/[root-of-the-server]__c5e09f6f._.js.map +1 -1
  234. package/web/.next/server/chunks/ssr/[root-of-the-server]__e88da4ee._.js +1 -1
  235. package/web/.next/server/chunks/ssr/{_5f099575._.js → _004b47fc._.js} +2 -2
  236. package/web/.next/server/chunks/ssr/{_5f099575._.js.map → _004b47fc._.js.map} +1 -1
  237. package/web/.next/server/chunks/ssr/_02e01240._.js +1 -1
  238. package/web/.next/server/chunks/ssr/_02e01240._.js.map +1 -1
  239. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  240. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  241. package/web/.next/server/chunks/ssr/_0727935d._.js +1 -1
  242. package/web/.next/server/chunks/ssr/_0727935d._.js.map +1 -1
  243. package/web/.next/server/chunks/ssr/_16235e5e._.js +1 -1
  244. package/web/.next/server/chunks/ssr/_16235e5e._.js.map +1 -1
  245. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  246. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  247. package/web/.next/server/chunks/ssr/_18886033._.js +1 -1
  248. package/web/.next/server/chunks/ssr/_18886033._.js.map +1 -1
  249. package/web/.next/server/chunks/ssr/_1e08a336._.js.map +1 -1
  250. package/web/.next/server/chunks/ssr/_22e00a14._.js +1 -1
  251. package/web/.next/server/chunks/ssr/_22e00a14._.js.map +1 -1
  252. package/web/.next/server/chunks/ssr/_4cbb7f95._.js +3 -0
  253. package/web/.next/server/chunks/ssr/_4cbb7f95._.js.map +1 -0
  254. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  255. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  256. package/web/.next/server/chunks/ssr/{_cac860bb._.js → _58902d92._.js} +2 -2
  257. package/web/.next/server/chunks/ssr/{_cac860bb._.js.map → _58902d92._.js.map} +1 -1
  258. package/web/.next/server/chunks/ssr/{_cc936cdc._.js → _682fc996._.js} +2 -2
  259. package/web/.next/server/chunks/ssr/_682fc996._.js.map +1 -0
  260. package/web/.next/server/chunks/ssr/_6892e3b9._.js +3 -0
  261. package/web/.next/server/chunks/ssr/_6892e3b9._.js.map +1 -0
  262. package/web/.next/server/chunks/ssr/_a1068852._.js +3 -0
  263. package/web/.next/server/chunks/ssr/_a1068852._.js.map +1 -0
  264. package/web/.next/server/chunks/ssr/_a5a5901d._.js +1 -1
  265. package/web/.next/server/chunks/ssr/_a5a5901d._.js.map +1 -1
  266. package/web/.next/server/chunks/ssr/_ad09f271._.js +1 -1
  267. package/web/.next/server/chunks/ssr/_ad09f271._.js.map +1 -1
  268. package/web/.next/server/chunks/ssr/_b4a9122d._.js +3 -0
  269. package/web/.next/server/chunks/ssr/_b4a9122d._.js.map +1 -0
  270. package/web/.next/server/chunks/ssr/_c3f595c6._.js +1 -1
  271. package/web/.next/server/chunks/ssr/_c3f595c6._.js.map +1 -1
  272. package/web/.next/server/chunks/ssr/_ea9e1556._.js +1 -1
  273. package/web/.next/server/chunks/ssr/_ea9e1556._.js.map +1 -1
  274. package/web/.next/server/chunks/ssr/_f1ba9be6._.js +2 -2
  275. package/web/.next/server/chunks/ssr/_f1ba9be6._.js.map +1 -1
  276. package/web/.next/server/chunks/ssr/_f33cd07e._.js +2 -2
  277. package/web/.next/server/chunks/ssr/_f33cd07e._.js.map +1 -1
  278. package/web/.next/server/chunks/ssr/_f8b45233._.js +1 -1
  279. package/web/.next/server/chunks/ssr/_f8b45233._.js.map +1 -1
  280. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  281. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  282. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  283. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -1
  284. package/web/.next/server/chunks/ssr/node_modules__pnpm_12a7ede0._.js +3 -0
  285. package/web/.next/server/chunks/ssr/node_modules__pnpm_12a7ede0._.js.map +1 -0
  286. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  287. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
  288. package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js.map +1 -1
  289. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  290. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  291. package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_select_tsx_45d6b8ae._.js +1 -1
  292. package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_select_tsx_45d6b8ae._.js.map +1 -1
  293. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js +1 -1
  294. package/web/.next/server/chunks/ssr/src_presentation_web_db9fa0c2._.js.map +1 -1
  295. package/web/.next/server/middleware-build-manifest.js +2 -2
  296. package/web/.next/server/pages/500.html +2 -2
  297. package/web/.next/server/server-reference-manifest.js +1 -1
  298. package/web/.next/server/server-reference-manifest.json +48 -48
  299. package/web/.next/static/chunks/{fe70e73feb07bcfd.js → 08ec4c9ab61717aa.js} +1 -1
  300. package/web/.next/static/chunks/{dedf6ca63c5468fa.js → 09edd35d194bec06.js} +3 -3
  301. package/web/.next/static/chunks/{d4d8f0a137bd2eb4.js → 12803afee7d0afc8.js} +2 -2
  302. package/web/.next/static/chunks/{f0183c225f31840b.js → 352c5cb6ed572dc3.js} +1 -1
  303. package/web/.next/static/chunks/41b4082b079b3ede.js +1 -0
  304. package/web/.next/static/chunks/5a36922f56850850.js +1 -0
  305. package/web/.next/static/chunks/5b7275374d2696b3.css +1 -0
  306. package/web/.next/static/chunks/6d6f70ff5151b8cb.js +7 -0
  307. package/web/.next/static/chunks/{2615825711ac4e81.js → 7bbbe3273230d2a1.js} +3 -3
  308. package/web/.next/static/chunks/{9e2dcc66aa1e3ee7.js → 890a772551fc3962.js} +1 -1
  309. package/web/.next/static/chunks/982aef195c118996.js +1 -0
  310. package/web/.next/static/chunks/{612750555eb00a6c.js → a830880e642a6e01.js} +2 -2
  311. package/web/.next/static/chunks/c625deec577681f7.js +1 -0
  312. package/web/.next/static/chunks/dadf5909b2f15985.js +1 -0
  313. package/web/.next/static/chunks/{9c4927d092875708.js → e137a48b35703673.js} +1 -1
  314. package/web/.next/static/chunks/{4ba01cd71cfa981b.js → e26afac86ed33fa7.js} +1 -1
  315. package/web/.next/static/chunks/{4ac6f8c2bb39a6e4.js → f48af05c1bdb8aec.js} +1 -1
  316. package/web/.next/static/chunks/{328874065794ea9f.js → fac6bac55da705ea.js} +1 -1
  317. package/web/.next/static/chunks/{68127a29d87ba43a.js → fb9d76d30fa8f790.js} +1 -1
  318. package/web/.next/static/chunks/{turbopack-62782e656a49f322.js → turbopack-57bb0674e2cd1d31.js} +1 -1
  319. package/web/.next/server/chunks/ssr/[root-of-the-server]__13fa44e4._.js +0 -3
  320. package/web/.next/server/chunks/ssr/[root-of-the-server]__13fa44e4._.js.map +0 -1
  321. package/web/.next/server/chunks/ssr/_5c76b6b5._.js +0 -3
  322. package/web/.next/server/chunks/ssr/_5c76b6b5._.js.map +0 -1
  323. package/web/.next/server/chunks/ssr/_a69efc34._.js +0 -3
  324. package/web/.next/server/chunks/ssr/_a69efc34._.js.map +0 -1
  325. package/web/.next/server/chunks/ssr/_cc936cdc._.js.map +0 -1
  326. package/web/.next/server/chunks/ssr/_df737cce._.js +0 -3
  327. package/web/.next/server/chunks/ssr/_df737cce._.js.map +0 -1
  328. package/web/.next/server/chunks/ssr/_f79e241b._.js +0 -3
  329. package/web/.next/server/chunks/ssr/_f79e241b._.js.map +0 -1
  330. package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.js +0 -3
  331. package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.js.map +0 -1
  332. package/web/.next/static/chunks/110a8827583ae5bb.js +0 -1
  333. package/web/.next/static/chunks/5d4a8552d5b6a4a8.js +0 -1
  334. package/web/.next/static/chunks/6d7b999c99d6d175.js +0 -9
  335. package/web/.next/static/chunks/8180973e9cd6a99e.css +0 -1
  336. package/web/.next/static/chunks/92c8c994d9ad0c81.js +0 -1
  337. package/web/.next/static/chunks/a262ab91e9288145.js +0 -1
  338. package/web/.next/static/chunks/a825ba5207a10722.js +0 -7
  339. package/web/.next/static/chunks/c4874941c93f4f77.js +0 -1
  340. package/web/.next/static/chunks/c5b3a8430ab26648.css +0 -1
  341. /package/web/.next/static/{xAhPAfLhIR5KWVO7DbsJR → 9dnSGRS5_ITgOmM09PgwP}/_buildManifest.js +0 -0
  342. /package/web/.next/static/{xAhPAfLhIR5KWVO7DbsJR → 9dnSGRS5_ITgOmM09PgwP}/_clientMiddlewareManifest.json +0 -0
  343. /package/web/.next/static/{xAhPAfLhIR5KWVO7DbsJR → 9dnSGRS5_ITgOmM09PgwP}/_ssgManifest.js +0 -0
@@ -80,6 +80,8 @@ export class InteractiveSessionService {
80
80
  updatedAt: now,
81
81
  };
82
82
  await this.sessionRepo.create(session);
83
+ // Mark as processing immediately so the FAB shows the spinner during boot
84
+ void this.sessionRepo.updateTurnStatus(session.id, 'processing');
83
85
  // Carry over agentSessionId from previous session so resumption works
84
86
  let previousAgentSessionId;
85
87
  for (const [, s] of this.sessions) {
@@ -113,6 +115,8 @@ export class InteractiveSessionService {
113
115
  subscribers: new Set(),
114
116
  turnInProgress: false,
115
117
  turnQueue: [],
118
+ pendingInteraction: null,
119
+ pendingInteractionResolver: null,
116
120
  };
117
121
  this.sessions.set(session.id, state);
118
122
  // Fire-and-forget the async boot sequence. The API returns the session
@@ -189,6 +193,9 @@ export class InteractiveSessionService {
189
193
  // Create the interactive executor and session
190
194
  const executor = this.executorFactory.createInteractiveExecutor(resolvedAgentType, authConfig);
191
195
  let handle;
196
+ // Build the onUserQuestion callback that pauses the SDK stream
197
+ // and waits for user input via the UI.
198
+ const onUserQuestion = this.buildOnUserQuestionCallback(state);
192
199
  const previousAgentSessionId = state.agentSessionId;
193
200
  if (previousAgentSessionId) {
194
201
  // Resume existing SDK session
@@ -196,6 +203,7 @@ export class InteractiveSessionService {
196
203
  cwd: worktreePath,
197
204
  model: state.model,
198
205
  systemPrompt: context,
206
+ onUserQuestion,
199
207
  });
200
208
  }
201
209
  else {
@@ -204,6 +212,7 @@ export class InteractiveSessionService {
204
212
  cwd: worktreePath,
205
213
  model: state.model,
206
214
  systemPrompt: context,
215
+ onUserQuestion,
207
216
  });
208
217
  }
209
218
  state.handle = handle;
@@ -585,6 +594,12 @@ export class InteractiveSessionService {
585
594
  });
586
595
  }
587
596
  break;
597
+ case 'user_question':
598
+ // AskUserQuestion is now handled by the canUseTool callback
599
+ // (buildOnUserQuestionCallback) which pauses the SDK stream.
600
+ // This event should not appear in the stream anymore, but if it
601
+ // does (e.g. from a different code path), ignore it here.
602
+ break;
588
603
  }
589
604
  }
590
605
  }
@@ -819,7 +834,9 @@ export class InteractiveSessionService {
819
834
  turnStatus = statuses.get(featureId) ?? 'idle';
820
835
  }
821
836
  }
822
- return { messages, sessionStatus, streamingText, sessionInfo, turnStatus };
837
+ // Include pending interaction if one exists
838
+ const pendingInteraction = state?.pendingInteraction ?? null;
839
+ return { messages, sessionStatus, streamingText, sessionInfo, turnStatus, pendingInteraction };
823
840
  }
824
841
  subscribeByFeature(featureId, onChunk) {
825
842
  // Subscribe at the feature level so the callback survives session restarts.
@@ -863,6 +880,89 @@ export class InteractiveSessionService {
863
880
  async getAllActiveTurnStatuses() {
864
881
  return this.sessionRepo.getAllActiveTurnStatuses();
865
882
  }
883
+ async respondToInteraction(featureId, answers) {
884
+ const state = this.findActiveStateForFeature(featureId);
885
+ if (!state?.pendingInteraction || !state.pendingInteractionResolver) {
886
+ throw new Error(`No pending interaction for feature ${featureId}`);
887
+ }
888
+ // Persist the user's answers as a structured user message.
889
+ // The {{interaction}} prefix lets the frontend detect and render it
890
+ // as a compact green bubble instead of a regular text message.
891
+ const interactionPayload = {
892
+ questions: state.pendingInteraction.questions.map((q) => ({
893
+ header: q.header,
894
+ question: q.question,
895
+ })),
896
+ answers,
897
+ };
898
+ const now = new Date();
899
+ const userMsg = {
900
+ id: crypto.randomUUID(),
901
+ featureId: state.featureId,
902
+ sessionId: state.sessionId,
903
+ role: InteractiveMessageRole.user,
904
+ content: `{{interaction}}${JSON.stringify(interactionPayload)}`,
905
+ createdAt: now,
906
+ updatedAt: now,
907
+ };
908
+ await this.messageRepo.create(userMsg);
909
+ // Resolve the Promise that the canUseTool callback is awaiting.
910
+ // This unblocks the SDK stream — the agent resumes with the user's answers.
911
+ state.pendingInteractionResolver(answers);
912
+ // Clear pending interaction state
913
+ state.pendingInteraction = null;
914
+ state.pendingInteractionResolver = null;
915
+ // Update turn status back to processing
916
+ void this.sessionRepo.updateTurnStatus(state.sessionId, 'processing');
917
+ // Clear the "Waiting for your response..." log
918
+ state.subscribers.forEach((sub) => sub({ delta: '', done: false }));
919
+ }
920
+ /**
921
+ * Build the onUserQuestion callback for a session.
922
+ * Called by the SDK's canUseTool when the agent invokes AskUserQuestion.
923
+ * Returns a Promise that doesn't resolve until the user submits their answers.
924
+ */
925
+ buildOnUserQuestionCallback(state) {
926
+ return async (interaction) => {
927
+ // Flush any accumulated assistant text as a separate message BEFORE
928
+ // the interaction. This ensures the agent's question text appears
929
+ // above the green answer bubble in the conversation history.
930
+ if (state.currentAssistantBuffer.trim()) {
931
+ const now = new Date();
932
+ const msg = {
933
+ id: crypto.randomUUID(),
934
+ featureId: state.featureId,
935
+ sessionId: state.sessionId,
936
+ role: InteractiveMessageRole.assistant,
937
+ content: state.currentAssistantBuffer,
938
+ createdAt: now,
939
+ updatedAt: now,
940
+ };
941
+ await this.messageRepo.create(msg);
942
+ state.currentAssistantBuffer = '';
943
+ state.toolEventsLog = [];
944
+ // Notify subscribers so the frontend picks up the new message
945
+ state.subscribers.forEach((sub) => sub({ delta: '', done: true }));
946
+ // Small delay so the refetch completes before the interaction appears
947
+ await new Promise((r) => setTimeout(r, 100));
948
+ }
949
+ // Store the interaction data for the frontend
950
+ state.pendingInteraction = interaction;
951
+ // Update turn status so the dot indicator shows amber
952
+ void this.sessionRepo.updateTurnStatus(state.sessionId, 'awaiting_input');
953
+ // Notify subscribers so SSE pushes the interaction to the frontend
954
+ state.subscribers.forEach((sub) => sub({
955
+ delta: '',
956
+ done: false,
957
+ log: 'Waiting for your response...',
958
+ interaction,
959
+ }));
960
+ // Create a Promise that will be resolved when the user calls respondToInteraction
961
+ return new Promise((resolve) => {
962
+ state.pendingInteractionResolver = resolve;
963
+ });
964
+ };
965
+ }
866
966
  /** Find the in-memory state for an active session for a feature. */
867
967
  findActiveStateForFeature(featureId) {
868
968
  for (const state of this.sessions.values()) {
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Respond to a pending agent interaction (AskUserQuestion).
3
+ *
4
+ * POST - Submit user's answers to the pending interaction.
5
+ * The agent resumes processing after receiving the response.
6
+ *
7
+ * `featureId` is a polymorphic scope key: a feature UUID, "repo-<id>", or "global".
8
+ */
9
+ import type { NextRequest } from 'next/server';
10
+ import { NextResponse } from 'next/server';
11
+ export declare const dynamic = "force-dynamic";
12
+ interface RouteParams {
13
+ params: Promise<{
14
+ featureId: string;
15
+ }>;
16
+ }
17
+ export declare function POST(request: NextRequest, { params }: RouteParams): Promise<NextResponse>;
18
+ export {};
19
+ //# sourceMappingURL=route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/presentation/web/app/api/interactive/chat/[featureId]/respond/route.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,UAAU,WAAW;IACnB,MAAM,EAAE,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxC;AAED,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAyB/F"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Respond to a pending agent interaction (AskUserQuestion).
3
+ *
4
+ * POST - Submit user's answers to the pending interaction.
5
+ * The agent resumes processing after receiving the response.
6
+ *
7
+ * `featureId` is a polymorphic scope key: a feature UUID, "repo-<id>", or "global".
8
+ */
9
+ import { NextResponse } from 'next/server';
10
+ import { resolve } from '../../../../../../lib/server-container.js';
11
+ export const dynamic = 'force-dynamic';
12
+ export async function POST(request, { params }) {
13
+ try {
14
+ const { featureId } = await params;
15
+ const body = (await request.json());
16
+ if (!body.answers || typeof body.answers !== 'object') {
17
+ return NextResponse.json({ error: 'answers must be a non-empty object' }, { status: 400 });
18
+ }
19
+ const useCase = resolve('RespondToInteractionUseCase');
20
+ await useCase.execute({
21
+ featureId,
22
+ answers: body.answers,
23
+ });
24
+ return NextResponse.json({ ok: true });
25
+ }
26
+ catch (error) {
27
+ const message = error instanceof Error ? error.message : String(error);
28
+ const status = message.includes('No pending interaction') ? 409 : 500;
29
+ // eslint-disable-next-line no-console
30
+ console.error('[POST /api/interactive/chat/:featureId/respond]', error);
31
+ return NextResponse.json({ error: message }, { status });
32
+ }
33
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/presentation/web/app/api/interactive/chat/[featureId]/stream/route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,UAAU,WAAW;IACnB,MAAM,EAAE,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxC;AAED,wBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CA4E1F"}
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/presentation/web/app/api/interactive/chat/[featureId]/stream/route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,UAAU,WAAW;IACnB,MAAM,EAAE,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxC;AAED,wBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAoF1F"}
@@ -38,6 +38,13 @@ export async function GET(request, { params }) {
38
38
  if (chunk.done) {
39
39
  enqueue(`event: done\ndata: ${JSON.stringify({ done: true, featureId })}\n\n`);
40
40
  }
41
+ else if (chunk.interaction) {
42
+ // Agent is asking the user a question — emit interaction event
43
+ enqueue(`event: interaction\ndata: ${JSON.stringify({ interaction: chunk.interaction, featureId })}\n\n`);
44
+ if (chunk.log) {
45
+ enqueue(`event: log\ndata: ${JSON.stringify({ log: chunk.log, featureId })}\n\n`);
46
+ }
47
+ }
41
48
  else if (chunk.activity) {
42
49
  enqueue(`event: activity\ndata: ${JSON.stringify({ activity: chunk.activity, featureId })}\n\n`);
43
50
  // Also send log for the status indicator
@@ -1,6 +1,5 @@
1
1
  import type { Metadata } from 'next';
2
2
  import '@xyflow/react/dist/base.css';
3
- import '@cubone/react-file-manager/dist/style.css';
4
3
  import './globals.css';
5
4
  /** Force dynamic rendering for all pages since they depend on client-side context. */
6
5
  export declare const dynamic = "force-dynamic";
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/app/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,6BAA6B,CAAC;AACrC,OAAO,2CAA2C,CAAC;AACnD,OAAO,eAAe,CAAC;AAWvB,sFAAsF;AACtF,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAkBtB,CAAC;AAEF,wBAA8B,UAAU,CAAC,EACvC,QAAQ,GACT,EAAE,QAAQ,CAAC;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC,oDA6BD"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/app/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAErC,OAAO,6BAA6B,CAAC;AACrC,OAAO,eAAe,CAAC;AAWvB,sFAAsF;AACtF,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,eAAO,MAAM,QAAQ,EAAE,QAkBtB,CAAC;AAEF,wBAA8B,UAAU,CAAC,EACvC,QAAQ,GACT,EAAE,QAAQ,CAAC;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC,oDA6BD"}
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cookies } from 'next/headers';
3
3
  import '@xyflow/react/dist/base.css';
4
- import '@cubone/react-file-manager/dist/style.css';
5
4
  import './globals.css';
6
5
  import { AppShell } from '../components/layouts/app-shell/index.js';
7
6
  import { Toaster } from '../components/ui/sonner.js';
@@ -1,6 +1,7 @@
1
- export declare function Thread({ className, statusBar, composer, }: {
1
+ export declare function Thread({ className, afterMessages, composer, }: {
2
2
  className?: string;
3
- statusBar?: React.ReactNode;
3
+ /** Content rendered inside the scrollable viewport, after messages (e.g. interaction bubbles). */
4
+ afterMessages?: React.ReactNode;
4
5
  composer?: React.ReactNode;
5
6
  }): import("react/jsx-runtime").JSX.Element;
6
7
  //# sourceMappingURL=thread.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/components/assistant-ui/thread.tsx"],"names":[],"mappings":"AAuFA,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,SAAS,EACT,QAAQ,GACT,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,2CAoBA"}
1
+ {"version":3,"file":"thread.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/components/assistant-ui/thread.tsx"],"names":[],"mappings":"AAwFA,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,aAAa,EACb,QAAQ,GACT,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kGAAkG;IAClG,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,2CAqBA"}
@@ -6,7 +6,7 @@ import Markdown from 'react-markdown';
6
6
  import remarkGfm from 'remark-gfm';
7
7
  import { useTranslation } from 'react-i18next';
8
8
  import { cn } from '../../lib/utils.js';
9
- import { SendHorizontal, CircleStop, Copy, Paperclip, Bot, User, Maximize2, X, ChevronDown, ChevronUp, Loader2, } from 'lucide-react';
9
+ import { SendHorizontal, CircleStop, Copy, Paperclip, Bot, User, Maximize2, X, ChevronDown, ChevronUp, Loader2, Check, } from 'lucide-react';
10
10
  // ── Markdown components for assistant messages ──────────────────────────────
11
11
  const markdownComponents = {
12
12
  p: ({ children }) => _jsx("p", { className: "mb-2 leading-relaxed last:mb-0", children: children }),
@@ -40,20 +40,43 @@ const markdownComponents = {
40
40
  hr: () => _jsx("hr", { className: "border-border/40 my-3 border-t" }),
41
41
  };
42
42
  // ── Thread ──────────────────────────────────────────────────────────────────
43
- export function Thread({ className, statusBar, composer, }) {
43
+ export function Thread({ className, afterMessages, composer, }) {
44
44
  return (_jsxs(ThreadPrimitive.Root, { className: cn('flex h-full flex-col', className), children: [_jsxs(ThreadPrimitive.Viewport, { className: "flex flex-1 flex-col overflow-y-auto pt-4", children: [_jsx(ThreadPrimitive.Empty, { children: _jsx(ThreadEmpty, {}) }), _jsx(ThreadPrimitive.Messages, { components: {
45
45
  UserMessage,
46
46
  AssistantMessage,
47
- } })] }), statusBar, composer ?? _jsx(Composer, {})] }));
47
+ } }), afterMessages] }), composer ?? _jsx(Composer, {})] }));
48
48
  }
49
49
  // ── Empty state ─────────────────────────────────────────────────────────────
50
50
  function ThreadEmpty() {
51
51
  return (_jsxs("div", { className: "flex flex-1 flex-col items-center justify-center gap-2 p-8 text-center", children: [_jsx(Bot, { className: "text-muted-foreground/40 h-10 w-10" }), _jsx("p", { className: "text-muted-foreground text-sm", children: "Send a message to start chatting with the agent." })] }));
52
52
  }
53
53
  // ── User message ────────────────────────────────────────────────────────────
54
+ const INTERACTION_PREFIX = '{{interaction}}';
54
55
  const UserMessage = () => {
56
+ const message = useMessage();
57
+ // Check if this is an interaction response message
58
+ const firstPart = message?.content?.[0];
59
+ const text = firstPart && 'text' in firstPart ? firstPart.text : '';
60
+ if (text.startsWith(INTERACTION_PREFIX)) {
61
+ return _jsx(InteractionResponseMessage, { text: text });
62
+ }
55
63
  return (_jsxs(MessagePrimitive.Root, { className: "group flex w-full items-start gap-2.5 px-4 py-0.5", children: [_jsx("div", { className: "mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-violet-500/15", children: _jsx(User, { className: "h-3.5 w-3.5 text-violet-500" }) }), _jsxs("div", { className: "flex max-w-[85%] min-w-0 flex-col gap-0.5", children: [_jsx("div", { className: "text-foreground mt-px overflow-hidden rounded-2xl rounded-tl-sm border border-violet-500/15 bg-violet-500/8 px-4 py-2 text-sm leading-relaxed break-words shadow-sm backdrop-blur-md", children: _jsx(MessagePrimitive.Content, { components: { Text: UserMessageText } }) }), _jsxs("div", { className: "flex items-center gap-1.5 opacity-0 transition-opacity group-hover:opacity-100", children: [_jsx(MessageMeta, {}), _jsx(ActionBarPrimitive.Root, { className: "flex items-center gap-1", children: _jsx(ActionBarPrimitive.Copy, { asChild: true, children: _jsx(IconButton, { tooltip: "Copy", children: _jsx(Copy, {}) }) }) })] })] })] }));
56
64
  };
65
+ /** Compact green bubble showing the user's selections from an AskUserQuestion interaction. */
66
+ function InteractionResponseMessage({ text }) {
67
+ const parsed = useMemo(() => {
68
+ try {
69
+ const json = text.slice(INTERACTION_PREFIX.length);
70
+ return JSON.parse(json);
71
+ }
72
+ catch {
73
+ return null;
74
+ }
75
+ }, [text]);
76
+ if (!parsed)
77
+ return null;
78
+ return (_jsxs(MessagePrimitive.Root, { className: "group flex w-full items-start gap-2.5 px-4 py-0.5", children: [_jsx("div", { className: "bg-muted flex h-6 w-6 shrink-0 items-center justify-center rounded-full", children: _jsx(Check, { className: "h-3.5 w-3.5 text-emerald-600 dark:text-emerald-400" }) }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsx("div", { className: "text-foreground mt-px flex flex-wrap items-center gap-x-4 gap-y-1 rounded-2xl rounded-tl-sm border border-emerald-600/20 bg-emerald-50/50 px-4 py-2 text-sm shadow-sm dark:border-emerald-500/20 dark:bg-emerald-950/20", children: parsed.questions.map((q) => (_jsxs("span", { className: "flex items-center gap-2", children: [_jsx("span", { className: "inline-flex shrink-0 items-center rounded-full bg-emerald-100 px-2 py-0.5 text-[10px] font-semibold tracking-wider text-emerald-700 uppercase dark:bg-emerald-900/50 dark:text-emerald-400", children: q.header }), _jsx("span", { className: "text-muted-foreground text-xs", children: parsed.answers[q.question] || 'No answer' })] }, q.question))) }), _jsxs("div", { className: "flex items-center gap-1.5 opacity-0 transition-opacity group-hover:opacity-100", children: [_jsx(MessageMeta, {}), _jsx(ActionBarPrimitive.Root, { className: "flex items-center gap-1", children: _jsx(ActionBarPrimitive.Copy, { asChild: true, children: _jsx(IconButton, { tooltip: "Copy", children: _jsx(Copy, {}) }) }) })] })] })] }));
79
+ }
57
80
  function UserMessageText({ text }) {
58
81
  return _jsx("span", { className: "whitespace-pre-wrap", children: text });
59
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"react-file-manager-dialog.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/react-file-manager-dialog/react-file-manager-dialog.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAGV,2BAA2B,EAC5B,MAAM,oCAAoC,CAAC;AA2C5C,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,WAAW,GACZ,EAAE,2BAA2B,2CAgI7B"}
1
+ {"version":3,"file":"react-file-manager-dialog.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/react-file-manager-dialog/react-file-manager-dialog.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAGV,2BAA2B,EAC5B,MAAM,oCAAoC,CAAC;AAkK5C,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,WAAW,GACZ,EAAE,2BAA2B,2CAoJ7B"}
@@ -1,29 +1,11 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useCallback, useEffect, useRef, useState } from 'react';
4
- import dynamic from 'next/dynamic';
5
- import { Loader2 } from 'lucide-react';
4
+ import { ChevronRight, Folder, FolderOpen, Loader2, Pencil } from 'lucide-react';
6
5
  import { toast } from 'sonner';
7
- import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '../../ui/dialog.js';
6
+ import { Dialog, DialogContent, DialogDescription, DialogTitle } from '../../ui/dialog.js';
8
7
  import { Button } from '../../ui/button.js';
9
- const FileManager = dynamic(() => import('@cubone/react-file-manager').then((mod) => mod.FileManager), { ssr: false, loading: () => _jsx(FileManagerSkeleton, {}) });
10
- function FileManagerSkeleton() {
11
- return (_jsx("div", { className: "flex h-full w-full items-center justify-center", children: _jsx(Loader2, { className: "text-muted-foreground h-8 w-8 animate-spin" }) }));
12
- }
13
- function toFileManagerFiles(entries) {
14
- // The @cubone/react-file-manager component filters visible files by matching
15
- // file.path === currentPath + "/" + file.name. Since we dynamically fetch
16
- // directory contents on each navigation, we present all entries at the
17
- // FileManager's root level by using path = "/" + name. The real absolute
18
- // path is preserved in a custom `absolutePath` field for selection/navigation.
19
- return entries.map((entry) => ({
20
- name: entry.name,
21
- isDirectory: true,
22
- path: `/${entry.name}`,
23
- absolutePath: entry.path,
24
- updatedAt: entry.updatedAt,
25
- }));
26
- }
8
+ import { ScrollArea } from '../../ui/scroll-area.js';
27
9
  async function fetchDirectory(dirPath) {
28
10
  const params = new URLSearchParams();
29
11
  if (dirPath) {
@@ -36,19 +18,76 @@ async function fetchDirectory(dirPath) {
36
18
  }
37
19
  return res.json();
38
20
  }
21
+ function parseBreadcrumbs(currentPath) {
22
+ if (!currentPath)
23
+ return [];
24
+ const isWindows = /^[a-zA-Z]:/.test(currentPath);
25
+ const separator = isWindows ? '\\' : '/';
26
+ const parts = currentPath.split(/[\\/]/).filter(Boolean);
27
+ const crumbs = [];
28
+ for (let i = 0; i < parts.length; i++) {
29
+ const path = isWindows
30
+ ? parts.slice(0, i + 1).join(separator)
31
+ : separator + parts.slice(0, i + 1).join(separator);
32
+ crumbs.push({ label: parts[i], path });
33
+ }
34
+ return crumbs;
35
+ }
36
+ const MAX_VISIBLE_CRUMBS = 3;
37
+ function AddressBar({ currentPath, isEditing, onToggleEdit, onNavigate, }) {
38
+ const inputRef = useRef(null);
39
+ const [inputValue, setInputValue] = useState(currentPath);
40
+ useEffect(() => {
41
+ setInputValue(currentPath);
42
+ }, [currentPath]);
43
+ useEffect(() => {
44
+ if (isEditing && inputRef.current) {
45
+ inputRef.current.focus();
46
+ inputRef.current.select();
47
+ }
48
+ }, [isEditing]);
49
+ function handleSubmit() {
50
+ const trimmed = inputValue.trim();
51
+ if (trimmed) {
52
+ onNavigate(trimmed);
53
+ }
54
+ }
55
+ function closeEdit() {
56
+ setInputValue(currentPath);
57
+ onToggleEdit();
58
+ }
59
+ const breadcrumbs = parseBreadcrumbs(currentPath);
60
+ const needsCollapse = breadcrumbs.length > MAX_VISIBLE_CRUMBS;
61
+ const visibleCrumbs = needsCollapse ? breadcrumbs.slice(-MAX_VISIBLE_CRUMBS) : breadcrumbs;
62
+ return (_jsxs("div", { className: "border-b px-4 py-3", children: [_jsx("h2", { className: "text-foreground mb-2.5 text-sm font-semibold tracking-[-0.01em]", children: "Select Folder" }), isEditing ? (_jsx("input", { ref: inputRef, type: "text", value: inputValue, onChange: (e) => setInputValue(e.target.value), onKeyDown: (e) => {
63
+ if (e.key === 'Enter') {
64
+ e.preventDefault();
65
+ handleSubmit();
66
+ }
67
+ if (e.key === 'Escape') {
68
+ e.preventDefault();
69
+ closeEdit();
70
+ }
71
+ }, onBlur: closeEdit, className: "bg-muted/60 border-border focus:ring-ring/20 focus:border-ring w-full rounded-lg border px-3 py-2 font-mono text-xs transition-all outline-none focus:ring-2", placeholder: "Type a path and press Enter...", spellCheck: false, autoComplete: "off" })) : (_jsxs("div", { className: "bg-muted/40 flex items-center gap-1 rounded-lg px-2.5 py-2", children: [_jsx("button", { type: "button", onClick: () => onNavigate('/'), className: "text-muted-foreground hover:text-foreground hover:bg-background shrink-0 rounded px-1.5 py-0.5 font-mono text-xs transition-colors", children: "/" }), needsCollapse ? (_jsxs(_Fragment, { children: [_jsx(ChevronRight, { className: "text-muted-foreground/30 h-3 w-3 shrink-0" }), _jsx("span", { className: "text-muted-foreground/40 font-mono text-xs", children: "..." })] })) : null, visibleCrumbs.map((crumb, i) => {
72
+ const isLast = i === visibleCrumbs.length - 1;
73
+ return (_jsxs("span", { className: "flex shrink-0 items-center gap-1", children: [_jsx(ChevronRight, { className: "text-muted-foreground/30 h-3 w-3" }), isLast ? (_jsx("span", { className: "bg-primary/10 text-primary rounded px-2 py-0.5 font-mono text-xs font-medium", children: crumb.label })) : (_jsx("button", { type: "button", onClick: () => onNavigate(crumb.path), className: "text-muted-foreground hover:text-foreground hover:bg-background rounded px-1.5 py-0.5 font-mono text-xs transition-colors", children: crumb.label }))] }, crumb.path));
74
+ }), _jsx("div", { className: "flex-1" }), _jsx("button", { type: "button", onClick: onToggleEdit, className: "text-muted-foreground/40 hover:text-foreground hover:bg-background shrink-0 rounded p-1 transition-colors", "aria-label": "Edit path", children: _jsx(Pencil, { className: "h-3 w-3" }) })] }))] }));
75
+ }
39
76
  export function ReactFileManagerDialog({ open, onOpenChange, onSelect, initialPath, }) {
40
77
  const [entries, setEntries] = useState([]);
41
78
  const [currentPath, setCurrentPath] = useState('');
42
79
  const [isLoading, setIsLoading] = useState(false);
43
- const [selectedPath, setSelectedPath] = useState(null);
80
+ const [isEditingPath, setIsEditingPath] = useState(false);
44
81
  const hasLoadedRef = useRef(false);
82
+ const [renderKey, setRenderKey] = useState(0);
45
83
  const loadDirectory = useCallback(async (dirPath) => {
46
84
  setIsLoading(true);
47
- setSelectedPath(null);
85
+ setIsEditingPath(false);
48
86
  try {
49
87
  const data = await fetchDirectory(dirPath);
50
88
  setEntries(data.entries);
51
89
  setCurrentPath(data.currentPath);
90
+ setRenderKey((k) => k + 1);
52
91
  }
53
92
  catch (error) {
54
93
  const message = error instanceof Error ? error.message : 'Failed to load directory';
@@ -65,32 +104,13 @@ export function ReactFileManagerDialog({ open, onOpenChange, onSelect, initialPa
65
104
  }
66
105
  if (!open) {
67
106
  hasLoadedRef.current = false;
107
+ setIsEditingPath(false);
68
108
  }
69
109
  }, [open, initialPath, loadDirectory]);
70
- const handleFileOpen = useCallback((file) => {
71
- // Use absolutePath (real filesystem path) for navigation, not the
72
- // virtual path used by the FileManager tree.
73
- const realPath = file.absolutePath;
74
- if (file.isDirectory && realPath) {
75
- loadDirectory(realPath);
76
- }
77
- }, [loadDirectory]);
78
- const handleSelectionChange = useCallback((files) => {
79
- if (files.length === 1 && files[0].isDirectory) {
80
- const realPath = files[0].absolutePath;
81
- setSelectedPath(realPath ?? null);
82
- }
83
- else {
84
- setSelectedPath(null);
85
- }
86
- }, []);
87
- function handleSelect() {
88
- if (selectedPath) {
89
- onSelect(selectedPath);
90
- onOpenChange(false);
91
- }
110
+ function handleNavigate(path) {
111
+ loadDirectory(path);
92
112
  }
93
- function handleSelectCurrentPath() {
113
+ function handleSelect() {
94
114
  if (currentPath) {
95
115
  onSelect(currentPath);
96
116
  onOpenChange(false);
@@ -104,13 +124,5 @@ export function ReactFileManagerDialog({ open, onOpenChange, onSelect, initialPa
104
124
  if (!isOpen) {
105
125
  handleCancel();
106
126
  }
107
- }, children: _jsxs(DialogContent, { className: "flex h-[95dvh] max-w-[95vw] flex-col", onCloseAutoFocus: (e) => e.preventDefault(), children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Select Folder" }), _jsx(DialogDescription, { className: "truncate font-mono text-xs", children: currentPath || 'Loading...' })] }), _jsx("div", { className: "shep-file-manager min-h-0 flex-1 overflow-hidden rounded-md border", children: _jsx(FileManager, { files: toFileManagerFiles(entries), isLoading: isLoading, height: "100%", width: "100%", layout: "list", enableFilePreview: false, permissions: {
108
- upload: false,
109
- delete: false,
110
- create: false,
111
- download: false,
112
- copy: false,
113
- move: false,
114
- rename: false,
115
- }, onFileOpen: handleFileOpen, onSelectionChange: handleSelectionChange, onRefresh: () => loadDirectory(currentPath) }, currentPath) }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", onClick: handleCancel, children: "Cancel" }), _jsx(Button, { variant: "secondary", onClick: handleSelectCurrentPath, disabled: !currentPath, children: "Select Current Folder" }), _jsx(Button, { onClick: handleSelect, disabled: !selectedPath, children: "Select Folder" })] })] }) }));
127
+ }, children: _jsxs(DialogContent, { className: "flex h-[min(520px,85dvh)] w-full max-w-[460px] flex-col gap-0 overflow-hidden p-0", onCloseAutoFocus: (e) => e.preventDefault(), children: [_jsx(DialogTitle, { className: "sr-only", children: "Select Folder" }), _jsx(DialogDescription, { className: "sr-only", children: "Navigate to a folder and select it" }), _jsx(AddressBar, { currentPath: currentPath, isEditing: isEditingPath, onToggleEdit: () => setIsEditingPath((v) => !v), onNavigate: handleNavigate }), _jsx(ScrollArea, { className: "min-h-0 flex-1", children: isLoading && entries.length === 0 ? (_jsx("div", { className: "space-y-0.5 p-2", children: Array.from({ length: 8 }).map((_, i) => (_jsxs("div", { className: "flex items-center gap-3 rounded-lg px-3 py-2.5", style: { opacity: 1 - i * 0.1 }, children: [_jsx("div", { className: "bg-muted h-4 w-4 animate-pulse rounded" }), _jsx("div", { className: "bg-muted h-3.5 animate-pulse rounded", style: { width: `${40 + Math.random() * 35}%` } })] }, `skeleton-${i}`))) })) : entries.length === 0 ? (_jsxs("div", { className: "flex flex-col items-center justify-center py-20", children: [_jsx(FolderOpen, { className: "text-muted-foreground/25 mb-3 h-10 w-10" }), _jsx("p", { className: "text-muted-foreground/60 text-sm", children: "Empty folder" })] })) : (_jsx("div", { className: "p-2", children: entries.map((entry, i) => (_jsxs("button", { type: "button", onClick: () => handleNavigate(entry.path), className: "folder-row group flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-left transition-all hover:bg-[var(--color-primary)]/[0.06] active:scale-[0.997]", style: { animationDelay: `${i * 20}ms` }, children: [_jsx(Folder, { className: "text-muted-foreground/50 group-hover:text-primary h-[18px] w-[18px] shrink-0 transition-colors" }), _jsx("span", { className: "text-foreground min-w-0 flex-1 truncate text-[13px] font-medium", children: entry.name }), _jsx(ChevronRight, { className: "text-muted-foreground/0 group-hover:text-muted-foreground/40 h-3.5 w-3.5 shrink-0 transition-all" })] }, entry.path))) }, renderKey)) }), _jsxs("div", { className: "flex items-center gap-2 border-t px-4 py-3", children: [_jsx("p", { className: "text-muted-foreground min-w-0 flex-1 truncate font-mono text-[11px] leading-none", children: currentPath || '\u00A0' }), _jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancel, className: "text-muted-foreground h-8 shrink-0 px-3 text-xs", children: "Cancel" }), _jsxs(Button, { size: "sm", onClick: handleSelect, disabled: !currentPath || isLoading, className: "h-8 shrink-0 px-5 text-xs font-medium", children: [isLoading ? _jsx(Loader2, { className: "mr-1.5 h-3 w-3 animate-spin" }) : null, "Select"] })] })] }) }));
116
128
  }
@@ -8,6 +8,7 @@ interface ChatDotIndicatorProps {
8
8
  * - idle: no dot (hidden)
9
9
  * - processing: pulsing blue dot
10
10
  * - unread: static green dot
11
+ * - awaiting_input: pulsing amber dot (agent needs user response)
11
12
  */
12
13
  export declare function ChatDotIndicator({ status, className }: ChatDotIndicatorProps): import("react/jsx-runtime").JSX.Element | null;
13
14
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ChatDotIndicator.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/chat/ChatDotIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,qBAAqB;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,SAAc,EAAE,EAAE,qBAAqB,kDAUjF"}
1
+ {"version":3,"file":"ChatDotIndicator.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/chat/ChatDotIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,qBAAqB;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,SAAc,EAAE,EAAE,qBAAqB,kDAajF"}
@@ -5,9 +5,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  * - idle: no dot (hidden)
6
6
  * - processing: pulsing blue dot
7
7
  * - unread: static green dot
8
+ * - awaiting_input: pulsing amber dot (agent needs user response)
8
9
  */
9
10
  export function ChatDotIndicator({ status, className = '' }) {
10
11
  if (status === 'idle')
11
12
  return null;
12
- return (_jsx("span", { className: `absolute -top-0.5 -right-0.5 block rounded-full ${status === 'processing' ? 'h-2.5 w-2.5 animate-pulse bg-blue-500' : 'h-2 w-2 bg-green-500'} ${className}` }));
13
+ const dotClass = status === 'awaiting_input'
14
+ ? 'h-2.5 w-2.5 animate-pulse bg-amber-500'
15
+ : status === 'processing'
16
+ ? 'h-2.5 w-2.5 animate-pulse bg-blue-500'
17
+ : 'h-2 w-2 bg-green-500';
18
+ return (_jsx("span", { className: `absolute -top-0.5 -right-0.5 block rounded-full ${dotClass} ${className}` }));
13
19
  }
@@ -6,4 +6,5 @@ type Story = StoryObj<typeof ChatDotIndicator>;
6
6
  export declare const Idle: Story;
7
7
  export declare const Processing: Story;
8
8
  export declare const Unread: Story;
9
+ export declare const AwaitingInput: Story;
9
10
  //# sourceMappingURL=ChatDotIndicator.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatDotIndicator.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/chat/ChatDotIndicator.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAWvC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAEpB,CAAC"}
1
+ {"version":3,"file":"ChatDotIndicator.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/chat/ChatDotIndicator.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAWvC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAEpB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC"}
@@ -17,3 +17,6 @@ export const Processing = {
17
17
  export const Unread = {
18
18
  args: { status: 'unread' },
19
19
  };
20
+ export const AwaitingInput = {
21
+ args: { status: 'awaiting_input' },
22
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"ChatSheet.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/chat/ChatSheet.tsx"],"names":[],"mappings":"AA2DA,wBAAgB,eAAe,4CAwY9B"}
1
+ {"version":3,"file":"ChatSheet.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/chat/ChatSheet.tsx"],"names":[],"mappings":"AA2DA,wBAAgB,eAAe,4CA4Y9B"}
@@ -261,7 +261,9 @@ export function GlobalChatPopup() {
261
261
  document.addEventListener('mouseup', onUp);
262
262
  }, className: "absolute end-0 bottom-0 z-10 h-4 w-4 cursor-se-resize" })) : null] })) : null, _jsxs(ChatFabWrapper, { swapPosition: swapPosition, sidebarState: sidebarState, isMaximized: isMaximized, children: [_jsxs(Button, { size: "icon", onClick: toggle, className: cn('relative h-14 w-14 rounded-full shadow-lg', 'transition-all duration-200 hover:scale-105 hover:shadow-xl active:scale-95', isOpen
263
263
  ? 'bg-violet-600 text-white hover:bg-violet-500'
264
- : 'bg-violet-500 text-white hover:bg-violet-400 dark:bg-violet-500 dark:hover:bg-violet-400'), children: [_jsx(MessageSquare, { className: cn('absolute h-7 w-7 stroke-[2.5] transition-all duration-200', isOpen ? 'scale-0 rotate-90 opacity-0' : 'scale-100 rotate-0 opacity-100') }), _jsx(X, { className: cn('absolute h-6 w-6 stroke-[2.5] transition-all duration-200', isOpen ? 'scale-100 rotate-0 opacity-100' : 'scale-0 -rotate-90 opacity-0') }), !isOpen && _jsx(ChatDotIndicator, { status: globalChatTurnStatus, className: "end-0 top-0" })] }), _jsx("div", { className: "pointer-events-none absolute bottom-[calc(100%+8px)] left-1/2 -translate-x-1/2 translate-y-1 opacity-0 transition-all duration-200 group-hover/fab:translate-y-0 group-hover/fab:opacity-100", children: _jsxs("div", { className: "bg-foreground rounded-lg px-3 py-1.5 text-center shadow-lg", children: [_jsx("p", { className: "text-background text-xs font-medium whitespace-nowrap", children: t('chat.shepChat') }), _jsxs("p", { className: "text-background/50 mt-0.5 flex items-center justify-center gap-1 text-[10px]", children: [_jsx("kbd", { className: "bg-background/15 rounded px-1 py-px font-mono", children: "\u2318" }), _jsx("kbd", { className: "bg-background/15 rounded px-1 py-px font-mono", children: "\u21E7" }), _jsx("kbd", { className: "bg-background/15 rounded px-1 py-px font-mono", children: "K" })] })] }) })] })] }));
264
+ : 'bg-violet-500 text-white hover:bg-violet-400 dark:bg-violet-500 dark:hover:bg-violet-400',
265
+ // Animated states when chat is closed
266
+ !isOpen && globalChatTurnStatus === 'processing' && 'chat-fab-spinning', !isOpen && globalChatTurnStatus === 'unread' && 'chat-fab-glow-unread', !isOpen && globalChatTurnStatus === 'awaiting_input' && 'chat-fab-glow-awaiting'), children: [_jsx(MessageSquare, { className: cn('absolute h-7 w-7 stroke-[2.5] transition-all duration-200', isOpen ? 'scale-0 rotate-90 opacity-0' : 'scale-100 rotate-0 opacity-100') }), _jsx(X, { className: cn('absolute h-6 w-6 stroke-[2.5] transition-all duration-200', isOpen ? 'scale-100 rotate-0 opacity-100' : 'scale-0 -rotate-90 opacity-0') }), !isOpen && _jsx(ChatDotIndicator, { status: globalChatTurnStatus, className: "end-0 top-0" })] }), _jsx("div", { className: "pointer-events-none absolute bottom-[calc(100%+8px)] left-1/2 -translate-x-1/2 translate-y-1 opacity-0 transition-all duration-200 group-hover/fab:translate-y-0 group-hover/fab:opacity-100", children: _jsxs("div", { className: "bg-foreground rounded-lg px-3 py-1.5 text-center shadow-lg", children: [_jsx("p", { className: "text-background text-xs font-medium whitespace-nowrap", children: t('chat.shepChat') }), _jsxs("p", { className: "text-background/50 mt-0.5 flex items-center justify-center gap-1 text-[10px]", children: [_jsx("kbd", { className: "bg-background/15 rounded px-1 py-px font-mono", children: "\u2318" }), _jsx("kbd", { className: "bg-background/15 rounded px-1 py-px font-mono", children: "\u21E7" }), _jsx("kbd", { className: "bg-background/15 rounded px-1 py-px font-mono", children: "K" })] })] }) })] })] }));
265
267
  }
266
268
  /** Wrapper for the Chat FAB that handles position swapping. */
267
269
  function ChatFabWrapper({ swapPosition, sidebarState, isMaximized, children, }) {
@@ -1 +1 @@
1
- {"version":3,"file":"ChatTab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/chat/ChatTab.tsx"],"names":[],"mappings":"AAcA,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,YAAY,2CAwGhE"}
1
+ {"version":3,"file":"ChatTab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/chat/ChatTab.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,YAAY,2CAsHhE"}