@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,893 @@
1
+ import { defineComponent as Mt, ref as D, onMounted as jt, nextTick as gt, onBeforeUnmount as Pt, computed as L, watch as kt, openBlock as r, createElementBlock as o, normalizeClass as C, createElementVNode as s, toDisplayString as a, Fragment as d, renderList as f, createBlock as It, createCommentVNode as u, unref as H, createVNode as W, normalizeStyle as bt } from "vue";
2
+ import { MdPreview as ft } from "md-editor-v3";
3
+ import "md-editor-v3/lib/preview.css";
4
+ import Vt from "./SpotlightMarkdownPreview.vue.js";
5
+ import { isToolExecutionStep as qt, humanizeSpotlightStepContent as Kt, getIntentStepDisplayContent as Jt, splitToolStepContent as mt, sanitizeToolStepAnswerText as pt } from "../store/pipeline/displayText.js";
6
+ import { partitionToolCalls as yt } from "../store/pipeline/toolDisplay.js";
7
+ import { TOOL_NAMES as Ut } from "../constants/toolNames.js";
8
+ import Wt from "./OfficialBorderBeam.js";
9
+ const Yt = { class: "thinking-bar-header" }, Gt = { class: "thinking-bar-title-stack" }, Qt = { class: "thinking-bar-title" }, Xt = {
10
+ class: "thinking-bar-metrics",
11
+ "aria-label": "执行状态概览"
12
+ }, Zt = { class: "thinking-bar-metric" }, te = { class: "thinking-bar-metric" }, ee = { class: "thinking-bar-metric" }, ne = { class: "thinking-bar-step-inner" }, ie = { class: "thinking-bar-step-icon" }, se = { class: "thinking-bar-step-column" }, re = { class: "thinking-bar-step-label" }, oe = ["onScrollPassive"], le = {
13
+ key: 0,
14
+ class: "thinking-bar-tool-step-flow"
15
+ }, ae = {
16
+ key: 0,
17
+ class: "thinking-bar-execution-details"
18
+ }, ce = { class: "thinking-bar-execution-details-summary" }, ue = { class: "thinking-bar-execution-details-meta" }, de = { class: "thinking-bar-execution-details-body" }, he = {
19
+ key: 0,
20
+ class: "thinking-bar-execution-planning"
21
+ }, ge = ["open"], ke = { class: "thinking-bar-tool-call-head" }, be = { class: "thinking-bar-tool-call-head-main" }, fe = { class: "thinking-bar-tool-call-name" }, me = {
22
+ key: 0,
23
+ class: "thinking-bar-tool-call-id"
24
+ }, pe = { class: "thinking-bar-tool-call-head-side" }, ye = { class: "thinking-bar-tool-call-body" }, _e = {
25
+ key: 0,
26
+ class: "thinking-bar-tool-call-block"
27
+ }, ve = { class: "thinking-bar-tool-call-pre" }, we = {
28
+ key: 1,
29
+ class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--result"
30
+ }, Te = { class: "thinking-bar-tool-call-pre" }, Se = {
31
+ key: 2,
32
+ class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--result"
33
+ }, xe = {
34
+ key: 0,
35
+ class: "thinking-bar-tool-result-image-shell"
36
+ }, $e = ["src", "alt"], Ae = ["srcdoc", "title"], Ce = {
37
+ key: 2,
38
+ class: "thinking-bar-tool-result-table-wrap"
39
+ }, Be = { class: "thinking-bar-tool-result-table" }, Ee = {
40
+ key: 3,
41
+ class: "thinking-bar-tool-call-pre"
42
+ }, Re = {
43
+ key: 3,
44
+ class: "thinking-bar-tool-call-block"
45
+ }, Fe = { class: "thinking-bar-tool-call-pre" }, Oe = {
46
+ key: 4,
47
+ class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--error"
48
+ }, ze = { class: "thinking-bar-tool-call-pre" }, De = {
49
+ key: 5,
50
+ class: "thinking-bar-nested-tools"
51
+ }, He = { class: "thinking-bar-tool-call-head" }, Ne = { class: "thinking-bar-tool-call-head-main" }, Le = { class: "thinking-bar-tool-call-name" }, Me = { class: "thinking-bar-tool-call-head-side" }, je = { class: "thinking-bar-tool-call-body" }, Pe = {
52
+ key: 0,
53
+ class: "thinking-bar-tool-call-block"
54
+ }, Ie = { class: "thinking-bar-tool-call-pre" }, Ve = {
55
+ key: 1,
56
+ class: "thinking-bar-tool-call-block"
57
+ }, qe = { class: "thinking-bar-tool-call-pre" }, Ke = {
58
+ key: 1,
59
+ class: "thinking-bar-step-answer-section"
60
+ }, Je = { class: "thinking-bar-step-text thinking-bar-step-markdown thinking-bar-step-answer" }, Ue = {
61
+ key: 0,
62
+ class: "thinking-bar-chat-items"
63
+ }, We = {
64
+ key: 0,
65
+ class: "thinking-bar-step-text thinking-bar-step-markdown"
66
+ }, Ye = ["open"], Ge = { class: "thinking-bar-tool-call-head" }, Qe = { class: "thinking-bar-tool-call-head-main" }, Xe = { class: "thinking-bar-tool-call-name" }, Ze = { class: "thinking-bar-tool-call-head-side" }, tn = { class: "thinking-bar-tool-call-body" }, en = {
67
+ key: 0,
68
+ class: "thinking-bar-tool-call-block thinking-bar-tool-call-block--result"
69
+ }, nn = {
70
+ key: 0,
71
+ class: "thinking-bar-tool-result-image-shell"
72
+ }, sn = ["src", "alt"], rn = ["srcdoc", "title"], on = {
73
+ key: 2,
74
+ class: "thinking-bar-tool-result-table-wrap"
75
+ }, ln = { class: "thinking-bar-tool-result-table" }, an = {
76
+ key: 3,
77
+ class: "thinking-bar-tool-call-pre"
78
+ }, cn = {
79
+ key: 1,
80
+ class: "thinking-bar-step-text thinking-bar-step-markdown"
81
+ }, un = {
82
+ key: 2,
83
+ class: "thinking-bar-attachments"
84
+ }, dn = ["href"], hn = ["src", "alt"], gn = { class: "thinking-bar-attachment-meta" }, kn = { class: "thinking-bar-attachment-name" }, bn = { class: "thinking-bar-attachment-type" }, fn = {
85
+ key: 3,
86
+ class: "thinking-bar-workspace"
87
+ }, mn = { class: "thinking-bar-workspace-shell" }, pn = { class: "thinking-bar-file-tree-pane" }, yn = { class: "thinking-bar-file-tree-body" }, _n = {
88
+ key: 0,
89
+ class: "thinking-bar-tree-node"
90
+ }, vn = ["onClick"], wn = { class: "thinking-bar-tree-caret" }, Tn = { class: "thinking-bar-tree-label" }, Sn = ["onClick"], xn = { class: "thinking-bar-tree-icon" }, $n = { class: "thinking-bar-tree-label" }, An = { class: "thinking-bar-file-preview" }, Cn = { class: "thinking-bar-file-preview-head" }, Bn = { class: "thinking-bar-file-preview-title" }, En = { class: "thinking-bar-tree-icon" }, Rn = {
91
+ key: 0,
92
+ class: "thinking-bar-preview-chip"
93
+ }, Fn = {
94
+ key: 0,
95
+ class: "thinking-bar-image-shell"
96
+ }, On = ["src", "alt"], zn = {
97
+ key: 1,
98
+ class: "thinking-bar-empty-preview"
99
+ }, Dn = ["srcdoc", "title"], Hn = {
100
+ key: 2,
101
+ class: "thinking-bar-file-preview-body"
102
+ }, Nn = {
103
+ key: 1,
104
+ class: "thinking-bar-empty-preview"
105
+ }, Jn = /* @__PURE__ */ Mt({
106
+ __name: "SpotlightThinking",
107
+ props: {
108
+ steps: {},
109
+ embedded: { type: Boolean },
110
+ centered: { type: Boolean }
111
+ },
112
+ emits: ["close"],
113
+ setup(w) {
114
+ const Y = D(!1), M = D(null), _ = D({}), T = /* @__PURE__ */ new Map();
115
+ let B = null, S = null;
116
+ function j(e) {
117
+ K(e), requestAnimationFrame(() => {
118
+ K(e);
119
+ });
120
+ }
121
+ function _t(e, t) {
122
+ const i = T.get(e);
123
+ i && S && S.unobserve(i);
124
+ const n = t instanceof HTMLElement ? t : null;
125
+ n ? (T.set(e, n), S?.observe(n)) : T.delete(e);
126
+ }
127
+ function G(e) {
128
+ return e.scrollHeight - e.scrollTop - e.clientHeight <= 96;
129
+ }
130
+ function vt(e, t) {
131
+ const i = t.target;
132
+ B != null && window.clearTimeout(B), _.value = {
133
+ ..._.value,
134
+ [e]: G(i)
135
+ }, B = window.setTimeout(() => {
136
+ _.value = {
137
+ ..._.value,
138
+ [e]: G(i)
139
+ };
140
+ }, 120);
141
+ }
142
+ function wt() {
143
+ const e = m.steps.find((i) => i.status === "active");
144
+ if (e) return [e.id];
145
+ const t = m.steps[m.steps.length - 1];
146
+ return t ? [t.id] : [];
147
+ }
148
+ function Q(e, t) {
149
+ return t ? !0 : _.value[e] !== !1;
150
+ }
151
+ jt(() => {
152
+ typeof ResizeObserver < "u" && (S = new ResizeObserver(() => {
153
+ K();
154
+ }), gt(() => {
155
+ T.forEach((e) => {
156
+ S?.observe(e);
157
+ });
158
+ })), requestAnimationFrame(() => {
159
+ Y.value = !0;
160
+ }), requestAnimationFrame(() => {
161
+ j(!0);
162
+ });
163
+ }), Pt(() => {
164
+ B != null && window.clearTimeout(B), S?.disconnect(), S = null, T.clear();
165
+ });
166
+ const m = w, Tt = L(() => m.steps.length > 0 && m.steps.every((t) => t.status === "done" || t.status === "error") ? "执行完成" : "思考中"), St = L(
167
+ () => m.steps.some(
168
+ (e) => e.status === "active" || e.status === "pending" || e.toolCalls?.some(
169
+ (t) => t.status === "pending" || t.status === "running"
170
+ )
171
+ )
172
+ ), xt = L(
173
+ () => m.steps.filter((e) => e.status === "active").length
174
+ ), $t = L(
175
+ () => m.steps.filter((e) => e.status === "done").length
176
+ );
177
+ function At(e) {
178
+ switch (e) {
179
+ case "active":
180
+ return "⋯";
181
+ case "done":
182
+ return "✓";
183
+ case "error":
184
+ return "✕";
185
+ default:
186
+ return "·";
187
+ }
188
+ }
189
+ function Ct(e) {
190
+ return e.name.trim().toLowerCase();
191
+ }
192
+ function N(e) {
193
+ return e.displayName?.trim() || e.name;
194
+ }
195
+ function P(e) {
196
+ return mt(e.content ?? "").planning;
197
+ }
198
+ function X(e) {
199
+ const { planning: t } = mt(e.content ?? ""), i = Z(
200
+ pt(e.content ?? "")
201
+ );
202
+ return i.trim() ? i : t.trim() ? "" : Z(
203
+ pt(e.content ?? "")
204
+ );
205
+ }
206
+ function Z(e) {
207
+ const t = e.trim();
208
+ return !t || t.startsWith("联网检索证据:") || t.includes("Tavily answer:") ? "" : t;
209
+ }
210
+ function tt(e) {
211
+ return e.toolCalls?.length ? e.toolCalls : (e.chatItems ?? []).filter(
212
+ (t) => t.type === "tool"
213
+ ).map((t) => t.toolCall);
214
+ }
215
+ function I(e) {
216
+ return yt(tt(e)).visible;
217
+ }
218
+ function et(e) {
219
+ return yt(tt(e)).nestedKnowledge;
220
+ }
221
+ function Bt(e) {
222
+ return Et(e.name) === Ut.knowledge.answer;
223
+ }
224
+ function Et(e) {
225
+ return e.trim().toLowerCase();
226
+ }
227
+ function Rt(e) {
228
+ return !!(P(e).trim() || I(e).length > 0);
229
+ }
230
+ function Ft(e) {
231
+ const t = I(e).length;
232
+ return t > 0 ? `${t} 个工具调用` : "规划记录";
233
+ }
234
+ function nt(e) {
235
+ switch (e) {
236
+ case "done":
237
+ return "已完成";
238
+ case "error":
239
+ return "失败";
240
+ case "running":
241
+ return "执行中";
242
+ default:
243
+ return "待执行";
244
+ }
245
+ }
246
+ function it(e) {
247
+ return e?.length ? e.map(
248
+ (t) => `[${t.phase}/${t.type}] ${t.tool}${t.detail ? ` · ${t.detail}` : ""}`
249
+ ).join(`
250
+ `) : "";
251
+ }
252
+ function st(e) {
253
+ return e.status === "running" || e.status === "pending";
254
+ }
255
+ function V(e) {
256
+ if (!e) return null;
257
+ try {
258
+ return JSON.parse(e);
259
+ } catch {
260
+ return null;
261
+ }
262
+ }
263
+ function x(e) {
264
+ const t = Ct(e), i = e.resultText?.trim() || "";
265
+ if (!i) return "";
266
+ if (t === "list_kbs") {
267
+ const n = V(i);
268
+ return Array.isArray(n) && n.length === 0 ? "当前没有可访问的知识库" : i;
269
+ }
270
+ if (t === "list_directory" || t === "ls") {
271
+ const n = V(i);
272
+ return Array.isArray(n) && n.length === 0 ? "" : i;
273
+ }
274
+ return i;
275
+ }
276
+ function q(e) {
277
+ const t = e.resultText?.trim() || "";
278
+ return t ? V(t) ?? t : null;
279
+ }
280
+ function E(e) {
281
+ return typeof e == "object" && e !== null && !Array.isArray(e);
282
+ }
283
+ function rt(e) {
284
+ return /<(table|html|body|svg|div|span|img|p|iframe)[\s>]/i.test(e);
285
+ }
286
+ function R(e) {
287
+ const t = q(e);
288
+ if (typeof t == "string") {
289
+ const i = t.trim();
290
+ return /^data:image\//i.test(i) || /\.(png|jpe?g|gif|webp|svg)(\?.*)?$/i.test(i) ? i : null;
291
+ }
292
+ if (E(t)) {
293
+ const i = [t.url, t.uri, t.path].find(
294
+ (n) => typeof n == "string" && /^data:image\//i.test(n)
295
+ );
296
+ return typeof i == "string" ? i : null;
297
+ }
298
+ return null;
299
+ }
300
+ function F(e) {
301
+ const t = q(e);
302
+ if (typeof t == "string" && rt(t.trim()))
303
+ return t;
304
+ if (E(t)) {
305
+ const i = [t.html, t.content, t.markup].find(
306
+ (n) => typeof n == "string" && rt(n)
307
+ );
308
+ return typeof i == "string" ? i : null;
309
+ }
310
+ return null;
311
+ }
312
+ function ot(e) {
313
+ return !Array.isArray(e) || e.length === 0 || !e.every((t) => E(t)) ? null : e;
314
+ }
315
+ function y(e) {
316
+ const t = q(e);
317
+ if (Array.isArray(t) && t.length > 0 && t.every((n) => typeof n == "string"))
318
+ return {
319
+ columns: ["value"],
320
+ rows: t.map((n) => ({ value: n }))
321
+ };
322
+ const i = ot(t);
323
+ if (i) {
324
+ const n = [...new Set(i.flatMap((l) => Object.keys(l)))];
325
+ return n.length > 0 ? { columns: n, rows: i } : null;
326
+ }
327
+ if (!E(t)) return null;
328
+ if (Array.isArray(t.columns) && Array.isArray(t.rows) && t.columns.every((n) => typeof n == "string")) {
329
+ const n = t.columns, l = t.rows.map(
330
+ (c) => E(c) ? c : Array.isArray(c) ? Object.fromEntries(
331
+ n.map((b, p) => [b, c[p]])
332
+ ) : { value: c }
333
+ );
334
+ return n.length > 0 ? { columns: n, rows: l } : null;
335
+ }
336
+ if (Array.isArray(t.data)) {
337
+ const n = ot(t.data);
338
+ if (n) {
339
+ const l = [
340
+ ...new Set(n.flatMap((c) => Object.keys(c)))
341
+ ];
342
+ return l.length > 0 ? { columns: l, rows: n } : null;
343
+ }
344
+ }
345
+ return null;
346
+ }
347
+ function lt(e) {
348
+ const t = x(e), i = e.summary?.trim();
349
+ return t && i && t.trim() === i ? !1 : !!(R(e) || F(e) || y(e) || t);
350
+ }
351
+ function at(e) {
352
+ if (e == null) return "-";
353
+ if (typeof e == "string") return e;
354
+ if (typeof e == "number" || typeof e == "boolean")
355
+ return String(e);
356
+ try {
357
+ return JSON.stringify(e);
358
+ } catch {
359
+ return String(e);
360
+ }
361
+ }
362
+ async function K(e = !1) {
363
+ await gt();
364
+ const t = M.value;
365
+ t && t.scrollTo({
366
+ top: t.scrollHeight,
367
+ behavior: e ? "auto" : "smooth"
368
+ });
369
+ const i = wt();
370
+ for (const n of i) {
371
+ const l = T.get(n);
372
+ !l || !Q(n, e) || l.scrollTo({
373
+ top: l.scrollHeight,
374
+ behavior: e ? "auto" : "smooth"
375
+ });
376
+ }
377
+ window.setTimeout(() => {
378
+ const n = M.value;
379
+ n && n.scrollTo({
380
+ top: n.scrollHeight,
381
+ behavior: "auto"
382
+ });
383
+ for (const l of i) {
384
+ const c = T.get(l);
385
+ !c || !Q(l, e) || c.scrollTo({
386
+ top: c.scrollHeight,
387
+ behavior: "auto"
388
+ });
389
+ }
390
+ }, 120);
391
+ }
392
+ kt(
393
+ () => m.steps,
394
+ () => {
395
+ if (St.value) {
396
+ const e = m.steps.find((t) => t.status === "active");
397
+ e && !(e.id in _.value) && (_.value = {
398
+ ..._.value,
399
+ [e.id]: !0
400
+ }), j(!1);
401
+ return;
402
+ }
403
+ j(!1);
404
+ },
405
+ { deep: !0 }
406
+ );
407
+ const O = D({}), A = D({});
408
+ kt(
409
+ () => m.steps,
410
+ (e) => {
411
+ const t = { ...O.value }, i = { ...A.value };
412
+ for (const n of e) {
413
+ if (n.files?.length && !t[n.id] && (t[n.id] = n.files[0].id), !n.files?.length && t[n.id] && delete t[n.id], n.files?.length) {
414
+ const l = new Set(i[n.id] || []);
415
+ for (const c of n.files)
416
+ Dt(c.path).forEach(
417
+ (b) => l.add(b)
418
+ );
419
+ i[n.id] = [...l];
420
+ }
421
+ !n.files?.length && i[n.id] && delete i[n.id];
422
+ }
423
+ O.value = t, A.value = i;
424
+ },
425
+ { deep: !0, immediate: !0 }
426
+ );
427
+ function Ot(e, t) {
428
+ O.value = {
429
+ ...O.value,
430
+ [e]: t
431
+ };
432
+ }
433
+ function zt(e, t) {
434
+ t && Ot(e, t.id);
435
+ }
436
+ function g(e) {
437
+ const t = O.value[e.id];
438
+ return e.files?.find((i) => i.id === t) ?? e.files?.[0] ?? null;
439
+ }
440
+ function Dt(e) {
441
+ const t = e.split("/").filter(Boolean), i = [];
442
+ let n = "";
443
+ return t.slice(0, -1).forEach((l) => {
444
+ n += `/${l}`, i.push(n);
445
+ }), i;
446
+ }
447
+ function ct(e, t) {
448
+ return (A.value[e] || []).includes(t);
449
+ }
450
+ function Ht(e, t) {
451
+ const i = new Set(A.value[e] || []);
452
+ i.has(t) ? i.delete(t) : i.add(t), A.value = {
453
+ ...A.value,
454
+ [e]: [...i]
455
+ };
456
+ }
457
+ function Nt(e, t) {
458
+ const i = /* @__PURE__ */ new Map(), n = (p, $, v) => (i.has(p) || i.set(p, {
459
+ path: p,
460
+ name: $,
461
+ depth: v,
462
+ directoryChildren: [],
463
+ files: []
464
+ }), i.get(p)), l = n("", "root", -1);
465
+ for (const p of t) {
466
+ const $ = p.path.split("/").filter(Boolean);
467
+ let v = "", z = l;
468
+ $.slice(0, -1).forEach((k, h) => {
469
+ v += `/${k}`;
470
+ const Lt = n(v, k, h);
471
+ z.directoryChildren.includes(v) || z.directoryChildren.push(v), z = Lt;
472
+ }), z.files.push(p);
473
+ }
474
+ const c = [], b = (p) => {
475
+ const $ = i.get(p);
476
+ if (!$) return;
477
+ const v = [...$.directoryChildren].sort(
478
+ (k, h) => k.localeCompare(h, "zh-CN")
479
+ );
480
+ for (const k of v) {
481
+ const h = i.get(k);
482
+ h && (c.push({
483
+ type: "directory",
484
+ path: h.path,
485
+ name: h.name,
486
+ depth: h.depth,
487
+ file: null
488
+ }), ct(e, h.path) && b(h.path));
489
+ }
490
+ [...$.files].sort(
491
+ (k, h) => k.path.localeCompare(h.path, "zh-CN")
492
+ ).forEach((k) => {
493
+ const h = Math.max(
494
+ k.path.split("/").filter(Boolean).length - 1,
495
+ 0
496
+ );
497
+ c.push({
498
+ type: "file",
499
+ path: k.path,
500
+ name: k.name,
501
+ depth: h,
502
+ file: k
503
+ });
504
+ });
505
+ };
506
+ return b(""), c;
507
+ }
508
+ function J(e) {
509
+ return (e?.content || []).join(`
510
+ `).trim();
511
+ }
512
+ function ut(e) {
513
+ return /\.(png|jpe?g|gif|webp|svg)$/i.test(e);
514
+ }
515
+ function U(e) {
516
+ return /\.(html?)$/i.test(e);
517
+ }
518
+ function dt(e) {
519
+ const t = J(e);
520
+ return /^data:image\//i.test(t) ? t : "";
521
+ }
522
+ function ht(e) {
523
+ return ut(e) ? "🖼" : U(e) ? "🌐" : /\.md$/i.test(e) ? "📝" : /\.(csv|xlsx?)$/i.test(e) ? "📊" : /\.(json|ya?ml|xml)$/i.test(e) ? "🧩" : "📄";
524
+ }
525
+ return (e, t) => (r(), o("div", {
526
+ class: C(["thinking-bar", [
527
+ { "thinking-bar--embedded": w.embedded },
528
+ { "thinking-bar--open": Y.value },
529
+ { "thinking-bar--centered": w.centered },
530
+ { "thinking-bar--corner": !w.centered && !w.embedded }
531
+ ]])
532
+ }, [
533
+ t[23] || (t[23] = s("div", {
534
+ class: "thinking-bar-grid",
535
+ "aria-hidden": "true"
536
+ }, null, -1)),
537
+ s("div", Yt, [
538
+ s("div", Gt, [
539
+ t[1] || (t[1] = s("span", { class: "thinking-bar-kicker" }, "HYDRO PROCESS", -1)),
540
+ s("span", Qt, a(Tt.value), 1)
541
+ ]),
542
+ s("div", Xt, [
543
+ s("span", Zt, [
544
+ s("strong", null, a(w.steps.length), 1),
545
+ t[2] || (t[2] = s("em", null, "阶段", -1))
546
+ ]),
547
+ s("span", te, [
548
+ s("strong", null, a(xt.value), 1),
549
+ t[3] || (t[3] = s("em", null, "运行", -1))
550
+ ]),
551
+ s("span", ee, [
552
+ s("strong", null, a($t.value), 1),
553
+ t[4] || (t[4] = s("em", null, "完成", -1))
554
+ ])
555
+ ]),
556
+ s("button", {
557
+ type: "button",
558
+ class: "thinking-bar-close",
559
+ "aria-label": "关闭",
560
+ onClick: t[0] || (t[0] = (i) => e.$emit("close"))
561
+ }, " × ")
562
+ ]),
563
+ s("div", {
564
+ ref_key: "stepsContainerRef",
565
+ ref: M,
566
+ class: "thinking-bar-steps"
567
+ }, [
568
+ (r(!0), o(d, null, f(w.steps, (i) => (r(), o("div", {
569
+ key: i.id,
570
+ class: C(["thinking-bar-step", [i.status]])
571
+ }, [
572
+ i.status === "active" ? (r(), It(Wt, {
573
+ key: 0,
574
+ class: "thinking-bar-step-beam",
575
+ size: 88,
576
+ duration: 6,
577
+ "border-width": 1.5,
578
+ "color-from": "#c9a25d",
579
+ "color-to": "#5d8f9b"
580
+ })) : u("", !0),
581
+ s("div", ne, [
582
+ s("span", ie, a(At(i.status)), 1),
583
+ s("div", se, [
584
+ s("span", re, a(i.label), 1),
585
+ s("div", {
586
+ ref_for: !0,
587
+ ref: (n) => _t(i.id, n),
588
+ class: "thinking-bar-step-body",
589
+ onScrollPassive: (n) => vt(i.id, n)
590
+ }, [
591
+ H(qt)(i.id) ? (r(), o("div", le, [
592
+ Rt(i) ? (r(), o("details", ae, [
593
+ s("summary", ce, [
594
+ t[5] || (t[5] = s("span", { class: "thinking-bar-execution-details-title" }, "调用工具", -1)),
595
+ s("span", ue, a(Ft(i)), 1),
596
+ t[6] || (t[6] = s("span", { class: "thinking-bar-execution-details-caret" }, "▾", -1))
597
+ ]),
598
+ s("div", de, [
599
+ P(i) ? (r(), o("pre", he, a(P(i)), 1)) : u("", !0),
600
+ (r(!0), o(d, null, f(I(i), (n) => (r(), o("details", {
601
+ key: n.id,
602
+ class: "thinking-bar-tool-call",
603
+ open: st(n)
604
+ }, [
605
+ s("summary", ke, [
606
+ s("div", be, [
607
+ s("span", fe, a(N(n)), 1),
608
+ n.name !== N(n) ? (r(), o("span", me, a(n.name), 1)) : u("", !0)
609
+ ]),
610
+ s("div", pe, [
611
+ s("span", {
612
+ class: C(["thinking-bar-tool-call-status", `is-${n.status}`])
613
+ }, a(nt(n.status)), 3),
614
+ t[7] || (t[7] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
615
+ ])
616
+ ]),
617
+ s("div", ye, [
618
+ n.argsText?.trim() ? (r(), o("div", _e, [
619
+ t[8] || (t[8] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 请求参数 ", -1)),
620
+ s("pre", ve, a(n.argsText), 1)
621
+ ])) : u("", !0),
622
+ n.summary?.trim() ? (r(), o("div", we, [
623
+ t[9] || (t[9] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 执行摘要 ", -1)),
624
+ s("pre", Te, a(n.summary), 1)
625
+ ])) : u("", !0),
626
+ lt(n) ? (r(), o("div", Se, [
627
+ t[10] || (t[10] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 接口结果 ", -1)),
628
+ R(n) ? (r(), o("div", xe, [
629
+ s("img", {
630
+ class: "thinking-bar-tool-result-image",
631
+ src: R(n) || "",
632
+ alt: n.name
633
+ }, null, 8, $e)
634
+ ])) : F(n) ? (r(), o("iframe", {
635
+ key: 1,
636
+ class: "thinking-bar-tool-result-html",
637
+ srcdoc: F(n) || "",
638
+ title: n.name,
639
+ sandbox: ""
640
+ }, null, 8, Ae)) : y(n) ? (r(), o("div", Ce, [
641
+ s("table", Be, [
642
+ s("thead", null, [
643
+ s("tr", null, [
644
+ (r(!0), o(d, null, f(y(
645
+ n
646
+ )?.columns, (l) => (r(), o("th", { key: l }, a(l), 1))), 128))
647
+ ])
648
+ ]),
649
+ s("tbody", null, [
650
+ (r(!0), o(d, null, f(y(n)?.rows, (l, c) => (r(), o("tr", {
651
+ key: `${n.id}-${c}`
652
+ }, [
653
+ (r(!0), o(d, null, f(y(
654
+ n
655
+ )?.columns, (b) => (r(), o("td", {
656
+ key: `${n.id}-${c}-${b}`
657
+ }, a(at(l[b])), 1))), 128))
658
+ ]))), 128))
659
+ ])
660
+ ])
661
+ ])) : x(n) ? (r(), o("pre", Ee, a(x(n)), 1)) : u("", !0)
662
+ ])) : u("", !0),
663
+ it(n.trace) ? (r(), o("div", Re, [
664
+ t[11] || (t[11] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 执行轨迹 ", -1)),
665
+ s("pre", Fe, a(it(n.trace)), 1)
666
+ ])) : u("", !0),
667
+ n.errorCode ? (r(), o("div", Oe, [
668
+ t[12] || (t[12] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 错误码 ", -1)),
669
+ s("pre", ze, a(n.errorCode), 1)
670
+ ])) : u("", !0),
671
+ Bt(n) && et(i).length > 0 ? (r(), o("div", De, [
672
+ t[16] || (t[16] = s("div", { class: "thinking-bar-nested-tools-label" }, " 知识库内部步骤 ", -1)),
673
+ (r(!0), o(d, null, f(et(
674
+ i
675
+ ), (l) => (r(), o("details", {
676
+ key: l.id,
677
+ class: "thinking-bar-tool-call thinking-bar-tool-call--nested"
678
+ }, [
679
+ s("summary", He, [
680
+ s("div", Ne, [
681
+ s("span", Le, a(N(l)), 1)
682
+ ]),
683
+ s("div", Me, [
684
+ s("span", {
685
+ class: C(["thinking-bar-tool-call-status", `is-${l.status}`])
686
+ }, a(nt(l.status)), 3),
687
+ t[13] || (t[13] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
688
+ ])
689
+ ]),
690
+ s("div", je, [
691
+ l.argsText?.trim() ? (r(), o("div", Pe, [
692
+ t[14] || (t[14] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 请求参数 ", -1)),
693
+ s("pre", Ie, a(l.argsText), 1)
694
+ ])) : u("", !0),
695
+ x(l) ? (r(), o("div", Ve, [
696
+ t[15] || (t[15] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 接口结果 ", -1)),
697
+ s("pre", qe, a(x(l)), 1)
698
+ ])) : u("", !0)
699
+ ])
700
+ ]))), 128))
701
+ ])) : u("", !0)
702
+ ])
703
+ ], 8, ge))), 128))
704
+ ])
705
+ ])) : u("", !0),
706
+ X(i) ? (r(), o("section", Ke, [
707
+ t[17] || (t[17] = s("div", { class: "thinking-bar-step-section-label" }, "回答", -1)),
708
+ s("div", Je, [
709
+ W(Vt, {
710
+ "model-value": X(i),
711
+ "format-knowledge": ""
712
+ }, null, 8, ["model-value"])
713
+ ])
714
+ ])) : u("", !0)
715
+ ])) : (r(), o(d, { key: 1 }, [
716
+ i.chatItems && i.chatItems.length > 0 ? (r(), o("div", Ue, [
717
+ (r(!0), o(d, null, f(i.chatItems, (n) => (r(), o("div", {
718
+ key: n.id,
719
+ class: "thinking-bar-chat-item"
720
+ }, [
721
+ n.type === "text" && n.text.trim() ? (r(), o("div", We, [
722
+ W(H(ft), {
723
+ "model-value": H(Kt)(n.text),
724
+ theme: "dark",
725
+ "preview-theme": "github",
726
+ "code-theme": "github",
727
+ class: "thinking-bar-md-preview"
728
+ }, null, 8, ["model-value"])
729
+ ])) : n.type === "tool" ? (r(), o("details", {
730
+ key: 1,
731
+ class: "thinking-bar-tool-call",
732
+ open: st(n.toolCall)
733
+ }, [
734
+ s("summary", Ge, [
735
+ s("div", Qe, [
736
+ s("span", Xe, a(N(n.toolCall)), 1)
737
+ ]),
738
+ s("div", Ze, [
739
+ s("span", {
740
+ class: C(["thinking-bar-tool-call-status", `is-${n.toolCall.status}`])
741
+ }, a(n.toolCall.status === "done" ? "已完成" : n.toolCall.status === "error" ? "失败" : n.toolCall.status === "running" ? "执行中" : "待执行"), 3),
742
+ t[18] || (t[18] = s("span", { class: "thinking-bar-tool-call-caret" }, "▾", -1))
743
+ ])
744
+ ]),
745
+ s("div", tn, [
746
+ lt(n.toolCall) ? (r(), o("div", en, [
747
+ t[19] || (t[19] = s("div", { class: "thinking-bar-tool-call-block-title" }, " 结果 ", -1)),
748
+ R(n.toolCall) ? (r(), o("div", nn, [
749
+ s("img", {
750
+ class: "thinking-bar-tool-result-image",
751
+ src: R(n.toolCall) || "",
752
+ alt: n.toolCall.name
753
+ }, null, 8, sn)
754
+ ])) : F(n.toolCall) ? (r(), o("iframe", {
755
+ key: 1,
756
+ class: "thinking-bar-tool-result-html",
757
+ srcdoc: F(n.toolCall) || "",
758
+ title: n.toolCall.name,
759
+ sandbox: ""
760
+ }, null, 8, rn)) : y(n.toolCall) ? (r(), o("div", on, [
761
+ s("table", ln, [
762
+ s("thead", null, [
763
+ s("tr", null, [
764
+ (r(!0), o(d, null, f(y(
765
+ n.toolCall
766
+ )?.columns, (l) => (r(), o("th", { key: l }, a(l), 1))), 128))
767
+ ])
768
+ ]),
769
+ s("tbody", null, [
770
+ (r(!0), o(d, null, f(y(
771
+ n.toolCall
772
+ )?.rows, (l, c) => (r(), o("tr", {
773
+ key: `${n.toolCall.id}-${c}`
774
+ }, [
775
+ (r(!0), o(d, null, f(y(
776
+ n.toolCall
777
+ )?.columns, (b) => (r(), o("td", {
778
+ key: `${n.toolCall.id}-${c}-${b}`
779
+ }, a(at(l[b])), 1))), 128))
780
+ ]))), 128))
781
+ ])
782
+ ])
783
+ ])) : x(n.toolCall) ? (r(), o("pre", an, a(x(n.toolCall)), 1)) : u("", !0)
784
+ ])) : u("", !0)
785
+ ])
786
+ ], 8, Ye)) : u("", !0)
787
+ ]))), 128))
788
+ ])) : i.content ? (r(), o("div", cn, [
789
+ W(H(ft), {
790
+ "model-value": H(Jt)(i.content ?? ""),
791
+ theme: "dark",
792
+ "preview-theme": "github",
793
+ "code-theme": "github",
794
+ class: "thinking-bar-md-preview"
795
+ }, null, 8, ["model-value"])
796
+ ])) : u("", !0)
797
+ ], 64)),
798
+ i.attachments && i.attachments.length > 0 ? (r(), o("div", un, [
799
+ (r(!0), o(d, null, f(i.attachments, (n) => (r(), o("a", {
800
+ key: n.id,
801
+ class: "thinking-bar-attachment",
802
+ href: n.url,
803
+ target: "_blank",
804
+ rel: "noopener noreferrer"
805
+ }, [
806
+ n.type === "image" ? (r(), o("img", {
807
+ key: 0,
808
+ class: "thinking-bar-attachment-image",
809
+ src: n.url,
810
+ alt: n.name || "图表预览"
811
+ }, null, 8, hn)) : u("", !0),
812
+ s("div", gn, [
813
+ s("span", kn, a(n.name || n.url), 1),
814
+ s("span", bn, a(n.type === "image" ? "图片预览" : n.type === "html" ? "打开图表" : "打开文件"), 1)
815
+ ])
816
+ ], 8, dn))), 128))
817
+ ])) : u("", !0),
818
+ i.files && i.files.length > 0 ? (r(), o("div", fn, [
819
+ t[22] || (t[22] = s("div", { class: "thinking-bar-workspace-title" }, "状态工作台", -1)),
820
+ s("div", mn, [
821
+ s("div", pn, [
822
+ t[21] || (t[21] = s("div", { class: "thinking-bar-file-tree-head" }, "文件系统", -1)),
823
+ s("div", yn, [
824
+ (r(!0), o(d, null, f(Nt(i.id, i.files), (n) => (r(), o(d, {
825
+ key: `${i.id}:${n.path}`
826
+ }, [
827
+ n.type === "directory" ? (r(), o("div", _n, [
828
+ s("button", {
829
+ type: "button",
830
+ class: "thinking-bar-tree-row thinking-bar-tree-row--directory",
831
+ style: bt({
832
+ paddingLeft: `${n.depth * 14 + 10}px`
833
+ }),
834
+ onClick: (l) => Ht(i.id, n.path)
835
+ }, [
836
+ s("span", wn, a(ct(i.id, n.path) ? "▾" : "▸"), 1),
837
+ t[20] || (t[20] = s("span", { class: "thinking-bar-tree-icon" }, "📁", -1)),
838
+ s("span", Tn, a(n.name), 1)
839
+ ], 12, vn)
840
+ ])) : (r(), o("button", {
841
+ key: 1,
842
+ type: "button",
843
+ class: C(["thinking-bar-tree-row thinking-bar-tree-row--file", {
844
+ active: g(i)?.id === n.file?.id
845
+ }]),
846
+ style: bt({ paddingLeft: `${n.depth * 14 + 26}px` }),
847
+ onClick: (l) => zt(i.id, n.file)
848
+ }, [
849
+ s("span", xn, a(ht(n.file?.path || "")), 1),
850
+ s("span", $n, a(n.name), 1)
851
+ ], 14, Sn))
852
+ ], 64))), 128))
853
+ ])
854
+ ]),
855
+ s("div", An, [
856
+ g(i) ? (r(), o(d, { key: 0 }, [
857
+ s("div", Cn, [
858
+ s("div", Bn, [
859
+ s("span", En, a(ht(g(i)?.path || "")), 1),
860
+ s("span", null, a(g(i)?.path), 1)
861
+ ]),
862
+ U(g(i)?.path || "") ? (r(), o("span", Rn, " HTML 预览 ")) : u("", !0)
863
+ ]),
864
+ ut(g(i)?.path || "") ? (r(), o("div", Fn, [
865
+ dt(g(i)) ? (r(), o("img", {
866
+ key: 0,
867
+ class: "thinking-bar-image-preview",
868
+ src: dt(g(i)) || "",
869
+ alt: g(i)?.name || "图片预览"
870
+ }, null, 8, On)) : (r(), o("div", zn, " 当前图片文件没有可直接渲染的内容。 "))
871
+ ])) : U(g(i)?.path || "") ? (r(), o("iframe", {
872
+ key: 1,
873
+ class: "thinking-bar-html-preview",
874
+ srcdoc: J(g(i)),
875
+ title: g(i)?.path,
876
+ sandbox: ""
877
+ }, null, 8, Dn)) : (r(), o("pre", Hn, a(J(g(i))), 1))
878
+ ], 64)) : (r(), o("div", Nn, " 还没选中文件,左边点一个看看。 "))
879
+ ])
880
+ ])
881
+ ])) : u("", !0)
882
+ ], 40, oe)
883
+ ])
884
+ ])
885
+ ], 2))), 128))
886
+ ], 512)
887
+ ], 2));
888
+ }
889
+ });
890
+ export {
891
+ Jn as default
892
+ };
893
+ //# sourceMappingURL=SpotlightThinking2.vue.js.map