@inupedia/spotlight-vue 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.js.map +1 -0
  3. package/dist/assets/spotlight-vue.css +1 -0
  4. package/dist/avatar/config.d.ts +16 -0
  5. package/dist/avatar/config.d.ts.map +1 -0
  6. package/dist/avatar/config.js +22 -0
  7. package/dist/avatar/config.js.map +1 -0
  8. package/dist/avatar/speech/live2dAnswerSpeechPolicy.d.ts +3 -0
  9. package/dist/avatar/speech/live2dAnswerSpeechPolicy.d.ts.map +1 -0
  10. package/dist/avatar/speech/live2dAnswerSpeechPolicy.js +16 -0
  11. package/dist/avatar/speech/live2dAnswerSpeechPolicy.js.map +1 -0
  12. package/dist/avatar/speech/live2dBriefingSummarizer.d.ts +11 -0
  13. package/dist/avatar/speech/live2dBriefingSummarizer.d.ts.map +1 -0
  14. package/dist/avatar/speech/live2dBriefingSummarizer.js +92 -0
  15. package/dist/avatar/speech/live2dBriefingSummarizer.js.map +1 -0
  16. package/dist/avatar/speech/live2dStreamSpeech.d.ts +14 -0
  17. package/dist/avatar/speech/live2dStreamSpeech.d.ts.map +1 -0
  18. package/dist/avatar/speech/live2dStreamSpeech.js +5 -0
  19. package/dist/avatar/speech/live2dStreamSpeech.js.map +1 -0
  20. package/dist/avatar/speech/live2dTtsPipeline.d.ts +34 -0
  21. package/dist/avatar/speech/live2dTtsPipeline.d.ts.map +1 -0
  22. package/dist/avatar/speech/live2dTtsPlayback.d.ts +3 -0
  23. package/dist/avatar/speech/live2dTtsPlayback.d.ts.map +1 -0
  24. package/dist/avatar/speech/live2dTtsPlayback.js +24 -0
  25. package/dist/avatar/speech/live2dTtsPlayback.js.map +1 -0
  26. package/dist/avatar/speech/llmUtils.d.ts +3 -0
  27. package/dist/avatar/speech/llmUtils.d.ts.map +1 -0
  28. package/dist/avatar/speech/llmUtils.js +19 -0
  29. package/dist/avatar/speech/llmUtils.js.map +1 -0
  30. package/dist/avatar/speech/spotlightSpeech.d.ts +24 -0
  31. package/dist/avatar/speech/spotlightSpeech.d.ts.map +1 -0
  32. package/dist/avatar/speech/spotlightSpeech.js +94 -0
  33. package/dist/avatar/speech/spotlightSpeech.js.map +1 -0
  34. package/dist/avatar/spine/live2dApp.d.ts +11 -0
  35. package/dist/avatar/spine/live2dApp.d.ts.map +1 -0
  36. package/dist/avatar/spine/live2dApp.js +28 -0
  37. package/dist/avatar/spine/live2dApp.js.map +1 -0
  38. package/dist/avatar/spine/spineAvatar.d.ts +14 -0
  39. package/dist/avatar/spine/spineAvatar.d.ts.map +1 -0
  40. package/dist/avatar/spine/spineAvatar.js +101 -0
  41. package/dist/avatar/spine/spineAvatar.js.map +1 -0
  42. package/dist/avatar/spine/spineLipSync.d.ts +13 -0
  43. package/dist/avatar/spine/spineLipSync.d.ts.map +1 -0
  44. package/dist/avatar/spine/spineLipSync.js +48 -0
  45. package/dist/avatar/spine/spineLipSync.js.map +1 -0
  46. package/dist/components/InspiraCardSpotlight.js +5 -0
  47. package/dist/components/InspiraCardSpotlight.js.map +1 -0
  48. package/dist/components/InspiraCardSpotlight.vue.d.ts +28 -0
  49. package/dist/components/InspiraCardSpotlight.vue.d.ts.map +1 -0
  50. package/dist/components/InspiraCardSpotlight.vue.js +53 -0
  51. package/dist/components/InspiraCardSpotlight.vue.js.map +1 -0
  52. package/dist/components/Live2dPanel.vue.d.ts +4 -0
  53. package/dist/components/Live2dPanel.vue.d.ts.map +1 -0
  54. package/dist/components/Live2dPanel.vue.js +8 -0
  55. package/dist/components/Live2dPanel.vue.js.map +1 -0
  56. package/dist/components/Live2dPanel2.vue.js +67 -0
  57. package/dist/components/Live2dPanel2.vue.js.map +1 -0
  58. package/dist/components/OfficialBorderBeam.js +8 -0
  59. package/dist/components/OfficialBorderBeam.js.map +1 -0
  60. package/dist/components/OfficialBorderBeam.vue.d.ts +21 -0
  61. package/dist/components/OfficialBorderBeam.vue.d.ts.map +1 -0
  62. package/dist/components/OfficialBorderBeam.vue.js +30 -0
  63. package/dist/components/OfficialBorderBeam.vue.js.map +1 -0
  64. package/dist/components/SpotlightCommandPanel.vue.d.ts +18 -0
  65. package/dist/components/SpotlightCommandPanel.vue.d.ts.map +1 -0
  66. package/dist/components/SpotlightCommandPanel.vue.js +8 -0
  67. package/dist/components/SpotlightCommandPanel.vue.js.map +1 -0
  68. package/dist/components/SpotlightCommandPanel2.vue.js +217 -0
  69. package/dist/components/SpotlightCommandPanel2.vue.js.map +1 -0
  70. package/dist/components/SpotlightMarkdownPreview.vue.d.ts +12 -0
  71. package/dist/components/SpotlightMarkdownPreview.vue.d.ts.map +1 -0
  72. package/dist/components/SpotlightMarkdownPreview.vue.js +39 -0
  73. package/dist/components/SpotlightMarkdownPreview.vue.js.map +1 -0
  74. package/dist/components/SpotlightMarkdownPreview2.vue.js +5 -0
  75. package/dist/components/SpotlightMarkdownPreview2.vue.js.map +1 -0
  76. package/dist/components/SpotlightRoot.vue.d.ts +26 -0
  77. package/dist/components/SpotlightRoot.vue.d.ts.map +1 -0
  78. package/dist/components/SpotlightRoot.vue.js +58 -0
  79. package/dist/components/SpotlightRoot.vue.js.map +1 -0
  80. package/dist/components/SpotlightRoot2.vue.js +5 -0
  81. package/dist/components/SpotlightRoot2.vue.js.map +1 -0
  82. package/dist/components/SpotlightShell.vue.d.ts +9 -0
  83. package/dist/components/SpotlightShell.vue.d.ts.map +1 -0
  84. package/dist/components/SpotlightShell.vue.js +5 -0
  85. package/dist/components/SpotlightShell.vue.js.map +1 -0
  86. package/dist/components/SpotlightShell2.vue.js +312 -0
  87. package/dist/components/SpotlightShell2.vue.js.map +1 -0
  88. package/dist/components/SpotlightThinking.vue.d.ts +59 -0
  89. package/dist/components/SpotlightThinking.vue.d.ts.map +1 -0
  90. package/dist/components/SpotlightThinking.vue.js +8 -0
  91. package/dist/components/SpotlightThinking.vue.js.map +1 -0
  92. package/dist/components/SpotlightThinking2.vue.js +893 -0
  93. package/dist/components/SpotlightThinking2.vue.js.map +1 -0
  94. package/dist/composables/useSpotlightCommandShortcuts.d.ts +13 -0
  95. package/dist/composables/useSpotlightCommandShortcuts.d.ts.map +1 -0
  96. package/dist/composables/useSpotlightCommandShortcuts.js +30 -0
  97. package/dist/composables/useSpotlightCommandShortcuts.js.map +1 -0
  98. package/dist/composables/useSpotlightPanelUi.d.ts +15 -0
  99. package/dist/composables/useSpotlightPanelUi.d.ts.map +1 -0
  100. package/dist/composables/useSpotlightPanelUi.js +9 -0
  101. package/dist/composables/useSpotlightPanelUi.js.map +1 -0
  102. package/dist/config.d.ts +59 -0
  103. package/dist/config.d.ts.map +1 -0
  104. package/dist/config.js +22 -0
  105. package/dist/config.js.map +1 -0
  106. package/dist/constants/toolNames.d.ts +12 -0
  107. package/dist/constants/toolNames.d.ts.map +1 -0
  108. package/dist/constants/toolNames.js +15 -0
  109. package/dist/constants/toolNames.js.map +1 -0
  110. package/dist/host/defineApp.d.ts +16 -0
  111. package/dist/host/defineApp.d.ts.map +1 -0
  112. package/dist/host/defineApp.js +27 -0
  113. package/dist/host/defineApp.js.map +1 -0
  114. package/dist/host/defineHost.d.ts +55 -0
  115. package/dist/host/defineHost.d.ts.map +1 -0
  116. package/dist/host/defineHost.js +55 -0
  117. package/dist/host/defineHost.js.map +1 -0
  118. package/dist/host/mergeSkills.d.ts +4 -0
  119. package/dist/host/mergeSkills.d.ts.map +1 -0
  120. package/dist/host/mergeSkills.js +12 -0
  121. package/dist/host/mergeSkills.js.map +1 -0
  122. package/dist/host/normalizeSkills.d.ts +4 -0
  123. package/dist/host/normalizeSkills.d.ts.map +1 -0
  124. package/dist/host/normalizeSkills.js +11 -0
  125. package/dist/host/normalizeSkills.js.map +1 -0
  126. package/dist/host/skillExecution.d.ts +9 -0
  127. package/dist/host/skillExecution.d.ts.map +1 -0
  128. package/dist/host/skillExecution.js +14 -0
  129. package/dist/host/skillExecution.js.map +1 -0
  130. package/dist/index.d.ts +37 -0
  131. package/dist/index.d.ts.map +1 -0
  132. package/dist/index.js +123 -0
  133. package/dist/index.js.map +1 -0
  134. package/dist/mountShell.d.ts +5 -0
  135. package/dist/mountShell.d.ts.map +1 -0
  136. package/dist/mountShell.js +24 -0
  137. package/dist/mountShell.js.map +1 -0
  138. package/dist/plugin.d.ts +16 -0
  139. package/dist/plugin.d.ts.map +1 -0
  140. package/dist/plugin.js +51 -0
  141. package/dist/plugin.js.map +1 -0
  142. package/dist/remote/audio.d.ts +13 -0
  143. package/dist/remote/audio.d.ts.map +1 -0
  144. package/dist/remote/audio.js +56 -0
  145. package/dist/remote/audio.js.map +1 -0
  146. package/dist/remote/hostToolRunner.d.ts +11 -0
  147. package/dist/remote/hostToolRunner.d.ts.map +1 -0
  148. package/dist/remote/hostToolRunner.js +25 -0
  149. package/dist/remote/hostToolRunner.js.map +1 -0
  150. package/dist/remote/httpConfig.d.ts +5 -0
  151. package/dist/remote/httpConfig.d.ts.map +1 -0
  152. package/dist/remote/httpConfig.js +20 -0
  153. package/dist/remote/httpConfig.js.map +1 -0
  154. package/dist/remote/index.d.ts +8 -0
  155. package/dist/remote/index.d.ts.map +1 -0
  156. package/dist/remote/index.js +27 -0
  157. package/dist/remote/index.js.map +1 -0
  158. package/dist/remote/meta.d.ts +12 -0
  159. package/dist/remote/meta.d.ts.map +1 -0
  160. package/dist/remote/meta.js +59 -0
  161. package/dist/remote/meta.js.map +1 -0
  162. package/dist/remote/runPipeline.d.ts +7 -0
  163. package/dist/remote/runPipeline.d.ts.map +1 -0
  164. package/dist/remote/runPipeline.js +342 -0
  165. package/dist/remote/runPipeline.js.map +1 -0
  166. package/dist/remote/serverJson.d.ts +3 -0
  167. package/dist/remote/serverJson.d.ts.map +1 -0
  168. package/dist/remote/serverJson.js +12 -0
  169. package/dist/remote/serverJson.js.map +1 -0
  170. package/dist/remote/types.d.ts +6 -0
  171. package/dist/remote/types.d.ts.map +1 -0
  172. package/dist/resolveConfig.d.ts +21 -0
  173. package/dist/resolveConfig.d.ts.map +1 -0
  174. package/dist/resolveConfig.js +14 -0
  175. package/dist/resolveConfig.js.map +1 -0
  176. package/dist/session/agentSession.d.ts +46 -0
  177. package/dist/session/agentSession.d.ts.map +1 -0
  178. package/dist/session/agentSession.js +150 -0
  179. package/dist/session/agentSession.js.map +1 -0
  180. package/dist/skills/index.d.ts +9 -0
  181. package/dist/skills/index.d.ts.map +1 -0
  182. package/dist/skills/index.js +23 -0
  183. package/dist/skills/index.js.map +1 -0
  184. package/dist/skills/matching.d.ts +11 -0
  185. package/dist/skills/matching.d.ts.map +1 -0
  186. package/dist/skills/matching.js +33 -0
  187. package/dist/skills/matching.js.map +1 -0
  188. package/dist/skills/parser.d.ts +3 -0
  189. package/dist/skills/parser.d.ts.map +1 -0
  190. package/dist/skills/parser.js +17 -0
  191. package/dist/skills/parser.js.map +1 -0
  192. package/dist/skills/skillFrontmatterParse.d.ts +3 -0
  193. package/dist/skills/skillFrontmatterParse.d.ts.map +1 -0
  194. package/dist/skills/skillFrontmatterParse.js +203 -0
  195. package/dist/skills/skillFrontmatterParse.js.map +1 -0
  196. package/dist/skills/skillListing.d.ts +9 -0
  197. package/dist/skills/skillListing.d.ts.map +1 -0
  198. package/dist/skills/skillListing.js +45 -0
  199. package/dist/skills/skillListing.js.map +1 -0
  200. package/dist/skills/skillPaths.d.ts +4 -0
  201. package/dist/skills/skillPaths.d.ts.map +1 -0
  202. package/dist/skills/skillPaths.js +22 -0
  203. package/dist/skills/skillPaths.js.map +1 -0
  204. package/dist/store/capabilities.d.ts +7 -0
  205. package/dist/store/capabilities.d.ts.map +1 -0
  206. package/dist/store/capabilities.js +12 -0
  207. package/dist/store/capabilities.js.map +1 -0
  208. package/dist/store/constants.d.ts +8 -0
  209. package/dist/store/constants.d.ts.map +1 -0
  210. package/dist/store/constants.js +6 -0
  211. package/dist/store/constants.js.map +1 -0
  212. package/dist/store/live2dOverlayStore.d.ts +20 -0
  213. package/dist/store/live2dOverlayStore.d.ts.map +1 -0
  214. package/dist/store/live2dOverlayStore.js +19 -0
  215. package/dist/store/live2dOverlayStore.js.map +1 -0
  216. package/dist/store/live2dSpeechStore.d.ts +29 -0
  217. package/dist/store/live2dSpeechStore.d.ts.map +1 -0
  218. package/dist/store/live2dSpeechStore.js +19 -0
  219. package/dist/store/live2dSpeechStore.js.map +1 -0
  220. package/dist/store/live2dVoiceChannelStore.d.ts +21 -0
  221. package/dist/store/live2dVoiceChannelStore.d.ts.map +1 -0
  222. package/dist/store/live2dVoiceChannelStore.js +22 -0
  223. package/dist/store/live2dVoiceChannelStore.js.map +1 -0
  224. package/dist/store/pipeline/api.d.ts +5 -0
  225. package/dist/store/pipeline/api.d.ts.map +1 -0
  226. package/dist/store/pipeline/api.js +86 -0
  227. package/dist/store/pipeline/api.js.map +1 -0
  228. package/dist/store/pipeline/constants.d.ts +18 -0
  229. package/dist/store/pipeline/constants.d.ts.map +1 -0
  230. package/dist/store/pipeline/constants.js +17 -0
  231. package/dist/store/pipeline/constants.js.map +1 -0
  232. package/dist/store/pipeline/displayText.d.ts +32 -0
  233. package/dist/store/pipeline/displayText.d.ts.map +1 -0
  234. package/dist/store/pipeline/displayText.js +93 -0
  235. package/dist/store/pipeline/displayText.js.map +1 -0
  236. package/dist/store/pipeline/errors.d.ts +5 -0
  237. package/dist/store/pipeline/errors.d.ts.map +1 -0
  238. package/dist/store/pipeline/errors.js +30 -0
  239. package/dist/store/pipeline/errors.js.map +1 -0
  240. package/dist/store/pipeline/spotlightMarkdown.d.ts +6 -0
  241. package/dist/store/pipeline/spotlightMarkdown.d.ts.map +1 -0
  242. package/dist/store/pipeline/spotlightMarkdown.js +86 -0
  243. package/dist/store/pipeline/spotlightMarkdown.js.map +1 -0
  244. package/dist/store/pipeline/steps.d.ts +11 -0
  245. package/dist/store/pipeline/steps.d.ts.map +1 -0
  246. package/dist/store/pipeline/steps.js +102 -0
  247. package/dist/store/pipeline/steps.js.map +1 -0
  248. package/dist/store/pipeline/toolDisplay.d.ts +14 -0
  249. package/dist/store/pipeline/toolDisplay.d.ts.map +1 -0
  250. package/dist/store/pipeline/toolDisplay.js +65 -0
  251. package/dist/store/pipeline/toolDisplay.js.map +1 -0
  252. package/dist/store/pipeline/types.d.ts +53 -0
  253. package/dist/store/pipeline/types.d.ts.map +1 -0
  254. package/dist/store/pipeline/typing.d.ts +4 -0
  255. package/dist/store/pipeline/typing.d.ts.map +1 -0
  256. package/dist/store/pipeline/typing.js +32 -0
  257. package/dist/store/pipeline/typing.js.map +1 -0
  258. package/dist/store/recent.d.ts +4 -0
  259. package/dist/store/recent.d.ts.map +1 -0
  260. package/dist/store/recent.js +27 -0
  261. package/dist/store/recent.js.map +1 -0
  262. package/dist/store/runtime/types.d.ts +140 -0
  263. package/dist/store/runtime/types.d.ts.map +1 -0
  264. package/dist/store/runtimeStore.d.ts +18 -0
  265. package/dist/store/runtimeStore.d.ts.map +1 -0
  266. package/dist/store/runtimeStore.js +25 -0
  267. package/dist/store/runtimeStore.js.map +1 -0
  268. package/dist/store/spotlightStore.d.ts +2787 -0
  269. package/dist/store/spotlightStore.d.ts.map +1 -0
  270. package/dist/store/spotlightStore.js +361 -0
  271. package/dist/store/spotlightStore.js.map +1 -0
  272. package/dist/store/storeSink.d.ts +16 -0
  273. package/dist/store/storeSink.d.ts.map +1 -0
  274. package/dist/store/storeSink.js +127 -0
  275. package/dist/store/storeSink.js.map +1 -0
  276. package/dist/store/types.d.ts +199 -0
  277. package/dist/store/types.d.ts.map +1 -0
  278. package/dist/store/types.js +87 -0
  279. package/dist/store/types.js.map +1 -0
  280. package/dist/types/session.d.ts +5 -0
  281. package/dist/types/session.d.ts.map +1 -0
  282. package/dist/types/toolResult.d.ts +11 -0
  283. package/dist/types/toolResult.d.ts.map +1 -0
  284. package/dist/utils/devConsole.d.ts +2 -0
  285. package/dist/utils/devConsole.d.ts.map +1 -0
  286. package/dist/utils/devConsole.js +6 -0
  287. package/dist/utils/devConsole.js.map +1 -0
  288. package/dist/utils/requestTimeout.d.ts +5 -0
  289. package/dist/utils/requestTimeout.d.ts.map +1 -0
  290. package/dist/utils/requestTimeout.js +12 -0
  291. package/dist/utils/requestTimeout.js.map +1 -0
  292. package/dist/workflow/createOperateDefinition.d.ts +22 -0
  293. package/dist/workflow/createOperateDefinition.d.ts.map +1 -0
  294. package/dist/workflow/createOperateDefinition.js +32 -0
  295. package/dist/workflow/createOperateDefinition.js.map +1 -0
  296. package/dist/workflow/operate.d.ts +23 -0
  297. package/dist/workflow/operate.d.ts.map +1 -0
  298. package/dist/workflow/operate.js +96 -0
  299. package/dist/workflow/operate.js.map +1 -0
  300. package/dist/workflow/runHostTool.d.ts +4 -0
  301. package/dist/workflow/runHostTool.d.ts.map +1 -0
  302. package/dist/workflow/runHostTool.js +13 -0
  303. package/dist/workflow/runHostTool.js.map +1 -0
  304. package/dist/workflow/sessionControl.d.ts +30 -0
  305. package/dist/workflow/sessionControl.d.ts.map +1 -0
  306. package/dist/workflow/sessionControl.js +113 -0
  307. package/dist/workflow/sessionControl.js.map +1 -0
  308. package/dist/workflow/shared.d.ts +6 -0
  309. package/dist/workflow/shared.d.ts.map +1 -0
  310. package/dist/workflow/shared.js +15 -0
  311. package/dist/workflow/shared.js.map +1 -0
  312. package/package.json +78 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpotlightThinking2.vue.js","sources":["../../src/components/SpotlightThinking.vue"],"sourcesContent":["<template>\n <div\n class=\"thinking-bar\"\n :class=\"[\n { 'thinking-bar--embedded': embedded },\n { 'thinking-bar--open': isOpen },\n { 'thinking-bar--centered': centered },\n { 'thinking-bar--corner': !centered && !embedded },\n ]\"\n >\n <div class=\"thinking-bar-grid\" aria-hidden=\"true\" />\n <div class=\"thinking-bar-header\">\n <div class=\"thinking-bar-title-stack\">\n <span class=\"thinking-bar-kicker\">HYDRO PROCESS</span>\n <span class=\"thinking-bar-title\">{{ titleText }}</span>\n </div>\n <div class=\"thinking-bar-metrics\" aria-label=\"执行状态概览\">\n <span class=\"thinking-bar-metric\">\n <strong>{{ steps.length }}</strong>\n <em>阶段</em>\n </span>\n <span class=\"thinking-bar-metric\">\n <strong>{{ activeStepCount }}</strong>\n <em>运行</em>\n </span>\n <span class=\"thinking-bar-metric\">\n <strong>{{ doneStepCount }}</strong>\n <em>完成</em>\n </span>\n </div>\n <button\n type=\"button\"\n class=\"thinking-bar-close\"\n aria-label=\"关闭\"\n @click=\"$emit('close')\"\n >\n ×\n </button>\n </div>\n <div ref=\"stepsContainerRef\" class=\"thinking-bar-steps\">\n <div\n v-for=\"step in steps\"\n :key=\"step.id\"\n class=\"thinking-bar-step\"\n :class=\"[step.status]\"\n >\n <OfficialBorderBeam\n v-if=\"step.status === 'active'\"\n class=\"thinking-bar-step-beam\"\n :size=\"88\"\n :duration=\"6\"\n :border-width=\"1.5\"\n color-from=\"#c9a25d\"\n color-to=\"#5d8f9b\"\n />\n <div class=\"thinking-bar-step-inner\">\n <span class=\"thinking-bar-step-icon\">{{\n stepIcon(step.status)\n }}</span>\n <div class=\"thinking-bar-step-column\">\n <span class=\"thinking-bar-step-label\">{{ step.label }}</span>\n <div\n :ref=\"(el) => setStepBodyRef(step.id, el)\"\n class=\"thinking-bar-step-body\"\n @scroll.passive=\"handleStepBodyScroll(step.id, $event)\"\n >\n <template v-if=\"isToolExecutionStep(step.id)\">\n <div class=\"thinking-bar-tool-step-flow\">\n <details\n v-if=\"hasExecutionDetails(step)\"\n class=\"thinking-bar-execution-details\"\n >\n <summary class=\"thinking-bar-execution-details-summary\">\n <span class=\"thinking-bar-execution-details-title\"\n >调用工具</span\n >\n <span class=\"thinking-bar-execution-details-meta\">{{\n executionDetailsMeta(step)\n }}</span>\n <span class=\"thinking-bar-execution-details-caret\"\n >▾</span\n >\n </summary>\n <div class=\"thinking-bar-execution-details-body\">\n <pre\n v-if=\"getToolStepPlanning(step)\"\n class=\"thinking-bar-execution-planning\"\n >{{ getToolStepPlanning(step) }}</pre\n >\n <details\n v-for=\"toolCall in getStepToolCalls(step)\"\n :key=\"toolCall.id\"\n class=\"thinking-bar-tool-call\"\n :open=\"isToolCallOpen(toolCall)\"\n >\n <summary class=\"thinking-bar-tool-call-head\">\n <div class=\"thinking-bar-tool-call-head-main\">\n <span class=\"thinking-bar-tool-call-name\">\n {{ getToolTitle(toolCall) }}\n </span>\n <span\n v-if=\"toolCall.name !== getToolTitle(toolCall)\"\n class=\"thinking-bar-tool-call-id\"\n >\n {{ toolCall.name }}\n </span>\n </div>\n <div class=\"thinking-bar-tool-call-head-side\">\n <span\n class=\"thinking-bar-tool-call-status\"\n :class=\"`is-${toolCall.status}`\"\n >\n {{ toolStatusLabel(toolCall.status) }}\n </span>\n <span class=\"thinking-bar-tool-call-caret\">▾</span>\n </div>\n </summary>\n <div class=\"thinking-bar-tool-call-body\">\n <div\n v-if=\"toolCall.argsText?.trim()\"\n class=\"thinking-bar-tool-call-block\"\n >\n <div class=\"thinking-bar-tool-call-block-title\">\n 请求参数\n </div>\n <pre class=\"thinking-bar-tool-call-pre\">{{\n toolCall.argsText\n }}</pre>\n </div>\n <div\n v-if=\"toolCall.summary?.trim()\"\n class=\"thinking-bar-tool-call-block thinking-bar-tool-call-block--result\"\n >\n <div class=\"thinking-bar-tool-call-block-title\">\n 执行摘要\n </div>\n <pre class=\"thinking-bar-tool-call-pre\">{{\n toolCall.summary\n }}</pre>\n </div>\n <div\n v-if=\"hasStructuredToolResult(toolCall)\"\n class=\"thinking-bar-tool-call-block thinking-bar-tool-call-block--result\"\n >\n <div class=\"thinking-bar-tool-call-block-title\">\n 接口结果\n </div>\n <div\n v-if=\"getToolResultImage(toolCall)\"\n class=\"thinking-bar-tool-result-image-shell\"\n >\n <img\n class=\"thinking-bar-tool-result-image\"\n :src=\"getToolResultImage(toolCall) || ''\"\n :alt=\"toolCall.name\"\n />\n </div>\n <iframe\n v-else-if=\"getToolResultHtml(toolCall)\"\n class=\"thinking-bar-tool-result-html\"\n :srcdoc=\"getToolResultHtml(toolCall) || ''\"\n :title=\"toolCall.name\"\n sandbox=\"\"\n />\n <div\n v-else-if=\"getToolResultTable(toolCall)\"\n class=\"thinking-bar-tool-result-table-wrap\"\n >\n <table class=\"thinking-bar-tool-result-table\">\n <thead>\n <tr>\n <th\n v-for=\"column in getToolResultTable(\n toolCall,\n )?.columns\"\n :key=\"column\"\n >\n {{ column }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(\n row, rowIndex\n ) in getToolResultTable(toolCall)?.rows\"\n :key=\"`${toolCall.id}-${rowIndex}`\"\n >\n <td\n v-for=\"column in getToolResultTable(\n toolCall,\n )?.columns\"\n :key=\"`${toolCall.id}-${rowIndex}-${column}`\"\n >\n {{ formatTableCell(row[column]) }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <pre\n v-else-if=\"getToolResultDisplay(toolCall)\"\n class=\"thinking-bar-tool-call-pre\"\n >{{ getToolResultDisplay(toolCall) }}</pre\n >\n </div>\n <div\n v-if=\"formatToolTrace(toolCall.trace)\"\n class=\"thinking-bar-tool-call-block\"\n >\n <div class=\"thinking-bar-tool-call-block-title\">\n 执行轨迹\n </div>\n <pre class=\"thinking-bar-tool-call-pre\">{{\n formatToolTrace(toolCall.trace)\n }}</pre>\n </div>\n <div\n v-if=\"toolCall.errorCode\"\n class=\"thinking-bar-tool-call-block thinking-bar-tool-call-block--error\"\n >\n <div class=\"thinking-bar-tool-call-block-title\">\n 错误码\n </div>\n <pre class=\"thinking-bar-tool-call-pre\">{{\n toolCall.errorCode\n }}</pre>\n </div>\n <div\n v-if=\"\n isKnowledgeAnswerTool(toolCall) &&\n getNestedKnowledgeToolCalls(step).length > 0\n \"\n class=\"thinking-bar-nested-tools\"\n >\n <div class=\"thinking-bar-nested-tools-label\">\n 知识库内部步骤\n </div>\n <details\n v-for=\"nested in getNestedKnowledgeToolCalls(\n step,\n )\"\n :key=\"nested.id\"\n class=\"thinking-bar-tool-call thinking-bar-tool-call--nested\"\n >\n <summary class=\"thinking-bar-tool-call-head\">\n <div class=\"thinking-bar-tool-call-head-main\">\n <span class=\"thinking-bar-tool-call-name\">{{\n getToolTitle(nested)\n }}</span>\n </div>\n <div class=\"thinking-bar-tool-call-head-side\">\n <span\n class=\"thinking-bar-tool-call-status\"\n :class=\"`is-${nested.status}`\"\n >\n {{ toolStatusLabel(nested.status) }}\n </span>\n <span class=\"thinking-bar-tool-call-caret\"\n >▾</span\n >\n </div>\n </summary>\n <div class=\"thinking-bar-tool-call-body\">\n <div\n v-if=\"nested.argsText?.trim()\"\n class=\"thinking-bar-tool-call-block\"\n >\n <div\n class=\"thinking-bar-tool-call-block-title\"\n >\n 请求参数\n </div>\n <pre class=\"thinking-bar-tool-call-pre\">{{\n nested.argsText\n }}</pre>\n </div>\n <div\n v-if=\"getToolResultDisplay(nested)\"\n class=\"thinking-bar-tool-call-block\"\n >\n <div\n class=\"thinking-bar-tool-call-block-title\"\n >\n 接口结果\n </div>\n <pre class=\"thinking-bar-tool-call-pre\">{{\n getToolResultDisplay(nested)\n }}</pre>\n </div>\n </div>\n </details>\n </div>\n </div>\n </details>\n </div>\n </details>\n <section\n v-if=\"getToolStepAnswer(step)\"\n class=\"thinking-bar-step-answer-section\"\n >\n <div class=\"thinking-bar-step-section-label\">回答</div>\n <div\n class=\"thinking-bar-step-text thinking-bar-step-markdown thinking-bar-step-answer\"\n >\n <SpotlightMarkdownPreview\n :model-value=\"getToolStepAnswer(step)\"\n format-knowledge\n />\n </div>\n </section>\n </div>\n </template>\n <template v-else>\n <div\n v-if=\"step.chatItems && step.chatItems.length > 0\"\n class=\"thinking-bar-chat-items\"\n >\n <div\n v-for=\"item in step.chatItems\"\n :key=\"item.id\"\n class=\"thinking-bar-chat-item\"\n >\n <div\n v-if=\"item.type === 'text' && item.text.trim()\"\n class=\"thinking-bar-step-text thinking-bar-step-markdown\"\n >\n <MdPreview\n :model-value=\"humanizeSpotlightStepContent(item.text)\"\n theme=\"dark\"\n preview-theme=\"github\"\n code-theme=\"github\"\n class=\"thinking-bar-md-preview\"\n />\n </div>\n <details\n v-else-if=\"item.type === 'tool'\"\n class=\"thinking-bar-tool-call\"\n :open=\"isToolCallOpen(item.toolCall)\"\n >\n <summary class=\"thinking-bar-tool-call-head\">\n <div class=\"thinking-bar-tool-call-head-main\">\n <span class=\"thinking-bar-tool-call-name\">\n {{ getToolTitle(item.toolCall) }}\n </span>\n </div>\n <div class=\"thinking-bar-tool-call-head-side\">\n <span\n class=\"thinking-bar-tool-call-status\"\n :class=\"`is-${item.toolCall.status}`\"\n >\n {{\n item.toolCall.status === \"done\"\n ? \"已完成\"\n : item.toolCall.status === \"error\"\n ? \"失败\"\n : item.toolCall.status === \"running\"\n ? \"执行中\"\n : \"待执行\"\n }}\n </span>\n <span class=\"thinking-bar-tool-call-caret\">▾</span>\n </div>\n </summary>\n <div class=\"thinking-bar-tool-call-body\">\n <div\n v-if=\"hasStructuredToolResult(item.toolCall)\"\n class=\"thinking-bar-tool-call-block thinking-bar-tool-call-block--result\"\n >\n <div class=\"thinking-bar-tool-call-block-title\">\n 结果\n </div>\n <div\n v-if=\"getToolResultImage(item.toolCall)\"\n class=\"thinking-bar-tool-result-image-shell\"\n >\n <img\n class=\"thinking-bar-tool-result-image\"\n :src=\"getToolResultImage(item.toolCall) || ''\"\n :alt=\"item.toolCall.name\"\n />\n </div>\n <iframe\n v-else-if=\"getToolResultHtml(item.toolCall)\"\n class=\"thinking-bar-tool-result-html\"\n :srcdoc=\"getToolResultHtml(item.toolCall) || ''\"\n :title=\"item.toolCall.name\"\n sandbox=\"\"\n />\n <div\n v-else-if=\"getToolResultTable(item.toolCall)\"\n class=\"thinking-bar-tool-result-table-wrap\"\n >\n <table class=\"thinking-bar-tool-result-table\">\n <thead>\n <tr>\n <th\n v-for=\"column in getToolResultTable(\n item.toolCall,\n )?.columns\"\n :key=\"column\"\n >\n {{ column }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(row, rowIndex) in getToolResultTable(\n item.toolCall,\n )?.rows\"\n :key=\"`${item.toolCall.id}-${rowIndex}`\"\n >\n <td\n v-for=\"column in getToolResultTable(\n item.toolCall,\n )?.columns\"\n :key=\"`${item.toolCall.id}-${rowIndex}-${column}`\"\n >\n {{ formatTableCell(row[column]) }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <pre\n v-else-if=\"getToolResultDisplay(item.toolCall)\"\n class=\"thinking-bar-tool-call-pre\"\n >{{ getToolResultDisplay(item.toolCall) }}</pre\n >\n </div>\n </div>\n </details>\n </div>\n </div>\n <div\n v-else-if=\"step.content\"\n class=\"thinking-bar-step-text thinking-bar-step-markdown\"\n >\n <MdPreview\n :model-value=\"\n getIntentStepDisplayContent(step.content ?? '')\n \"\n theme=\"dark\"\n preview-theme=\"github\"\n code-theme=\"github\"\n class=\"thinking-bar-md-preview\"\n />\n </div>\n </template>\n <div\n v-if=\"step.attachments && step.attachments.length > 0\"\n class=\"thinking-bar-attachments\"\n >\n <a\n v-for=\"attachment in step.attachments\"\n :key=\"attachment.id\"\n class=\"thinking-bar-attachment\"\n :href=\"attachment.url\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <img\n v-if=\"attachment.type === 'image'\"\n class=\"thinking-bar-attachment-image\"\n :src=\"attachment.url\"\n :alt=\"attachment.name || '图表预览'\"\n />\n <div class=\"thinking-bar-attachment-meta\">\n <span class=\"thinking-bar-attachment-name\">\n {{ attachment.name || attachment.url }}\n </span>\n <span class=\"thinking-bar-attachment-type\">\n {{\n attachment.type === \"image\"\n ? \"图片预览\"\n : attachment.type === \"html\"\n ? \"打开图表\"\n : \"打开文件\"\n }}\n </span>\n </div>\n </a>\n </div>\n <div\n v-if=\"step.files && step.files.length > 0\"\n class=\"thinking-bar-workspace\"\n >\n <div class=\"thinking-bar-workspace-title\">状态工作台</div>\n <div class=\"thinking-bar-workspace-shell\">\n <div class=\"thinking-bar-file-tree-pane\">\n <div class=\"thinking-bar-file-tree-head\">文件系统</div>\n <div class=\"thinking-bar-file-tree-body\">\n <template\n v-for=\"node in getVisibleFileTree(step.id, step.files)\"\n :key=\"`${step.id}:${node.path}`\"\n >\n <div\n v-if=\"node.type === 'directory'\"\n class=\"thinking-bar-tree-node\"\n >\n <button\n type=\"button\"\n class=\"thinking-bar-tree-row thinking-bar-tree-row--directory\"\n :style=\"{\n paddingLeft: `${node.depth * 14 + 10}px`,\n }\"\n @click=\"toggleDirectory(step.id, node.path)\"\n >\n <span class=\"thinking-bar-tree-caret\">\n {{\n isDirectoryExpanded(step.id, node.path)\n ? \"▾\"\n : \"▸\"\n }}\n </span>\n <span class=\"thinking-bar-tree-icon\">📁</span>\n <span class=\"thinking-bar-tree-label\">{{\n node.name\n }}</span>\n </button>\n </div>\n <button\n v-else\n type=\"button\"\n class=\"thinking-bar-tree-row thinking-bar-tree-row--file\"\n :class=\"{\n active: getSelectedFile(step)?.id === node.file?.id,\n }\"\n :style=\"{ paddingLeft: `${node.depth * 14 + 26}px` }\"\n @click=\"selectTreeFile(step.id, node.file)\"\n >\n <span class=\"thinking-bar-tree-icon\">\n {{ getFileIcon(node.file?.path || \"\") }}\n </span>\n <span class=\"thinking-bar-tree-label\">{{\n node.name\n }}</span>\n </button>\n </template>\n </div>\n </div>\n <div class=\"thinking-bar-file-preview\">\n <template v-if=\"getSelectedFile(step)\">\n <div class=\"thinking-bar-file-preview-head\">\n <div class=\"thinking-bar-file-preview-title\">\n <span class=\"thinking-bar-tree-icon\">\n {{ getFileIcon(getSelectedFile(step)?.path || \"\") }}\n </span>\n <span>{{ getSelectedFile(step)?.path }}</span>\n </div>\n <span\n v-if=\"isHtmlFile(getSelectedFile(step)?.path || '')\"\n class=\"thinking-bar-preview-chip\"\n >\n HTML 预览\n </span>\n </div>\n <div\n v-if=\"isImageFile(getSelectedFile(step)?.path || '')\"\n class=\"thinking-bar-image-shell\"\n >\n <img\n v-if=\"getFileDataUrl(getSelectedFile(step))\"\n class=\"thinking-bar-image-preview\"\n :src=\"getFileDataUrl(getSelectedFile(step)) || ''\"\n :alt=\"getSelectedFile(step)?.name || '图片预览'\"\n />\n <div v-else class=\"thinking-bar-empty-preview\">\n 当前图片文件没有可直接渲染的内容。\n </div>\n </div>\n <iframe\n v-else-if=\"\n isHtmlFile(getSelectedFile(step)?.path || '')\n \"\n class=\"thinking-bar-html-preview\"\n :srcdoc=\"getFileContent(getSelectedFile(step))\"\n :title=\"getSelectedFile(step)?.path\"\n sandbox=\"\"\n />\n <pre v-else class=\"thinking-bar-file-preview-body\">{{\n getFileContent(getSelectedFile(step))\n }}</pre>\n </template>\n <div v-else class=\"thinking-bar-empty-preview\">\n 还没选中文件,左边点一个看看。\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onBeforeUnmount,\n onMounted,\n ref,\n watch,\n} from \"vue\";\nimport { MdPreview } from \"md-editor-v3\";\nimport \"md-editor-v3/lib/preview.css\";\nimport SpotlightMarkdownPreview from \"./SpotlightMarkdownPreview.vue\";\nimport type { ToolTraceEvent } from \"@inupedia/spotlight-protocol\";\nimport {\n getIntentStepDisplayContent,\n humanizeSpotlightStepContent,\n isToolExecutionStep,\n sanitizeToolStepAnswerText,\n splitToolStepContent,\n} from \"../store/pipeline/displayText.js\";\nimport { partitionToolCalls } from \"../store/pipeline/toolDisplay.js\";\nimport { TOOL_NAMES } from \"../constants/toolNames.js\";\nimport OfficialBorderBeam from \"./OfficialBorderBeam.vue\";\n\ninterface StepAttachment {\n id: string;\n type: \"image\" | \"file\" | \"html\";\n name?: string;\n url: string;\n mimeType?: string;\n}\n\ninterface StepFile {\n id: string;\n path: string;\n name: string;\n content?: string[];\n createdAt?: string;\n modifiedAt?: string;\n}\n\ninterface StepToolCall {\n id: string;\n name: string;\n displayName?: string;\n argsText?: string;\n resultText?: string;\n summary?: string;\n errorCode?: string;\n trace?: ToolTraceEvent[];\n status: \"pending\" | \"running\" | \"done\" | \"error\";\n}\n\ninterface TableData {\n columns: string[];\n rows: Array<Record<string, unknown>>;\n}\n\ntype StepChatItem =\n | {\n id: string;\n type: \"text\";\n text: string;\n }\n | {\n id: string;\n type: \"tool\";\n toolCall: StepToolCall;\n };\n\ninterface FileTreeNode {\n type: \"directory\" | \"file\";\n path: string;\n name: string;\n depth: number;\n file: StepFile | null;\n}\n\nconst isOpen = ref(false);\nconst stepsContainerRef = ref<HTMLElement | null>(null);\n/** 各阶段独立:仅当为 false 时跳过自动滚到底(用户在该阶段内上滑过) */\nconst stepStickToBottom = ref<Record<string, boolean>>({});\nconst stepBodyEls = new Map<string, HTMLElement>();\nlet scrollTimer: number | null = null;\nlet bodyResizeObserver: ResizeObserver | null = null;\n\nfunction scheduleScrollAfterLayout(force: boolean) {\n void scrollToBottom(force);\n requestAnimationFrame(() => {\n void scrollToBottom(force);\n });\n}\n\nfunction setStepBodyRef(stepId: string, el: unknown) {\n const prev = stepBodyEls.get(stepId);\n if (prev && bodyResizeObserver) {\n bodyResizeObserver.unobserve(prev);\n }\n const html = el instanceof HTMLElement ? el : null;\n if (html) {\n stepBodyEls.set(stepId, html);\n bodyResizeObserver?.observe(html);\n } else {\n stepBodyEls.delete(stepId);\n }\n}\n\nfunction isStepBodyNearBottom(el: HTMLElement): boolean {\n return el.scrollHeight - el.scrollTop - el.clientHeight <= 96;\n}\n\nfunction handleStepBodyScroll(stepId: string, event: Event) {\n const el = event.target as HTMLElement;\n if (scrollTimer != null) {\n window.clearTimeout(scrollTimer);\n }\n stepStickToBottom.value = {\n ...stepStickToBottom.value,\n [stepId]: isStepBodyNearBottom(el),\n };\n scrollTimer = window.setTimeout(() => {\n stepStickToBottom.value = {\n ...stepStickToBottom.value,\n [stepId]: isStepBodyNearBottom(el),\n };\n }, 120);\n}\n\nfunction scrollTargetStepIds(): string[] {\n const active = props.steps.find((s) => s.status === \"active\");\n if (active) return [active.id];\n const last = props.steps[props.steps.length - 1];\n return last ? [last.id] : [];\n}\n\nfunction shouldFollowStepBody(stepId: string, force: boolean): boolean {\n if (force) return true;\n return stepStickToBottom.value[stepId] !== false;\n}\n\nonMounted(() => {\n if (typeof ResizeObserver !== \"undefined\") {\n bodyResizeObserver = new ResizeObserver(() => {\n void scrollToBottom();\n });\n void nextTick(() => {\n stepBodyEls.forEach((el) => {\n bodyResizeObserver?.observe(el);\n });\n });\n }\n requestAnimationFrame(() => {\n isOpen.value = true;\n });\n requestAnimationFrame(() => {\n scheduleScrollAfterLayout(true);\n });\n});\n\nonBeforeUnmount(() => {\n if (scrollTimer != null) {\n window.clearTimeout(scrollTimer);\n }\n bodyResizeObserver?.disconnect();\n bodyResizeObserver = null;\n stepBodyEls.clear();\n});\n\nconst props = defineProps<{\n steps: Array<{\n id: string;\n label: string;\n status: \"pending\" | \"active\" | \"done\" | \"error\";\n content?: string;\n attachments?: StepAttachment[];\n files?: StepFile[];\n toolCalls?: StepToolCall[];\n chatItems?: StepChatItem[];\n }>;\n embedded?: boolean;\n centered?: boolean;\n}>();\n\ndefineEmits<{\n close: [];\n}>();\n\nconst titleText = computed(() => {\n const allEnded =\n props.steps.length > 0 &&\n props.steps.every((s) => s.status === \"done\" || s.status === \"error\");\n return allEnded ? \"执行完成\" : \"思考中\";\n});\n\nconst isThinkingActive = computed(() =>\n props.steps.some(\n (step) =>\n step.status === \"active\" ||\n step.status === \"pending\" ||\n step.toolCalls?.some(\n (toolCall) =>\n toolCall.status === \"pending\" || toolCall.status === \"running\",\n ),\n ),\n);\nconst activeStepCount = computed(\n () => props.steps.filter((step) => step.status === \"active\").length,\n);\nconst doneStepCount = computed(\n () => props.steps.filter((step) => step.status === \"done\").length,\n);\n\nfunction stepIcon(status: string): string {\n switch (status) {\n case \"active\":\n return \"⋯\";\n case \"done\":\n return \"✓\";\n case \"error\":\n return \"✕\";\n default:\n return \"·\";\n }\n}\n\nfunction getToolId(toolCall: StepToolCall): string {\n return toolCall.name.trim().toLowerCase();\n}\n\nfunction getToolTitle(toolCall: StepToolCall): string {\n return toolCall.displayName?.trim() || toolCall.name;\n}\n\ntype PipelineStep = (typeof props.steps)[number];\n\nfunction getToolStepPlanning(step: PipelineStep): string {\n return splitToolStepContent(step.content ?? \"\").planning;\n}\n\nfunction getToolStepAnswer(step: PipelineStep): string {\n const { planning } = splitToolStepContent(step.content ?? \"\");\n const cleaned = stripInternalEvidenceAnswer(\n sanitizeToolStepAnswerText(step.content ?? \"\"),\n );\n if (cleaned.trim()) return cleaned;\n\n if (planning.trim()) return \"\";\n return stripInternalEvidenceAnswer(\n sanitizeToolStepAnswerText(step.content ?? \"\"),\n );\n}\n\nfunction stripInternalEvidenceAnswer(text: string): string {\n const trimmed = text.trim();\n if (!trimmed) return \"\";\n if (\n trimmed.startsWith(\"联网检索证据:\") ||\n trimmed.includes(\"Tavily answer:\")\n ) {\n return \"\";\n }\n return trimmed;\n}\n\nfunction collectRawToolCalls(step: PipelineStep): StepToolCall[] {\n if (step.toolCalls?.length) return step.toolCalls;\n return (step.chatItems ?? [])\n .filter(\n (item): item is Extract<StepChatItem, { type: \"tool\" }> =>\n item.type === \"tool\",\n )\n .map((item) => item.toolCall);\n}\n\nfunction getStepToolCalls(step: PipelineStep): StepToolCall[] {\n return partitionToolCalls(collectRawToolCalls(step)).visible;\n}\n\nfunction getNestedKnowledgeToolCalls(step: PipelineStep): StepToolCall[] {\n return partitionToolCalls(collectRawToolCalls(step)).nestedKnowledge;\n}\n\nfunction isKnowledgeAnswerTool(toolCall: StepToolCall): boolean {\n return normalizeToolName(toolCall.name) === TOOL_NAMES.knowledge.answer;\n}\n\nfunction normalizeToolName(name: string): string {\n return name.trim().toLowerCase();\n}\n\nfunction hasExecutionDetails(step: PipelineStep): boolean {\n return Boolean(\n getToolStepPlanning(step).trim() || getStepToolCalls(step).length > 0,\n );\n}\n\nfunction executionDetailsMeta(step: PipelineStep): string {\n const toolCount = getStepToolCalls(step).length;\n if (toolCount > 0) return `${toolCount} 个工具调用`;\n return \"规划记录\";\n}\n\nfunction toolStatusLabel(status: StepToolCall[\"status\"]): string {\n switch (status) {\n case \"done\":\n return \"已完成\";\n case \"error\":\n return \"失败\";\n case \"running\":\n return \"执行中\";\n default:\n return \"待执行\";\n }\n}\n\nfunction formatToolTrace(trace?: ToolTraceEvent[]): string {\n if (!trace?.length) return \"\";\n return trace\n .map(\n (event) =>\n `[${event.phase}/${event.type}] ${event.tool}${event.detail ? ` · ${event.detail}` : \"\"}`,\n )\n .join(\"\\n\");\n}\n\nfunction isToolCallOpen(toolCall: StepToolCall): boolean {\n return toolCall.status === \"running\" || toolCall.status === \"pending\";\n}\n\nfunction parseStructuredText(value?: string): unknown {\n if (!value) return null;\n try {\n return JSON.parse(value);\n } catch {\n return null;\n }\n}\n\nfunction getToolResultDisplay(toolCall: StepToolCall): string {\n const toolId = getToolId(toolCall);\n const raw = toolCall.resultText?.trim() || \"\";\n if (!raw) return \"\";\n\n if (toolId === \"list_kbs\") {\n const parsed = parseStructuredText(raw);\n if (Array.isArray(parsed)) {\n if (parsed.length === 0) return \"当前没有可访问的知识库\";\n return raw;\n }\n return raw;\n }\n\n if (toolId === \"list_directory\" || toolId === \"ls\") {\n const parsed = parseStructuredText(raw);\n if (Array.isArray(parsed) && parsed.length === 0) {\n return \"\";\n }\n return raw;\n }\n\n return raw;\n}\n\nfunction getParsedToolResult(toolCall: StepToolCall): unknown {\n const raw = toolCall.resultText?.trim() || \"\";\n if (!raw) return null;\n return parseStructuredText(raw) ?? raw;\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction looksLikeInlineHtml(value: string): boolean {\n return /<(table|html|body|svg|div|span|img|p|iframe)[\\s>]/i.test(value);\n}\n\nfunction getToolResultImage(toolCall: StepToolCall): string | null {\n const parsed = getParsedToolResult(toolCall);\n if (typeof parsed === \"string\") {\n const trimmed = parsed.trim();\n if (/^data:image\\//i.test(trimmed)) return trimmed;\n if (/\\.(png|jpe?g|gif|webp|svg)(\\?.*)?$/i.test(trimmed)) return trimmed;\n return null;\n }\n\n if (isPlainObject(parsed)) {\n const candidate = [parsed.url, parsed.uri, parsed.path].find(\n (value) => typeof value === \"string\" && /^data:image\\//i.test(value),\n );\n return typeof candidate === \"string\" ? candidate : null;\n }\n\n return null;\n}\n\nfunction getToolResultHtml(toolCall: StepToolCall): string | null {\n const parsed = getParsedToolResult(toolCall);\n if (typeof parsed === \"string\" && looksLikeInlineHtml(parsed.trim())) {\n return parsed;\n }\n if (isPlainObject(parsed)) {\n const candidate = [parsed.html, parsed.content, parsed.markup].find(\n (value) => typeof value === \"string\" && looksLikeInlineHtml(value),\n );\n return typeof candidate === \"string\" ? candidate : null;\n }\n return null;\n}\n\nfunction normalizeRows(value: unknown): Array<Record<string, unknown>> | null {\n if (!Array.isArray(value) || value.length === 0) return null;\n if (!value.every((item) => isPlainObject(item))) return null;\n return value as Array<Record<string, unknown>>;\n}\n\nfunction getToolResultTable(toolCall: StepToolCall): TableData | null {\n const parsed = getParsedToolResult(toolCall);\n if (\n Array.isArray(parsed) &&\n parsed.length > 0 &&\n parsed.every((item) => typeof item === \"string\")\n ) {\n return {\n columns: [\"value\"],\n rows: (parsed as string[]).map((value) => ({ value })),\n };\n }\n\n const directRows = normalizeRows(parsed);\n if (directRows) {\n const columns = [...new Set(directRows.flatMap((row) => Object.keys(row)))];\n return columns.length > 0 ? { columns, rows: directRows } : null;\n }\n\n if (!isPlainObject(parsed)) return null;\n\n if (\n Array.isArray(parsed.columns) &&\n Array.isArray(parsed.rows) &&\n parsed.columns.every((column) => typeof column === \"string\")\n ) {\n const columns = parsed.columns as string[];\n const rows = (parsed.rows as unknown[]).map((row) =>\n isPlainObject(row)\n ? row\n : Array.isArray(row)\n ? Object.fromEntries(\n columns.map((column, index) => [column, row[index]]),\n )\n : { value: row },\n );\n return columns.length > 0 ? { columns, rows } : null;\n }\n\n if (Array.isArray(parsed.data)) {\n const nestedRows = normalizeRows(parsed.data);\n if (nestedRows) {\n const columns = [\n ...new Set(nestedRows.flatMap((row) => Object.keys(row))),\n ];\n return columns.length > 0 ? { columns, rows: nestedRows } : null;\n }\n }\n\n return null;\n}\n\nfunction hasStructuredToolResult(toolCall: StepToolCall): boolean {\n const display = getToolResultDisplay(toolCall);\n const summary = toolCall.summary?.trim();\n if (display && summary && display.trim() === summary) return false;\n return Boolean(\n getToolResultImage(toolCall) ||\n getToolResultHtml(toolCall) ||\n getToolResultTable(toolCall) ||\n display,\n );\n}\n\nfunction formatTableCell(value: unknown): string {\n if (value == null) return \"-\";\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\" || typeof value === \"boolean\") {\n return String(value);\n }\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n}\n\nasync function scrollToBottom(force = false) {\n await nextTick();\n const stepsContainer = stepsContainerRef.value;\n if (stepsContainer) {\n stepsContainer.scrollTo({\n top: stepsContainer.scrollHeight,\n behavior: force ? \"auto\" : \"smooth\",\n });\n }\n const ids = scrollTargetStepIds();\n for (const id of ids) {\n const el = stepBodyEls.get(id);\n if (!el || !shouldFollowStepBody(id, force)) continue;\n el.scrollTo({\n top: el.scrollHeight,\n behavior: force ? \"auto\" : \"smooth\",\n });\n }\n\n window.setTimeout(() => {\n const retryContainer = stepsContainerRef.value;\n if (retryContainer) {\n retryContainer.scrollTo({\n top: retryContainer.scrollHeight,\n behavior: \"auto\",\n });\n }\n for (const id of ids) {\n const el = stepBodyEls.get(id);\n if (!el || !shouldFollowStepBody(id, force)) continue;\n el.scrollTo({\n top: el.scrollHeight,\n behavior: \"auto\",\n });\n }\n }, 120);\n}\n\nwatch(\n () => props.steps,\n () => {\n if (isThinkingActive.value) {\n const active = props.steps.find((s) => s.status === \"active\");\n // When a new active step appears, default it to follow-bottom.\n // If user manually scrolls up, handleStepBodyScroll will flip it to false.\n if (active && !(active.id in stepStickToBottom.value)) {\n stepStickToBottom.value = {\n ...stepStickToBottom.value,\n [active.id]: true,\n };\n }\n scheduleScrollAfterLayout(false);\n return;\n }\n scheduleScrollAfterLayout(false);\n },\n { deep: true },\n);\n\nconst selectedFileByStep = ref<Record<string, string>>({});\nconst expandedDirectoriesByStep = ref<Record<string, string[]>>({});\n\nwatch(\n () => props.steps,\n (steps) => {\n const next = { ...selectedFileByStep.value };\n const nextExpanded = { ...expandedDirectoriesByStep.value };\n for (const step of steps) {\n if (step.files?.length && !next[step.id]) {\n next[step.id] = step.files[0].id;\n }\n if (!step.files?.length && next[step.id]) {\n delete next[step.id];\n }\n if (step.files?.length) {\n const expanded = new Set(nextExpanded[step.id] || []);\n for (const file of step.files) {\n collectDirectoryPaths(file.path).forEach((path) =>\n expanded.add(path),\n );\n }\n nextExpanded[step.id] = [...expanded];\n }\n if (!step.files?.length && nextExpanded[step.id]) {\n delete nextExpanded[step.id];\n }\n }\n selectedFileByStep.value = next;\n expandedDirectoriesByStep.value = nextExpanded;\n },\n { deep: true, immediate: true },\n);\n\nfunction selectFile(stepId: string, fileId: string) {\n selectedFileByStep.value = {\n ...selectedFileByStep.value,\n [stepId]: fileId,\n };\n}\n\nfunction selectTreeFile(stepId: string, file: StepFile | null | undefined) {\n if (!file) return;\n selectFile(stepId, file.id);\n}\n\nfunction getSelectedFile(step: (typeof props.steps)[number]) {\n const selectedId = selectedFileByStep.value[step.id];\n return (\n step.files?.find((file) => file.id === selectedId) ??\n step.files?.[0] ??\n null\n );\n}\n\nfunction collectDirectoryPaths(path: string): string[] {\n const normalized = path.split(\"/\").filter(Boolean);\n const directories: string[] = [];\n let current = \"\";\n normalized.slice(0, -1).forEach((segment) => {\n current += `/${segment}`;\n directories.push(current);\n });\n return directories;\n}\n\nfunction isDirectoryExpanded(stepId: string, path: string): boolean {\n return (expandedDirectoriesByStep.value[stepId] || []).includes(path);\n}\n\nfunction toggleDirectory(stepId: string, path: string) {\n const current = new Set(expandedDirectoriesByStep.value[stepId] || []);\n if (current.has(path)) current.delete(path);\n else current.add(path);\n expandedDirectoriesByStep.value = {\n ...expandedDirectoriesByStep.value,\n [stepId]: [...current],\n };\n}\n\nfunction getVisibleFileTree(stepId: string, files: StepFile[]): FileTreeNode[] {\n const directories = new Map<\n string,\n {\n path: string;\n name: string;\n depth: number;\n directoryChildren: string[];\n files: StepFile[];\n }\n >();\n\n const ensureDirectory = (path: string, name: string, depth: number) => {\n if (!directories.has(path)) {\n directories.set(path, {\n path,\n name,\n depth,\n directoryChildren: [],\n files: [],\n });\n }\n return directories.get(path)!;\n };\n\n const root = ensureDirectory(\"\", \"root\", -1);\n\n for (const file of files) {\n const normalized = file.path.split(\"/\").filter(Boolean);\n let currentPath = \"\";\n let parent = root;\n\n normalized.slice(0, -1).forEach((segment, index) => {\n currentPath += `/${segment}`;\n const directory = ensureDirectory(currentPath, segment, index);\n if (!parent.directoryChildren.includes(currentPath)) {\n parent.directoryChildren.push(currentPath);\n }\n parent = directory;\n });\n\n parent.files.push(file);\n }\n\n const nodes: FileTreeNode[] = [];\n const walk = (directoryPath: string) => {\n const current = directories.get(directoryPath);\n if (!current) return;\n\n const sortedDirectories = [...current.directoryChildren].sort((a, b) =>\n a.localeCompare(b, \"zh-CN\"),\n );\n for (const childPath of sortedDirectories) {\n const child = directories.get(childPath);\n if (!child) continue;\n nodes.push({\n type: \"directory\",\n path: child.path,\n name: child.name,\n depth: child.depth,\n file: null,\n });\n if (isDirectoryExpanded(stepId, child.path)) {\n walk(child.path);\n }\n }\n\n const sortedFiles = [...current.files].sort((a, b) =>\n a.path.localeCompare(b.path, \"zh-CN\"),\n );\n sortedFiles.forEach((file) => {\n const depth = Math.max(\n file.path.split(\"/\").filter(Boolean).length - 1,\n 0,\n );\n nodes.push({\n type: \"file\",\n path: file.path,\n name: file.name,\n depth,\n file,\n });\n });\n };\n\n walk(\"\");\n return nodes;\n}\n\nfunction getFileContent(file: StepFile | null): string {\n return (file?.content || []).join(\"\\n\").trim();\n}\n\nfunction isImageFile(path: string): boolean {\n return /\\.(png|jpe?g|gif|webp|svg)$/i.test(path);\n}\n\nfunction isHtmlFile(path: string): boolean {\n return /\\.(html?)$/i.test(path);\n}\n\nfunction getFileDataUrl(file: StepFile | null): string {\n const content = getFileContent(file);\n if (/^data:image\\//i.test(content)) {\n return content;\n }\n return \"\";\n}\n\nfunction getFileIcon(path: string): string {\n if (isImageFile(path)) return \"🖼\";\n if (isHtmlFile(path)) return \"🌐\";\n if (/\\.md$/i.test(path)) return \"📝\";\n if (/\\.(csv|xlsx?)$/i.test(path)) return \"📊\";\n if (/\\.(json|ya?ml|xml)$/i.test(path)) return \"🧩\";\n return \"📄\";\n}\n</script>\n\n<style scoped>\n.thinking-bar {\n position: fixed;\n width: min(720px, calc(100vw - 48px));\n max-height: min(78vh, 820px);\n display: flex;\n flex-direction: column;\n min-height: 0;\n background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);\n border-radius: 22px;\n box-shadow:\n 0 24px 80px rgba(2, 6, 23, 0.48),\n 0 0 0 1px rgba(148, 163, 184, 0.18);\n color: #e2e8f0;\n z-index: 10000;\n overflow: hidden;\n opacity: 0;\n backdrop-filter: blur(14px);\n transition:\n opacity 0.28s ease,\n transform 0.28s ease,\n inset 0.28s ease,\n width 0.28s ease,\n max-height 0.28s ease,\n border-radius 0.28s ease;\n}\n\n.thinking-bar--open {\n opacity: 1;\n}\n\n.thinking-bar--embedded {\n position: relative;\n right: auto;\n bottom: auto;\n width: 100%;\n max-height: 100%;\n}\n\n.thinking-bar--centered {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%) scale(0.96);\n transform-origin: center;\n}\n\n.thinking-bar--centered.thinking-bar--open {\n transform: translate(-50%, -50%) scale(1);\n}\n\n.thinking-bar--corner {\n right: 24px;\n bottom: 24px;\n width: min(440px, calc(100vw - 28px));\n max-height: min(76vh, calc(100vh - 36px));\n border-radius: 16px;\n transform: scale(0.96);\n transform-origin: right bottom;\n}\n\n.thinking-bar--corner.thinking-bar--open {\n transform: scale(1);\n}\n\n.thinking-bar-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 18px 22px 16px;\n border-bottom: 1px solid rgba(148, 163, 184, 0.2);\n flex-shrink: 0;\n}\n\n.thinking-bar-title {\n font-size: 18px;\n font-weight: 700;\n color: #dbeafe;\n letter-spacing: 0.02em;\n min-width: 0;\n line-height: 1.35;\n}\n\n.thinking-bar-close {\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: #94a3b8;\n font-size: 20px;\n line-height: 1;\n cursor: pointer;\n transition:\n background 0.15s,\n color 0.15s;\n}\n\n.thinking-bar-close:hover {\n background: rgba(148, 163, 184, 0.2);\n color: #e2e8f0;\n}\n\n.thinking-bar-steps {\n padding: 18px 22px 22px;\n flex: 1;\n min-height: 0;\n overflow-x: hidden;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.thinking-bar-step {\n --thinking-step-border-color: rgba(148, 163, 184, 0.1);\n --thinking-step-glow-color: rgba(148, 163, 184, 0.16);\n display: flex;\n flex-direction: column;\n position: relative;\n /* Let each step size to content; long tool details scroll internally. */\n flex: 0 0 auto;\n min-height: 0;\n min-width: 0;\n box-sizing: border-box;\n font-size: 15px;\n padding: 10px 12px;\n border-radius: 14px;\n background: rgba(15, 23, 42, 0.42);\n border: 1px solid var(--thinking-step-border-color);\n box-shadow:\n inset 0 0 0 1px rgba(255, 255, 255, 0.02),\n 0 0 0 1px rgba(2, 6, 23, 0.16);\n overflow: hidden;\n isolation: isolate;\n transition:\n border-color 0.22s ease,\n box-shadow 0.22s ease,\n background 0.22s ease;\n}\n\n.thinking-bar-step-inner {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: row;\n align-items: stretch;\n gap: 10px;\n min-width: 0;\n}\n\n.thinking-bar-step-column {\n flex: 1;\n min-width: 0;\n min-height: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n position: relative;\n z-index: 1;\n}\n\n.thinking-bar-step-body {\n flex: 1;\n min-height: 0;\n max-height: min(36vh, 340px);\n overflow-x: hidden;\n overflow-y: auto;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n/* 隐藏滚动条且不占用布局宽度(仍可滚轮/触控滑动) */\n.thinking-bar-steps,\n.thinking-bar-step-body,\n.thinking-bar-tool-call-block,\n.thinking-bar-tool-result-table-wrap,\n.thinking-bar-file-tree-body,\n.thinking-bar-file-preview-body {\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n\n.thinking-bar-steps::-webkit-scrollbar,\n.thinking-bar-step-body::-webkit-scrollbar,\n.thinking-bar-tool-call-block::-webkit-scrollbar,\n.thinking-bar-tool-result-table-wrap::-webkit-scrollbar,\n.thinking-bar-file-tree-body::-webkit-scrollbar,\n.thinking-bar-file-preview-body::-webkit-scrollbar {\n display: none;\n width: 0;\n height: 0;\n}\n\n.thinking-bar-step-beam {\n z-index: 0;\n}\n\n.thinking-bar-step::before {\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: inherit;\n padding: 1px;\n background: linear-gradient(\n 180deg,\n rgba(255, 255, 255, 0.04),\n rgba(255, 255, 255, 0.01)\n );\n pointer-events: none;\n -webkit-mask:\n linear-gradient(#fff 0 0) content-box,\n linear-gradient(#fff 0 0);\n -webkit-mask-composite: xor;\n mask:\n linear-gradient(#fff 0 0) content-box,\n linear-gradient(#fff 0 0);\n mask-composite: exclude;\n}\n\n.thinking-bar-step.done {\n --thinking-step-border-color: rgba(59, 130, 246, 0.82);\n --thinking-step-glow-color: rgba(59, 130, 246, 0.24);\n background: linear-gradient(\n 180deg,\n rgba(15, 23, 42, 0.58) 0%,\n rgba(10, 20, 38, 0.48) 100%\n );\n box-shadow:\n inset 0 0 0 1px rgba(96, 165, 250, 0.06),\n 0 0 0 1px rgba(59, 130, 246, 0.12),\n 0 10px 24px -20px var(--thinking-step-glow-color);\n}\n\n.thinking-bar-step.active {\n --thinking-step-border-color: rgba(255, 170, 64, 0.78);\n --thinking-step-glow-color: rgba(156, 64, 255, 0.2);\n background: linear-gradient(\n 180deg,\n rgba(24, 18, 38, 0.82) 0%,\n rgba(17, 11, 32, 0.72) 100%\n );\n box-shadow:\n inset 0 0 0 1px rgba(255, 170, 64, 0.08),\n 0 0 0 1px rgba(255, 170, 64, 0.14),\n 0 12px 28px -20px var(--thinking-step-glow-color),\n 0 0 24px -14px rgba(156, 64, 255, 0.22);\n}\n\n.thinking-bar-step.active::before {\n background: linear-gradient(\n 180deg,\n rgba(255, 170, 64, 0.12),\n rgba(156, 64, 255, 0.04)\n );\n}\n\n.thinking-bar-step.error {\n --thinking-step-border-color: rgba(248, 113, 113, 0.72);\n --thinking-step-glow-color: rgba(248, 113, 113, 0.22);\n box-shadow:\n inset 0 0 0 1px rgba(248, 113, 113, 0.05),\n 0 0 0 1px rgba(248, 113, 113, 0.12),\n 0 10px 24px -20px var(--thinking-step-glow-color);\n}\n\n.thinking-bar-step-icon {\n flex-shrink: 0;\n align-self: flex-start;\n width: 22px;\n text-align: center;\n font-size: 15px;\n color: #64748b;\n position: relative;\n z-index: 1;\n margin-top: 2px;\n}\n\n.thinking-bar-step.active .thinking-bar-step-icon {\n color: #ffb347;\n text-shadow: 0 0 12px rgba(255, 170, 64, 0.35);\n animation: thinking-pulse 1.1s ease-in-out infinite;\n}\n\n.thinking-bar-step.done .thinking-bar-step-icon {\n color: #60a5fa;\n}\n\n.thinking-bar-step.error .thinking-bar-step-icon {\n color: #f87171;\n}\n\n.thinking-bar-step-label {\n flex-shrink: 0;\n color: #e2e8f0;\n font-size: 15px;\n font-weight: 600;\n line-height: 1.45;\n overflow: visible;\n}\n\n.thinking-bar-step-text {\n margin: 0;\n color: #94a3b8;\n font-size: 14px;\n line-height: 1.65;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.thinking-bar-step-markdown {\n white-space: normal;\n}\n\n.thinking-bar-md-preview {\n --md-theme-bg-color: transparent;\n --md-color: #94a3b8;\n --md-bk-color: transparent;\n --md-border-color: rgba(148, 163, 184, 0.14);\n --md-code-bg-color: rgba(15, 23, 42, 0.76);\n --md-code-color: #c4b5fd;\n --md-table-even-color: rgba(2, 6, 23, 0.52);\n --md-table-odd-color: rgba(2, 6, 23, 0.42);\n --md-table-header-bg-color: rgba(15, 23, 42, 0.96);\n --md-scrollbar-bg-color: rgba(148, 163, 184, 0.12);\n --md-scrollbar-thumb-color: rgba(148, 163, 184, 0.36);\n}\n\n.thinking-bar-step-markdown :deep(.md-editor-preview-wrapper) {\n padding: 0;\n}\n\n.thinking-bar-step-markdown :deep(.md-editor-preview) {\n color: #94a3b8;\n font-size: 14px;\n line-height: 1.6;\n}\n\n.thinking-bar-step-answer :deep(.md-editor-preview h1),\n.thinking-bar-step-answer :deep(.md-editor-preview h2),\n.thinking-bar-step-answer :deep(.md-editor-preview h3),\n.thinking-bar-step-answer :deep(.md-editor-preview h4),\n.thinking-bar-step-answer :deep(.md-editor-preview h5),\n.thinking-bar-step-answer :deep(.md-editor-preview h6) {\n margin: 8px 0 4px;\n color: #e2e8f0;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.55;\n}\n\n.thinking-bar-step-answer :deep(.md-editor-preview p),\n.thinking-bar-step-answer :deep(.md-editor-preview ul),\n.thinking-bar-step-answer :deep(.md-editor-preview ol),\n.thinking-bar-step-answer :deep(.md-editor-preview li),\n.thinking-bar-step-answer :deep(.md-editor-preview table),\n.thinking-bar-step-answer :deep(.md-editor-preview th),\n.thinking-bar-step-answer :deep(.md-editor-preview td) {\n font-size: 14px;\n}\n\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview h1),\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview h2),\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview h3),\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview h4),\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview h5),\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview h6),\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview p),\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview ul),\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview ol),\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview li),\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview table),\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview th),\n.thinking-bar--corner .thinking-bar-step-answer :deep(.md-editor-preview td) {\n font-size: 13px;\n line-height: 1.55;\n}\n\n.thinking-bar-step-markdown :deep(.md-editor-preview h1),\n.thinking-bar-step-markdown :deep(.md-editor-preview h2),\n.thinking-bar-step-markdown :deep(.md-editor-preview h3),\n.thinking-bar-step-markdown :deep(.md-editor-preview h4),\n.thinking-bar-step-markdown :deep(.md-editor-preview h5),\n.thinking-bar-step-markdown :deep(.md-editor-preview h6) {\n margin: 8px 0 4px;\n color: #e2e8f0;\n}\n\n.thinking-bar-step-markdown :deep(.md-editor-preview p),\n.thinking-bar-step-markdown :deep(.md-editor-preview ul),\n.thinking-bar-step-markdown :deep(.md-editor-preview ol),\n.thinking-bar-step-markdown :deep(.md-editor-preview hr),\n.thinking-bar-step-markdown :deep(.md-editor-preview table) {\n margin: 4px 0;\n}\n\n.thinking-bar-step-markdown :deep(.md-editor-preview strong) {\n color: #f8fafc;\n}\n\n.thinking-bar-step-markdown :deep(.md-editor-preview code) {\n font-size: 12px;\n}\n\n.thinking-bar-step-markdown :deep(.md-editor-preview table) {\n display: block;\n overflow: auto;\n border-radius: 12px;\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n\n.thinking-bar-step-markdown :deep(.md-editor-preview table)::-webkit-scrollbar {\n display: none;\n width: 0;\n height: 0;\n}\n\n.thinking-bar-step-markdown :deep(.md-editor-preview thead th) {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n\n.thinking-bar-chat-items {\n display: flex;\n flex-direction: column;\n gap: 6px;\n margin-top: 4px;\n}\n\n.thinking-bar-chat-item {\n min-width: 0;\n}\n\n.thinking-bar-tool-call {\n border: 1px solid rgba(114, 169, 176, 0.16);\n border-radius: 6px;\n background: rgba(2, 6, 23, 0.52);\n overflow: hidden;\n}\n\n.thinking-bar-tool-call-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n padding: 12px;\n cursor: pointer;\n list-style: none;\n}\n\n.thinking-bar-tool-call-head::-webkit-details-marker {\n display: none;\n}\n\n.thinking-bar-tool-call-head-main,\n.thinking-bar-tool-call-head-side {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n min-width: 0;\n}\n\n.thinking-bar-tool-call-head-main {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 0;\n min-width: 0;\n}\n\n.thinking-bar-tool-call-head-side {\n flex-shrink: 0;\n}\n\n.thinking-bar-tool-call-caret {\n color: #94a3b8;\n font-size: 12px;\n transition: transform 0.18s ease;\n}\n\n.thinking-bar-tool-call[open] .thinking-bar-tool-call-caret {\n transform: rotate(180deg);\n}\n\n.thinking-bar-tool-call-body {\n padding: 12px;\n display: grid;\n gap: var(--thinking-detail-gap);\n min-width: 0;\n max-height: min(42vh, 420px);\n overflow-y: auto;\n border-top: 1px solid rgba(114, 169, 176, 0.12);\n}\n\n.thinking-bar-tool-call-name {\n color: #e2e8f0;\n font-size: 14px;\n font-weight: 600;\n overflow-wrap: anywhere;\n word-break: break-word;\n}\n\n.thinking-bar-tool-call-status {\n flex-shrink: 0;\n padding: 3px 9px;\n border-radius: 999px;\n background: rgba(148, 163, 184, 0.16);\n color: #cbd5e1;\n font-size: 11px;\n font-weight: 600;\n}\n\n.thinking-bar-tool-call-status.is-running {\n background: rgba(56, 189, 248, 0.16);\n color: #7dd3fc;\n}\n\n.thinking-bar-tool-call-status.is-done {\n background: rgba(52, 211, 153, 0.16);\n color: #6ee7b7;\n}\n\n.thinking-bar-tool-call-status.is-error {\n background: rgba(248, 113, 113, 0.16);\n color: #fca5a5;\n}\n\n.thinking-bar-tool-call-block {\n margin: 0;\n border-radius: 6px;\n border: 1px solid rgba(114, 169, 176, 0.1);\n background: rgba(15, 23, 42, 0.78);\n padding: 12px;\n min-width: 0;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n gap: 8px;\n overflow: auto;\n color: #cbd5e1;\n font-size: 12px;\n line-height: 1.6;\n max-height: min(30vh, 300px);\n}\n\n.thinking-bar-tool-call-block + .thinking-bar-tool-call-block {\n margin-top: 0;\n}\n\n.thinking-bar-tool-call-block-title {\n margin: 0;\n color: #7dd3fc;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.03em;\n}\n\n.thinking-bar-tool-call-pre {\n margin: 0;\n color: #cbd5e1;\n font-size: 12px;\n line-height: 1.6;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n word-break: break-word;\n}\n\n.thinking-bar-tool-trace-list {\n margin: 0;\n padding-left: 18px;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.thinking-bar-tool-trace-item {\n color: #cbd5e1;\n line-height: 1.45;\n overflow-wrap: anywhere;\n word-break: break-word;\n}\n\n.thinking-bar-tool-result-image-shell {\n padding: 8px;\n border-radius: 10px;\n background: rgba(2, 6, 23, 0.6);\n}\n\n.thinking-bar-tool-result-image {\n display: block;\n width: 100%;\n max-height: 320px;\n object-fit: contain;\n border-radius: 10px;\n}\n\n.thinking-bar-tool-result-html {\n width: 100%;\n min-height: min(200px, 22vh);\n border: none;\n border-radius: 10px;\n background: #fff;\n}\n\n.thinking-bar-tool-result-table-wrap {\n overflow: auto;\n border-radius: 10px;\n border: 1px solid rgba(148, 163, 184, 0.12);\n}\n\n.thinking-bar-tool-result-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 12px;\n line-height: 1.5;\n}\n\n.thinking-bar-tool-result-table th,\n.thinking-bar-tool-result-table td {\n padding: 8px 10px;\n text-align: left;\n vertical-align: top;\n border-bottom: 1px solid rgba(148, 163, 184, 0.12);\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.thinking-bar-tool-result-table th {\n position: sticky;\n top: 0;\n background: rgba(15, 23, 42, 0.96);\n color: #e2e8f0;\n font-weight: 700;\n}\n\n.thinking-bar-tool-result-table td {\n color: #cbd5e1;\n background: rgba(2, 6, 23, 0.48);\n}\n\n.thinking-bar-attachments {\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin-top: 6px;\n}\n\n.thinking-bar-attachment {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 10px;\n border-radius: 12px;\n border: 1px solid rgba(56, 189, 248, 0.2);\n background: rgba(15, 23, 42, 0.68);\n color: inherit;\n text-decoration: none;\n}\n\n.thinking-bar-attachment:hover {\n border-color: rgba(56, 189, 248, 0.42);\n}\n\n.thinking-bar-attachment-image {\n width: 100%;\n max-height: 240px;\n object-fit: contain;\n border-radius: 10px;\n background: rgba(2, 6, 23, 0.72);\n}\n\n.thinking-bar-attachment-meta {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n\n.thinking-bar-attachment-name {\n color: #e2e8f0;\n font-size: 13px;\n font-weight: 600;\n word-break: break-word;\n}\n\n.thinking-bar-attachment-type {\n color: #38bdf8;\n font-size: 12px;\n flex-shrink: 0;\n}\n\n.thinking-bar-workspace {\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin-top: 8px;\n}\n\n.thinking-bar-workspace-title {\n color: #cbd5e1;\n font-size: 13px;\n font-weight: 700;\n}\n\n.thinking-bar-workspace-shell {\n display: grid;\n grid-template-columns: minmax(210px, 240px) minmax(0, 1fr);\n gap: 10px;\n min-height: 0;\n}\n\n.thinking-bar-file-tree-pane {\n border: 1px solid rgba(148, 163, 184, 0.16);\n border-radius: 14px;\n background: rgba(2, 6, 23, 0.46);\n overflow: hidden;\n}\n\n.thinking-bar-file-tree-head {\n padding: 10px 12px;\n border-bottom: 1px solid rgba(148, 163, 184, 0.12);\n color: #cbd5e1;\n font-size: 12px;\n font-weight: 700;\n}\n\n.thinking-bar-file-tree-body {\n max-height: min(200px, 100%);\n overflow: auto;\n padding: 8px 0;\n}\n\n.thinking-bar-tree-node {\n display: block;\n}\n\n.thinking-bar-tree-row {\n width: 100%;\n min-height: 34px;\n display: flex;\n align-items: center;\n gap: 6px;\n border: none;\n background: transparent;\n color: #cbd5e1;\n text-align: left;\n cursor: pointer;\n}\n\n.thinking-bar-tree-row:hover {\n background: rgba(30, 41, 59, 0.72);\n}\n\n.thinking-bar-tree-row--file.active {\n background: rgba(14, 116, 144, 0.22);\n color: #e0f2fe;\n}\n\n.thinking-bar-tree-row--directory {\n color: #dbeafe;\n}\n\n.thinking-bar-tree-caret {\n width: 12px;\n color: #94a3b8;\n font-size: 11px;\n flex-shrink: 0;\n}\n\n.thinking-bar-tree-icon {\n width: 18px;\n text-align: center;\n flex-shrink: 0;\n}\n\n.thinking-bar-tree-label {\n min-width: 0;\n font-size: 12px;\n line-height: 1.5;\n word-break: break-word;\n}\n\n.thinking-bar-file-preview {\n min-width: 0;\n border: 1px solid rgba(148, 163, 184, 0.16);\n border-radius: 14px;\n background: rgba(2, 6, 23, 0.58);\n overflow: hidden;\n min-height: 0;\n display: flex;\n flex-direction: column;\n}\n\n.thinking-bar-file-preview-head {\n padding: 10px 12px;\n border-bottom: 1px solid rgba(148, 163, 184, 0.12);\n color: #cbd5e1;\n font-size: 12px;\n font-weight: 600;\n word-break: break-word;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n\n.thinking-bar-file-preview-title {\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.thinking-bar-preview-chip {\n padding: 2px 8px;\n border-radius: 999px;\n background: rgba(56, 189, 248, 0.16);\n color: #7dd3fc;\n font-size: 11px;\n font-weight: 700;\n flex-shrink: 0;\n}\n\n.thinking-bar-file-preview-body {\n margin: 0;\n padding: 12px;\n flex: 1;\n overflow: auto;\n color: #cbd5e1;\n font-size: 12px;\n line-height: 1.65;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.thinking-bar-image-shell {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n background: rgba(2, 6, 23, 0.72);\n}\n\n.thinking-bar-image-preview {\n max-width: 100%;\n max-height: 320px;\n object-fit: contain;\n border-radius: 12px;\n}\n\n.thinking-bar-html-preview {\n flex: 1;\n min-height: min(200px, 28vh);\n border: none;\n background: #fff;\n}\n\n.thinking-bar-empty-preview {\n padding: 18px;\n color: #94a3b8;\n font-size: 13px;\n line-height: 1.7;\n}\n\n.thinking-bar-step.pending .thinking-bar-step-label {\n color: #64748b;\n}\n\n.thinking-bar--corner .thinking-bar-header {\n padding: 14px 16px 12px;\n}\n\n.thinking-bar--corner .thinking-bar-title {\n font-size: 16px;\n}\n\n.thinking-bar--corner .thinking-bar-steps {\n padding: 12px 14px 14px;\n flex: 1;\n min-height: 0;\n gap: 8px;\n}\n\n.thinking-bar--corner .thinking-bar-step {\n padding: 10px 12px;\n}\n\n.thinking-bar--corner .thinking-bar-step-inner {\n gap: 8px;\n}\n\n.thinking-bar--corner .thinking-bar-step-icon {\n width: 18px;\n font-size: 14px;\n}\n\n.thinking-bar--corner .thinking-bar-step-label {\n font-size: 14px;\n line-height: 1.4;\n word-break: break-word;\n}\n\n.thinking-bar--corner .thinking-bar-step-text,\n.thinking-bar--corner .thinking-bar-step-markdown :deep(.md-editor-preview) {\n font-size: 13px;\n line-height: 1.55;\n overflow-wrap: anywhere;\n}\n\n.thinking-bar--corner .thinking-bar-tool-call-body {\n max-height: min(38vh, 300px);\n overflow-y: auto;\n}\n\n.thinking-bar--corner .thinking-bar-tool-call-block {\n max-height: min(24vh, 180px);\n overflow: auto;\n}\n\n.thinking-bar {\n width: min(980px, calc(100vw - 56px));\n border-radius: 8px;\n border: 1px solid rgba(96, 142, 154, 0.3);\n background:\n radial-gradient(\n circle at 18% 0%,\n rgba(45, 111, 132, 0.16),\n transparent 30%\n ),\n linear-gradient(135deg, rgba(8, 30, 45, 0.96), rgba(3, 15, 28, 0.94));\n box-shadow:\n 0 30px 90px rgba(0, 0, 0, 0.5),\n 0 0 0 1px rgba(255, 255, 255, 0.035);\n isolation: isolate;\n}\n\n.thinking-bar-grid {\n position: absolute;\n inset: 0;\n z-index: 0;\n pointer-events: none;\n background-image:\n repeating-linear-gradient(\n 175deg,\n transparent 0,\n transparent 34px,\n rgba(96, 165, 168, 0.04) 35px,\n transparent 38px\n ),\n linear-gradient(rgba(125, 157, 169, 0.03) 1px, transparent 1px),\n linear-gradient(90deg, rgba(125, 157, 169, 0.03) 1px, transparent 1px);\n background-size: 48px 48px;\n mask-image: linear-gradient(180deg, black 0, transparent 82%);\n}\n\n.thinking-bar-header,\n.thinking-bar-steps {\n position: relative;\n z-index: 1;\n}\n\n.thinking-bar-header {\n padding: 18px 20px;\n border-bottom-color: rgba(96, 142, 154, 0.24);\n background: linear-gradient(\n 90deg,\n rgba(13, 48, 64, 0.42),\n rgba(4, 18, 31, 0)\n );\n}\n\n.thinking-bar-title-stack {\n display: grid;\n gap: 3px;\n min-width: 0;\n}\n\n.thinking-bar-kicker {\n color: #9bb8c2;\n font-size: 10px;\n font-weight: 800;\n letter-spacing: 0.18em;\n}\n\n.thinking-bar-title {\n color: #edf7f8;\n font-size: 20px;\n letter-spacing: 0;\n}\n\n.thinking-bar-metrics {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-left: auto;\n}\n\n.thinking-bar-metric {\n display: grid;\n min-width: 58px;\n padding: 7px 9px;\n border: 1px solid rgba(114, 169, 176, 0.2);\n border-radius: 4px;\n background: rgba(5, 22, 36, 0.64);\n text-align: center;\n}\n\n.thinking-bar-metric strong {\n color: #e8f3f4;\n font-size: 15px;\n line-height: 1.1;\n}\n\n.thinking-bar-metric em {\n color: rgba(190, 214, 218, 0.62);\n font-size: 10px;\n font-style: normal;\n line-height: 1.2;\n}\n\n.thinking-bar-close {\n flex-shrink: 0;\n margin-left: 8px;\n border-radius: 4px;\n border: 1px solid rgba(114, 169, 176, 0.18);\n background: rgba(15, 23, 42, 0.52);\n}\n\n.thinking-bar-close:hover {\n background: rgba(74, 124, 142, 0.18);\n color: #edf7f8;\n}\n\n.thinking-bar-steps {\n gap: 12px;\n padding: 18px 20px 20px;\n}\n\n.thinking-bar-steps::before {\n content: \"\";\n position: sticky;\n top: 0;\n display: block;\n height: 1px;\n margin: -2px 0 2px;\n background: linear-gradient(\n 90deg,\n rgba(112, 172, 150, 0),\n rgba(112, 172, 150, 0.32),\n rgba(201, 162, 93, 0.22),\n rgba(112, 172, 150, 0)\n );\n z-index: 2;\n}\n\n.thinking-bar-step {\n border-radius: 6px;\n background:\n linear-gradient(90deg, rgba(13, 48, 64, 0.24), rgba(4, 18, 31, 0.56)),\n rgba(2, 6, 23, 0.58);\n border-color: rgba(114, 169, 176, 0.14);\n}\n\n.thinking-bar-step::before {\n background:\n linear-gradient(180deg, rgba(160, 190, 196, 0.045), transparent),\n repeating-linear-gradient(\n 90deg,\n transparent 0,\n transparent 18px,\n rgba(112, 172, 150, 0.035) 19px,\n transparent 22px\n );\n}\n\n.thinking-bar-step::after {\n content: \"\";\n position: absolute;\n left: 0;\n top: 10px;\n bottom: 10px;\n width: 3px;\n border-radius: 0 999px 999px 0;\n background: rgba(100, 116, 139, 0.55);\n}\n\n.thinking-bar-step.active::after {\n background: #c9a25d;\n box-shadow: none;\n}\n\n.thinking-bar-step.done::after {\n background: #70ac96;\n box-shadow: none;\n}\n\n.thinking-bar-step.error::after {\n background: #d08b8b;\n box-shadow: none;\n}\n\n.thinking-bar-step.active {\n --thinking-step-border-color: rgba(201, 162, 93, 0.38);\n --thinking-step-glow-color: transparent;\n border-color: rgba(201, 162, 93, 0.34);\n background:\n linear-gradient(90deg, rgba(92, 73, 39, 0.24), rgba(13, 48, 64, 0.18)),\n rgba(2, 6, 23, 0.62);\n box-shadow:\n inset 0 0 0 1px rgba(201, 162, 93, 0.06),\n 0 0 0 1px rgba(201, 162, 93, 0.08);\n}\n\n.thinking-bar-step.done {\n --thinking-step-border-color: rgba(112, 172, 150, 0.34);\n --thinking-step-glow-color: transparent;\n border-color: rgba(112, 172, 150, 0.28);\n background:\n linear-gradient(90deg, rgba(29, 71, 61, 0.2), rgba(13, 48, 64, 0.18)),\n rgba(2, 6, 23, 0.58);\n box-shadow:\n inset 0 0 0 1px rgba(112, 172, 150, 0.05),\n 0 0 0 1px rgba(112, 172, 150, 0.08);\n}\n\n.thinking-bar-step.error {\n --thinking-step-border-color: rgba(208, 139, 139, 0.34);\n --thinking-step-glow-color: transparent;\n border-color: rgba(208, 139, 139, 0.3);\n box-shadow:\n inset 0 0 0 1px rgba(208, 139, 139, 0.05),\n 0 0 0 1px rgba(208, 139, 139, 0.08);\n}\n\n.thinking-bar-step.active::before {\n background: linear-gradient(180deg, rgba(201, 162, 93, 0.08), transparent);\n}\n\n.thinking-bar-step-label,\n.thinking-bar-tool-call-name,\n.thinking-bar-workspace-title {\n color: #edf7f8;\n}\n\n.thinking-bar-step-body {\n max-height: min(46vh, 430px);\n}\n\n.thinking-bar-tool-call,\n.thinking-bar-attachment,\n.thinking-bar-file-tree-pane,\n.thinking-bar-file-preview {\n border-radius: 6px;\n border-color: rgba(114, 169, 176, 0.16);\n background: rgba(4, 18, 31, 0.66);\n}\n\n.thinking-bar-tool-call-head,\n.thinking-bar-file-tree-head,\n.thinking-bar-file-preview-head {\n background: rgba(13, 48, 64, 0.24);\n}\n\n.thinking-bar-tool-call-status {\n border-radius: 4px;\n border: 1px solid rgba(114, 169, 176, 0.14);\n}\n\n.thinking-bar-tool-call-block,\n.thinking-bar-file-preview-body {\n border: 1px solid rgba(114, 169, 176, 0.1);\n background: rgba(2, 13, 24, 0.72);\n}\n\n.thinking-bar-tool-result-table th {\n background: rgba(13, 48, 64, 0.96);\n}\n\n.thinking-bar-step.active .thinking-bar-step-icon {\n color: #c9a25d;\n text-shadow: none;\n animation: none;\n}\n\n.thinking-bar-step.done .thinking-bar-step-icon {\n color: #70ac96;\n}\n\n.thinking-bar-step.error .thinking-bar-step-icon {\n color: #d08b8b;\n}\n\n.thinking-bar-tool-call-status.is-running {\n background: rgba(201, 162, 93, 0.14);\n color: #c9a25d;\n}\n\n.thinking-bar-tool-call-status.is-done {\n background: rgba(112, 172, 150, 0.14);\n color: #8fc6b2;\n}\n\n.thinking-bar-tool-call-status.is-error {\n background: rgba(208, 139, 139, 0.14);\n color: #d08b8b;\n}\n\n.thinking-bar-attachment-type,\n.thinking-bar-preview-chip,\n.thinking-bar-tool-call-block-title {\n color: #b9ccd1;\n}\n\n.thinking-bar-preview-chip {\n background: rgba(74, 124, 142, 0.18);\n}\n\n.thinking-bar--corner {\n width: min(520px, calc(100vw - 28px));\n}\n\n.thinking-bar--corner .thinking-bar-metrics {\n display: none;\n}\n\n@media (max-width: 768px) {\n .thinking-bar--centered {\n width: calc(100vw - 24px);\n max-height: 72vh;\n }\n\n .thinking-bar--corner {\n right: 12px;\n bottom: 12px;\n width: min(360px, calc(100vw - 24px));\n max-height: min(72vh, calc(100vh - 24px));\n }\n\n .thinking-bar-header {\n padding: 16px 16px 14px;\n }\n\n .thinking-bar-steps {\n padding: 14px 16px 16px;\n }\n\n .thinking-bar-workspace-shell {\n grid-template-columns: 1fr;\n }\n\n .thinking-bar-header {\n align-items: flex-start;\n gap: 10px;\n }\n\n .thinking-bar-metrics {\n display: none;\n }\n}\n\n.thinking-bar-step-answer {\n margin: 0;\n}\n\n.thinking-bar-tool-step-flow {\n --thinking-detail-gap: 12px;\n display: flex;\n flex-direction: column;\n gap: var(--thinking-detail-gap);\n}\n\n.thinking-bar-step-answer-section {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.thinking-bar-step-section-label {\n color: #dbeafe;\n font-size: 13px;\n font-weight: 700;\n line-height: 1.4;\n}\n\n.thinking-bar-execution-details {\n margin: 0;\n border: 1px solid rgba(114, 169, 176, 0.18);\n border-radius: 6px;\n background: rgba(4, 18, 31, 0.52);\n overflow: hidden;\n}\n\n.thinking-bar-execution-details-summary {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n cursor: pointer;\n list-style: none;\n user-select: none;\n background: rgba(13, 48, 64, 0.28);\n}\n\n.thinking-bar-execution-details-summary::-webkit-details-marker {\n display: none;\n}\n\n.thinking-bar-execution-details-title {\n color: #dbeafe;\n font-size: 13px;\n font-weight: 700;\n}\n\n.thinking-bar-execution-details-meta {\n margin-left: auto;\n padding: 2px 8px;\n border-radius: 999px;\n border: 1px solid rgba(114, 169, 176, 0.16);\n background: rgba(2, 13, 24, 0.72);\n color: #9bb8c2;\n font-size: 11px;\n font-weight: 600;\n}\n\n.thinking-bar-execution-details-caret {\n color: #94a3b8;\n font-size: 12px;\n transition: transform 0.18s ease;\n}\n\n.thinking-bar-execution-details[open] .thinking-bar-execution-details-caret {\n transform: rotate(180deg);\n}\n\n.thinking-bar-execution-details-body {\n display: grid;\n gap: var(--thinking-detail-gap, 12px);\n padding: 12px;\n border-top: 1px solid rgba(114, 169, 176, 0.12);\n}\n\n.thinking-bar-execution-planning {\n margin: 0;\n padding: 10px 12px;\n border-radius: 6px;\n border: 1px solid rgba(114, 169, 176, 0.1);\n background: rgba(2, 13, 24, 0.72);\n color: #b9ccd1;\n font-size: 12px;\n line-height: 1.6;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n.thinking-bar-tool-call-id {\n display: block;\n margin-top: 6px;\n color: #64748b;\n font-size: 11px;\n font-weight: 500;\n line-height: 1.45;\n overflow-wrap: anywhere;\n}\n\n.thinking-bar-tool-call-block--error {\n border-color: rgba(208, 139, 139, 0.24);\n}\n\n.thinking-bar-tool-call-block--error .thinking-bar-tool-call-block-title {\n color: #d08b8b;\n}\n\n.thinking-bar-nested-tools {\n display: grid;\n gap: var(--thinking-detail-gap, 12px);\n padding-top: 4px;\n}\n\n.thinking-bar-nested-tools-label {\n color: #9bb8c2;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.04em;\n}\n\n.thinking-bar-tool-call--nested {\n border-style: dashed;\n background: rgba(2, 13, 24, 0.42);\n}\n\n@keyframes thinking-pulse {\n 50% {\n opacity: 0.6;\n }\n}\n</style>\n"],"names":["isOpen","ref","stepsContainerRef","stepStickToBottom","stepBodyEls","scrollTimer","bodyResizeObserver","scheduleScrollAfterLayout","force","scrollToBottom","setStepBodyRef","stepId","el","prev","html","isStepBodyNearBottom","handleStepBodyScroll","event","scrollTargetStepIds","active","props","s","last","shouldFollowStepBody","onMounted","nextTick","onBeforeUnmount","__props","titleText","computed","isThinkingActive","step","toolCall","activeStepCount","doneStepCount","stepIcon","status","getToolId","getToolTitle","getToolStepPlanning","splitToolStepContent","getToolStepAnswer","planning","cleaned","stripInternalEvidenceAnswer","sanitizeToolStepAnswerText","text","trimmed","collectRawToolCalls","item","getStepToolCalls","partitionToolCalls","getNestedKnowledgeToolCalls","isKnowledgeAnswerTool","normalizeToolName","TOOL_NAMES","name","hasExecutionDetails","executionDetailsMeta","toolCount","toolStatusLabel","formatToolTrace","trace","isToolCallOpen","parseStructuredText","value","getToolResultDisplay","toolId","raw","parsed","getParsedToolResult","isPlainObject","looksLikeInlineHtml","getToolResultImage","candidate","getToolResultHtml","normalizeRows","getToolResultTable","directRows","columns","row","column","rows","index","nestedRows","hasStructuredToolResult","display","summary","formatTableCell","stepsContainer","ids","id","retryContainer","watch","selectedFileByStep","expandedDirectoriesByStep","steps","next","nextExpanded","expanded","file","collectDirectoryPaths","path","selectFile","fileId","selectTreeFile","getSelectedFile","selectedId","normalized","directories","current","segment","isDirectoryExpanded","toggleDirectory","getVisibleFileTree","files","ensureDirectory","depth","root","currentPath","parent","directory","nodes","walk","directoryPath","sortedDirectories","a","b","childPath","child","getFileContent","isImageFile","isHtmlFile","getFileDataUrl","content","getFileIcon","_createElementBlock","_createElementVNode","_hoisted_1","_hoisted_2","_cache","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","$emit","_Fragment","_renderList","_normalizeClass","_createBlock","OfficialBorderBeam","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","$event","_unref","isToolExecutionStep","_openBlock","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_34","_hoisted_35","rowIndex","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","nested","_hoisted_42","_hoisted_43","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_48","_hoisted_49","_hoisted_50","_hoisted_51","_hoisted_52","_createVNode","SpotlightMarkdownPreview","_hoisted_53","_hoisted_54","MdPreview","humanizeSpotlightStepContent","_hoisted_56","_hoisted_57","_hoisted_58","_hoisted_59","_hoisted_60","_hoisted_61","_hoisted_62","_hoisted_65","_hoisted_66","_hoisted_67","_hoisted_68","getIntentStepDisplayContent","_hoisted_69","attachment","_hoisted_72","_hoisted_73","_hoisted_74","_hoisted_75","_hoisted_76","_hoisted_77","_hoisted_78","node","_hoisted_79","_normalizeStyle","_hoisted_81","_hoisted_82","_hoisted_84","_hoisted_85","_hoisted_86","_hoisted_87","_hoisted_88","_hoisted_89","_hoisted_90","_hoisted_91","_hoisted_93","_hoisted_95","_hoisted_96"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqqBA,UAAMA,IAASC,EAAI,EAAK,GAClBC,IAAoBD,EAAwB,IAAI,GAEhDE,IAAoBF,EAA6B,EAAE,GACnDG,wBAAkB,IAAA;AACxB,QAAIC,IAA6B,MAC7BC,IAA4C;AAEhD,aAASC,EAA0BC,GAAgB;AACjD,MAAKC,EAAeD,CAAK,GACzB,sBAAsB,MAAM;AAC1B,QAAKC,EAAeD,CAAK;AAAA,MAC3B,CAAC;AAAA,IACH;AAEA,aAASE,GAAeC,GAAgBC,GAAa;AACnD,YAAMC,IAAOT,EAAY,IAAIO,CAAM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EADNZ,EAAexB,EAAgB3E,CAAI,CAAA,CAAA,GAAA,CAAA;AAAA,sBAAA,gBAGvCyG,EAEM,OAFN0G,IAA+C,mBAE/C;AAAA,oBAAA;;;;;;;;;;;"}
@@ -0,0 +1,13 @@
1
+ import { type Ref } from "vue";
2
+ export type SpotlightCommandShortcutsOptions = {
3
+ visible: Ref<boolean>;
4
+ showThinkingBar: Ref<boolean>;
5
+ open: () => void;
6
+ close: () => void;
7
+ closeThinking: () => void;
8
+ onEscape?: () => void;
9
+ onKeydown?: (event: KeyboardEvent) => void;
10
+ onKeyup?: (event: KeyboardEvent) => void;
11
+ };
12
+ export declare function useSpotlightCommandShortcuts(options: SpotlightCommandShortcutsOptions): void;
13
+ //# sourceMappingURL=useSpotlightCommandShortcuts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSpotlightCommandShortcuts.d.ts","sourceRoot":"","sources":["../../src/composables/useSpotlightCommandShortcuts.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAEvD,MAAM,MAAM,gCAAgC,GAAG;IAC7C,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACtB,eAAe,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC9B,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAC1C,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,gCAAgC,QA8C1C"}
@@ -0,0 +1,30 @@
1
+ import { onMounted as i, onUnmounted as a } from "vue";
2
+ function o(e) {
3
+ function r(n) {
4
+ if (e.onKeydown?.(n), n.defaultPrevented) return;
5
+ const t = n.key.toLowerCase();
6
+ if ((n.metaKey || n.ctrlKey) && t === "k") {
7
+ n.preventDefault(), e.visible.value ? e.close() : e.open();
8
+ return;
9
+ }
10
+ if (t === "escape") {
11
+ if (n.preventDefault(), e.onEscape) {
12
+ e.onEscape();
13
+ return;
14
+ }
15
+ e.showThinkingBar.value ? e.closeThinking() : e.visible.value && e.close();
16
+ }
17
+ }
18
+ function u(n) {
19
+ e.onKeyup?.(n);
20
+ }
21
+ i(() => {
22
+ window.addEventListener("keydown", r, !0), window.addEventListener("keyup", u, !0);
23
+ }), a(() => {
24
+ window.removeEventListener("keydown", r, !0), window.removeEventListener("keyup", u, !0);
25
+ });
26
+ }
27
+ export {
28
+ o as useSpotlightCommandShortcuts
29
+ };
30
+ //# sourceMappingURL=useSpotlightCommandShortcuts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSpotlightCommandShortcuts.js","sources":["../../src/composables/useSpotlightCommandShortcuts.ts"],"sourcesContent":["import { onMounted, onUnmounted, type Ref } from \"vue\";\n\nexport type SpotlightCommandShortcutsOptions = {\n visible: Ref<boolean>;\n showThinkingBar: Ref<boolean>;\n open: () => void;\n close: () => void;\n closeThinking: () => void;\n onEscape?: () => void;\n onKeydown?: (event: KeyboardEvent) => void;\n onKeyup?: (event: KeyboardEvent) => void;\n};\n\nexport function useSpotlightCommandShortcuts(\n options: SpotlightCommandShortcutsOptions,\n) {\n function handleKeydown(event: KeyboardEvent) {\n options.onKeydown?.(event);\n if (event.defaultPrevented) return;\n\n const key = event.key.toLowerCase();\n const isMeta = event.metaKey || event.ctrlKey;\n\n if (isMeta && key === \"k\") {\n event.preventDefault();\n if (options.visible.value) {\n options.close();\n } else {\n options.open();\n }\n return;\n }\n\n if (key === \"escape\") {\n event.preventDefault();\n if (options.onEscape) {\n options.onEscape();\n return;\n }\n if (options.showThinkingBar.value) {\n options.closeThinking();\n } else if (options.visible.value) {\n options.close();\n }\n }\n }\n\n function handleKeyup(event: KeyboardEvent) {\n options.onKeyup?.(event);\n }\n\n onMounted(() => {\n window.addEventListener(\"keydown\", handleKeydown, true);\n window.addEventListener(\"keyup\", handleKeyup, true);\n });\n\n onUnmounted(() => {\n window.removeEventListener(\"keydown\", handleKeydown, true);\n window.removeEventListener(\"keyup\", handleKeyup, true);\n });\n}\n"],"names":["useSpotlightCommandShortcuts","options","handleKeydown","event","key","handleKeyup","onMounted","onUnmounted"],"mappings":";AAaO,SAASA,EACdC,GACA;AACA,WAASC,EAAcC,GAAsB;AAE3C,QADAF,EAAQ,YAAYE,CAAK,GACrBA,EAAM,iBAAkB;AAE5B,UAAMC,IAAMD,EAAM,IAAI,YAAA;AAGtB,SAFeA,EAAM,WAAWA,EAAM,YAExBC,MAAQ,KAAK;AACzB,MAAAD,EAAM,eAAA,GACFF,EAAQ,QAAQ,QAClBA,EAAQ,MAAA,IAERA,EAAQ,KAAA;AAEV;AAAA,IACF;AAEA,QAAIG,MAAQ,UAAU;AAEpB,UADAD,EAAM,eAAA,GACFF,EAAQ,UAAU;AACpB,QAAAA,EAAQ,SAAA;AACR;AAAA,MACF;AACA,MAAIA,EAAQ,gBAAgB,QAC1BA,EAAQ,cAAA,IACCA,EAAQ,QAAQ,SACzBA,EAAQ,MAAA;AAAA,IAEZ;AAAA,EACF;AAEA,WAASI,EAAYF,GAAsB;AACzC,IAAAF,EAAQ,UAAUE,CAAK;AAAA,EACzB;AAEA,EAAAG,EAAU,MAAM;AACd,WAAO,iBAAiB,WAAWJ,GAAe,EAAI,GACtD,OAAO,iBAAiB,SAASG,GAAa,EAAI;AAAA,EACpD,CAAC,GAEDE,EAAY,MAAM;AAChB,WAAO,oBAAoB,WAAWL,GAAe,EAAI,GACzD,OAAO,oBAAoB,SAASG,GAAa,EAAI;AAAA,EACvD,CAAC;AACH;"}
@@ -0,0 +1,15 @@
1
+ import { type Ref } from "vue";
2
+ export type SpotlightPanelUiState = "idle" | "running" | "done" | "error";
3
+ export type UseSpotlightPanelUiOptions = {
4
+ pipelinePhase: Ref<string>;
5
+ loading: Ref<boolean>;
6
+ voiceHoldActive?: Ref<boolean>;
7
+ speechPending?: Ref<boolean>;
8
+ voiceKeyLabel?: string;
9
+ };
10
+ export declare function useSpotlightPanelUi(options: UseSpotlightPanelUiOptions): {
11
+ uiState: import("vue").ComputedRef<SpotlightPanelUiState>;
12
+ placeholder: import("vue").ComputedRef<string>;
13
+ badgeLabel: import("vue").ComputedRef<"语音录制中" | "语音识别中" | "Agent 执行中" | "已完成" | "执行异常" | "等待提问">;
14
+ };
15
+ //# sourceMappingURL=useSpotlightPanelUi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSpotlightPanelUi.d.ts","sourceRoot":"","sources":["../../src/composables/useSpotlightPanelUi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAEzC,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1E,MAAM,MAAM,0BAA0B,GAAG;IACvC,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACtB,eAAe,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/B,aAAa,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,0BAA0B;;;;EAyCtE"}
@@ -0,0 +1,9 @@
1
+ import { computed as n } from "vue";
2
+ function t(e) {
3
+ const u = e.voiceKeyLabel ?? "`", r = n(() => e.pipelinePhase.value === "error" ? "error" : e.loading.value || e.pipelinePhase.value === "running" ? "running" : e.pipelinePhase.value === "done" ? "done" : "idle"), i = n(() => e.voiceHoldActive?.value ? `正在录音,松开 ${u} 结束并转写…` : e.speechPending?.value ? "语音识别中,请稍候…" : r.value === "running" ? "Agent 正在分析场景、路由工具和上下文…" : r.value === "done" ? "继续追问,或者换个角度继续盘它…" : r.value === "error" ? "刚才那轮跑岔了,换个问法再试试…" : "输入问题或从下方选择历史…"), l = n(() => e.voiceHoldActive?.value ? "语音录制中" : e.speechPending?.value ? "语音识别中" : r.value === "running" ? "Agent 执行中" : r.value === "done" ? "已完成" : r.value === "error" ? "执行异常" : "等待提问");
4
+ return { uiState: r, placeholder: i, badgeLabel: l };
5
+ }
6
+ export {
7
+ t as useSpotlightPanelUi
8
+ };
9
+ //# sourceMappingURL=useSpotlightPanelUi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSpotlightPanelUi.js","sources":["../../src/composables/useSpotlightPanelUi.ts"],"sourcesContent":["import { computed, type Ref } from \"vue\";\n\nexport type SpotlightPanelUiState = \"idle\" | \"running\" | \"done\" | \"error\";\n\nexport type UseSpotlightPanelUiOptions = {\n pipelinePhase: Ref<string>;\n loading: Ref<boolean>;\n voiceHoldActive?: Ref<boolean>;\n speechPending?: Ref<boolean>;\n voiceKeyLabel?: string;\n};\n\nexport function useSpotlightPanelUi(options: UseSpotlightPanelUiOptions) {\n const voiceKeyLabel = options.voiceKeyLabel ?? \"`\";\n\n const uiState = computed<SpotlightPanelUiState>(() => {\n if (options.pipelinePhase.value === \"error\") return \"error\";\n if (options.loading.value || options.pipelinePhase.value === \"running\") {\n return \"running\";\n }\n if (options.pipelinePhase.value === \"done\") return \"done\";\n return \"idle\";\n });\n\n const placeholder = computed(() => {\n if (options.voiceHoldActive?.value) {\n return `正在录音,松开 ${voiceKeyLabel} 结束并转写…`;\n }\n if (options.speechPending?.value) {\n return \"语音识别中,请稍候…\";\n }\n if (uiState.value === \"running\") {\n return \"Agent 正在分析场景、路由工具和上下文…\";\n }\n if (uiState.value === \"done\") {\n return \"继续追问,或者换个角度继续盘它…\";\n }\n if (uiState.value === \"error\") {\n return \"刚才那轮跑岔了,换个问法再试试…\";\n }\n return \"输入问题或从下方选择历史…\";\n });\n\n const badgeLabel = computed(() => {\n if (options.voiceHoldActive?.value) return \"语音录制中\";\n if (options.speechPending?.value) return \"语音识别中\";\n if (uiState.value === \"running\") return \"Agent 执行中\";\n if (uiState.value === \"done\") return \"已完成\";\n if (uiState.value === \"error\") return \"执行异常\";\n return \"等待提问\";\n });\n\n return { uiState, placeholder, badgeLabel };\n}\n"],"names":["useSpotlightPanelUi","options","voiceKeyLabel","uiState","computed","placeholder","badgeLabel"],"mappings":";AAYO,SAASA,EAAoBC,GAAqC;AACvE,QAAMC,IAAgBD,EAAQ,iBAAiB,KAEzCE,IAAUC,EAAgC,MAC1CH,EAAQ,cAAc,UAAU,UAAgB,UAChDA,EAAQ,QAAQ,SAASA,EAAQ,cAAc,UAAU,YACpD,YAELA,EAAQ,cAAc,UAAU,SAAe,SAC5C,MACR,GAEKI,IAAcD,EAAS,MACvBH,EAAQ,iBAAiB,QACpB,WAAWC,CAAa,YAE7BD,EAAQ,eAAe,QAClB,eAELE,EAAQ,UAAU,YACb,2BAELA,EAAQ,UAAU,SACb,qBAELA,EAAQ,UAAU,UACb,qBAEF,eACR,GAEKG,IAAaF,EAAS,MACtBH,EAAQ,iBAAiB,QAAc,UACvCA,EAAQ,eAAe,QAAc,UACrCE,EAAQ,UAAU,YAAkB,cACpCA,EAAQ,UAAU,SAAe,QACjCA,EAAQ,UAAU,UAAgB,SAC/B,MACR;AAED,SAAO,EAAE,SAAAA,GAAS,aAAAE,GAAa,YAAAC,EAAA;AACjC;"}
@@ -0,0 +1,59 @@
1
+ import type { AgentUiContext, SpotlightCommandCatalog, SpotlightCommandCatalogVideoChannel, SpotlightSkill } from "@inupedia/spotlight-protocol";
2
+ import type { SessionHostToolHandler, SpotlightClientConfig, SpotlightHostTool } from "@inupedia/spotlight-client";
3
+ import type { RemoteHostToolCall } from "@inupedia/spotlight-protocol";
4
+ import type { HandlerApi } from "./store/pipeline/types.js";
5
+ import type { SpotlightUiPrompts } from "./remote/meta.js";
6
+ import type { ToolResult } from "./types/toolResult.js";
7
+ import type { SpotlightConfigInput } from "./resolveConfig.js";
8
+ export type { SpotlightConfigInput } from "./resolveConfig.js";
9
+ export type SpotlightHostServicesRegistration = Partial<Pick<SpotlightConfig, "tools" | "getUiContext" | "catalogOverlay" | "videoChannels" | "onVideoChannelsLoaded" | "uiPromptsFallback" | "runSessionHostTool" | "runHostTool" | "quickPanelActions" | "getSuggestedQuestions">>;
10
+ export type SpotlightConfig = SpotlightClientConfig & {
11
+ /** Host-side tools the server may invoke via SSE bridge. */
12
+ tools: SpotlightHostTool[] | (() => SpotlightHostTool[]);
13
+ /** Skills sent on each create-run (metadata only; bodies loaded server-side). */
14
+ skills?: SpotlightSkill[] | (() => SpotlightSkill[]);
15
+ /** Preferred: host resolves bundled + inline skills per run. */
16
+ getSkillsForRun?: () => SpotlightSkill[];
17
+ /** Optional dynamic catalog overlay (e.g. live video channels). */
18
+ catalogOverlay?: () => SpotlightCommandCatalog | null | undefined;
19
+ /** Optional static video channel metadata for catalog merge / meta fallback. */
20
+ videoChannels?: SpotlightCommandCatalogVideoChannel[];
21
+ /** Called when video channel meta is loaded from server or fallback. */
22
+ onVideoChannelsLoaded?: (channels: SpotlightCommandCatalogVideoChannel[]) => void;
23
+ /** Bundled ui-prompts when server meta is unavailable. */
24
+ uiPromptsFallback?: SpotlightUiPrompts;
25
+ /** Per-run UI context reported to server. */
26
+ getUiContext?: () => AgentUiContext;
27
+ /** Host handler for session.* tools (e.g. repeatLastAnswer). */
28
+ runSessionHostTool?: (call: RemoteHostToolCall, api: HandlerApi) => Promise<Awaited<ReturnType<SessionHostToolHandler>>>;
29
+ /** Host-side tool runner for domain workflows (e.g. operate). */
30
+ runHostTool?: (name: string, input: Record<string, unknown>) => Promise<ToolResult<unknown>>;
31
+ /** Optional legacy quick actions wired into handler API. */
32
+ quickPanelActions?: SpotlightQuickPanelActions;
33
+ /** Override suggested question chips (defaults use server ui-prompts). */
34
+ getSuggestedQuestions?: (params: {
35
+ sceneLevel: number | null | undefined;
36
+ smallTab?: string | null;
37
+ activeTarget?: string | null;
38
+ }) => string[];
39
+ /** Host operate domain executor (usually from defineSpotlightHost). */
40
+ executeOperateWorkflow?: (ctx: import("./store/pipeline/types.js").SpotlightContext, api: HandlerApi) => Promise<void>;
41
+ };
42
+ export type SpotlightQuickPanelActions = {
43
+ triggerProgressAction?: () => Promise<ToolResult<void>>;
44
+ triggerSimulationProgressAction?: () => Promise<ToolResult<void>>;
45
+ };
46
+ /** Validate and normalize host config (supports `services` / `skills` registration). */
47
+ export declare function defineSpotlightConfig(input: SpotlightConfigInput | SpotlightConfig): SpotlightConfig;
48
+ export declare const SPOTLIGHT_CONFIG_KEY: unique symbol;
49
+ import type { SpotlightAvatarConfig } from "./avatar/config.js";
50
+ export type SpotlightVuePluginOptions = {
51
+ config: SpotlightConfigInput | SpotlightConfig;
52
+ /** Mount command panel + thinking UI (default: true). */
53
+ enabled?: boolean;
54
+ /** Enable digital-human overlay, ⌘/Ctrl+L, and answer TTS (default: false). */
55
+ avatarEnabled?: boolean;
56
+ /** Avatar copy + Spine asset paths (when avatarEnabled). */
57
+ avatar?: SpotlightAvatarConfig;
58
+ };
59
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,mCAAmC,EACnC,cAAc,EACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAA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/dist/config.js ADDED
@@ -0,0 +1,22 @@
1
+ import { resolveSpotlightConfig as i } from "./resolveConfig.js";
2
+ function s(r) {
3
+ const o = "host" in r || "services" in r || "skills" in r ? i(r) : r;
4
+ if (!o.projectId?.trim())
5
+ throw new Error("Spotlight config: projectId is required");
6
+ if (!o.serverUrl?.trim())
7
+ throw new Error("Spotlight config: serverUrl is required");
8
+ if (!o.tools)
9
+ throw new Error("Spotlight config: tools are required (via services or tools)");
10
+ if (typeof o.tools != "function") {
11
+ const t = o.tools;
12
+ if (!Array.isArray(t) || t.length === 0)
13
+ throw new Error("Spotlight config: at least one host tool is required");
14
+ }
15
+ return o;
16
+ }
17
+ const l = /* @__PURE__ */ Symbol("spotlight-config");
18
+ export {
19
+ l as SPOTLIGHT_CONFIG_KEY,
20
+ s as defineSpotlightConfig
21
+ };
22
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sources":["../src/config.ts"],"sourcesContent":["import type {\n AgentUiContext,\n SpotlightCommandCatalog,\n SpotlightCommandCatalogVideoChannel,\n SpotlightSkill,\n} from \"@inupedia/spotlight-protocol\";\nimport type {\n SessionHostToolHandler,\n SpotlightClientConfig,\n SpotlightHostTool,\n} from \"@inupedia/spotlight-client\";\nimport type { RemoteHostToolCall } from \"@inupedia/spotlight-protocol\";\nimport type { HandlerApi } from \"./store/pipeline/types.js\";\nimport type { SpotlightUiPrompts } from \"./remote/meta.js\";\nimport type { ToolResult } from \"./types/toolResult.js\";\nimport type { SpotlightConfigInput } from \"./resolveConfig.js\";\nimport { resolveSpotlightConfig } from \"./resolveConfig.js\";\n\nexport type { SpotlightConfigInput } from \"./resolveConfig.js\";\n\nexport type SpotlightHostServicesRegistration = Partial<\n Pick<\n SpotlightConfig,\n | \"tools\"\n | \"getUiContext\"\n | \"catalogOverlay\"\n | \"videoChannels\"\n | \"onVideoChannelsLoaded\"\n | \"uiPromptsFallback\"\n | \"runSessionHostTool\"\n | \"runHostTool\"\n | \"quickPanelActions\"\n | \"getSuggestedQuestions\"\n >\n>;\n\nexport type SpotlightConfig = SpotlightClientConfig & {\n /** Host-side tools the server may invoke via SSE bridge. */\n tools: SpotlightHostTool[] | (() => SpotlightHostTool[]);\n /** Skills sent on each create-run (metadata only; bodies loaded server-side). */\n skills?: SpotlightSkill[] | (() => SpotlightSkill[]);\n /** Preferred: host resolves bundled + inline skills per run. */\n getSkillsForRun?: () => SpotlightSkill[];\n /** Optional dynamic catalog overlay (e.g. live video channels). */\n catalogOverlay?: () => SpotlightCommandCatalog | null | undefined;\n /** Optional static video channel metadata for catalog merge / meta fallback. */\n videoChannels?: SpotlightCommandCatalogVideoChannel[];\n /** Called when video channel meta is loaded from server or fallback. */\n onVideoChannelsLoaded?: (\n channels: SpotlightCommandCatalogVideoChannel[],\n ) => void;\n /** Bundled ui-prompts when server meta is unavailable. */\n uiPromptsFallback?: SpotlightUiPrompts;\n /** Per-run UI context reported to server. */\n getUiContext?: () => AgentUiContext;\n /** Host handler for session.* tools (e.g. repeatLastAnswer). */\n runSessionHostTool?: (\n call: RemoteHostToolCall,\n api: HandlerApi,\n ) => Promise<Awaited<ReturnType<SessionHostToolHandler>>>;\n /** Host-side tool runner for domain workflows (e.g. operate). */\n runHostTool?: (\n name: string,\n input: Record<string, unknown>,\n ) => Promise<ToolResult<unknown>>;\n /** Optional legacy quick actions wired into handler API. */\n quickPanelActions?: SpotlightQuickPanelActions;\n /** Override suggested question chips (defaults use server ui-prompts). */\n getSuggestedQuestions?: (params: {\n sceneLevel: number | null | undefined;\n smallTab?: string | null;\n activeTarget?: string | null;\n }) => string[];\n /** Host operate domain executor (usually from defineSpotlightHost). */\n executeOperateWorkflow?: (\n ctx: import(\"./store/pipeline/types.js\").SpotlightContext,\n api: HandlerApi,\n ) => Promise<void>;\n};\n\nexport type SpotlightQuickPanelActions = {\n triggerProgressAction?: () => Promise<ToolResult<void>>;\n triggerSimulationProgressAction?: () => Promise<ToolResult<void>>;\n};\n\n/** Validate and normalize host config (supports `services` / `skills` registration). */\nexport function defineSpotlightConfig(\n input: SpotlightConfigInput | SpotlightConfig,\n): SpotlightConfig {\n const config =\n \"host\" in input ||\n \"services\" in input ||\n \"skills\" in input\n ? resolveSpotlightConfig(input as SpotlightConfigInput)\n : (input as SpotlightConfig);\n if (!config.projectId?.trim()) {\n throw new Error(\"Spotlight config: projectId is required\");\n }\n if (!config.serverUrl?.trim()) {\n throw new Error(\"Spotlight config: serverUrl is required\");\n }\n if (!config.tools) {\n throw new Error(\"Spotlight config: tools are required (via services or tools)\");\n }\n if (typeof config.tools !== \"function\") {\n const tools = config.tools;\n if (!Array.isArray(tools) || tools.length === 0) {\n throw new Error(\"Spotlight config: at least one host tool is required\");\n }\n }\n return config;\n}\n\nexport const SPOTLIGHT_CONFIG_KEY = Symbol(\"spotlight-config\");\n\nimport type { SpotlightAvatarConfig } from \"./avatar/config.js\";\n\nexport type SpotlightVuePluginOptions = {\n config: SpotlightConfigInput | SpotlightConfig;\n /** Mount command panel + thinking UI (default: true). */\n enabled?: boolean;\n /** Enable digital-human overlay, ⌘/Ctrl+L, and answer TTS (default: false). */\n avatarEnabled?: boolean;\n /** Avatar copy + Spine asset paths (when avatarEnabled). */\n avatar?: SpotlightAvatarConfig;\n};\n"],"names":["defineSpotlightConfig","input","config","resolveSpotlightConfig","tools","SPOTLIGHT_CONFIG_KEY"],"mappings":";AAsFO,SAASA,EACdC,GACiB;AACjB,QAAMC,IACJ,UAAUD,KACV,cAAcA,KACd,YAAYA,IACRE,EAAuBF,CAA6B,IACnDA;AACP,MAAI,CAACC,EAAO,WAAW;AACrB,UAAM,IAAI,MAAM,yCAAyC;AAE3D,MAAI,CAACA,EAAO,WAAW;AACrB,UAAM,IAAI,MAAM,yCAAyC;AAE3D,MAAI,CAACA,EAAO;AACV,UAAM,IAAI,MAAM,8DAA8D;AAEhF,MAAI,OAAOA,EAAO,SAAU,YAAY;AACtC,UAAME,IAAQF,EAAO;AACrB,QAAI,CAAC,MAAM,QAAQE,CAAK,KAAKA,EAAM,WAAW;AAC5C,YAAM,IAAI,MAAM,sDAAsD;AAAA,EAE1E;AACA,SAAOF;AACT;AAEO,MAAMG,2BAA8B,kBAAkB;"}
@@ -0,0 +1,12 @@
1
+ export declare const TOOL_NAMES: {
2
+ readonly skill: {
3
+ readonly invoke: "skill.invoke";
4
+ };
5
+ readonly knowledge: {
6
+ readonly answer: "knowledge.answer";
7
+ };
8
+ readonly session: {
9
+ readonly repeatLastAnswer: "session.repeatLastAnswer";
10
+ };
11
+ };
12
+ //# sourceMappingURL=toolNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolNames.d.ts","sourceRoot":"","sources":["../../src/constants/toolNames.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;CAUb,CAAC"}
@@ -0,0 +1,15 @@
1
+ const e = {
2
+ skill: {
3
+ invoke: "skill.invoke"
4
+ },
5
+ knowledge: {
6
+ answer: "knowledge.answer"
7
+ },
8
+ session: {
9
+ repeatLastAnswer: "session.repeatLastAnswer"
10
+ }
11
+ };
12
+ export {
13
+ e as TOOL_NAMES
14
+ };
15
+ //# sourceMappingURL=toolNames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolNames.js","sources":["../../src/constants/toolNames.ts"],"sourcesContent":["export const TOOL_NAMES = {\n skill: {\n invoke: \"skill.invoke\",\n },\n knowledge: {\n answer: \"knowledge.answer\",\n },\n session: {\n repeatLastAnswer: \"session.repeatLastAnswer\",\n },\n} as const;\n"],"names":["TOOL_NAMES"],"mappings":"AAAO,MAAMA,IAAa;AAAA,EACxB,OAAO;AAAA,IACL,QAAQ;AAAA,EAAA;AAAA,EAEV,WAAW;AAAA,IACT,QAAQ;AAAA,EAAA;AAAA,EAEV,SAAS;AAAA,IACP,kBAAkB;AAAA,EAAA;AAEtB;"}
@@ -0,0 +1,16 @@
1
+ import { type SpotlightConfig } from "../config.js";
2
+ import { type DefineSpotlightHostOptions } from "./defineHost.js";
3
+ export type SpotlightEnvDefaults = {
4
+ serverUrl?: string;
5
+ projectId?: string;
6
+ };
7
+ /** Read standard Vite env vars for Spotlight server connection. */
8
+ export declare function readSpotlightEnv(env: Record<string, string | undefined>, defaults?: SpotlightEnvDefaults): Pick<DefineSpotlightAppOptions, "serverUrl" | "projectId" | "apiKey">;
9
+ export type DefineSpotlightAppOptions = DefineSpotlightHostOptions & {
10
+ serverUrl: string;
11
+ projectId: string;
12
+ apiKey?: string;
13
+ };
14
+ /** Single entry: server config + host registration in one call. */
15
+ export declare function defineSpotlightApp(options: DefineSpotlightAppOptions): SpotlightConfig;
16
+ //# sourceMappingURL=defineApp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defineApp.d.ts","sourceRoot":"","sources":["../../src/host/defineApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAuB,KAAK,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAEvF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,mEAAmE;AACnE,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EACvC,QAAQ,GAAE,oBAAyB,GAClC,IAAI,CAAC,yBAAyB,EAAE,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC,CAUvE;AAED,MAAM,MAAM,yBAAyB,GAAG,0BAA0B,GAAG;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,mEAAmE;AACnE,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,yBAAyB,GACjC,eAAe,CAQjB"}
@@ -0,0 +1,27 @@
1
+ import { defineSpotlightConfig as p } from "../config.js";
2
+ import { defineSpotlightHost as n } from "./defineHost.js";
3
+ function T(t, r = {}) {
4
+ return {
5
+ serverUrl: String(
6
+ t.VITE_SPOTLIGHT_SERVER_URL ?? r.serverUrl ?? "/spotlight-api"
7
+ ),
8
+ apiKey: String(t.VITE_SPOTLIGHT_API_KEY ?? "").trim() || void 0,
9
+ projectId: String(
10
+ t.VITE_SPOTLIGHT_PROJECT_ID ?? r.projectId ?? ""
11
+ ).trim()
12
+ };
13
+ }
14
+ function g(t) {
15
+ const { serverUrl: r, projectId: i, apiKey: o, ...e } = t;
16
+ return p({
17
+ serverUrl: r,
18
+ projectId: i,
19
+ apiKey: o,
20
+ host: n(e)
21
+ });
22
+ }
23
+ export {
24
+ g as defineSpotlightApp,
25
+ T as readSpotlightEnv
26
+ };
27
+ //# sourceMappingURL=defineApp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defineApp.js","sources":["../../src/host/defineApp.ts"],"sourcesContent":["import { defineSpotlightConfig, type SpotlightConfig } from \"../config.js\";\nimport { defineSpotlightHost, type DefineSpotlightHostOptions } from \"./defineHost.js\";\n\nexport type SpotlightEnvDefaults = {\n serverUrl?: string;\n projectId?: string;\n};\n\n/** Read standard Vite env vars for Spotlight server connection. */\nexport function readSpotlightEnv(\n env: Record<string, string | undefined>,\n defaults: SpotlightEnvDefaults = {},\n): Pick<DefineSpotlightAppOptions, \"serverUrl\" | \"projectId\" | \"apiKey\"> {\n return {\n serverUrl: String(\n env.VITE_SPOTLIGHT_SERVER_URL ?? defaults.serverUrl ?? \"/spotlight-api\",\n ),\n apiKey: String(env.VITE_SPOTLIGHT_API_KEY ?? \"\").trim() || undefined,\n projectId: String(\n env.VITE_SPOTLIGHT_PROJECT_ID ?? defaults.projectId ?? \"\",\n ).trim(),\n };\n}\n\nexport type DefineSpotlightAppOptions = DefineSpotlightHostOptions & {\n serverUrl: string;\n projectId: string;\n apiKey?: string;\n};\n\n/** Single entry: server config + host registration in one call. */\nexport function defineSpotlightApp(\n options: DefineSpotlightAppOptions,\n): SpotlightConfig {\n const { serverUrl, projectId, apiKey, ...hostOptions } = options;\n return defineSpotlightConfig({\n serverUrl,\n projectId,\n apiKey,\n host: defineSpotlightHost(hostOptions),\n });\n}\n"],"names":["readSpotlightEnv","env","defaults","defineSpotlightApp","options","serverUrl","projectId","apiKey","hostOptions","defineSpotlightConfig","defineSpotlightHost"],"mappings":";;AASO,SAASA,EACdC,GACAC,IAAiC,IACsC;AACvE,SAAO;AAAA,IACL,WAAW;AAAA,MACTD,EAAI,6BAA6BC,EAAS,aAAa;AAAA,IAAA;AAAA,IAEzD,QAAQ,OAAOD,EAAI,0BAA0B,EAAE,EAAE,UAAU;AAAA,IAC3D,WAAW;AAAA,MACTA,EAAI,6BAA6BC,EAAS,aAAa;AAAA,IAAA,EACvD,KAAA;AAAA,EAAK;AAEX;AASO,SAASC,EACdC,GACiB;AACjB,QAAM,EAAE,WAAAC,GAAW,WAAAC,GAAW,QAAAC,GAAQ,GAAGC,MAAgBJ;AACzD,SAAOK,EAAsB;AAAA,IAC3B,WAAAJ;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAMG,EAAoBF,CAAW;AAAA,EAAA,CACtC;AACH;"}