@inupedia/spotlight-vue 0.1.1 → 0.1.2

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 (177) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +0 -1
  2. package/dist/avatar/config.js +0 -1
  3. package/dist/avatar/speech/live2dAnswerSpeechPolicy.js +0 -1
  4. package/dist/avatar/speech/live2dBriefingSummarizer.js +0 -1
  5. package/dist/avatar/speech/live2dStreamSpeech.js +0 -1
  6. package/dist/avatar/speech/live2dTtsPlayback.js +0 -1
  7. package/dist/avatar/speech/llmUtils.js +0 -1
  8. package/dist/avatar/speech/spotlightSpeech.js +0 -1
  9. package/dist/avatar/spine/live2dApp.js +0 -1
  10. package/dist/avatar/spine/spineAvatar.js +0 -1
  11. package/dist/avatar/spine/spineLipSync.js +0 -1
  12. package/dist/components/InspiraCardSpotlight.js +0 -1
  13. package/dist/components/InspiraCardSpotlight.vue.js +0 -1
  14. package/dist/components/Live2dPanel.vue.js +0 -1
  15. package/dist/components/Live2dPanel2.vue.js +0 -1
  16. package/dist/components/OfficialBorderBeam.js +0 -1
  17. package/dist/components/OfficialBorderBeam.vue.js +0 -1
  18. package/dist/components/SpotlightCommandPanel.vue.js +0 -1
  19. package/dist/components/SpotlightCommandPanel2.vue.js +0 -1
  20. package/dist/components/SpotlightMarkdownPreview.vue.js +0 -1
  21. package/dist/components/SpotlightMarkdownPreview2.vue.js +0 -1
  22. package/dist/components/SpotlightRoot.vue.js +0 -1
  23. package/dist/components/SpotlightRoot2.vue.js +0 -1
  24. package/dist/components/SpotlightShell.vue.js +0 -1
  25. package/dist/components/SpotlightShell2.vue.js +0 -1
  26. package/dist/components/SpotlightThinking.vue.js +0 -1
  27. package/dist/components/SpotlightThinking2.vue.js +0 -1
  28. package/dist/components/index.d.ts +3 -0
  29. package/dist/components/index.d.ts.map +1 -0
  30. package/dist/components/index.js +6 -0
  31. package/dist/composables/useSpotlightCommandShortcuts.js +0 -1
  32. package/dist/composables/useSpotlightPanelUi.js +0 -1
  33. package/dist/config.js +0 -1
  34. package/dist/constants/toolNames.js +0 -1
  35. package/dist/host/defineApp.js +0 -1
  36. package/dist/host/defineHost.js +0 -1
  37. package/dist/host/mergeSkills.js +0 -1
  38. package/dist/host/normalizeSkills.js +0 -1
  39. package/dist/host/skillExecution.js +0 -1
  40. package/dist/index.d.ts +2 -2
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +113 -117
  43. package/dist/markdown/index.d.ts +2 -0
  44. package/dist/markdown/index.d.ts.map +1 -0
  45. package/dist/markdown/index.js +6 -0
  46. package/dist/mountShell.js +0 -1
  47. package/dist/plugin.js +0 -1
  48. package/dist/remote/audio.js +0 -1
  49. package/dist/remote/hostToolRunner.js +3 -4
  50. package/dist/remote/httpConfig.js +0 -1
  51. package/dist/remote/index.js +0 -1
  52. package/dist/remote/meta.js +0 -1
  53. package/dist/remote/runPipeline.js +0 -1
  54. package/dist/remote/serverJson.js +0 -1
  55. package/dist/resolveConfig.js +0 -1
  56. package/dist/session/agentSession.js +0 -1
  57. package/dist/skills/index.js +0 -1
  58. package/dist/skills/matching.js +0 -1
  59. package/dist/skills/parser.js +0 -1
  60. package/dist/skills/skillFrontmatterParse.js +0 -1
  61. package/dist/skills/skillListing.js +0 -1
  62. package/dist/skills/skillPaths.js +0 -1
  63. package/dist/store/capabilities.js +0 -1
  64. package/dist/store/constants.js +0 -1
  65. package/dist/store/index.d.ts +5 -0
  66. package/dist/store/index.d.ts.map +1 -0
  67. package/dist/store/index.js +22 -0
  68. package/dist/store/live2dOverlayStore.js +0 -1
  69. package/dist/store/live2dSpeechStore.js +0 -1
  70. package/dist/store/live2dVoiceChannelStore.js +0 -1
  71. package/dist/store/pipeline/api.js +0 -1
  72. package/dist/store/pipeline/constants.js +0 -1
  73. package/dist/store/pipeline/displayText.js +0 -1
  74. package/dist/store/pipeline/errors.js +0 -1
  75. package/dist/store/pipeline/spotlightMarkdown.d.ts.map +1 -1
  76. package/dist/store/pipeline/spotlightMarkdown.js +51 -46
  77. package/dist/store/pipeline/steps.js +0 -1
  78. package/dist/store/pipeline/toolDisplay.js +0 -1
  79. package/dist/store/pipeline/typing.js +0 -1
  80. package/dist/store/recent.js +0 -1
  81. package/dist/store/runtimeStore.js +0 -1
  82. package/dist/store/spotlightStore.js +14 -16
  83. package/dist/store/storeSink.js +0 -1
  84. package/dist/store/types.js +0 -1
  85. package/dist/testing/index.d.ts +3 -0
  86. package/dist/testing/index.d.ts.map +1 -0
  87. package/dist/testing/index.js +6 -0
  88. package/dist/utils/devConsole.js +0 -1
  89. package/dist/utils/requestTimeout.js +0 -1
  90. package/dist/workflow/createOperateDefinition.js +0 -1
  91. package/dist/workflow/index.d.ts +6 -0
  92. package/dist/workflow/index.d.ts.map +1 -0
  93. package/dist/workflow/index.js +20 -0
  94. package/dist/workflow/operate.js +0 -1
  95. package/dist/workflow/runHostTool.js +0 -1
  96. package/dist/workflow/sessionControl.js +0 -1
  97. package/dist/workflow/shared.js +0 -1
  98. package/package.json +72 -8
  99. package/dist/_virtual/_plugin-vue_export-helper.js.map +0 -1
  100. package/dist/avatar/config.js.map +0 -1
  101. package/dist/avatar/speech/live2dAnswerSpeechPolicy.js.map +0 -1
  102. package/dist/avatar/speech/live2dBriefingSummarizer.js.map +0 -1
  103. package/dist/avatar/speech/live2dStreamSpeech.js.map +0 -1
  104. package/dist/avatar/speech/live2dTtsPlayback.js.map +0 -1
  105. package/dist/avatar/speech/llmUtils.js.map +0 -1
  106. package/dist/avatar/speech/spotlightSpeech.js.map +0 -1
  107. package/dist/avatar/spine/live2dApp.js.map +0 -1
  108. package/dist/avatar/spine/spineAvatar.js.map +0 -1
  109. package/dist/avatar/spine/spineLipSync.js.map +0 -1
  110. package/dist/components/InspiraCardSpotlight.js.map +0 -1
  111. package/dist/components/InspiraCardSpotlight.vue.js.map +0 -1
  112. package/dist/components/Live2dPanel.vue.js.map +0 -1
  113. package/dist/components/Live2dPanel2.vue.js.map +0 -1
  114. package/dist/components/OfficialBorderBeam.js.map +0 -1
  115. package/dist/components/OfficialBorderBeam.vue.js.map +0 -1
  116. package/dist/components/SpotlightCommandPanel.vue.js.map +0 -1
  117. package/dist/components/SpotlightCommandPanel2.vue.js.map +0 -1
  118. package/dist/components/SpotlightMarkdownPreview.vue.js.map +0 -1
  119. package/dist/components/SpotlightMarkdownPreview2.vue.js.map +0 -1
  120. package/dist/components/SpotlightRoot.vue.js.map +0 -1
  121. package/dist/components/SpotlightRoot2.vue.js.map +0 -1
  122. package/dist/components/SpotlightShell.vue.js.map +0 -1
  123. package/dist/components/SpotlightShell2.vue.js.map +0 -1
  124. package/dist/components/SpotlightThinking.vue.js.map +0 -1
  125. package/dist/components/SpotlightThinking2.vue.js.map +0 -1
  126. package/dist/composables/useSpotlightCommandShortcuts.js.map +0 -1
  127. package/dist/composables/useSpotlightPanelUi.js.map +0 -1
  128. package/dist/config.js.map +0 -1
  129. package/dist/constants/toolNames.js.map +0 -1
  130. package/dist/host/defineApp.js.map +0 -1
  131. package/dist/host/defineHost.js.map +0 -1
  132. package/dist/host/mergeSkills.js.map +0 -1
  133. package/dist/host/normalizeSkills.js.map +0 -1
  134. package/dist/host/skillExecution.js.map +0 -1
  135. package/dist/index.js.map +0 -1
  136. package/dist/mountShell.js.map +0 -1
  137. package/dist/plugin.js.map +0 -1
  138. package/dist/remote/audio.js.map +0 -1
  139. package/dist/remote/hostToolRunner.js.map +0 -1
  140. package/dist/remote/httpConfig.js.map +0 -1
  141. package/dist/remote/index.js.map +0 -1
  142. package/dist/remote/meta.js.map +0 -1
  143. package/dist/remote/runPipeline.js.map +0 -1
  144. package/dist/remote/serverJson.js.map +0 -1
  145. package/dist/resolveConfig.js.map +0 -1
  146. package/dist/session/agentSession.js.map +0 -1
  147. package/dist/skills/index.js.map +0 -1
  148. package/dist/skills/matching.js.map +0 -1
  149. package/dist/skills/parser.js.map +0 -1
  150. package/dist/skills/skillFrontmatterParse.js.map +0 -1
  151. package/dist/skills/skillListing.js.map +0 -1
  152. package/dist/skills/skillPaths.js.map +0 -1
  153. package/dist/store/capabilities.js.map +0 -1
  154. package/dist/store/constants.js.map +0 -1
  155. package/dist/store/live2dOverlayStore.js.map +0 -1
  156. package/dist/store/live2dSpeechStore.js.map +0 -1
  157. package/dist/store/live2dVoiceChannelStore.js.map +0 -1
  158. package/dist/store/pipeline/api.js.map +0 -1
  159. package/dist/store/pipeline/constants.js.map +0 -1
  160. package/dist/store/pipeline/displayText.js.map +0 -1
  161. package/dist/store/pipeline/errors.js.map +0 -1
  162. package/dist/store/pipeline/spotlightMarkdown.js.map +0 -1
  163. package/dist/store/pipeline/steps.js.map +0 -1
  164. package/dist/store/pipeline/toolDisplay.js.map +0 -1
  165. package/dist/store/pipeline/typing.js.map +0 -1
  166. package/dist/store/recent.js.map +0 -1
  167. package/dist/store/runtimeStore.js.map +0 -1
  168. package/dist/store/spotlightStore.js.map +0 -1
  169. package/dist/store/storeSink.js.map +0 -1
  170. package/dist/store/types.js.map +0 -1
  171. package/dist/utils/devConsole.js.map +0 -1
  172. package/dist/utils/requestTimeout.js.map +0 -1
  173. package/dist/workflow/createOperateDefinition.js.map +0 -1
  174. package/dist/workflow/operate.js.map +0 -1
  175. package/dist/workflow/runHostTool.js.map +0 -1
  176. package/dist/workflow/sessionControl.js.map +0 -1
  177. package/dist/workflow/shared.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"live2dStreamSpeech.js","sources":["../../../src/avatar/speech/live2dStreamSpeech.ts"],"sourcesContent":["/** 与 Spotlight 流水线「执行工具与回答 / 知识问答」步骤 id 一致 */\nexport const LIVE2D_ANSWER_STEP_ID = \"3\";\n\nconst SENTENCE_END_RE = /[。!?;\\n]/;\nconst DEFAULT_MIN_CHARS = 6;\n\nexport function normalizeLive2dSpeechSegment(raw: string): string {\n return raw\n .replace(/```[\\s\\S]*?```/g, \" \")\n .replace(/`([^`]+)`/g, \"$1\")\n .replace(/\\[(.*?)\\]\\((.*?)\\)/g, \"$1\")\n .replace(/[#>*_-]+/g, \" \")\n .replace(/\\s+/g, \" \")\n .trim();\n}\n\nexport type Live2dAnswerSegmenter = {\n reset: () => void;\n /** 根据当前步骤全文增量切出可播报的完整句 */\n push: (fullText: string) => string[];\n /** 流水线结束时吐出缓冲区剩余内容 */\n flush: (fullText?: string) => string[];\n};\n\nexport function createLive2dAnswerSegmenter(options?: {\n minChars?: number;\n}): Live2dAnswerSegmenter {\n const minChars = options?.minChars ?? DEFAULT_MIN_CHARS;\n let processedLength = 0;\n let pending = \"\";\n\n function takeCompleteSegments(): string[] {\n const out: string[] = [];\n while (true) {\n const idx = pending.search(SENTENCE_END_RE);\n if (idx < 0) break;\n const piece = pending.slice(0, idx + 1);\n pending = pending.slice(idx + 1);\n const seg = normalizeLive2dSpeechSegment(piece);\n if (seg.length >= minChars) out.push(seg);\n }\n return out;\n }\n\n return {\n reset() {\n processedLength = 0;\n pending = \"\";\n },\n push(fullText: string) {\n const delta = fullText.slice(processedLength);\n if (!delta) return [];\n processedLength = fullText.length;\n pending += delta;\n return takeCompleteSegments();\n },\n flush(fullText?: string) {\n if (fullText != null) {\n const delta = fullText.slice(processedLength);\n if (delta) {\n pending += delta;\n processedLength = fullText.length;\n }\n }\n const out = takeCompleteSegments();\n const tail = normalizeLive2dSpeechSegment(pending);\n pending = \"\";\n if (tail.length >= minChars) out.push(tail);\n return out;\n },\n };\n}\n"],"names":["LIVE2D_ANSWER_STEP_ID"],"mappings":"AACO,MAAMA,IAAwB;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"live2dTtsPlayback.js","sources":["../../../src/avatar/speech/live2dTtsPlayback.ts"],"sourcesContent":["/** 等音频自然播完,避免 `ended` 过早触发导致段尾被截断 */\nexport function waitForAudioNaturalEnd(\n audio: HTMLAudioElement,\n signal?: AbortSignal,\n): Promise<void> {\n return new Promise((resolve, reject) => {\n let settled = false;\n const finish = () => {\n if (settled) return;\n settled = true;\n cleanup();\n resolve();\n };\n const fail = (err: unknown) => {\n if (settled) return;\n settled = true;\n cleanup();\n reject(err);\n };\n\n const onEnded = () => finish();\n const onTimeUpdate = () => {\n const duration = audio.duration;\n if (!Number.isFinite(duration) || duration <= 0) return;\n if (audio.currentTime >= duration - 0.04) {\n window.setTimeout(finish, 48);\n }\n };\n const onError = () => fail(new Error(\"音频播放失败\"));\n const onAbort = () => fail(new DOMException(\"Aborted\", \"AbortError\"));\n\n const cleanup = () => {\n audio.removeEventListener(\"ended\", onEnded);\n audio.removeEventListener(\"timeupdate\", onTimeUpdate);\n audio.removeEventListener(\"error\", onError);\n signal?.removeEventListener(\"abort\", onAbort);\n };\n\n audio.addEventListener(\"ended\", onEnded);\n audio.addEventListener(\"timeupdate\", onTimeUpdate);\n audio.addEventListener(\"error\", onError, { once: true });\n signal?.addEventListener(\"abort\", onAbort, { once: true });\n\n if (signal?.aborted) {\n onAbort();\n return;\n }\n if (audio.ended) {\n finish();\n }\n });\n}\n"],"names":["waitForAudioNaturalEnd","audio","signal","resolve","reject","settled","finish","cleanup","fail","err","onEnded","onTimeUpdate","duration","onError","onAbort"],"mappings":"AACO,SAASA,EACdC,GACAC,GACe;AACf,SAAO,IAAI,QAAQ,CAACC,GAASC,MAAW;AACtC,QAAIC,IAAU;AACd,UAAMC,IAAS,MAAM;AACnB,MAAID,MACJA,IAAU,IACVE,EAAA,GACAJ,EAAA;AAAA,IACF,GACMK,IAAO,CAACC,MAAiB;AAC7B,MAAIJ,MACJA,IAAU,IACVE,EAAA,GACAH,EAAOK,CAAG;AAAA,IACZ,GAEMC,IAAU,MAAMJ,EAAA,GAChBK,IAAe,MAAM;AACzB,YAAMC,IAAWX,EAAM;AACvB,MAAI,CAAC,OAAO,SAASW,CAAQ,KAAKA,KAAY,KAC1CX,EAAM,eAAeW,IAAW,QAClC,OAAO,WAAWN,GAAQ,EAAE;AAAA,IAEhC,GACMO,IAAU,MAAML,EAAK,IAAI,MAAM,QAAQ,CAAC,GACxCM,IAAU,MAAMN,EAAK,IAAI,aAAa,WAAW,YAAY,CAAC,GAE9DD,IAAU,MAAM;AACpB,MAAAN,EAAM,oBAAoB,SAASS,CAAO,GAC1CT,EAAM,oBAAoB,cAAcU,CAAY,GACpDV,EAAM,oBAAoB,SAASY,CAAO,GAC1CX,GAAQ,oBAAoB,SAASY,CAAO;AAAA,IAC9C;AAOA,QALAb,EAAM,iBAAiB,SAASS,CAAO,GACvCT,EAAM,iBAAiB,cAAcU,CAAY,GACjDV,EAAM,iBAAiB,SAASY,GAAS,EAAE,MAAM,IAAM,GACvDX,GAAQ,iBAAiB,SAASY,GAAS,EAAE,MAAM,IAAM,GAErDZ,GAAQ,SAAS;AACnB,MAAAY,EAAA;AACA;AAAA,IACF;AACA,IAAIb,EAAM,SACRK,EAAA;AAAA,EAEJ,CAAC;AACH;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"llmUtils.js","sources":["../../../src/avatar/speech/llmUtils.ts"],"sourcesContent":["export function getLlmTimeoutMs(): number {\n const env = import.meta.env as Record<string, string | undefined>;\n return Number(\n env.VITE_LLM_TIMEOUT_MS ?? env.VITE_QWEN_TIMEOUT_MS ?? 20_000,\n );\n}\n\nfunction stripJsonFromMarkdown(s: string): string {\n const trimmed = s.trim();\n const match = trimmed.match(/^```(?:json)?\\s*([\\s\\S]*?)```$/);\n return match ? match[1].trim() : trimmed;\n}\n\nexport function parseJsonContent<T>(content: unknown): T {\n if (typeof content === \"string\") {\n return JSON.parse(stripJsonFromMarkdown(content)) as T;\n }\n return content as T;\n}\n"],"names":["getLlmTimeoutMs","env","__vite_import_meta_env__","stripJsonFromMarkdown","s","trimmed","match","parseJsonContent","content"],"mappings":";AAAO,SAASA,IAA0B;AACxC,QAAMC,IAAMC;AACZ,SAAO;AAAA,IACLD,EAAI,uBAAuBA,EAAI,wBAAwB;AAAA,EAAA;AAE3D;AAEA,SAASE,EAAsBC,GAAmB;AAChD,QAAMC,IAAUD,EAAE,KAAA,GACZE,IAAQD,EAAQ,MAAM,gCAAgC;AAC5D,SAAOC,IAAQA,EAAM,CAAC,EAAE,SAASD;AACnC;AAEO,SAASE,EAAoBC,GAAqB;AACvD,SAAI,OAAOA,KAAY,WACd,KAAK,MAAML,EAAsBK,CAAO,CAAC,IAE3CA;AACT;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"spotlightSpeech.js","sources":["../../../src/avatar/speech/spotlightSpeech.ts"],"sourcesContent":["import {\n extractTranscriptionText,\n spotlightSynthesizeSpeech,\n spotlightTranscribeAudio,\n} from \"../../remote/audio.js\";\n\nconst STT_MOCK_FALLBACK_TEXT = \"请介绍一下引大济岷项目\";\n\nexport type SpotlightTranscriptionResult = {\n text: string;\n raw: unknown;\n};\n\nfunction isSttMockMode(): boolean {\n // 仅本地开发可 mock;生产构建强制走真实麦克风 + STT 接口\n return import.meta.env.DEV && import.meta.env.VITE_STT_MOCK === \"1\";\n}\n\nfunction mockTranscriptionText(): string {\n const custom = import.meta.env.VITE_STT_MOCK_TEXT?.trim();\n return custom || STT_MOCK_FALLBACK_TEXT;\n}\n\nexport function hasSpotlightSpeechConfig(): boolean {\n if (isSttMockMode()) return true;\n const key = import.meta.env.VITE_SPOTLIGHT_API_KEY?.trim();\n const base = import.meta.env.VITE_SPOTLIGHT_SERVER_URL?.trim();\n return Boolean(key && base);\n}\n\nasync function blobToBase64(blob: Blob): Promise<string> {\n const buffer = await blob.arrayBuffer();\n const bytes = new Uint8Array(buffer);\n let binary = \"\";\n const chunkSize = 0x8000;\n for (let i = 0; i < bytes.length; i += chunkSize) {\n binary += String.fromCharCode(...bytes.subarray(i, i + chunkSize));\n }\n return btoa(binary);\n}\n\nfunction assertBrowserSupport(): void {\n if (!navigator.mediaDevices?.getUserMedia) {\n throw new Error(\"当前浏览器不支持麦克风采集。\");\n }\n if (typeof MediaRecorder === \"undefined\") {\n throw new Error(\"当前浏览器不支持 MediaRecorder。\");\n }\n}\n\n/** 浏览器侧录音 + mock;STT/TTS HTTP 见 `@inupedia/spotlight-vue`。 */\nexport class SpotlightSpeechService {\n private mediaRecorder: MediaRecorder | null = null;\n\n private mediaStream: MediaStream | null = null;\n\n private audioChunks: BlobPart[] = [];\n\n private started = false;\n\n get isRecording(): boolean {\n if (isSttMockMode()) return this.started;\n return this.mediaRecorder?.state === \"recording\";\n }\n\n async startRecording(): Promise<void> {\n if (isSttMockMode()) {\n if (this.started) return;\n this.started = true;\n return;\n }\n if (this.isRecording) return;\n assertBrowserSupport();\n this.audioChunks = [];\n this.mediaStream = await navigator.mediaDevices.getUserMedia({\n audio: true,\n });\n this.mediaRecorder = new MediaRecorder(this.mediaStream);\n this.mediaRecorder.ondataavailable = (event) => {\n if (event.data.size > 0) this.audioChunks.push(event.data);\n };\n this.mediaRecorder.start();\n this.started = true;\n }\n\n async stopAndTranscribe(\n signal?: AbortSignal,\n ): Promise<SpotlightTranscriptionResult> {\n if (!this.started) {\n throw new Error(\"语音录制尚未开始。\");\n }\n\n if (isSttMockMode()) {\n if (signal?.aborted) {\n throw new DOMException(\"Aborted\", \"AbortError\");\n }\n const text = mockTranscriptionText();\n this.reset();\n return { text, raw: { mock: true as const, text } };\n }\n\n if (!this.mediaRecorder) {\n throw new Error(\"语音录制尚未开始。\");\n }\n\n const recorder = this.mediaRecorder;\n const blob = await new Promise<Blob>((resolve, reject) => {\n recorder.onerror = () => reject(new Error(\"语音录制失败,请重试。\"));\n recorder.onstop = () => {\n resolve(\n new Blob(this.audioChunks, {\n type: recorder.mimeType || \"audio/webm\",\n }),\n );\n };\n recorder.stop();\n });\n this.stopTracks();\n\n if (blob.size <= 0) {\n throw new Error(\"未采集到语音内容,请重试。\");\n }\n\n const filename = `spotlight-recording.${this.resolveFileExt(blob.type)}`;\n try {\n const raw = await spotlightTranscribeAudio(\n {\n file: await blobToBase64(blob),\n mimeType: blob.type || \"audio/webm\",\n filename,\n },\n signal,\n );\n const text = extractTranscriptionText(raw);\n if (!text) throw new Error(\"STT 返回为空,请重试。\");\n return { text, raw };\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n throw new Error(`Spotlight STT failed: ${message}`);\n } finally {\n this.reset();\n }\n }\n\n async synthesize(\n text: string,\n signal?: AbortSignal,\n ): Promise<{ blob: Blob; spokenText: string }> {\n try {\n return await spotlightSynthesizeSpeech(text, signal);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n throw new Error(`Spotlight TTS failed: ${message}`);\n }\n }\n\n cancel(): void {\n if (isSttMockMode()) {\n this.reset();\n return;\n }\n if (this.mediaRecorder && this.mediaRecorder.state !== \"inactive\") {\n this.mediaRecorder.stop();\n }\n this.stopTracks();\n this.reset();\n }\n\n private stopTracks(): void {\n this.mediaStream?.getTracks().forEach((track) => track.stop());\n this.mediaStream = null;\n }\n\n private reset(): void {\n this.mediaRecorder = null;\n this.audioChunks = [];\n this.started = false;\n }\n\n private resolveFileExt(mimeType: string): string {\n if (mimeType.includes(\"mpeg\")) return \"mp3\";\n if (mimeType.includes(\"mp4\")) return \"mp4\";\n if (mimeType.includes(\"ogg\")) return \"ogg\";\n return \"webm\";\n }\n}\n"],"names":["hasSpotlightSpeechConfig","blobToBase64","blob","buffer","bytes","binary","chunkSize","i","assertBrowserSupport","SpotlightSpeechService","event","signal","recorder","resolve","reject","filename","raw","spotlightTranscribeAudio","text","extractTranscriptionText","err","message","spotlightSynthesizeSpeech","track","mimeType"],"mappings":";AAuBO,SAASA,IAAoC;AAIlD,SAAe;AACjB;AAEA,eAAeC,EAAaC,GAA6B;AACvD,QAAMC,IAAS,MAAMD,EAAK,YAAA,GACpBE,IAAQ,IAAI,WAAWD,CAAM;AACnC,MAAIE,IAAS;AACb,QAAMC,IAAY;AAClB,WAASC,IAAI,GAAGA,IAAIH,EAAM,QAAQG,KAAKD;AACrC,IAAAD,KAAU,OAAO,aAAa,GAAGD,EAAM,SAASG,GAAGA,IAAID,CAAS,CAAC;AAEnE,SAAO,KAAKD,CAAM;AACpB;AAEA,SAASG,IAA6B;AACpC,MAAI,CAAC,UAAU,cAAc;AAC3B,UAAM,IAAI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
- {"version":3,"file":"live2dApp.js","sources":["../../../src/avatar/spine/live2dApp.ts"],"sourcesContent":["import {\n bindSpineLipSyncToAudio,\n bindSpineLipSyncToAudioUrl,\n playSpineHello,\n startSpineAvatar,\n stopSpineAvatar,\n stopSpineLipSync,\n type WavEnvelope,\n} from \"./spineAvatar\";\n\n/** 数字人小滴(Spine / public/little-drop) */\nexport async function startLive2dApp(): Promise<void> {\n await startSpineAvatar();\n}\n\nexport function stopLive2dApp(): void {\n stopSpineAvatar();\n}\n\nexport function bindLive2dLipSyncToAudio(\n audio: HTMLAudioElement,\n envelope: WavEnvelope,\n): void {\n bindSpineLipSyncToAudio(audio, envelope);\n}\n\nexport async function bindLive2dLipSyncToAudioUrl(\n audio: HTMLAudioElement,\n audioUrl: string,\n): Promise<void> {\n await bindSpineLipSyncToAudioUrl(audio, audioUrl);\n}\n\nexport function stopLive2dLipSync(): void {\n stopSpineLipSync();\n}\n\nexport type { WavEnvelope };\n\n/** 与开场招呼语 TTS 同步时播放一次 hello 挥手(仅身体,嘴型跟 audio) */\nexport function playLive2dHello(): void {\n playSpineHello();\n}\n"],"names":["startLive2dApp","startSpineAvatar","stopLive2dApp","stopSpineAvatar","bindLive2dLipSyncToAudio","audio","envelope","bindSpineLipSyncToAudio","bindLive2dLipSyncToAudioUrl","audioUrl","bindSpineLipSyncToAudioUrl","stopLive2dLipSync","stopSpineLipSync","playLive2dHello","playSpineHello"],"mappings":";AAWA,eAAsBA,IAAgC;AACpD,QAAMC,EAAA;AACR;AAEO,SAASC,IAAsB;AACpC,EAAAC,EAAA;AACF;AAEO,SAASC,EACdC,GACAC,GACM;AACN,EAAAC,EAAwBF,GAAOC,CAAQ;AACzC;AAEA,eAAsBE,EACpBH,GACAI,GACe;AACf,QAAMC,EAA2BL,GAAOI,CAAQ;AAClD;AAEO,SAASE,IAA0B;AACxC,EAAAC,EAAA;AACF;AAKO,SAASC,IAAwB;AACtC,EAAAC,EAAA;AACF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"spineAvatar.js","sources":["../../../src/avatar/spine/spineAvatar.ts"],"sourcesContent":["import { Application, Assets } from \"pixi.js\";\nimport { Spine } from \"@pixi-spine/all-3.8\";\nimport {\n MOUTH_SLOT,\n buildWavEnvelope,\n envelopeLevelAt,\n mouthAttachmentForLevel,\n type WavEnvelope,\n} from \"./spineLipSync.js\";\nimport {\n resolveAvatarSkeletonUrl,\n type SpotlightAvatarConfig,\n} from \"../config.js\";\n\nexport type { WavEnvelope } from \"./spineLipSync.js\";\n\nconst IDLE_ANIM = \"idle\";\nconst HELLO_ANIM = \"hello\";\n/** 覆盖 idle 口型轨,保持 shuidi_3 微笑(见 public/little-drop/export/shuidi.json) */\nconst MOUTH_SMILE_ANIM = \"mouth_smile\";\n\nlet runtimeAvatarConfig: SpotlightAvatarConfig | undefined;\n\nexport function configureSpineAvatar(config?: SpotlightAvatarConfig): void {\n runtimeAvatarConfig = config;\n}\n\nlet helloPlaying = false;\nlet helloResetTimer: number | null = null;\n\nfunction clearHelloResetTimer(): void {\n if (helloResetTimer == null) return;\n window.clearTimeout(helloResetTimer);\n helloResetTimer = null;\n}\n\nlet app: Application | null = null;\nlet spine: Spine | null = null;\nlet hostEl: HTMLElement | null = null;\nlet resizeObserver: ResizeObserver | null = null;\nlet spineUpdateWrapped = false;\n\nlet isSpeaking = false;\nlet lipSyncEnvelope: WavEnvelope | null = null;\n/** 口型唯一时钟:与正在播放的 TTS 音频 currentTime 绑定 */\nlet lipSyncAudio: HTMLAudioElement | null = null;\n\nfunction setSlotAttachment(slotName: string, attachmentName: string): void {\n if (!spine) return;\n const skeleton = spine.skeleton;\n const slot = skeleton.findSlot(slotName);\n if (!slot) return;\n const attachment = skeleton.getAttachment(slot.data.index, attachmentName);\n slot.setAttachment(attachment ?? null);\n}\n\nfunction applyLipSyncMouth(): void {\n if (!spine || !lipSyncEnvelope || !lipSyncAudio) return;\n if (lipSyncAudio.ended) return;\n\n const elapsedMs = lipSyncAudio.currentTime * 1000;\n const level = envelopeLevelAt(lipSyncEnvelope, elapsedMs);\n setSlotAttachment(MOUTH_SLOT, mouthAttachmentForLevel(level));\n}\n\nfunction restoreIdleSmileTrack(): void {\n if (!spine?.state.hasAnimation(MOUTH_SMILE_ANIM)) return;\n spine.state.setAnimation(1, MOUTH_SMILE_ANIM, true);\n}\n\nfunction clearIdleSmileTrack(): void {\n if (!spine) return;\n spine.state.setEmptyAnimation(1, 0);\n}\n\nfunction playIdleWithSmile(): void {\n if (!spine) return;\n if (spine.state.hasAnimation(IDLE_ANIM)) {\n spine.state.setAnimation(0, IDLE_ANIM, true);\n }\n restoreIdleSmileTrack();\n}\n\n/** 开场招呼语时:hello 播一次,结束后自动接 idle(仅身体轨,嘴型由 TTS 音频驱动) */\nexport function playSpineHello(): void {\n if (!spine?.state.hasAnimation(HELLO_ANIM) || helloPlaying) return;\n clearHelloResetTimer();\n helloPlaying = true;\n const state = spine.state;\n state.setAnimation(0, HELLO_ANIM, false);\n if (state.hasAnimation(IDLE_ANIM)) {\n state.addAnimation(0, IDLE_ANIM, true, 0);\n }\n if (!isSpeaking) {\n restoreIdleSmileTrack();\n } else {\n clearIdleSmileTrack();\n }\n spine.update(0);\n\n const anim = state.data.skeletonData.findAnimation(HELLO_ANIM);\n const durationMs = anim ? (anim.duration + 0.15) * 1000 : 2500;\n helloResetTimer = window.setTimeout(() => {\n helloPlaying = false;\n helloResetTimer = null;\n }, durationMs);\n}\n\nfunction wrapSpineUpdate(): void {\n if (!spine || spineUpdateWrapped) return;\n const baseUpdate = spine.update.bind(spine);\n spine.update = (dt: number) => {\n baseUpdate(dt);\n if (!isSpeaking || !lipSyncEnvelope || !lipSyncAudio) return;\n applyLipSyncMouth();\n baseUpdate(0);\n };\n spineUpdateWrapped = true;\n}\n\nconst GROUND_SLOT = \"shuidi_17\";\n\nfunction hideGroundSlot(): void {\n if (!spine) return;\n const slot = spine.skeleton.findSlot(GROUND_SLOT);\n if (slot) slot.setAttachment(null as never);\n}\n\nfunction layoutSpine(): void {\n if (!spine || !hostEl) return;\n const { clientWidth: w, clientHeight: h } = hostEl;\n if (w <= 0 || h <= 0) return;\n\n spine.scale.set(1);\n spine.position.set(0, 0);\n spine.update(0);\n\n const bounds = spine.getLocalBounds();\n if (bounds.width <= 0 || bounds.height <= 0) return;\n\n const pad = 0.9;\n const scale = Math.min((w * pad) / bounds.width, (h * pad) / bounds.height);\n const cx = bounds.x + bounds.width / 2;\n const cy = bounds.y + bounds.height / 2;\n\n spine.scale.set(scale);\n spine.position.set(w / 2 - cx * scale, h / 2 - cy * scale);\n}\n\nexport async function startSpineAvatar(): Promise<void> {\n hostEl = document.getElementById(\"live2d-container\");\n if (!hostEl || app) return;\n\n app = new Application({\n backgroundAlpha: 0,\n antialias: true,\n resizeTo: hostEl,\n });\n hostEl.appendChild(app.view as HTMLCanvasElement);\n\n const resource = await Assets.load(resolveAvatarSkeletonUrl(runtimeAvatarConfig));\n spine = new Spine(resource.spineData);\n spine.autoUpdate = true;\n wrapSpineUpdate();\n app.stage.addChild(spine as never);\n\n hideGroundSlot();\n playIdleWithSmile();\n spine.update(0);\n layoutSpine();\n\n resizeObserver = new ResizeObserver(() => layoutSpine());\n resizeObserver.observe(hostEl);\n}\n\nexport function stopSpineAvatar(): void {\n stopSpineLipSync();\n clearHelloResetTimer();\n helloPlaying = false;\n resizeObserver?.disconnect();\n resizeObserver = null;\n spineUpdateWrapped = false;\n\n if (spine && app) {\n app.stage.removeChild(spine as never);\n spine.destroy({ children: true } as never);\n spine = null;\n }\n\n if (app) {\n app.destroy(true, { children: true, texture: true, baseTexture: true } as never);\n app = null;\n }\n\n hostEl = null;\n void Assets.reset();\n}\n\n/** 将口型与指定 audio 元素绑定(须在 play() 前后均可,以 currentTime 为准) */\nexport function bindSpineLipSyncToAudio(\n audio: HTMLAudioElement,\n envelope: WavEnvelope,\n): void {\n if (!spine) return;\n lipSyncAudio = audio;\n lipSyncEnvelope = envelope;\n clearIdleSmileTrack();\n isSpeaking = true;\n spine.update(0);\n}\n\n/** 从音频 URL 解析包络并绑定(与 bindSpineLipSyncToAudio 二选一) */\nexport async function bindSpineLipSyncToAudioUrl(\n audio: HTMLAudioElement,\n audioUrl: string,\n): Promise<void> {\n const envelope = await buildWavEnvelope(audioUrl);\n bindSpineLipSyncToAudio(audio, envelope);\n}\n\nexport function stopSpineLipSync(): void {\n isSpeaking = false;\n lipSyncEnvelope = null;\n lipSyncAudio = null;\n restoreIdleSmileTrack();\n spine?.update(0);\n}\n"],"names":["IDLE_ANIM","HELLO_ANIM","MOUTH_SMILE_ANIM","runtimeAvatarConfig","configureSpineAvatar","config","helloPlaying","helloResetTimer","clearHelloResetTimer","app","spine","hostEl","resizeObserver","spineUpdateWrapped","isSpeaking","lipSyncEnvelope","lipSyncAudio","setSlotAttachment","slotName","attachmentName","skeleton","slot","attachment","applyLipSyncMouth","elapsedMs","level","envelopeLevelAt","MOUTH_SLOT","mouthAttachmentForLevel","restoreIdleSmileTrack","clearIdleSmileTrack","playIdleWithSmile","playSpineHello","state","anim","durationMs","wrapSpineUpdate","baseUpdate","dt","GROUND_SLOT","hideGroundSlot","layoutSpine","w","h","bounds","pad","scale","cx","cy","startSpineAvatar","Application","resource","Assets","resolveAvatarSkeletonUrl","Spine","stopSpineAvatar","stopSpineLipSync","bindSpineLipSyncToAudio","audio","envelope","bindSpineLipSyncToAudioUrl","audioUrl","buildWavEnvelope"],"mappings":";;;;AAgBA,MAAMA,IAAY,QACZC,IAAa,SAEbC,IAAmB;AAEzB,IAAIC;AAEG,SAASC,EAAqBC,GAAsC;AACzE,EAAAF,IAAsBE;AACxB;AAEA,IAAIC,IAAe,IACfC,IAAiC;AAErC,SAASC,IAA6B;AACpC,EAAID,KAAmB,SACvB,OAAO,aAAaA,CAAe,GACnCA,IAAkB;AACpB;AAEA,IAAIE,IAA0B,MAC1BC,IAAsB,MACtBC,IAA6B,MAC7BC,IAAwC,MACxCC,IAAqB,IAErBC,IAAa,IACbC,IAAsC,MAEtCC,IAAwC;AAE5C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sources":["../../../src/avatar/spine/spineLipSync.ts"],"sourcesContent":["/** 嘴部 slot 与附件(shuidi_3 = 微笑,播报时按音量张大) */\nexport const MOUTH_SLOT = \"shuidi_0\";\nexport const MOUTH_SMILE = \"shuidi_3\";\nexport const MOUTH_OPEN_LEVELS = [\"shuidi_3\", \"shuidi_2\", \"shuidi_1\", \"shuidi_0\"] as const;\n\nconst LIP_SYNC_STEP_MS = 50;\n\nexport type WavEnvelope = {\n durationMs: number;\n levels: number[];\n};\n\nexport async function buildWavEnvelope(wavUrl: string): Promise<WavEnvelope> {\n const response = await fetch(wavUrl);\n return buildWavEnvelopeFromBlob(await response.blob());\n}\n\nexport async function buildWavEnvelopeFromBlob(blob: Blob): Promise<WavEnvelope> {\n const buffer = await blob.arrayBuffer();\n const ctx = new AudioContext();\n try {\n const audioBuffer = await ctx.decodeAudioData(buffer.slice(0));\n const channel = audioBuffer.getChannelData(0);\n const sampleRate = audioBuffer.sampleRate;\n const stepSamples = Math.max(1, Math.floor((sampleRate * LIP_SYNC_STEP_MS) / 1000));\n const levels: number[] = [];\n\n for (let i = 0; i < channel.length; i += stepSamples) {\n const end = Math.min(i + stepSamples, channel.length);\n let sum = 0;\n for (let j = i; j < end; j += 1) {\n const s = channel[j];\n sum += s * s;\n }\n levels.push(Math.sqrt(sum / (end - i)));\n }\n\n const peak = Math.max(...levels, 0.0001);\n return {\n durationMs: audioBuffer.duration * 1000,\n levels: levels.map((v) => Math.min(1, v / peak)),\n };\n } finally {\n void ctx.close();\n }\n}\n\nexport function envelopeLevelAt(\n envelope: WavEnvelope,\n elapsedMs: number,\n): number {\n if (elapsedMs < 0) return 0;\n const idx = Math.floor(elapsedMs / LIP_SYNC_STEP_MS);\n if (idx >= envelope.levels.length) return 0;\n return envelope.levels[idx] ?? 0;\n}\n\nexport function mouthAttachmentForLevel(level: number): string {\n const clamped = Math.max(0, Math.min(1, level));\n const idx = Math.min(\n MOUTH_OPEN_LEVELS.length - 1,\n Math.floor(clamped * MOUTH_OPEN_LEVELS.length),\n );\n return MOUTH_OPEN_LEVELS[idx];\n}\n"],"names":["MOUTH_SLOT","MOUTH_OPEN_LEVELS","buildWavEnvelope","wavUrl","response","buildWavEnvelopeFromBlob","blob","buffer","ctx","audioBuffer","channel","sampleRate","stepSamples","levels","i","end","sum","j","s","peak","v","envelopeLevelAt","envelope","elapsedMs","idx","mouthAttachmentForLevel","level","clamped"],"mappings":"AACO,MAAMA,IAAa,YAEbC,IAAoB,CAAC,YAAY,YAAY,YAAY,UAAU;AAShF,eAAsBC,EAAiBC,GAAsC;AAC3E,QAAMC,IAAW,MAAM,MAAMD,CAAM;AACnC,SAAOE,EAAyB,MAAMD,EAAS,MAAM;AACvD;AAEA,eAAsBC,EAAyBC,GAAkC;AAC/E,QAAMC,IAAS,MAAMD,EAAK,YAAA,GACpBE,IAAM,IAAI,aAAA;AAChB,MAAI;AACF,UAAMC,IAAc,MAAMD,EAAI,gBAAgBD,EAAO,MAAM,CAAC,CAAC,GACvDG,IAAUD,EAAY,eAAe,CAAC,GACtCE,IAAaF,EAAY,YACzBG,IAAc,KAAK,IAAI,GAAG,KAAK,MAAOD,IAAa,KAAoB,GAAI,CAAC,GAC5EE,IAAmB,CAAA;AAEzB,aAASC,IAAI,GAAGA,IAAIJ,EAAQ,QAAQI,KAAKF,GAAa;AACpD,YAAMG,IAAM,KAAK,IAAID,IAAIF,GAAaF,EAAQ,MAAM;AACpD,UAAIM,IAAM;AACV,eAASC,IAAIH,GAAGG,IAAIF,GAAKE,KAAK,GAAG;AAC/B,cAAMC,IAAIR,EAAQO,CAAC;AACnB,QAAAD,KAAOE,IAAIA;AAAA,MACb;AACA,MAAAL,EAAO,KAAK,KAAK,KAAKG,KAAOD,IAAMD,EAAE,CAAC;AAAA,IACxC;AAEA,UAAMK,IAAO,KAAK,IAAI,GAAGN,GAAQ,IAAM;AACvC,WAAO;AAAA,MACL,YAAYJ,EAAY,WAAW;AAAA,MACnC,QAAQI,EAAO,IAAI,CAACO,MAAM,KAAK,IAAI,GAAGA,IAAID,CAAI,CAAC;AAAA,IAAA;AAAA,EAEnD,UAAA;AACE,IAAKX,EAAI,MAAA;AAAA,EACX;AACF;AAEO,SAASa,EACdC,GACAC,GACQ;AACR,MAAIA,IAAY,EAAG,QAAO;AAC1B,QAAMC,IAAM,KAAK,MAAMD,IAAY,EAAgB;AACnD,SAAIC,KAAOF,EAAS,OAAO,SAAe,IACnCA,EAAS,OAAOE,CAAG,KAAK;AACjC;AAEO,SAASC,EAAwBC,GAAuB;AAC7D,QAAMC,IAAU,KAAK,IAAI,GAAG,KAAK,IAAI,GAAGD,CAAK,CAAC,GACxCF,IAAM,KAAK;AAAA,IACfvB,EAAkB,SAAS;AAAA,IAC3B,KAAK,MAAM0B,IAAU1B,EAAkB,MAAM;AAAA,EAAA;AAE/C,SAAOA,EAAkBuB,CAAG;AAC9B;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"InspiraCardSpotlight.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"InspiraCardSpotlight.vue.js","sources":["../../src/components/InspiraCardSpotlight.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { HTMLAttributes } from \"vue\";\nimport { cn } from \"@inspira-ui/plugins\";\nimport { computed, onMounted, ref } from \"vue\";\n\nconst props = withDefaults(\n defineProps<{\n class?: HTMLAttributes[\"class\"];\n slotClass?: HTMLAttributes[\"class\"];\n gradientSize?: number;\n gradientColor?: string;\n gradientOpacity?: number;\n }>(),\n {\n class: \"\",\n slotClass: \"\",\n gradientSize: 220,\n gradientColor: \"rgba(56, 189, 248, 0.22)\",\n gradientOpacity: 1,\n },\n);\n\nconst mouseX = ref(-props.gradientSize * 10);\nconst mouseY = ref(-props.gradientSize * 10);\n\nfunction handleMouseMove(event: MouseEvent) {\n const target = event.currentTarget as HTMLElement;\n const rect = target.getBoundingClientRect();\n mouseX.value = event.clientX - rect.left;\n mouseY.value = event.clientY - rect.top;\n}\n\nfunction handleMouseLeave() {\n mouseX.value = -props.gradientSize * 10;\n mouseY.value = -props.gradientSize * 10;\n}\n\nonMounted(() => {\n handleMouseLeave();\n});\n\nconst backgroundStyle = computed(() => {\n return `radial-gradient(circle at ${mouseX.value}px ${mouseY.value}px, ${props.gradientColor} 0%, rgba(0, 0, 0, 0) 70%)`;\n});\n</script>\n\n<template>\n <div\n :class=\"\n cn(\n 'inspira-card-spotlight group relative flex size-full overflow-hidden rounded-xl',\n props.class,\n )\n \"\n @mousemove=\"handleMouseMove\"\n @mouseleave=\"handleMouseLeave\"\n >\n <div\n :class=\"\n cn(\n 'inspira-card-spotlight__content relative z-10 size-full',\n props.slotClass,\n )\n \"\n >\n <slot />\n </div>\n <div\n class=\"inspira-card-spotlight__gradient pointer-events-none absolute inset-0 rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100\"\n :style=\"{\n background: backgroundStyle,\n opacity: gradientOpacity,\n }\"\n />\n </div>\n</template>\n\n<style scoped>\n.inspira-card-spotlight {\n position: relative;\n display: flex;\n width: 100%;\n min-width: 0;\n height: 100%;\n overflow: hidden;\n border-radius: 12px;\n}\n\n.inspira-card-spotlight__content {\n position: relative;\n z-index: 10;\n width: 100%;\n min-width: 0;\n height: 100%;\n}\n\n.inspira-card-spotlight__gradient {\n pointer-events: none;\n position: absolute;\n inset: 0;\n border-radius: inherit;\n opacity: 0;\n transition: opacity 0.3s ease;\n}\n\n.inspira-card-spotlight:hover .inspira-card-spotlight__gradient {\n opacity: 1;\n}\n</style>\n"],"names":["props","__props","mouseX","ref","mouseY","handleMouseMove","event","rect","handleMouseLeave","onMounted","backgroundStyle","computed","_createElementBlock","_normalizeClass","_unref","cn","_createElementVNode","_renderSlot","_ctx","_normalizeStyle"],"mappings":";;;;;;;;;;;;AAKA,UAAMA,IAAQC,GAiBRC,IAASC,EAAI,CAACH,EAAM,eAAe,EAAE,GACrCI,IAASD,EAAI,CAACH,EAAM,eAAe,EAAE;AAE3C,aAASK,EAAgBC,GAAmB;AAE1C,YAAMC,IADSD,EAAM,cACD,sBAAA;AACpB,MAAAJ,EAAO,QAAQI,EAAM,UAAUC,EAAK,MACpCH,EAAO,QAAQE,EAAM,UAAUC,EAAK;AAAA,IACtC;AAEA,aAASC,IAAmB;AAC1B,MAAAN,EAAO,QAAQ,CAACF,EAAM,eAAe,IACrCI,EAAO,QAAQ,CAACJ,EAAM,eAAe;AAAA,IACvC;AAEA,IAAAS,EAAU,MAAM;AACd,MAAAD,EAAA;AAAA,IACF,CAAC;AAED,UAAME,IAAkBC,EAAS,MACxB,6BAA6BT,EAAO,KAAK,MAAME,EAAO,KAAK,OAAOJ,EAAM,aAAa,4BAC7F;2BAICY,EA2BM,OAAA;AAAA,MA1BH,OAAKC;AAAAA,QAASC,EAAAC,CAAA;AAAA;UAAuGf,EAAM;AAAA,QAAA;AAAA;MAM3H,aAAWK;AAAA,MACX,cAAYG;AAAA,IAAA;MAEbQ,EASM,OAAA;AAAA,QARH,OAAKH;AAAAA,UAAWC,EAAAC,CAAA;AAAA;YAAmFf,EAAM;AAAA,UAAA;AAAA;;QAO1GiB,EAAQC,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,MAAA;MAEVF,EAME,OAAA;AAAA,QALA,OAAM;AAAA,QACL,OAAKG,EAAA;AAAA,sBAAwBT,EAAA;AAAA,mBAAkCT,EAAA;AAAA,QAAA;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Live2dPanel.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Live2dPanel2.vue.js","sources":["../../src/components/Live2dPanel.vue"],"sourcesContent":["<template>\n <div class=\"live2d-panel-shell\">\n <div id=\"live2d-container\" class=\"live2d-panel\" aria-label=\"Live2D\" />\n <Transition name=\"speech-bubble\">\n <div\n v-if=\"speechVisible\"\n class=\"live2d-speech-bubble\"\n :class=\"{ 'is-speaking': speaking }\"\n >\n <div class=\"live2d-speech-head\">\n <span class=\"live2d-speech-dot\" />\n <span>{{ avatarConfig.bubbleTitle ?? \"数字人\" }}</span>\n </div>\n <p class=\"live2d-speech-text\">{{ animatedText }}</p>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, onUnmounted, ref, watch } from \"vue\";\nimport { storeToRefs } from \"pinia\";\nimport { startLive2dApp, stopLive2dApp } from \"../avatar/spine/live2dApp.js\";\nimport { configureSpineAvatar } from \"../avatar/spine/spineAvatar.js\";\nimport { useSpotlightAvatarConfig } from \"../avatar/config.js\";\nimport { useLive2dSpeechStore } from \"../store/live2dSpeechStore.js\";\n\nconst speechStore = useLive2dSpeechStore();\nconst avatarConfig = useSpotlightAvatarConfig();\nconst { message, speaking, revealInstant } = storeToRefs(speechStore);\nconst animatedText = ref(\"\");\nlet typingTimer: number | null = null;\n\nconst speechVisible = computed(() => {\n return speaking.value || message.value.trim().length > 0;\n});\n\nfunction clearTypingTimer() {\n if (typingTimer != null) {\n window.clearInterval(typingTimer);\n typingTimer = null;\n }\n}\n\nwatch(\n () => [message.value, revealInstant.value] as const,\n ([text, instant]) => {\n clearTypingTimer();\n const normalized = text.trim();\n if (!normalized) {\n animatedText.value = \"\";\n return;\n }\n\n if (instant) {\n animatedText.value = normalized;\n return;\n }\n\n animatedText.value = \"\";\n let index = 0;\n typingTimer = window.setInterval(() => {\n index += 1;\n animatedText.value = normalized.slice(0, index);\n if (index >= normalized.length) {\n clearTypingTimer();\n }\n }, 24);\n },\n { immediate: true },\n);\n\nonMounted(async () => {\n configureSpineAvatar(avatarConfig);\n await startLive2dApp();\n});\n\nonUnmounted(() => {\n clearTypingTimer();\n speechStore.reset();\n stopLive2dApp();\n});\n</script>\n\n<style scoped>\n.live2d-panel-shell {\n position: fixed;\n right: 220px;\n bottom: 16px;\n z-index: 5000;\n width: min(420px, 42vw);\n height: min(560px, 52vh);\n pointer-events: none;\n}\n\n.live2d-panel {\n position: absolute;\n inset: 0;\n pointer-events: auto;\n touch-action: none;\n background: transparent;\n}\n\n.live2d-speech-bubble {\n position: absolute;\n right: calc(100% - 36px);\n bottom: 44%;\n width: min(360px, 40vw);\n max-height: 32vh;\n overflow: hidden auto;\n border-radius: 14px;\n border: 1px solid rgba(148, 163, 184, 0.3);\n background: linear-gradient(\n 180deg,\n rgba(15, 23, 42, 0.92),\n rgba(2, 6, 23, 0.94)\n );\n box-shadow:\n 0 18px 36px rgba(2, 6, 23, 0.42),\n inset 0 0 0 1px rgba(15, 23, 42, 0.45);\n color: #e2e8f0;\n padding: 10px 12px;\n pointer-events: auto;\n}\n\n.live2d-speech-bubble.is-speaking {\n border-color: rgba(34, 211, 238, 0.45);\n box-shadow:\n 0 20px 40px rgba(6, 182, 212, 0.22),\n inset 0 0 0 1px rgba(8, 145, 178, 0.28);\n}\n\n.live2d-speech-head {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n color: #7dd3fc;\n font-size: 12px;\n line-height: 1;\n}\n\n.live2d-speech-dot {\n width: 8px;\n height: 8px;\n border-radius: 999px;\n background: currentcolor;\n box-shadow: 0 0 12px currentcolor;\n}\n\n.live2d-speech-bubble.is-speaking .live2d-speech-dot {\n animation: speech-pulse 1.1s ease-in-out infinite;\n}\n\n.live2d-speech-text {\n margin: 8px 0 0;\n white-space: pre-wrap;\n word-break: break-word;\n font-size: 13px;\n line-height: 1.55;\n}\n\n.speech-bubble-enter-active,\n.speech-bubble-leave-active {\n transition: all 0.28s ease;\n}\n\n.speech-bubble-enter-from,\n.speech-bubble-leave-to {\n opacity: 0;\n transform: translateX(10px) scale(0.98);\n}\n\n@keyframes speech-pulse {\n 0% {\n opacity: 0.65;\n transform: scale(0.95);\n }\n 50% {\n opacity: 1;\n transform: scale(1.12);\n }\n 100% {\n opacity: 0.65;\n transform: scale(0.95);\n }\n}\n</style>\n"],"names":["speechStore","useLive2dSpeechStore","avatarConfig","useSpotlightAvatarConfig","message","speaking","revealInstant","storeToRefs","animatedText","ref","typingTimer","speechVisible","computed","clearTypingTimer","watch","text","instant","normalized","index","onMounted","configureSpineAvatar","startLive2dApp","onUnmounted","stopLive2dApp","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_createVNode","_Transition","_normalizeClass","_unref","_hoisted_2","_toDisplayString","_hoisted_3"],"mappings":";;;;;;;;;AA2BA,UAAMA,IAAcC,EAAA,GACdC,IAAeC,EAAA,GACf,EAAE,SAAAC,GAAS,UAAAC,GAAU,eAAAC,EAAA,IAAkBC,EAAYP,CAAW,GAC9DQ,IAAeC,EAAI,EAAE;AAC3B,QAAIC,IAA6B;AAEjC,UAAMC,IAAgBC,EAAS,MACtBP,EAAS,SAASD,EAAQ,MAAM,KAAA,EAAO,SAAS,CACxD;AAED,aAASS,IAAmB;AAC1B,MAAIH,KAAe,SACjB,OAAO,cAAcA,CAAW,GAChCA,IAAc;AAAA,IAElB;AAEA,WAAAI;AAAA,MACE,MAAM,CAACV,EAAQ,OAAOE,EAAc,KAAK;AAAA,MACzC,CAAC,CAACS,GAAMC,CAAO,MAAM;AACnB,QAAAH,EAAA;AACA,cAAMI,IAAaF,EAAK,KAAA;AACxB,YAAI,CAACE,GAAY;AACf,UAAAT,EAAa,QAAQ;AACrB;AAAA,QACF;AAEA,YAAIQ,GAAS;AACX,UAAAR,EAAa,QAAQS;AACrB;AAAA,QACF;AAEA,QAAAT,EAAa,QAAQ;AACrB,YAAIU,IAAQ;AACZ,QAAAR,IAAc,OAAO,YAAY,MAAM;AACrC,UAAAQ,KAAS,GACTV,EAAa,QAAQS,EAAW,MAAM,GAAGC,CAAK,GAC1CA,KAASD,EAAW,UACtBJ,EAAA;AAAA,QAEJ,GAAG,EAAE;AAAA,MACP;AAAA,MACA,EAAE,WAAW,GAAA;AAAA,IAAK,GAGpBM,EAAU,YAAY;AACpB,MAAAC,EAAqBlB,CAAY,GACjC,MAAMmB,EAAA;AAAA,IACR,CAAC,GAEDC,EAAY,MAAM;AAChB,MAAAT,EAAA,GACAb,EAAY,MAAA,GACZuB,EAAA;AAAA,IACF,CAAC,cAhFCC,EAAA,GAAAC,EAeM,OAfNC,GAeM;AAAA,sBAdJC,EAAsE,OAAA;AAAA,QAAjE,IAAG;AAAA,QAAmB,OAAM;AAAA,QAAe,cAAW;AAAA,MAAA;MAC3DC,EAYaC,GAAA,EAZD,MAAK,mBAAe;AAAA,mBAC9B,MAUM;AAAA,UATElB,EAAA,cADRc,EAUM,OAAA;AAAA;YARJ,OAAKK,EAAA,CAAC,wBAAsB,EAAA,eACHC,EAAA1B,CAAA,GAAQ,CAAA;AAAA,UAAA;YAEjCsB,EAGM,OAHNK,GAGM;AAAA,8BAFJL,EAAkC,QAAA,EAA5B,OAAM,oBAAA,GAAmB,MAAA,EAAA;AAAA,cAC/BA,EAAoD,QAAA,MAAAM,EAA3CF,EAAA7B,CAAA,EAAa,eAAW,KAAA,GAAA,CAAA;AAAA,YAAA;YAEnCyB,EAAoD,KAApDO,GAAoDD,EAAnBzB,EAAA,KAAY,GAAA,CAAA;AAAA,UAAA;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"OfficialBorderBeam.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"OfficialBorderBeam.vue.js","sources":["../../src/components/OfficialBorderBeam.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from \"vue\";\n\ninterface BorderBeamProps {\n size?: number;\n duration?: number;\n borderWidth?: number;\n anchor?: number;\n colorFrom?: string;\n colorTo?: string;\n delay?: number;\n}\n\nconst props = withDefaults(defineProps<BorderBeamProps>(), {\n size: 200,\n duration: 15,\n anchor: 90,\n borderWidth: 1.5,\n colorFrom: \"#ffaa40\",\n colorTo: \"#9c40ff\",\n delay: 0,\n});\n\nconst durationInSeconds = computed(() => `${props.duration}s`);\nconst delayInSeconds = computed(() => `${props.delay}s`);\n</script>\n\n<template>\n <div class=\"border-beam-official\" />\n</template>\n\n<style scoped>\n.border-beam-official {\n --size: v-bind(size);\n --duration: v-bind(durationInSeconds);\n --anchor: v-bind(anchor);\n --border-width: v-bind(borderWidth);\n --color-from: v-bind(colorFrom);\n --color-to: v-bind(colorTo);\n --delay: v-bind(delayInSeconds);\n position: absolute;\n inset: 0;\n pointer-events: none;\n border-radius: inherit;\n border: calc(var(--border-width) * 1px) solid transparent;\n mask-image:\n linear-gradient(transparent, transparent), linear-gradient(white, white);\n mask-clip: padding-box, border-box;\n mask-composite: intersect;\n -webkit-mask-image:\n linear-gradient(transparent, transparent), linear-gradient(white, white);\n -webkit-mask-clip: padding-box, border-box;\n -webkit-mask-composite: source-in;\n}\n\n.border-beam-official::after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: calc(var(--size) * 1px);\n aspect-ratio: 1 / 1;\n background: linear-gradient(\n to left,\n var(--color-from),\n var(--color-to),\n transparent\n );\n offset-anchor: calc(var(--anchor) * 1%) 50%;\n offset-path: rect(0 auto auto 0 round calc(var(--size) * 1px));\n animation: border-beam-official-anim var(--duration) infinite linear;\n animation-delay: var(--delay);\n}\n\n@keyframes border-beam-official-anim {\n to {\n offset-distance: 100%;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .border-beam-official::after {\n animation: none;\n }\n}\n</style>\n"],"names":["props","__props","durationInSeconds","computed","delayInSeconds","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaA,UAAMA,IAAQC,GAURC,IAAoBC,EAAS,MAAM,GAAGH,EAAM,QAAQ,GAAG,GACvDI,IAAiBD,EAAS,MAAM,GAAGH,EAAM,KAAK,GAAG;sBAIrDK,EAAA,GAAAC,EAAoC,OAApCC,CAAoC;AAAA;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpotlightCommandPanel.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpotlightCommandPanel2.vue.js","sources":["../../src/components/SpotlightCommandPanel.vue"],"sourcesContent":["<template>\n <div class=\"spotlight-backdrop\" @click.self=\"store.close\">\n <div\n class=\"spotlight-panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"指令面板\"\n >\n <div v-if=\"deckKicker\" class=\"spotlight-command-deck\" aria-hidden=\"true\">\n <span class=\"spotlight-command-deck-kicker\">{{ deckKicker }}</span>\n <span class=\"spotlight-command-deck-line\" />\n <span class=\"spotlight-command-deck-status\">{{ badgeLabel }}</span>\n </div>\n <div class=\"spotlight-orbit\" aria-hidden=\"true\">\n <span />\n <span />\n <span />\n </div>\n <div\n v-if=\"store.pendingSkillPermission\"\n class=\"spotlight-permission-banner\"\n role=\"alertdialog\"\n aria-label=\"Skill 权限确认\"\n >\n <div class=\"spotlight-permission-banner-body\">\n <strong>{{\n store.pendingSkillPermission.displayName ??\n store.pendingSkillPermission.skillName\n }}</strong>\n <span>{{ store.pendingSkillPermission.reason }}</span>\n </div>\n <div class=\"spotlight-permission-banner-actions\">\n <button\n type=\"button\"\n class=\"spotlight-permission-btn is-approve\"\n @click=\"store.approvePendingSkillPermission()\"\n >\n 允许\n </button>\n <button\n type=\"button\"\n class=\"spotlight-permission-btn is-dismiss\"\n @click=\"store.clearPendingSkillPermission()\"\n >\n 取消\n </button>\n </div>\n </div>\n <InspiraCardSpotlight\n class=\"spotlight-input-shell\"\n :gradient-size=\"260\"\n gradient-color=\"rgba(74, 124, 142, 0.16)\"\n :gradient-opacity=\"1\"\n >\n <div\n v-if=\"voiceHoldActive || speechPending\"\n class=\"spotlight-voice-shell\"\n :class=\"{\n 'is-recording': voiceHoldActive,\n 'is-transcribing': speechPending,\n }\"\n >\n <OfficialBorderBeam\n class=\"spotlight-voice-beam\"\n :size=\"86\"\n :duration=\"6\"\n :border-width=\"1.5\"\n color-from=\"#c9a25d\"\n color-to=\"#5d8f9b\"\n />\n <div class=\"spotlight-voice-mic\" aria-hidden=\"true\">\n <span class=\"spotlight-voice-mic-icon\">\n <span class=\"spotlight-voice-mic-body\" />\n <span class=\"spotlight-voice-mic-stem\" />\n </span>\n </div>\n <div class=\"spotlight-voice-text\">\n {{\n voiceHoldActive\n ? `正在录音,松开 ${voiceKeyLabel} 结束`\n : \"语音识别中,请稍候…\"\n }}\n </div>\n </div>\n <div v-else class=\"spotlight-input-wrap\" :class=\"`is-${uiState}`\">\n <div class=\"spotlight-input-prefix\" aria-hidden=\"true\">\n <span class=\"spotlight-input-prefix-core\" />\n </div>\n <!-- prettier-ignore -->\n <input\n ref=\"inputRef\"\n v-model=\"store.prompt\"\n class=\"spotlight-input\"\n type=\"text\"\n :placeholder=\"placeholder\"\n @keydown.enter.prevent=\"store.handleEnter\"\n @keydown.down.prevent=\"store.selectNext\"\n @keydown.up.prevent=\"store.selectPrev\"\n >\n <span class=\"spotlight-input-scanline\" aria-hidden=\"true\" />\n <div class=\"spotlight-agent-badge\" :class=\"`is-${uiState}`\">\n <span class=\"spotlight-agent-badge-dot\" />\n <span>{{ badgeLabel }}</span>\n </div>\n </div>\n </InspiraCardSpotlight>\n <div\n v-if=\"\n !store.prompt.trim() &&\n !store.loading &&\n !voiceHoldActive &&\n !speechPending\n \"\n class=\"spotlight-list-shell\"\n >\n <ul class=\"spotlight-list\" role=\"listbox\">\n <li\n v-for=\"(q, i) in store.suggestedQuestions\"\n :key=\"`suggested-${i}`\"\n class=\"spotlight-item\"\n :class=\"{ 'is-selected': store.selectedIndex === i }\"\n role=\"option\"\n :aria-selected=\"store.selectedIndex === i\"\n @click=\"onSelectQuestion(i)\"\n >\n <span class=\"spotlight-item-label\">{{ q }}</span>\n <span class=\"spotlight-item-hint\">推荐</span>\n </li>\n <li\n v-if=\"\n store.suggestedQuestions.length > 0 &&\n store.recentQuestions.length > 0\n \"\n class=\"spotlight-list-divider\"\n >\n <span>历史问题</span>\n </li>\n <li\n v-for=\"(q, i) in store.recentQuestions\"\n :key=\"`recent-${i}`\"\n class=\"spotlight-item\"\n :class=\"{\n 'is-selected':\n store.selectedIndex === i + store.suggestedQuestions.length,\n }\"\n role=\"option\"\n :aria-selected=\"\n store.selectedIndex === i + store.suggestedQuestions.length\n \"\n @click=\"onSelectQuestion(i + store.suggestedQuestions.length)\"\n >\n <span class=\"spotlight-item-label\">{{ q }}</span>\n <span class=\"spotlight-item-hint\">历史</span>\n </li>\n <li\n v-if=\"\n store.suggestedQuestions.length === 0 &&\n store.recentQuestions.length === 0\n \"\n class=\"spotlight-item spotlight-item--empty\"\n >\n <span class=\"spotlight-item-label\">暂无推荐问法</span>\n </li>\n </ul>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { nextTick, ref, toRef } from \"vue\";\nimport { storeToRefs } from \"pinia\";\nimport { useSpotlightStore } from \"../store/spotlightStore.js\";\nimport { useSpotlightPanelUi } from \"../composables/useSpotlightPanelUi.js\";\nimport InspiraCardSpotlight from \"./InspiraCardSpotlight.vue\";\nimport OfficialBorderBeam from \"./OfficialBorderBeam.vue\";\n\nconst props = withDefaults(\n defineProps<{\n deckKicker?: string;\n voiceHoldActive?: boolean;\n speechPending?: boolean;\n voiceKeyLabel?: string;\n }>(),\n {\n deckKicker: \"\",\n voiceHoldActive: false,\n speechPending: false,\n voiceKeyLabel: \"`\",\n },\n);\n\nconst store = useSpotlightStore();\nconst { loading, pipelinePhase } = storeToRefs(store);\nconst inputRef = ref<HTMLInputElement | null>(null);\n\nconst { uiState, placeholder, badgeLabel } = useSpotlightPanelUi({\n pipelinePhase,\n loading,\n voiceHoldActive: toRef(props, \"voiceHoldActive\"),\n speechPending: toRef(props, \"speechPending\"),\n voiceKeyLabel: props.voiceKeyLabel,\n});\n\nfunction onSelectQuestion(index: number) {\n store.fillPromptWithRecent(index);\n nextTick(() => inputRef.value?.focus());\n}\n\nfunction focusInput() {\n nextTick(() => inputRef.value?.focus());\n}\n\ndefineExpose({ focusInput });\n</script>\n\n<style scoped>\n@import \"../styles/spotlight-command-panel.css\";\n</style>\n"],"names":["props","__props","store","useSpotlightStore","loading","pipelinePhase","storeToRefs","inputRef","ref","uiState","placeholder","badgeLabel","useSpotlightPanelUi","toRef","onSelectQuestion","index","nextTick","focusInput","__expose","_createElementBlock","_cache","_withModifiers","args","_unref","_createElementVNode","_hoisted_1","_openBlock","_hoisted_2","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","$event","_createVNode","InspiraCardSpotlight","OfficialBorderBeam","_hoisted_8","_normalizeClass","_vModelText","_hoisted_10","_hoisted_11","_Fragment","q","i","_hoisted_13","_hoisted_14","_hoisted_16","_hoisted_17"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiLA,UAAMA,IAAQC,GAeRC,IAAQC,EAAA,GACR,EAAE,SAAAC,GAAS,eAAAC,MAAkBC,EAAYJ,CAAK,GAC9CK,IAAWC,EAA6B,IAAI,GAE5C,EAAE,SAAAC,GAAS,aAAAC,GAAa,YAAAC,EAAA,IAAeC,EAAoB;AAAA,MAC/D,eAAAP;AAAA,MACA,SAAAD;AAAA,MACA,iBAAiBS,EAAMb,GAAO,iBAAiB;AAAA,MAC/C,eAAea,EAAMb,GAAO,eAAe;AAAA,MAC3C,eAAeA,EAAM;AAAA,IAAA,CACtB;AAED,aAASc,EAAiBC,GAAe;AACvC,MAAAb,EAAM,qBAAqBa,CAAK,GAChCC,EAAS,MAAMT,EAAS,OAAO,MAAA,CAAO;AAAA,IACxC;AAEA,aAASU,IAAa;AACpB,MAAAD,EAAS,MAAMT,EAAS,OAAO,MAAA,CAAO;AAAA,IACxC;AAEA,WAAAW,EAAa,EAAE,YAAAD,GAAY,mBApNzBE,EAqKM,OAAA;AAAA,MArKD,OAAM;AAAA,MAAsB,SAAKC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAC;AAAAA;AAAAA,QAAO,IAAAC,MAAAC,EAAArB,CAAA,EAAM,SAANqB,EAAArB,CAAA,EAAM,MAAK,GAAAoB,CAAA;AAAA,QAAA,CAAA,MAAA;AAAA,MAAA;AAAA,IAAA;MACtDE,EAmKM,O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B,IAQK,CAAA,GAAA7B,EAAA,EAAA,MAAAA,EAAA,EAAA,IAAA;AAAA,cADHI,EAAgD,QAAA,EAA1C,OAAM,uBAAA,GAAuB,UAAM,EAAA;AAAA,YAAA;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpotlightMarkdownPreview.vue.js","sources":["../../src/components/SpotlightMarkdownPreview.vue"],"sourcesContent":["<template>\n <MdPreview\n :id=\"editorId\"\n :model-value=\"displayValue\"\n theme=\"dark\"\n preview-theme=\"github\"\n code-theme=\"github\"\n class=\"thinking-bar-md-preview\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport { MdPreview } from \"md-editor-v3\";\nimport { computed, ref, watch } from \"vue\";\nimport {\n formatSpotlightKnowledgeMarkdown,\n preprocessKnowledgeMarkdown,\n} from \"../store/pipeline/spotlightMarkdown.js\";\n\nconst props = withDefaults(\n defineProps<{\n modelValue: string;\n formatKnowledge?: boolean;\n editorId?: string;\n }>(),\n {\n formatKnowledge: false,\n editorId: \"spotlight-knowledge-preview\",\n },\n);\n\nconst formattedValue = ref(\"\");\nlet formatGeneration = 0;\n\nconst displayValue = computed(() => {\n if (!props.formatKnowledge) return props.modelValue;\n return formattedValue.value || preprocessKnowledgeMarkdown(props.modelValue);\n});\n\nwatch(\n () => [props.modelValue, props.formatKnowledge] as const,\n async ([value, shouldFormat]) => {\n if (!shouldFormat) {\n formattedValue.value = \"\";\n return;\n }\n const generation = ++formatGeneration;\n const next = await formatSpotlightKnowledgeMarkdown(value);\n if (generation === formatGeneration) {\n formattedValue.value = next;\n }\n },\n { immediate: true },\n);\n</script>\n"],"names":["props","__props","formattedValue","ref","formatGeneration","displayValue","computed","preprocessKnowledgeMarkdown","watch","value","shouldFormat","generation","next","formatSpotlightKnowledgeMarkdown","_createBlock","_unref","MdPreview"],"mappings":";;;;;;;;;;;AAmBA,UAAMA,IAAQC,GAYRC,IAAiBC,EAAI,EAAE;AAC7B,QAAIC,IAAmB;AAEvB,UAAMC,IAAeC,EAAS,MACvBN,EAAM,kBACJE,EAAe,SAASK,EAA4BP,EAAM,UAAU,IADxCA,EAAM,UAE1C;AAED,WAAAQ;AAAA,MACE,MAAM,CAACR,EAAM,YAAYA,EAAM,eAAe;AAAA,MAC9C,OAAO,CAACS,GAAOC,CAAY,MAAM;AAC/B,YAAI,CAACA,GAAc;AACjB,UAAAR,EAAe,QAAQ;AACvB;AAAA,QACF;AACA,cAAMS,IAAa,EAAEP,GACfQ,IAAO,MAAMC,EAAiCJ,CAAK;AACzD,QAAIE,MAAeP,MACjBF,EAAe,QAAQU;AAAA,MAE3B;AAAA,MACA,EAAE,WAAW,GAAA;AAAA,IAAK,mBAnDlBE,EAOEC,EAAAC,CAAA,GAAA;AAAA,MANC,IAAIf,EAAA;AAAA,MACJ,eAAaI,EAAA;AAAA,MACd,OAAM;AAAA,MACN,iBAAc;AAAA,MACd,cAAW;AAAA,MACX,OAAM;AAAA,IAAA;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpotlightMarkdownPreview2.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpotlightRoot.vue.js","sources":["../../src/components/SpotlightRoot.vue"],"sourcesContent":["<template>\n <Teleport to=\"body\">\n <SpotlightCommandPanel\n v-if=\"store.visible\"\n ref=\"panelRef\"\n :deck-kicker=\"deckKicker\"\n :voice-hold-active=\"voiceHoldActive\"\n :speech-pending=\"speechPending\"\n :voice-key-label=\"voiceKeyLabel\"\n />\n <SpotlightThinking\n v-if=\"showThinking\"\n :steps=\"store.agentSteps\"\n :centered=\"thinkingCentered\"\n @close=\"store.closeThinking\"\n />\n </Teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from \"vue\";\nimport { storeToRefs } from \"pinia\";\nimport { useSpotlightStore } from \"../store/spotlightStore.js\";\nimport { useSpotlightCommandShortcuts } from \"../composables/useSpotlightCommandShortcuts.js\";\nimport SpotlightCommandPanel from \"./SpotlightCommandPanel.vue\";\nimport SpotlightThinking from \"./SpotlightThinking.vue\";\n\nconst props = withDefaults(\n defineProps<{\n deckKicker?: string;\n voiceHoldActive?: boolean;\n speechPending?: boolean;\n voiceKeyLabel?: string;\n /** Override default `store.showThinkingBar` visibility. */\n showThinking?: boolean;\n thinkingCentered?: boolean;\n onEscape?: () => void;\n onKeydown?: (event: KeyboardEvent) => void;\n onKeyup?: (event: KeyboardEvent) => void;\n }>(),\n {\n deckKicker: \"\",\n voiceHoldActive: false,\n speechPending: false,\n voiceKeyLabel: \"`\",\n thinkingCentered: false,\n },\n);\n\nconst emit = defineEmits<{\n visibleChange: [visible: boolean];\n}>();\n\nconst store = useSpotlightStore();\nconst { visible, showThinkingBar } = storeToRefs(store);\nconst panelRef = ref<InstanceType<typeof SpotlightCommandPanel> | null>(null);\n\nconst showThinking = computed(\n () => props.showThinking ?? showThinkingBar.value,\n);\n\nuseSpotlightCommandShortcuts({\n visible,\n showThinkingBar,\n open: () => store.open(),\n close: () => store.close(),\n closeThinking: () => store.closeThinking(),\n onEscape: props.onEscape,\n onKeydown: props.onKeydown,\n onKeyup: props.onKeyup,\n});\n\nwatch(visible, (next) => {\n emit(\"visibleChange\", next);\n if (next) {\n panelRef.value?.focusInput();\n }\n});\n</script>\n"],"names":["props","__props","emit","__emit","store","useSpotlightStore","visible","showThinkingBar","storeToRefs","panelRef","ref","showThinking","computed","useSpotlightCommandShortcuts","watch","next","_createBlock","_Teleport","_unref","SpotlightCommandPanel","SpotlightThinking"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2BA,UAAMA,IAAQC,GAsBRC,IAAOC,GAIPC,IAAQC,EAAA,GACR,EAAE,SAAAC,GAAS,iBAAAC,MAAoBC,EAAYJ,CAAK,GAChDK,IAAWC,EAAuD,IAAI,GAEtEC,IAAeC;AAAA,MACnB,MAAMZ,EAAM,gBAAgBO,EAAgB;AAAA,IAAA;AAG9C,WAAAM,EAA6B;AAAA,MAC3B,SAAAP;AAAA,MACA,iBAAAC;AAAA,MACA,MAAM,MAAMH,EAAM,KAAA;AAAA,MAClB,OAAO,MAAMA,EAAM,MAAA;AAAA,MACnB,eAAe,MAAMA,EAAM,cAAA;AAAA,MAC3B,UAAUJ,EAAM;AAAA,MAChB,WAAWA,EAAM;AAAA,MACjB,SAASA,EAAM;AAAA,IAAA,CAChB,GAEDc,EAAMR,GAAS,CAACS,MAAS;AACvB,MAAAb,EAAK,iBAAiBa,CAAI,GACtBA,KACFN,EAAS,OAAO,WAAA;AAAA,IAEpB,CAAC,mBA5ECO,EAeWC,GAAA,EAfD,IAAG,UAAM;AAAA,MAETC,EAAAd,CAAA,EAAM,gBADdY,EAOEG,GAAA;AAAA;iBALI;AAAA,QAAJ,KAAIV;AAAA,QACH,eAAaR,EAAA;AAAA,QACb,qBAAmBA,EAAA;AAAA,QACnB,kBAAgBA,EAAA;AAAA,QAChB,mBAAiBA,EAAA;AAAA,MAAA;MAGZU,EAAA,cADRK,EAKEI,GAAA;AAAA;QAHC,OAAOF,EAAAd,CAAA,EAAM;AAAA,QACb,UAAUH,EAAA;AAAA,QACV,SAAOiB,EAAAd,CAAA,EAAM;AAAA,MAAA;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpotlightRoot2.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpotlightShell.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpotlightShell2.vue.js","sources":["../../src/components/SpotlightShell.vue"],"sourcesContent":["<template>\n <SpotlightRoot\n :deck-kicker=\"deckKicker\"\n :voice-hold-active=\"voiceHoldActive\"\n :speech-pending=\"speechPending\"\n :voice-key-label=\"VOICE_INPUT_KEY_LABEL\"\n :show-thinking=\"showSpotlightThinkingBar\"\n :thinking-centered=\"thinkingBarCentered\"\n :on-escape=\"onSpotlightEscape\"\n :on-keydown=\"onSpotlightKeydown\"\n :on-keyup=\"onSpotlightKeyup\"\n @visible-change=\"onPanelVisibleChange\"\n />\n <Live2dPanel v-if=\"avatarEnabled && live2dVisible\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onUnmounted, ref, watch } from \"vue\";\nimport {\n buildFastLive2dBriefing,\n summarizeLive2dBriefing,\n type Live2dBriefingSentence,\n} from \"../avatar/speech/live2dBriefingSummarizer.js\";\nimport { isGenericHostExecutionReply } from \"../avatar/speech/live2dAnswerSpeechPolicy.js\";\nimport { LIVE2D_ANSWER_STEP_ID } from \"../avatar/speech/live2dStreamSpeech.js\";\nimport { waitForAudioNaturalEnd } from \"../avatar/speech/live2dTtsPlayback.js\";\nimport type { WavEnvelope } from \"../avatar/spine/live2dApp.js\";\nimport {\n hasSpotlightSpeechConfig,\n SpotlightSpeechService,\n} from \"../avatar/speech/spotlightSpeech.js\";\nimport { storeToRefs } from \"pinia\";\nimport { useSpotlightStore } from \"../store/spotlightStore.js\";\nimport { useSpotlightAvatarConfig } from \"../avatar/config.js\";\nimport SpotlightRoot from \"./SpotlightRoot.vue\";\nimport Live2dPanel from \"./Live2dPanel.vue\";\nimport { useLive2dOverlayStore } from \"../store/live2dOverlayStore.js\";\nimport { useLive2dSpeechStore } from \"../store/live2dSpeechStore.js\";\nimport { useLive2dVoiceChannelStore } from \"../store/live2dVoiceChannelStore.js\";\nimport { devWarn } from \"../utils/devConsole.js\";\n\nconst props = withDefaults(\n defineProps<{ avatarEnabled?: boolean }>(),\n { avatarEnabled: false },\n);\n\nconst avatarConfig = useSpotlightAvatarConfig();\nconst deckKicker = computed(\n () => avatarConfig.deckKicker?.trim() || \"SPOTLIGHT\",\n);\nconst greetingText = computed(\n () => avatarConfig.greetingText?.trim() || \"您好,我是 Spotlight 助手\",\n);\n\nconst store = useSpotlightStore();\nconst live2dOverlay = useLive2dOverlayStore();\nconst { visible: live2dVisible } = storeToRefs(live2dOverlay);\nconst live2dSpeech = useLive2dSpeechStore();\nconst live2dVoiceChannel = useLive2dVoiceChannelStore();\nconst speechService = new SpotlightSpeechService();\n\nconst VOICE_INPUT_KEY_CODE = \"Backquote\";\nconst VOICE_INPUT_KEY_LABEL = \"`\";\nconst voiceHoldTimer = ref<number | null>(null);\nconst voiceHoldActive = ref(false);\nconst speechPending = ref(false);\nconst speechAbortController = ref<AbortController | null>(null);\nconst ttsAudio = ref<HTMLAudioElement | null>(null);\nconst ttsAudioUrl = ref<string | null>(null);\nconst ttsAbortController = ref<AbortController | null>(null);\nconst activeSpeechToken = ref(0);\nconst lastSpokenPipelineRunId = ref(0);\nconst live2dHoldThinkingUntilSpeech = ref(false);\nconst live2dBriefingKeepLastMs = computed(() =>\n Math.max(\n 0,\n avatarConfig.briefingKeepLastMs ??\n (Number(import.meta.env.VITE_LIVE2D_BRIEFING_KEEP_LAST_MS ?? 0) || 0),\n ),\n);\nlet live2dGreetingAbort: AbortController | null = null;\nconst sttFromLive2dVoiceChannel = ref(false);\n\nconst showSpotlightThinkingBar = computed(() => {\n if (!store.showThinkingBar) return false;\n if (!props.avatarEnabled || !live2dVisible.value) return true;\n if (\n store.pipelinePhase === \"running\" ||\n live2dHoldThinkingUntilSpeech.value\n ) {\n return true;\n }\n return store.pipelinePhase === \"done\";\n});\n\nconst thinkingBarCentered = computed(() => {\n const isKnowledgeQa =\n store.agentSteps.length === 1 && store.agentSteps[0]?.label === \"知识问答\";\n return (\n store.pipelinePhase === \"running\" ||\n isKnowledgeQa ||\n live2dHoldThinkingUntilSpeech.value\n );\n});\n\nfunction dismissLive2dThinkingForSpeech(): void {\n live2dHoldThinkingUntilSpeech.value = false;\n if (live2dVisible.value) {\n store.showThinkingBar = false;\n }\n}\n\nfunction clearVoiceHoldTimer() {\n if (voiceHoldTimer.value != null) {\n window.clearTimeout(voiceHoldTimer.value);\n voiceHoldTimer.value = null;\n }\n}\n\nfunction cancelSpeechSession() {\n clearVoiceHoldTimer();\n if (speechAbortController.value) {\n speechAbortController.value.abort();\n speechAbortController.value = null;\n }\n speechPending.value = false;\n voiceHoldActive.value = false;\n sttFromLive2dVoiceChannel.value = false;\n live2dVoiceChannel.reset();\n speechService.cancel();\n}\n\nfunction stopTtsPlayback() {\n if (live2dGreetingAbort) {\n live2dGreetingAbort.abort();\n live2dGreetingAbort = null;\n }\n if (ttsAbortController.value) {\n ttsAbortController.value.abort();\n ttsAbortController.value = null;\n }\n releaseCurrentTtsAudio();\n live2dSpeech.reset();\n void import(\"../avatar/spine/live2dApp.js\").then((live2d) =>\n live2d.stopLive2dLipSync(),\n );\n}\n\nfunction wait(ms: number, signal?: AbortSignal): Promise<void> {\n if (ms <= 0) return Promise.resolve();\n return new Promise((resolve, reject) => {\n const timer = window.setTimeout(() => {\n signal?.removeEventListener(\"abort\", onAbort);\n resolve();\n }, ms);\n const onAbort = () => {\n window.clearTimeout(timer);\n reject(new DOMException(\"Aborted\", \"AbortError\"));\n };\n if (signal?.aborted) {\n onAbort();\n return;\n }\n signal?.addEventListener(\"abort\", onAbort, { once: true });\n });\n}\n\nasync function playLive2dGreetingWhenOpened(): Promise<void> {\n if (!live2dVisible.value || store.pipelinePhase === \"running\") return;\n\n stopTtsPlayback();\n activeSpeechToken.value += 1;\n const speechToken = activeSpeechToken.value;\n const controller = new AbortController();\n live2dGreetingAbort = controller;\n\n if (!hasSpotlightSpeechConfig()) {\n live2dGreetingAbort = null;\n await nextTick();\n const live2d = await import(\"../avatar/spine/live2dApp.js\");\n live2d.playLive2dHello();\n live2dSpeech.start(greetingText.value, { instant: true });\n live2dSpeech.reset();\n return;\n }\n\n const synthesizePromise = speechService.synthesize(\n greetingText.value,\n controller.signal,\n );\n\n await nextTick();\n await new Promise<void>((resolve) => {\n requestAnimationFrame(() => resolve());\n });\n if (!isLive2dTtsSessionActive(controller, speechToken)) return;\n\n try {\n const { blob } = await synthesizePromise;\n if (!isLive2dTtsSessionActive(controller, speechToken)) return;\n await playLive2dTtsBlob(\n greetingText.value,\n blob,\n controller,\n speechToken,\n { instantText: true, playHelloWithSpeech: true },\n );\n } catch (err) {\n if (controller.signal.aborted) return;\n const message =\n err instanceof Error ? err.message : \"数字人招呼语音失败,请稍后重试。\";\n devWarn(\"[live2d-greeting]\", message);\n if (isLive2dTtsSessionActive(controller, speechToken)) {\n const live2d = await import(\"../avatar/spine/live2dApp.js\");\n live2d.playLive2dHello();\n live2dSpeech.start(greetingText.value, { instant: true });\n live2dSpeech.reset();\n }\n } finally {\n if (live2dGreetingAbort === controller) {\n live2dGreetingAbort = null;\n }\n }\n}\n\nfunction releaseCurrentTtsAudio() {\n if (ttsAudio.value) {\n ttsAudio.value.pause();\n ttsAudio.value.src = \"\";\n ttsAudio.value = null;\n }\n if (ttsAudioUrl.value) {\n URL.revokeObjectURL(ttsAudioUrl.value);\n ttsAudioUrl.value = null;\n }\n}\n\nfunction getAnswerStepSpeechText(): string {\n const step =\n store.agentSteps.find((item) => item.id === LIVE2D_ANSWER_STEP_ID) ??\n store.agentSteps.find((item) => item.label === \"执行工具与回答\") ??\n store.agentSteps.find((item) => item.label === \"知识问答\");\n return step?.content ?? \"\";\n}\n\nasync function speakAnswerStepWithLive2d(): Promise<void> {\n const text = getAnswerStepSpeechText().trim();\n if (!text || !live2dVisible.value || isGenericHostExecutionReply(text)) {\n live2dHoldThinkingUntilSpeech.value = false;\n return;\n }\n\n stopTtsPlayback();\n const speechToken = activeSpeechToken.value;\n const controller = new AbortController();\n ttsAbortController.value = controller;\n\n try {\n const fastPlan = buildFastLive2dBriefing(text);\n let activeSentences = fastPlan.sentences;\n if (!activeSentences.length) {\n live2dHoldThinkingUntilSpeech.value = false;\n return;\n }\n\n let refinedPlanSentences: Live2dBriefingSentence[] | null = null;\n let refinedApplied = false;\n const refinedTask = summarizeLive2dBriefing(text, controller.signal)\n .then((plan) => {\n if (plan.sentences.length > 0) {\n refinedPlanSentences = plan.sentences;\n }\n })\n .catch(() => {});\n\n let prefetchIndex = -1;\n let prefetchTask: Promise<Blob> | null = null;\n const schedulePrefetch = (index: number) => {\n if (index < 0 || index >= activeSentences.length) return;\n if (prefetchIndex === index && prefetchTask) return;\n prefetchIndex = index;\n prefetchTask = speechService\n .synthesize(activeSentences[index]!.text, controller.signal)\n .then((result) => result.blob);\n };\n\n let spokenIndex = 0;\n while (spokenIndex < activeSentences.length) {\n if (!isLive2dTtsSessionActive(controller, speechToken)) return;\n\n if (!refinedApplied && refinedPlanSentences) {\n activeSentences = refinedPlanSentences;\n refinedApplied = true;\n prefetchIndex = -1;\n prefetchTask = null;\n if (spokenIndex >= activeSentences.length) break;\n }\n\n const sentence = activeSentences[spokenIndex]!;\n schedulePrefetch(spokenIndex);\n const blob =\n prefetchIndex === spokenIndex && prefetchTask\n ? await prefetchTask\n : (await speechService.synthesize(sentence.text, controller.signal))\n .blob;\n if (!isLive2dTtsSessionActive(controller, speechToken)) return;\n schedulePrefetch(spokenIndex + 1);\n\n if (spokenIndex === 0) {\n dismissLive2dThinkingForSpeech();\n }\n\n await playLive2dTtsBlob(sentence.text, blob, controller, speechToken, {\n instantText: true,\n hasFollowingClip: spokenIndex + 1 < activeSentences.length,\n });\n\n const pauseMs = sentence.pauseMs ?? 0;\n if (pauseMs > 0 && isLive2dTtsSessionActive(controller, speechToken)) {\n try {\n await wait(pauseMs, controller.signal);\n } catch {\n return;\n }\n }\n\n spokenIndex += 1;\n }\n await refinedTask;\n } catch (err) {\n if (controller.signal.aborted) return;\n stopTtsPlayback();\n const message =\n err instanceof Error ? err.message : \"数字人语音播放失败,请稍后重试。\";\n store.error = message;\n } finally {\n live2dHoldThinkingUntilSpeech.value = false;\n releaseCurrentTtsAudio();\n const live2d = await import(\"../avatar/spine/live2dApp.js\");\n live2d.stopLive2dLipSync();\n if (isLive2dTtsSessionActive(controller, speechToken)) {\n if (live2dBriefingKeepLastMs.value > 0) {\n try {\n await wait(live2dBriefingKeepLastMs.value, controller.signal);\n } catch {\n // ignore abort\n }\n }\n if (isLive2dTtsSessionActive(controller, speechToken)) {\n live2dSpeech.reset();\n }\n }\n if (ttsAbortController.value === controller) {\n ttsAbortController.value = null;\n }\n }\n}\n\nfunction isLive2dTtsSessionActive(\n controller: AbortController,\n speechToken: number,\n): boolean {\n return !controller.signal.aborted && activeSpeechToken.value === speechToken;\n}\n\nasync function playLive2dTtsBlob(\n text: string,\n blob: Blob,\n controller: AbortController,\n speechToken: number,\n options?: {\n instantText?: boolean;\n hasFollowingClip?: boolean;\n lipSyncEnvelope?: WavEnvelope;\n playHelloWithSpeech?: boolean;\n },\n): Promise<void> {\n if (!isLive2dTtsSessionActive(controller, speechToken)) return;\n\n const hasFollowingClip = options?.hasFollowingClip ?? false;\n releaseCurrentTtsAudio();\n const audioUrl = URL.createObjectURL(blob);\n ttsAudioUrl.value = audioUrl;\n const audio = new Audio(audioUrl);\n audio.volume = 1;\n ttsAudio.value = audio;\n\n const live2d = await import(\"../avatar/spine/live2dApp.js\");\n const { buildWavEnvelopeFromBlob } = await import(\"../avatar/spine/spineLipSync.js\");\n const envelope =\n options?.lipSyncEnvelope ?? (await buildWavEnvelopeFromBlob(blob));\n\n if (!isLive2dTtsSessionActive(controller, speechToken)) return;\n\n if (options?.playHelloWithSpeech) {\n live2d.playLive2dHello();\n }\n\n live2d.bindLive2dLipSyncToAudio(audio, envelope);\n live2dSpeech.start(text, { instant: options?.instantText ?? true });\n try {\n await audio.play();\n } catch (err) {\n live2d.stopLive2dLipSync();\n releaseCurrentTtsAudio();\n throw err;\n }\n\n await waitForAudioNaturalEnd(audio, controller.signal);\n\n live2d.stopLive2dLipSync();\n releaseCurrentTtsAudio();\n if (!isLive2dTtsSessionActive(controller, speechToken)) return;\n\n if (hasFollowingClip) {\n live2dSpeech.finish();\n return;\n }\n\n live2dSpeech.reset();\n}\n\nfunction canLive2dHiddenVoiceStt(): boolean {\n if (!props.avatarEnabled) return false;\n return (\n live2dVisible.value &&\n !store.visible &&\n !store.loading &&\n !speechPending.value\n );\n}\n\nasync function stopSpeechAndFillPrompt() {\n if (speechPending.value) return;\n const submitAfterTranscribe = sttFromLive2dVoiceChannel.value;\n voiceHoldActive.value = false;\n if (submitAfterTranscribe) {\n live2dVoiceChannel.setTranscribing(true);\n }\n speechPending.value = true;\n const controller = new AbortController();\n speechAbortController.value = controller;\n try {\n const { text } = await speechService.stopAndTranscribe(controller.signal);\n const trimmed = text.trim();\n if (submitAfterTranscribe) {\n sttFromLive2dVoiceChannel.value = false;\n if (!trimmed) return;\n store.prompt = trimmed;\n await store.submit();\n return;\n }\n const current = store.prompt.trim();\n store.prompt = current ? `${current} ${text}` : text;\n } catch (err) {\n if (controller.signal.aborted) return;\n const message =\n err instanceof Error ? err.message : \"语音识别失败,请重试。\";\n store.error = message;\n } finally {\n speechAbortController.value = null;\n speechPending.value = false;\n voiceHoldActive.value = false;\n sttFromLive2dVoiceChannel.value = false;\n live2dVoiceChannel.reset();\n }\n}\n\nfunction onVoiceHoldKeydown(event: KeyboardEvent) {\n if (event.repeat) return;\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n\n const hiddenThinkingStt = canLive2dHiddenVoiceStt();\n if (!store.visible && !hiddenThinkingStt) return;\n if (store.visible && store.loading) return;\n\n event.preventDefault();\n if (voiceHoldTimer.value != null || voiceHoldActive.value) return;\n voiceHoldTimer.value = window.setTimeout(async () => {\n voiceHoldTimer.value = null;\n const useHiddenPath = canLive2dHiddenVoiceStt();\n if (!store.visible && !useHiddenPath) return;\n if (store.visible && store.loading) return;\n try {\n await speechService.startRecording();\n voiceHoldActive.value = true;\n sttFromLive2dVoiceChannel.value = useHiddenPath;\n if (useHiddenPath) {\n live2dVoiceChannel.setRecording(true);\n } else {\n live2dVoiceChannel.reset();\n }\n store.error = \"\";\n } catch (err) {\n const message = err instanceof Error ? err.message : \"无法启动语音录制。\";\n store.error = message;\n voiceHoldActive.value = false;\n sttFromLive2dVoiceChannel.value = false;\n live2dVoiceChannel.reset();\n }\n }, 450);\n}\n\nfunction onSpotlightKeyup(event: KeyboardEvent) {\n if (event.code !== VOICE_INPUT_KEY_CODE) return;\n if (!store.visible && !voiceHoldActive.value) return;\n event.preventDefault();\n const hadLongPress = voiceHoldActive.value;\n clearVoiceHoldTimer();\n if (hadLongPress) {\n void stopSpeechAndFillPrompt();\n }\n}\n\nfunction onSpotlightKeydown(event: KeyboardEvent) {\n if (event.code === VOICE_INPUT_KEY_CODE) {\n onVoiceHoldKeydown(event);\n return;\n }\n\n const key = event.key.toLowerCase();\n const isMeta = event.metaKey || event.ctrlKey;\n if (!props.avatarEnabled) return;\n if (isMeta && key === \"l\") {\n event.preventDefault();\n live2dOverlay.toggle();\n }\n}\n\nfunction onSpotlightEscape() {\n live2dHoldThinkingUntilSpeech.value = false;\n activeSpeechToken.value += 1;\n stopTtsPlayback();\n live2dSpeech.reset();\n if (store.showThinkingBar) {\n store.closeThinking();\n } else if (store.visible) {\n store.close();\n }\n}\n\nfunction onPanelVisibleChange(visible: boolean) {\n if (!visible) {\n cancelSpeechSession();\n if (live2dVisible.value) {\n store.prepareLive2dVoiceChannel();\n }\n return;\n }\n}\n\nwatch(live2dVisible, (on) => {\n if (!props.avatarEnabled) return;\n if (!on) {\n live2dHoldThinkingUntilSpeech.value = false;\n cancelSpeechSession();\n stopTtsPlayback();\n live2dSpeech.reset();\n live2dVoiceChannel.reset();\n return;\n }\n if (!store.visible) {\n store.prepareLive2dVoiceChannel();\n }\n void playLive2dGreetingWhenOpened();\n});\n\nwatch(\n () =>\n [store.pipelinePhase, store.pipelineRunId, live2dVisible.value] as const,\n ([phase, runId, live2dOn]) => {\n if (!props.avatarEnabled) return;\n if (phase === \"running\") {\n live2dHoldThinkingUntilSpeech.value = false;\n stopTtsPlayback();\n return;\n }\n if (phase !== \"done\") {\n if (phase === \"error\" || phase === \"cancelled\") {\n live2dHoldThinkingUntilSpeech.value = false;\n stopTtsPlayback();\n }\n return;\n }\n if (!live2dOn) return;\n if (runId <= lastSpokenPipelineRunId.value) return;\n lastSpokenPipelineRunId.value = runId;\n void nextTick(() => {\n const text = getAnswerStepSpeechText().trim();\n if (\n !text ||\n isGenericHostExecutionReply(text) ||\n !hasSpotlightSpeechConfig()\n ) {\n live2dHoldThinkingUntilSpeech.value = false;\n return;\n }\n live2dHoldThinkingUntilSpeech.value = true;\n activeSpeechToken.value += 1;\n void speakAnswerStepWithLive2d();\n });\n },\n);\n\nonUnmounted(() => {\n cancelSpeechSession();\n stopTtsPlayback();\n live2dSpeech.reset();\n live2dVoiceChannel.reset();\n});\n</script>\n"],"names":["VOICE_INPUT_KEY_CODE","VOICE_INPUT_KEY_LABEL","props","__props","avatarConfig","useSpotlightAvatarConfig","deckKicker","computed","greetingText","store","useSpotlightStore","live2dOverlay","useLive2dOverlayStore","live2dVisible","storeToRefs","live2dSpeech","useLive2dSpeechStore","live2dVoiceChannel","useLive2dVoiceChannelStore","speechService","SpotlightSpeechService","voiceHoldTimer","ref","voiceHoldActive","speechPending","speechAbortController","ttsAudio","ttsAudioUrl","ttsAbortController","activeSpeechToken","lastSpokenPipelineRunId","live2dHoldThinkingUntilSpeech","live2dBriefingKeepLastMs","live2dGreetingAbort","sttFromLive2dVoiceChannel","showSpotlightThinkingBar","thinkingBarCentered","isKnowledgeQa","dismissLive2dThinkingForSpeech","clearVoiceHoldTimer","cancelSpeechSession","stopTtsPlayback","releaseCurrentTtsAudio","live2d","wait","ms","signal","resolve","reject","timer","onAbort","playLive2dGreetingWhenOpened","speechToken","controller","hasSpotlightSpeechConfig","nextTick","synthesizePromise","isLive2dTtsSessionActive","blob","playLive2dTtsBlob","err","message","devWarn","getAnswerStepSpeechText","item","LIVE2D_ANSWER_STEP_ID","speakAnswerStepWithLive2d","text","isGenericHostExecutionReply","activeSentences","buildFastLive2dBriefing","refinedPlanSentences","refinedApplied","refinedTask","summarizeLive2dBriefing","plan","prefetchIndex","prefetchTask","schedulePrefetch","index","result","spokenIndex","sentence","pauseMs","options","hasFollowingClip","audioUrl","audio","buildWavEnvelopeFromBlob","envelope","waitForAudioNaturalEnd","canLive2dHiddenVoiceStt","stopSpeechAndFillPrompt","submitAfterTranscribe","trimmed","current","onVoiceHoldKeydown","event","hiddenThinkingStt","useHiddenPath","onSpotlightKeyup","hadLongPress","onSpotlightKeydown","key","isMeta","onSpotlightEscape","onPanelVisibleChange","visible","watch","on","phase","runId","live2dOn","onUnmounted","_createVNode","SpotlightRoot","_unref","_createBlock","Live2dPanel"],"mappings":";;;;;;;;;;;;;;;AA6DA,MAAMA,KAAuB,aACvBC,KAAwB;;;;;;AArB9B,UAAMC,IAAQC,GAKRC,IAAeC,GAAA,GACfC,KAAaC;AAAA,MACjB,MAAMH,EAAa,YAAY,UAAU;AAAA,IAAA,GAErCI,IAAeD;AAAA,MACnB,MAAMH,EAAa,cAAc,UAAU;AAAA,IAAA,GAGvCK,IAAQC,GAAA,GACRC,IAAgBC,GAAA,GAChB,EAAE,SAASC,MAAkBC,GAAYH,CAAa,GACtDI,IAAeC,GAAA,GACfC,IAAqBC,GAAA,GACrBC,IAAgB,IAAIC,GAAA,GAIpBC,IAAiBC,EAAmB,IAAI,GACxCC,IAAkBD,EAAI,EAAK,GAC3BE,IAAgBF,EAAI,EAAK,GACzBG,IAAwBH,EAA4B,IAAI,GACxDI,IAAWJ,EAA6B,IAAI,GAC5CK,IAAcL,EAAmB,IAAI,GACrCM,IAAqBN,EAA4B,IAAI,GACrDO,IAAoBP,EAAI,CAAC,GACzBQ,IAA0BR,EAAI,CAAC,GAC/BS,IAAgCT,EAAI,EAAK,GACzCU,IAA2BzB;AAAA,MAAS,MACxC,KAAK;AAAA,QACH;AAAA,QACAH,EAAa,sBACwD;AAAA,MAAA;AAAA,IACvE;AAEF,QAAI6B,IAA8C;AAClD,UAAMC,IAA4BZ,EAAI,EAAK,GAErCa,KAA2B5B,EAAS,MACnCE,EAAM,kBACP,CAACP,EAAM,iBAAiB,CAACW,EAAc,SAEzCJ,EAAM,kBAAkB,aACxBsB,EAA8B,QAEvB,KAEFtB,EAAM,kBAAkB,SARI,EASpC,GAEK2B,KAAsB7B,EAAS,MAAM;AACzC,YAAM8B,IACJ5B,EAAM,WAAW,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MACH;AAAA,IAAA,GAGF+C,GAAY,MAAM;AAChB,MAAAzE,EAAA,GACAC,EAAA,GACA1B,EAAa,MAAA,GACbE,EAAmB,MAAA;AAAA,IACrB,CAAC;MAhmBCiG,GAWEC,IAAA;AAAA,QAVC,eAAa7G,GAAA;AAAA,QACb,qBAAmBiB,EAAA;AAAA,QACnB,kBAAgBC,EAAA;AAAA,QAChB,mBAAiBvB;AAAA,QACjB,iBAAekC,GAAA;AAAA,QACf,qBAAmBC,GAAA;AAAA,QACnB,aAAWqE;AAAA,QACX,cAAYH;AAAA,QACZ,YAAUF;AAAA,QACV,iBAAgBM;AAAA,MAAA;MAEAvG,EAAA,iBAAiBiH,GAAAvG,CAAA,UAApCwG,GAAqDC,IAAA,EAAA,KAAA,EAAA,CAAA;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpotlightThinking.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +0,0 @@
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;AACnC,MAAIE,KAAQP,KACVA,EAAmB,UAAUO,CAAI;AAEnC,YAAMC,IAAOF,aAAc,cAAcA,IAAK;AAC9C,MAAIE,KACFV,EAAY,IAAIO,GAAQG,CAAI,GAC5BR,GAAoB,QAAQQ,CAAI,KAEhCV,EAAY,OAAOO,CAAM;AAAA,IAE7B;AAEA,aAASI,EAAqBH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