paul-ai-assistant 0.1.16
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.
- package/README.md +249 -0
- package/dist/1.async.js +61 -0
- package/dist/1013.async.js +1 -0
- package/dist/123.async.js +258 -0
- package/dist/1387.async.js +321 -0
- package/dist/1481.async.js +1 -0
- package/dist/1548.async.js +2 -0
- package/dist/1815.async.js +3 -0
- package/dist/1819.async.js +1 -0
- package/dist/1851.async.js +1 -0
- package/dist/2491.async.js +132 -0
- package/dist/2517.async.js +247 -0
- package/dist/2678.async.js +1 -0
- package/dist/2856.async.js +267 -0
- package/dist/295.async.js +1 -0
- package/dist/3098.async.js +1 -0
- package/dist/3138.async.js +1 -0
- package/dist/34.async.js +137 -0
- package/dist/3472.async.js +1 -0
- package/dist/3614.async.js +25 -0
- package/dist/3959.async.js +69 -0
- package/dist/404.html +44 -0
- package/dist/4484.async.js +10 -0
- package/dist/4498.async.js +37 -0
- package/dist/4911.async.js +1 -0
- package/dist/4927.async.js +104 -0
- package/dist/5067.async.js +44 -0
- package/dist/5588.async.js +8 -0
- package/dist/5754.async.js +5 -0
- package/dist/6254.async.js +30286 -0
- package/dist/6355.async.js +10 -0
- package/dist/6662.async.js +177 -0
- package/dist/6680.async.js +2615 -0
- package/dist/6690.async.js +153 -0
- package/dist/7267.async.js +31 -0
- package/dist/7329.async.js +180 -0
- package/dist/7718.async.js +61 -0
- package/dist/7762.async.js +3 -0
- package/dist/7787.async.js +7 -0
- package/dist/7929.async.js +1 -0
- package/dist/8164.async.js +1 -0
- package/dist/834.async.js +221 -0
- package/dist/8456.async.js +146 -0
- package/dist/8542.async.js +25 -0
- package/dist/8749.async.js +1 -0
- package/dist/8914.async.js +66 -0
- package/dist/9570.async.js +65 -0
- package/dist/9725.async.js +18 -0
- package/dist/components/llm-trace-v2/index.html +44 -0
- package/dist/components/llm-trace-v3/index.html +44 -0
- package/dist/components/llm-trace-v3-advanced/index.html +44 -0
- package/dist/components/llm-trace-v3-examples/index.html +44 -0
- package/dist/components/llm-trace-v3-visual-demos/index.html +44 -0
- package/dist/demos.async.js +594 -0
- package/dist/demos__index.md.async.js +1 -0
- package/dist/demos__markdown-latex-mermaid__index.md.async.js +1 -0
- package/dist/demos__toolChatType__index.md.async.js +1 -0
- package/dist/docs/index.html +44 -0
- package/dist/docs__components__llm-trace-v2.md.async.js +1 -0
- package/dist/docs__components__llm-trace-v3-advanced.md.async.js +1 -0
- package/dist/docs__components__llm-trace-v3-examples.md.async.js +1 -0
- package/dist/docs__components__llm-trace-v3-visual-demos.md.async.js +1 -0
- package/dist/docs__components__llm-trace-v3.md.async.js +61 -0
- package/dist/docs__docs__index.md.async.js +108 -0
- package/dist/docs__index.md.async.js +1 -0
- package/dist/dumi__tmp-production__dumi__theme__ContextWrapper.async.js +1 -0
- package/dist/index.html +44 -0
- package/dist/markdown-latex-mermaid/index.html +44 -0
- package/dist/meta__demos.async.js +4272 -0
- package/dist/meta__docs.async.js +3416 -0
- package/dist/nm__dumi__dist__client__pages__404.async.js +29 -0
- package/dist/nm__dumi__dist__client__pages__Demo__index.async.js +5 -0
- package/dist/nm__dumi__theme-default__layouts__DocLayout__index.async.js +1 -0
- package/dist/preload_helper.js +1 -0
- package/dist/static/KaTeX_AMS-Regular.1608a09b.woff +0 -0
- package/dist/static/KaTeX_AMS-Regular.4aafdb68.ttf +0 -0
- package/dist/static/KaTeX_AMS-Regular.a79f1c31.woff2 +0 -0
- package/dist/static/KaTeX_Caligraphic-Bold.b6770918.woff +0 -0
- package/dist/static/KaTeX_Caligraphic-Bold.cce5b8ec.ttf +0 -0
- package/dist/static/KaTeX_Caligraphic-Bold.ec17d132.woff2 +0 -0
- package/dist/static/KaTeX_Caligraphic-Regular.07ef19e7.ttf +0 -0
- package/dist/static/KaTeX_Caligraphic-Regular.55fac258.woff2 +0 -0
- package/dist/static/KaTeX_Caligraphic-Regular.dad44a7f.woff +0 -0
- package/dist/static/KaTeX_Fraktur-Bold.9f256b85.woff +0 -0
- package/dist/static/KaTeX_Fraktur-Bold.b18f59e1.ttf +0 -0
- package/dist/static/KaTeX_Fraktur-Bold.d42a5579.woff2 +0 -0
- package/dist/static/KaTeX_Fraktur-Regular.7c187121.woff +0 -0
- package/dist/static/KaTeX_Fraktur-Regular.d3c882a6.woff2 +0 -0
- package/dist/static/KaTeX_Fraktur-Regular.ed38e79f.ttf +0 -0
- package/dist/static/KaTeX_Main-Bold.b74a1a8b.ttf +0 -0
- package/dist/static/KaTeX_Main-Bold.c3fb5ac2.woff2 +0 -0
- package/dist/static/KaTeX_Main-Bold.d181c465.woff +0 -0
- package/dist/static/KaTeX_Main-BoldItalic.6f2bb1df.woff2 +0 -0
- package/dist/static/KaTeX_Main-BoldItalic.70d8b0a5.ttf +0 -0
- package/dist/static/KaTeX_Main-BoldItalic.e3f82f9d.woff +0 -0
- package/dist/static/KaTeX_Main-Italic.47373d1e.ttf +0 -0
- package/dist/static/KaTeX_Main-Italic.8916142b.woff2 +0 -0
- package/dist/static/KaTeX_Main-Italic.9024d815.woff +0 -0
- package/dist/static/KaTeX_Main-Regular.0462f03b.woff2 +0 -0
- package/dist/static/KaTeX_Main-Regular.7f51fe03.woff +0 -0
- package/dist/static/KaTeX_Main-Regular.b7f8fe9b.ttf +0 -0
- package/dist/static/KaTeX_Math-BoldItalic.572d331f.woff2 +0 -0
- package/dist/static/KaTeX_Math-BoldItalic.a879cf83.ttf +0 -0
- package/dist/static/KaTeX_Math-BoldItalic.f1035d8d.woff +0 -0
- package/dist/static/KaTeX_Math-Italic.5295ba48.woff +0 -0
- package/dist/static/KaTeX_Math-Italic.939bc644.ttf +0 -0
- package/dist/static/KaTeX_Math-Italic.f28c23ac.woff2 +0 -0
- package/dist/static/KaTeX_SansSerif-Bold.8c5b5494.woff2 +0 -0
- package/dist/static/KaTeX_SansSerif-Bold.94e1e8dc.ttf +0 -0
- package/dist/static/KaTeX_SansSerif-Bold.bf59d231.woff +0 -0
- package/dist/static/KaTeX_SansSerif-Italic.3b1e59b3.woff2 +0 -0
- package/dist/static/KaTeX_SansSerif-Italic.7c9bc82b.woff +0 -0
- package/dist/static/KaTeX_SansSerif-Italic.b4c20c84.ttf +0 -0
- package/dist/static/KaTeX_SansSerif-Regular.74048478.woff +0 -0
- package/dist/static/KaTeX_SansSerif-Regular.ba21ed5f.woff2 +0 -0
- package/dist/static/KaTeX_SansSerif-Regular.d4d7ba48.ttf +0 -0
- package/dist/static/KaTeX_Script-Regular.03e9641d.woff2 +0 -0
- package/dist/static/KaTeX_Script-Regular.07505710.woff +0 -0
- package/dist/static/KaTeX_Script-Regular.fe9cbbe1.ttf +0 -0
- package/dist/static/KaTeX_Size1-Regular.e1e279cb.woff +0 -0
- package/dist/static/KaTeX_Size1-Regular.eae34984.woff2 +0 -0
- package/dist/static/KaTeX_Size1-Regular.fabc004a.ttf +0 -0
- package/dist/static/KaTeX_Size2-Regular.57727022.woff +0 -0
- package/dist/static/KaTeX_Size2-Regular.5916a24f.woff2 +0 -0
- package/dist/static/KaTeX_Size2-Regular.d6b476ec.ttf +0 -0
- package/dist/static/KaTeX_Size3-Regular.9acaf01c.woff +0 -0
- package/dist/static/KaTeX_Size3-Regular.a144ef58.ttf +0 -0
- package/dist/static/KaTeX_Size3-Regular.b4230e7e.woff2 +0 -0
- package/dist/static/KaTeX_Size4-Regular.10d95fd3.woff2 +0 -0
- package/dist/static/KaTeX_Size4-Regular.7a996c9d.woff +0 -0
- package/dist/static/KaTeX_Size4-Regular.fbccdabe.ttf +0 -0
- package/dist/static/KaTeX_Typewriter-Regular.6258592b.woff +0 -0
- package/dist/static/KaTeX_Typewriter-Regular.a8709e36.woff2 +0 -0
- package/dist/static/KaTeX_Typewriter-Regular.d97aaf4a.ttf +0 -0
- package/dist/tool-chat-type/index.html +44 -0
- package/dist/umi.js +1534 -0
- package/dist/~demos/:id/index.html +44 -0
- package/dist/~demos/demos-markdown-latex-mermaid-demo-markdown-latex-mermaid/index.html +44 -0
- package/dist/~demos/demos-tool-chat-type-demo-agentschemaformdemo/index.html +44 -0
- package/dist/~demos/demos-tool-chat-type-demo-assistant-drawer/index.html +44 -0
- package/dist/~demos/demos-tool-chat-type-demo-chat-input-demo/index.html +44 -0
- package/dist/~demos/demos-tool-chat-type-demo-chat-list-demo/index.html +44 -0
- package/dist/~demos/demos-tool-chat-type-demo-chat-scenario-demo/index.html +44 -0
- package/dist/~demos/demos-tool-chat-type-demo-schema-input/index.html +44 -0
- package/dist/~demos/demos-tool-chat-type-demo-toolchattype/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-2-demo-0/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-2-demo-1/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-2-demo-2/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-2-demo-3/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-2-demo-4/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-advanced-demo-0/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-advanced-demo-1/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-advanced-demo-2/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-advanced-demo-3/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-demo-0/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-demo-1/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-demo-2/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-demo-3/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-0/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-1/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-2/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-3/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-examples-demo-4/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-0/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-1/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-2/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-3/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-4/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-5/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-6/index.html +44 -0
- package/dist/~demos/docs-components-llm-trace-v-3-visual-demos-demo-7/index.html +44 -0
- package/es/AssistantChat/AssistantChatApp/CardMatchRender/index.d.ts +8 -0
- package/es/AssistantChat/AssistantChatApp/CardMatchRender/index.js +124 -0
- package/es/AssistantChat/AssistantChatApp/OperationMatchRender/index.d.ts +9 -0
- package/es/AssistantChat/AssistantChatApp/OperationMatchRender/index.js +64 -0
- package/es/AssistantChat/AssistantChatApp/const.d.ts +51 -0
- package/es/AssistantChat/AssistantChatApp/const.js +105 -0
- package/es/AssistantChat/AssistantChatApp/index.d.ts +4 -0
- package/es/AssistantChat/AssistantChatApp/index.js +281 -0
- package/es/AssistantChat/AssistantChatApp/index.scss +327 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/TemplateCard.d.ts +3 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/TemplateCard.js +125 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/common/types.d.ts +3 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/common/types.js +1 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateHeader.d.ts +5 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateHeader.js +24 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateHtml.d.ts +7 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateHtml.js +58 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateParagraph.d.ts +3 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateParagraph.js +8 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateTitle.d.ts +3 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TemplateTitle.js +9 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TraceComponent.d.ts +3 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/component/TraceComponent.js +47 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/context/index.d.ts +29 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/context/index.js +95 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/index.d.ts +4 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/index.js +100 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/index.scss +18 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/utils.d.ts +2 -0
- package/es/AssistantChat/AssistantChatCard/AgentCardRender/utils.js +36 -0
- package/es/AssistantChat/AssistantChatCard/AgentCommonCard/index.d.ts +4 -0
- package/es/AssistantChat/AssistantChatCard/AgentCommonCard/index.js +95 -0
- package/es/AssistantChat/AssistantChatCard/AgentCommonCard/index.scss +20 -0
- package/es/AssistantChat/AssistantChatCard/AgentExecutionCard/index.d.ts +16 -0
- package/es/AssistantChat/AssistantChatCard/AgentExecutionCard/index.js +17 -0
- package/es/AssistantChat/AssistantChatCard/AgentExecutionCard/index.scss +99 -0
- package/es/AssistantChat/AssistantChatCard/LlmGenerateCard/index.d.ts +14 -0
- package/es/AssistantChat/AssistantChatCard/LlmGenerateCard/index.js +273 -0
- package/es/AssistantChat/AssistantChatCard/LlmGenerateCard/index.scss +101 -0
- package/es/AssistantChat/AssistantChatCard/LlmGenerateCardV5/index.d.ts +78 -0
- package/es/AssistantChat/AssistantChatCard/LlmGenerateCardV5/index.js +123 -0
- package/es/AssistantChat/AssistantChatCard/LlmGenerateCardV5/index.scss +12 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/AigcTipsRender/index.d.ts +7 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/AigcTipsRender/index.js +29 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/Copy/index.d.ts +7 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/Copy/index.js +64 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/CopyRequestId/index.d.ts +3 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/CopyRequestId/index.js +19 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/FeedBack/index.d.ts +11 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/FeedBack/index.js +91 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/ShareButton/index.d.ts +3 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/ShareButton/index.js +26 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/index.d.ts +4 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/index.js +43 -0
- package/es/AssistantChat/AssistantChatCard/OperationCard/index.scss +14 -0
- package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/AttachmentsRender.d.ts +21 -0
- package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/AttachmentsRender.js +141 -0
- package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/ImageRender.d.ts +7 -0
- package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/ImageRender.js +74 -0
- package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/index.d.ts +8 -0
- package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/index.js +54 -0
- package/es/AssistantChat/AssistantChatCard/UserQueryCardRender/index.scss +98 -0
- package/es/AssistantChat/AssistantChatCard/index.d.ts +5 -0
- package/es/AssistantChat/AssistantChatCard/index.js +10 -0
- package/es/AssistantChat/AssistantChatInput/index.d.ts +5 -0
- package/es/AssistantChat/AssistantChatInput/index.js +172 -0
- package/es/AssistantChat/AssistantChatInput/index.scss +85 -0
- package/es/AssistantChat/AssistantToolApp/const.d.ts +12 -0
- package/es/AssistantChat/AssistantToolApp/const.js +22 -0
- package/es/AssistantChat/AssistantToolApp/index.d.ts +4 -0
- package/es/AssistantChat/AssistantToolApp/index.js +159 -0
- package/es/AssistantChat/AssistantToolApp/index.scss +76 -0
- package/es/AssistantChat/AssistantToolExecutionApp/const.d.ts +7 -0
- package/es/AssistantChat/AssistantToolExecutionApp/const.js +23 -0
- package/es/AssistantChat/AssistantToolExecutionApp/index.d.ts +4 -0
- package/es/AssistantChat/AssistantToolExecutionApp/index.js +66 -0
- package/es/AssistantChat/AssistantToolExecutionApp/index.scss +39 -0
- package/es/AssistantChat/AssistentError/index.d.ts +5 -0
- package/es/AssistantChat/AssistentError/index.js +138 -0
- package/es/AssistantChat/index.d.ts +6 -0
- package/es/AssistantChat/index.js +166 -0
- package/es/AssistantChat/index.scss +30 -0
- package/es/AssistantChat/logCallback/aTagLog.d.ts +1 -0
- package/es/AssistantChat/logCallback/aTagLog.js +23 -0
- package/es/AssistantChat/logCallback/copyLog.d.ts +3 -0
- package/es/AssistantChat/logCallback/copyLog.js +63 -0
- package/es/ErrorBoundary/ErrorBoundaryFallback/index.d.ts +5 -0
- package/es/ErrorBoundary/ErrorBoundaryFallback/index.js +134 -0
- package/es/ErrorBoundary/index.d.ts +22 -0
- package/es/ErrorBoundary/index.js +69 -0
- package/es/common/registerAssistChatForm.d.ts +2 -0
- package/es/common/registerAssistChatForm.js +14 -0
- package/es/components/AgentCardSubmit/index.d.ts +20 -0
- package/es/components/AgentCardSubmit/index.js +90 -0
- package/es/components/AgentResult/index.d.ts +8 -0
- package/es/components/AgentResult/index.js +77 -0
- package/es/components/AgentResult/index.scss +11 -0
- package/es/components/AgentSchemaForm/ScreenshotView.d.ts +12 -0
- package/es/components/AgentSchemaForm/ScreenshotView.js +194 -0
- package/es/components/AgentSchemaForm/ScreenshotView.scss +86 -0
- package/es/components/AgentSchemaForm/_interface.d.ts +37 -0
- package/es/components/AgentSchemaForm/_interface.js +13 -0
- package/es/components/AgentSchemaForm/index.d.ts +9 -0
- package/es/components/AgentSchemaForm/index.js +190 -0
- package/es/components/AgentSchemaForm/index.scss +37 -0
- package/es/components/AgentText/index.d.ts +4 -0
- package/es/components/AgentText/index.js +8 -0
- package/es/components/AgentText/index.scss +5 -0
- package/es/components/AigcTips/index.d.ts +9 -0
- package/es/components/AigcTips/index.js +17 -0
- package/es/components/AigcTips/index.scss +6 -0
- package/es/components/ArrayInput/index.d.ts +3 -0
- package/es/components/ArrayInput/index.js +36 -0
- package/es/components/AssistantDrawer/index.d.ts +22 -0
- package/es/components/AssistantDrawer/index.js +112 -0
- package/es/components/AssistantDrawer/index.scss +96 -0
- package/es/components/EmptyIcon/index.d.ts +3 -0
- package/es/components/EmptyIcon/index.js +124 -0
- package/es/components/HeaderSvgIcon/index.d.ts +3 -0
- package/es/components/HeaderSvgIcon/index.js +1 -0
- package/es/components/InspectionCard/index.d.ts +66 -0
- package/es/components/InspectionCard/index.js +246 -0
- package/es/components/InspectionCard/index.module.less +193 -0
- package/es/components/InspectionCard/result.d.ts +13 -0
- package/es/components/InspectionCard/result.js +26 -0
- package/es/components/InspectionCard/result.module.less +36 -0
- package/es/components/LlmMarkDown/MdAmarkGuess/index.d.ts +16 -0
- package/es/components/LlmMarkDown/MdAmarkGuess/index.js +41 -0
- package/es/components/LlmMarkDown/MdAmarkReference/index.d.ts +21 -0
- package/es/components/LlmMarkDown/MdAmarkReference/index.js +300 -0
- package/es/components/LlmMarkDown/MdAmarkReference/index.scss +122 -0
- package/es/components/LlmMarkDown/index.d.ts +30 -0
- package/es/components/LlmMarkDown/index.js +202 -0
- package/es/components/LlmMarkDown/index.scss +23 -0
- package/es/components/LlmModelChange/index.d.ts +57 -0
- package/es/components/LlmModelChange/index.js +138 -0
- package/es/components/LlmModelChange/index.scss +60 -0
- package/es/components/LlmReference/index.d.ts +25 -0
- package/es/components/LlmReference/index.js +147 -0
- package/es/components/LlmReference/index.scss +92 -0
- package/es/components/LlmTitle/index.d.ts +14 -0
- package/es/components/LlmTitle/index.js +26 -0
- package/es/components/LlmTitle/index.scss +20 -0
- package/es/components/LlmTrace/index.d.ts +17 -0
- package/es/components/LlmTrace/index.js +119 -0
- package/es/components/LlmTrace/index.scss +79 -0
- package/es/components/LlmTraceComponents/Disassemble/index.d.ts +24 -0
- package/es/components/LlmTraceComponents/Disassemble/index.js +89 -0
- package/es/components/LlmTraceComponents/Disassemble/index.scss +19 -0
- package/es/components/LlmTraceComponents/ReadResource/index.d.ts +24 -0
- package/es/components/LlmTraceComponents/ReadResource/index.js +19 -0
- package/es/components/LlmTraceComponents/ReadResource/index.scss +5 -0
- package/es/components/LlmTraceComponents/Rewrite/index.d.ts +23 -0
- package/es/components/LlmTraceComponents/Rewrite/index.js +49 -0
- package/es/components/LlmTraceComponents/Rewrite/index.scss +13 -0
- package/es/components/LlmTraceComponents/TraceMarkDown/index.d.ts +22 -0
- package/es/components/LlmTraceComponents/TraceMarkDown/index.js +44 -0
- package/es/components/LlmTraceComponents/TraceMarkDown/index.scss +18 -0
- package/es/components/LlmTraceComponents/const.d.ts +25 -0
- package/es/components/LlmTraceComponents/const.js +23 -0
- package/es/components/LlmTraceV2/index.d.ts +56 -0
- package/es/components/LlmTraceV2/index.js +384 -0
- package/es/components/LlmTraceV2/index.scss +115 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/BusinessFlow/index.d.ts +13 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/BusinessFlow/index.js +38 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/BusinessFlow/index.scss +56 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/CodeBlock/index.d.ts +18 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/CodeBlock/index.js +82 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/CodeBlock/index.scss +36 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/DeepThinking/index.d.ts +13 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/DeepThinking/index.js +26 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/DeepThinking/index.scss +54 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/InfoMissing/index.d.ts +13 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/InfoMissing/index.js +25 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/InfoMissing/index.scss +38 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/LinkList/index.d.ts +20 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/LinkList/index.js +49 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/LinkList/index.scss +37 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/SearchResults/index.d.ts +13 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/SearchResults/index.js +93 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/SearchResults/index.scss +151 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/TaskPlanning/index.d.ts +12 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/TaskPlanning/index.js +28 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/ToolCall/index.d.ts +13 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/ToolCall/index.js +46 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/ToolCall/index.scss +70 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/ToolResult/index.d.ts +13 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/ToolResult/index.js +72 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/ToolResult/index.scss +90 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/const.d.ts +32 -0
- package/es/components/LlmTraceV3/components/TraceContentComponents/const.js +27 -0
- package/es/components/LlmTraceV3/components/TraceGroup/index.d.ts +8 -0
- package/es/components/LlmTraceV3/components/TraceGroup/index.js +81 -0
- package/es/components/LlmTraceV3/components/TraceHeader/index.d.ts +8 -0
- package/es/components/LlmTraceV3/components/TraceHeader/index.js +64 -0
- package/es/components/LlmTraceV3/components/TraceItem/index.d.ts +8 -0
- package/es/components/LlmTraceV3/components/TraceItem/index.js +126 -0
- package/es/components/LlmTraceV3/components/TraceSlide/index.d.ts +30 -0
- package/es/components/LlmTraceV3/components/TraceSlide/index.js +278 -0
- package/es/components/LlmTraceV3/components/TraceSlide/index.scss +204 -0
- package/es/components/LlmTraceV3/components/TraceStatusIcon/index.d.ts +8 -0
- package/es/components/LlmTraceV3/components/TraceStatusIcon/index.js +41 -0
- package/es/components/LlmTraceV3/hooks/useGroupCollapse.d.ts +18 -0
- package/es/components/LlmTraceV3/hooks/useGroupCollapse.js +91 -0
- package/es/components/LlmTraceV3/hooks/useItemCollapse.d.ts +18 -0
- package/es/components/LlmTraceV3/hooks/useItemCollapse.js +61 -0
- package/es/components/LlmTraceV3/hooks/useTraceAnimation.d.ts +15 -0
- package/es/components/LlmTraceV3/hooks/useTraceAnimation.js +54 -0
- package/es/components/LlmTraceV3/hooks/useTraceCollapse.d.ts +17 -0
- package/es/components/LlmTraceV3/hooks/useTraceCollapse.js +80 -0
- package/es/components/LlmTraceV3/index.d.ts +11 -0
- package/es/components/LlmTraceV3/index.js +173 -0
- package/es/components/LlmTraceV3/index.scss +333 -0
- package/es/components/LlmTraceV3/types.d.ts +263 -0
- package/es/components/LlmTraceV3/types.js +108 -0
- package/es/components/LlmTraceV3/utils/collapseLogic.d.ts +26 -0
- package/es/components/LlmTraceV3/utils/collapseLogic.js +86 -0
- package/es/components/LlmTraceV3/utils/traceHelpers.d.ts +42 -0
- package/es/components/LlmTraceV3/utils/traceHelpers.js +94 -0
- package/es/components/MarkDown/index.d.ts +11 -0
- package/es/components/MarkDown/index.js +222 -0
- package/es/components/MarkDown/index.scss +179 -0
- package/es/components/ModelSelect/ModeDropdown.d.ts +8 -0
- package/es/components/ModelSelect/ModeDropdown.js +118 -0
- package/es/components/ModelSelect/const.d.ts +30 -0
- package/es/components/ModelSelect/const.js +61 -0
- package/es/components/ModelSelect/index.d.ts +4 -0
- package/es/components/ModelSelect/index.js +45 -0
- package/es/components/ModelSelect/index.scss +121 -0
- package/es/components/PaulButtonGroup/Select.d.ts +3 -0
- package/es/components/PaulButtonGroup/Select.js +109 -0
- package/es/components/PaulButtonGroup/index.d.ts +16 -0
- package/es/components/PaulButtonGroup/index.js +209 -0
- package/es/components/PaulButtonGroup/index.scss +19 -0
- package/es/components/PopAuth/index.d.ts +4 -0
- package/es/components/PopAuth/index.js +62 -0
- package/es/components/PopAuth/index.scss +16 -0
- package/es/components/ReferenceInfoItem/index.d.ts +49 -0
- package/es/components/ReferenceInfoItem/index.js +43 -0
- package/es/components/ReferenceInfoItem/index.scss +46 -0
- package/es/components/ReferenceTag/index.d.ts +11 -0
- package/es/components/ReferenceTag/index.js +27 -0
- package/es/components/ReferenceTag/index.scss +19 -0
- package/es/components/SchemaInput/SchemaInputCore/index.d.ts +4 -0
- package/es/components/SchemaInput/SchemaInputCore/index.js +113 -0
- package/es/components/SchemaInput/SchemaInputCore/index.scss +35 -0
- package/es/components/SchemaInput/SchemaInputCore/utils.d.ts +1 -0
- package/es/components/SchemaInput/SchemaInputCore/utils.js +77 -0
- package/es/components/SchemaInput/SimpleJSONEditor/index.d.ts +4 -0
- package/es/components/SchemaInput/SimpleJSONEditor/index.js +35 -0
- package/es/components/SchemaInput/SimpleJSONEditor/index.scss +7 -0
- package/es/components/SchemaInput/index.d.ts +8 -0
- package/es/components/SchemaInput/index.js +30 -0
- package/es/components/SelectBlurry/index.d.ts +3 -0
- package/es/components/SelectBlurry/index.js +74 -0
- package/es/components/SendMessageSvgIcon/index.d.ts +3 -0
- package/es/components/SendMessageSvgIcon/index.js +70 -0
- package/es/components/ShareContent/index.d.ts +21 -0
- package/es/components/ShareContent/index.js +176 -0
- package/es/components/ShareContent/index.scss +36 -0
- package/es/components/ShareModal/index.d.ts +15 -0
- package/es/components/ShareModal/index.js +185 -0
- package/es/components/ShareModal/index.scss +199 -0
- package/es/components/ShareOperationBar/index.d.ts +4 -0
- package/es/components/ShareOperationBar/index.js +152 -0
- package/es/components/ShareOperationBar/index.scss +47 -0
- package/es/components/TextContent/index.d.ts +14 -0
- package/es/components/TextContent/index.js +37 -0
- package/es/components/TextContent/index.scss +31 -0
- package/es/components/TraceMarkdownWithCard/index.d.ts +6 -0
- package/es/components/TraceMarkdownWithCard/index.js +21 -0
- package/es/components/TraceMarkdownWithCard/index.module.less +29 -0
- package/es/components/TraceWithAgent/index.d.ts +23 -0
- package/es/components/TraceWithAgent/index.js +93 -0
- package/es/components/TraceWithAgent/index.less +74 -0
- package/es/constants/assistChatEvent.d.ts +33 -0
- package/es/constants/assistChatEvent.js +33 -0
- package/es/constants/common.d.ts +71 -0
- package/es/constants/common.js +90 -0
- package/es/constants/logTrace.d.ts +3 -0
- package/es/constants/logTrace.js +4 -0
- package/es/constants/reference.d.ts +109 -0
- package/es/constants/reference.js +111 -0
- package/es/constants/traceDataStatus.d.ts +34 -0
- package/es/constants/traceDataStatus.js +37 -0
- package/es/context/index.d.ts +13 -0
- package/es/context/index.js +785 -0
- package/es/context/utils/messages.d.ts +33 -0
- package/es/context/utils/messages.js +194 -0
- package/es/context/utils/send.d.ts +29 -0
- package/es/context/utils/send.js +187 -0
- package/es/context/utils/tool.d.ts +19 -0
- package/es/context/utils/tool.js +89 -0
- package/es/index.d.ts +37 -0
- package/es/index.js +63 -0
- package/es/index.scss +39 -0
- package/es/interface/IAgent.d.ts +12 -0
- package/es/interface/IAgent.js +1 -0
- package/es/interface/IChatBottom.d.ts +69 -0
- package/es/interface/IChatBottom.js +1 -0
- package/es/interface/IChatCard.d.ts +40 -0
- package/es/interface/IChatCard.js +1 -0
- package/es/interface/IChatContext.d.ts +59 -0
- package/es/interface/IChatContext.js +1 -0
- package/es/interface/IChatRef.d.ts +75 -0
- package/es/interface/IChatRef.js +1 -0
- package/es/interface/IGuessQuestion.d.ts +43 -0
- package/es/interface/IGuessQuestion.js +15 -0
- package/es/interface/IMessage.d.ts +17 -0
- package/es/interface/IMessage.js +1 -0
- package/es/interface/ISend.d.ts +19 -0
- package/es/interface/ISend.js +1 -0
- package/es/interface/index.d.ts +272 -0
- package/es/interface/index.js +7 -0
- package/es/utils/CSEIconTool.d.ts +8 -0
- package/es/utils/CSEIconTool.js +6 -0
- package/es/utils/apushAssistant.d.ts +73 -0
- package/es/utils/apushAssistant.js +518 -0
- package/es/utils/clientPlugin.d.ts +3 -0
- package/es/utils/clientPlugin.js +73 -0
- package/es/utils/common.d.ts +10 -0
- package/es/utils/common.js +40 -0
- package/es/utils/copyToClipboard.d.ts +2 -0
- package/es/utils/copyToClipboard.js +70 -0
- package/es/utils/formDataFormat.d.ts +3 -0
- package/es/utils/formDataFormat.js +55 -0
- package/es/utils/formatData.d.ts +14 -0
- package/es/utils/formatData.js +104 -0
- package/es/utils/log.d.ts +18 -0
- package/es/utils/log.js +37 -0
- package/es/utils/parseUrl.d.ts +9 -0
- package/es/utils/parseUrl.js +48 -0
- package/es/utils/screenshot.d.ts +45 -0
- package/es/utils/screenshot.js +650 -0
- package/es/utils/send.d.ts +10 -0
- package/es/utils/send.js +8 -0
- package/es/utils/uploadImage.d.ts +9 -0
- package/es/utils/uploadImage.js +226 -0
- package/es/utils/websocketLogger.d.ts +176 -0
- package/es/utils/websocketLogger.js +267 -0
- package/package.json +166 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 折叠逻辑工具函数
|
|
3
|
+
*/
|
|
4
|
+
import type { ITraceSecondItem, ITraceThirdItem } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* 计算单个 Item 的默认折叠状态
|
|
7
|
+
* @param item Item 数据
|
|
8
|
+
* @param _traceFinished 整体 trace 是否已完成(保留参数用于兼容性,当前未使用)
|
|
9
|
+
* @param hasInspectionCard 是否包含 InspectionCard
|
|
10
|
+
* @returns 是否折叠
|
|
11
|
+
*/
|
|
12
|
+
export declare const calculateItemCollapseState: (item: ITraceThirdItem, _traceFinished: boolean, hasInspectionCard: boolean) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* 初始化所有 Item 的折叠状态
|
|
15
|
+
* @param traceData trace 数据
|
|
16
|
+
* @param traceFinished 整体 trace 是否已完成
|
|
17
|
+
* @param hasInspectionCard 是否包含 InspectionCard
|
|
18
|
+
* @returns Item 折叠状态 Map
|
|
19
|
+
*/
|
|
20
|
+
export declare const initializeItemCollapseMap: (traceData: ITraceSecondItem[], traceFinished: boolean, hasInspectionCard: boolean) => Record<string, boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* 判断是否应该展示折叠图标
|
|
23
|
+
* @param result Item 的 result
|
|
24
|
+
* @returns 是否展示
|
|
25
|
+
*/
|
|
26
|
+
export declare const shouldShowCollapseIcon: (result?: any) => boolean;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
|
+
/**
|
|
3
|
+
* 折叠逻辑工具函数
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { TRACE_STATUS_ENUM } from "../../../constants/traceDataStatus";
|
|
7
|
+
import { checkHasInspectionCard } from "./traceHelpers";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 计算单个 Item 的默认折叠状态
|
|
11
|
+
* @param item Item 数据
|
|
12
|
+
* @param _traceFinished 整体 trace 是否已完成(保留参数用于兼容性,当前未使用)
|
|
13
|
+
* @param hasInspectionCard 是否包含 InspectionCard
|
|
14
|
+
* @returns 是否折叠
|
|
15
|
+
*/
|
|
16
|
+
export var calculateItemCollapseState = function calculateItemCollapseState(item, _traceFinished, hasInspectionCard) {
|
|
17
|
+
// 包含 InspectionCard,默认展开
|
|
18
|
+
if (hasInspectionCard) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
var itemStatus = item === null || item === void 0 ? void 0 : item.status;
|
|
22
|
+
|
|
23
|
+
// 如果 item 没有 status,默认折叠
|
|
24
|
+
if (!itemStatus) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 如果 item 状态为 FAILED 或 STOP,默认展开
|
|
29
|
+
if (itemStatus === TRACE_STATUS_ENUM.FAILED || itemStatus === TRACE_STATUS_ENUM.STOP) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// 如果 item 状态为 RUNNING,默认展开
|
|
34
|
+
if (itemStatus === TRACE_STATUS_ENUM.RUNNING) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// SUCCESS 状态,默认折叠
|
|
39
|
+
return true;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 初始化所有 Item 的折叠状态
|
|
44
|
+
* @param traceData trace 数据
|
|
45
|
+
* @param traceFinished 整体 trace 是否已完成
|
|
46
|
+
* @param hasInspectionCard 是否包含 InspectionCard
|
|
47
|
+
* @returns Item 折叠状态 Map
|
|
48
|
+
*/
|
|
49
|
+
export var initializeItemCollapseMap = function initializeItemCollapseMap(traceData, traceFinished, hasInspectionCard) {
|
|
50
|
+
var map = {};
|
|
51
|
+
traceData === null || traceData === void 0 || traceData.forEach(function (group, groupIndex) {
|
|
52
|
+
var result = group === null || group === void 0 ? void 0 : group.result;
|
|
53
|
+
if (Array.isArray(result)) {
|
|
54
|
+
result.forEach(function (item, itemIndex) {
|
|
55
|
+
var key = "group-".concat(groupIndex, "-item-").concat(itemIndex);
|
|
56
|
+
var hasItemInspectionCard = checkHasInspectionCard(item);
|
|
57
|
+
map[key] = calculateItemCollapseState(item, traceFinished, hasInspectionCard || hasItemInspectionCard);
|
|
58
|
+
});
|
|
59
|
+
} else if (result) {
|
|
60
|
+
// 修复:即使 result 不是数组,也使用 item-0 的 key 格式
|
|
61
|
+
// 这样才能与 TraceGroup 中 normalizeResultToArray 后的 key 保持一致
|
|
62
|
+
var key = "group-".concat(groupIndex, "-item-0");
|
|
63
|
+
var hasItemInspectionCard = checkHasInspectionCard(result);
|
|
64
|
+
map[key] = calculateItemCollapseState(result, traceFinished, hasInspectionCard || hasItemInspectionCard);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
return map;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 判断是否应该展示折叠图标
|
|
72
|
+
* @param result Item 的 result
|
|
73
|
+
* @returns 是否展示
|
|
74
|
+
*/
|
|
75
|
+
export var shouldShowCollapseIcon = function shouldShowCollapseIcon(result) {
|
|
76
|
+
if (!result) return false;
|
|
77
|
+
|
|
78
|
+
// 如果有内容就显示折叠图标
|
|
79
|
+
if (typeof result === 'string' && result.trim()) {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
if (_typeof(result) === 'object') {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
return false;
|
|
86
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trace 辅助函数
|
|
3
|
+
*/
|
|
4
|
+
import type { ITraceSecondItem, ITraceThirdItem } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* 检查节点树中是否包含 InspectionCard 类型
|
|
7
|
+
* @param node 节点数据
|
|
8
|
+
* @returns 是否包含 InspectionCard
|
|
9
|
+
*/
|
|
10
|
+
export declare const checkHasInspectionCard: (node: any) => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* 检查 trace 数据中是否包含特殊节点
|
|
13
|
+
* @param traceData trace 数据
|
|
14
|
+
* @returns 是否包含特殊节点
|
|
15
|
+
*/
|
|
16
|
+
export declare const hasSpecialNode: (traceData: ITraceSecondItem[]) => boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 生成唯一的 item key
|
|
19
|
+
* @param groupIndex 分组索引
|
|
20
|
+
* @param itemIndex item 索引
|
|
21
|
+
* @returns 唯一 key
|
|
22
|
+
*/
|
|
23
|
+
export declare const generateItemKey: (groupIndex: number, itemIndex?: number) => string;
|
|
24
|
+
/**
|
|
25
|
+
* 浅比较两个对象是否相等
|
|
26
|
+
* @param obj1 对象1
|
|
27
|
+
* @param obj2 对象2
|
|
28
|
+
* @returns 是否相等
|
|
29
|
+
*/
|
|
30
|
+
export declare const isShallowEqual: (obj1: Record<string, any>, obj2: Record<string, any>) => boolean;
|
|
31
|
+
/**
|
|
32
|
+
* 格式化耗时
|
|
33
|
+
* @param cost 耗时(ms)
|
|
34
|
+
* @returns 格式化后的字符串
|
|
35
|
+
*/
|
|
36
|
+
export declare const formatCost: (cost?: string | number) => string;
|
|
37
|
+
/**
|
|
38
|
+
* 将 result 标准化为数组
|
|
39
|
+
* @param result 可能是数组或单个对象
|
|
40
|
+
* @returns 数组
|
|
41
|
+
*/
|
|
42
|
+
export declare const normalizeResultToArray: (result?: ITraceThirdItem[] | ITraceThirdItem) => ITraceThirdItem[];
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
|
+
/**
|
|
3
|
+
* Trace 辅助函数
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 检查节点树中是否包含 InspectionCard 类型
|
|
8
|
+
* @param node 节点数据
|
|
9
|
+
* @returns 是否包含 InspectionCard
|
|
10
|
+
*/
|
|
11
|
+
export var checkHasInspectionCard = function checkHasInspectionCard(node) {
|
|
12
|
+
// 检查当前节点
|
|
13
|
+
if ((node === null || node === void 0 ? void 0 : node.type) === 'InspectionCard') {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// 递归检查 result 数组
|
|
18
|
+
if (Array.isArray(node === null || node === void 0 ? void 0 : node.result)) {
|
|
19
|
+
return node.result.some(function (item) {
|
|
20
|
+
return checkHasInspectionCard(item);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 递归检查 result 对象
|
|
25
|
+
if (node !== null && node !== void 0 && node.result && _typeof(node.result) === 'object') {
|
|
26
|
+
return checkHasInspectionCard(node.result);
|
|
27
|
+
}
|
|
28
|
+
return false;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 检查 trace 数据中是否包含特殊节点
|
|
33
|
+
* @param traceData trace 数据
|
|
34
|
+
* @returns 是否包含特殊节点
|
|
35
|
+
*/
|
|
36
|
+
export var hasSpecialNode = function hasSpecialNode(traceData) {
|
|
37
|
+
return (traceData === null || traceData === void 0 ? void 0 : traceData.some(function (item) {
|
|
38
|
+
return checkHasInspectionCard(item);
|
|
39
|
+
})) || false;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 生成唯一的 item key
|
|
44
|
+
* @param groupIndex 分组索引
|
|
45
|
+
* @param itemIndex item 索引
|
|
46
|
+
* @returns 唯一 key
|
|
47
|
+
*/
|
|
48
|
+
export var generateItemKey = function generateItemKey(groupIndex, itemIndex) {
|
|
49
|
+
if (itemIndex !== undefined) {
|
|
50
|
+
return "group-".concat(groupIndex, "-item-").concat(itemIndex);
|
|
51
|
+
}
|
|
52
|
+
return "group-".concat(groupIndex);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 浅比较两个对象是否相等
|
|
57
|
+
* @param obj1 对象1
|
|
58
|
+
* @param obj2 对象2
|
|
59
|
+
* @returns 是否相等
|
|
60
|
+
*/
|
|
61
|
+
export var isShallowEqual = function isShallowEqual(obj1, obj2) {
|
|
62
|
+
var keys1 = Object.keys(obj1);
|
|
63
|
+
var keys2 = Object.keys(obj2);
|
|
64
|
+
if (keys1.length !== keys2.length) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
return keys1.every(function (key) {
|
|
68
|
+
return obj1[key] === obj2[key];
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 格式化耗时
|
|
74
|
+
* @param cost 耗时(ms)
|
|
75
|
+
* @returns 格式化后的字符串
|
|
76
|
+
*/
|
|
77
|
+
export var formatCost = function formatCost(cost) {
|
|
78
|
+
if (!cost) return '';
|
|
79
|
+
var costNum = typeof cost === 'string' ? parseFloat(cost) : cost;
|
|
80
|
+
if (costNum < 1000) {
|
|
81
|
+
return "".concat(costNum, "ms");
|
|
82
|
+
}
|
|
83
|
+
return "".concat((costNum / 1000).toFixed(2), "s");
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* 将 result 标准化为数组
|
|
88
|
+
* @param result 可能是数组或单个对象
|
|
89
|
+
* @returns 数组
|
|
90
|
+
*/
|
|
91
|
+
export var normalizeResultToArray = function normalizeResultToArray(result) {
|
|
92
|
+
if (!result) return [];
|
|
93
|
+
return Array.isArray(result) ? result : [result];
|
|
94
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MarkDownProps } from '@alife/magic-chat-ui';
|
|
3
|
+
import 'katex/dist/katex.min.css';
|
|
4
|
+
import './index.scss';
|
|
5
|
+
export interface IProps extends MarkDownProps {
|
|
6
|
+
logKey?: string;
|
|
7
|
+
logParams?: Record<string, any>;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: ({ data, linkTarget, className, ...otherProps }: IProps) => React.JSX.Element;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
6
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
7
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
|
+
var _excluded = ["inline", "className", "children"],
|
|
9
|
+
_excluded2 = ["data", "linkTarget", "className"],
|
|
10
|
+
_excluded3 = ["remarkPlugins", "rehypePlugins", "components"];
|
|
11
|
+
import React, { useEffect, useRef } from 'react';
|
|
12
|
+
import { previewImg } from '@alife/goc-utils';
|
|
13
|
+
import { MarkDown } from '@alife/magic-chat-ui';
|
|
14
|
+
import katex from 'katex';
|
|
15
|
+
import mermaid from 'mermaid';
|
|
16
|
+
import rehypeHighlight from 'rehype-highlight';
|
|
17
|
+
import rehypeKatex from 'rehype-katex';
|
|
18
|
+
import rehypeRaw from 'rehype-raw';
|
|
19
|
+
import remarkGfm from 'remark-gfm';
|
|
20
|
+
import remarkMath from 'remark-math';
|
|
21
|
+
import 'katex/dist/katex.min.css';
|
|
22
|
+
import "./index.scss";
|
|
23
|
+
// LaTeX 渲染组件
|
|
24
|
+
var LatexBlock = function LatexBlock(_ref) {
|
|
25
|
+
var children = _ref.children;
|
|
26
|
+
var ref = useRef(null);
|
|
27
|
+
var _React$useState = React.useState(''),
|
|
28
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
29
|
+
html = _React$useState2[0],
|
|
30
|
+
setHtml = _React$useState2[1];
|
|
31
|
+
useEffect(function () {
|
|
32
|
+
try {
|
|
33
|
+
var trimmedContent = String(children).trim();
|
|
34
|
+
|
|
35
|
+
// 使用 KaTeX 渲染 LaTeX 公式(块级显示)
|
|
36
|
+
var renderedHtml = katex.renderToString(trimmedContent, {
|
|
37
|
+
displayMode: true,
|
|
38
|
+
// 块级显示
|
|
39
|
+
throwOnError: false,
|
|
40
|
+
// 遇到错误不抛出异常
|
|
41
|
+
output: 'html'
|
|
42
|
+
});
|
|
43
|
+
setHtml(renderedHtml);
|
|
44
|
+
} catch (error) {
|
|
45
|
+
console.error('[LatexBlock] 渲染失败:', error);
|
|
46
|
+
setHtml("<div class=\"latex-error\">LaTeX \u6E32\u67D3\u9519\u8BEF: ".concat(error, "</div>"));
|
|
47
|
+
}
|
|
48
|
+
}, [children]);
|
|
49
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
ref: ref,
|
|
51
|
+
className: "latex-wrapper",
|
|
52
|
+
dangerouslySetInnerHTML: {
|
|
53
|
+
__html: html
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// Mermaid 渲染组件
|
|
59
|
+
var MermaidBlock = function MermaidBlock(_ref2) {
|
|
60
|
+
var children = _ref2.children;
|
|
61
|
+
var ref = useRef(null);
|
|
62
|
+
var _React$useState3 = React.useState(''),
|
|
63
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
64
|
+
svg = _React$useState4[0],
|
|
65
|
+
setSvg = _React$useState4[1];
|
|
66
|
+
var renderTimerRef = useRef(null); // 防抖定时器
|
|
67
|
+
var lastSuccessContentRef = useRef(''); // 上次成功渲染的内容
|
|
68
|
+
|
|
69
|
+
useEffect(function () {
|
|
70
|
+
var trimmedContent = String(children).trim();
|
|
71
|
+
|
|
72
|
+
// 清除之前的定时器
|
|
73
|
+
if (renderTimerRef.current) {
|
|
74
|
+
clearTimeout(renderTimerRef.current);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// 防抖:延迟渲染,避免流式输出时的频繁渲染
|
|
78
|
+
// 如果内容还在快速变化中(流式输出),等待 300ms 后再渲染
|
|
79
|
+
renderTimerRef.current = setTimeout(function () {
|
|
80
|
+
var renderMermaid = /*#__PURE__*/function () {
|
|
81
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
82
|
+
var id, _yield$mermaid$render, renderedSvg, bindFunctions;
|
|
83
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
84
|
+
while (1) switch (_context.prev = _context.next) {
|
|
85
|
+
case 0:
|
|
86
|
+
_context.prev = 0;
|
|
87
|
+
mermaid.initialize({
|
|
88
|
+
startOnLoad: false,
|
|
89
|
+
theme: 'default',
|
|
90
|
+
securityLevel: 'loose',
|
|
91
|
+
suppressErrorRendering: true,
|
|
92
|
+
// 阻止 mermaid 在 DOM 中插入错误 SVG
|
|
93
|
+
fontFamily: 'inherit',
|
|
94
|
+
// 继承父元素字体
|
|
95
|
+
logLevel: 'error' // 只输出错误日志,减少控制台噪音
|
|
96
|
+
});
|
|
97
|
+
id = "mermaid-".concat(Date.now(), "-").concat(Math.random().toString().replace('.', ''));
|
|
98
|
+
_context.next = 5;
|
|
99
|
+
return mermaid.render(id, trimmedContent);
|
|
100
|
+
case 5:
|
|
101
|
+
_yield$mermaid$render = _context.sent;
|
|
102
|
+
renderedSvg = _yield$mermaid$render.svg;
|
|
103
|
+
bindFunctions = _yield$mermaid$render.bindFunctions;
|
|
104
|
+
// 渲染成功:更新 SVG 和成功内容记录
|
|
105
|
+
setSvg(renderedSvg);
|
|
106
|
+
lastSuccessContentRef.current = trimmedContent;
|
|
107
|
+
|
|
108
|
+
// 绑定交互功能(如点击事件、工具提示等)
|
|
109
|
+
if (bindFunctions && ref.current) {
|
|
110
|
+
try {
|
|
111
|
+
bindFunctions(ref.current);
|
|
112
|
+
} catch (bindError) {
|
|
113
|
+
console.warn('[MermaidBlock] 绑定交互功能失败:', bindError);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
_context.next = 16;
|
|
117
|
+
break;
|
|
118
|
+
case 13:
|
|
119
|
+
_context.prev = 13;
|
|
120
|
+
_context.t0 = _context["catch"](0);
|
|
121
|
+
// 渲染异常:保持之前成功的渲染结果
|
|
122
|
+
console.warn('[MermaidBlock] 渲染失败(可能是流式输出中),保持之前的渲染结果:', _context.t0);
|
|
123
|
+
// 不调用 setSvg(''),保持之前的渲染结果
|
|
124
|
+
case 16:
|
|
125
|
+
case "end":
|
|
126
|
+
return _context.stop();
|
|
127
|
+
}
|
|
128
|
+
}, _callee, null, [[0, 13]]);
|
|
129
|
+
}));
|
|
130
|
+
return function renderMermaid() {
|
|
131
|
+
return _ref3.apply(this, arguments);
|
|
132
|
+
};
|
|
133
|
+
}();
|
|
134
|
+
renderMermaid();
|
|
135
|
+
}, 100); // 100ms 防抖延迟
|
|
136
|
+
|
|
137
|
+
// 清理函数:清除防抖定时器
|
|
138
|
+
return function () {
|
|
139
|
+
if (renderTimerRef.current) {
|
|
140
|
+
clearTimeout(renderTimerRef.current);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}, [children]);
|
|
144
|
+
|
|
145
|
+
// 只在有有效 SVG 内容时才渲染
|
|
146
|
+
if (!svg) {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
150
|
+
ref: ref,
|
|
151
|
+
className: "mermaid-wrapper",
|
|
152
|
+
dangerouslySetInnerHTML: {
|
|
153
|
+
__html: svg
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
// 自定义代码块组件
|
|
159
|
+
var CodeBlock = function CodeBlock(_ref4) {
|
|
160
|
+
var inline = _ref4.inline,
|
|
161
|
+
className = _ref4.className,
|
|
162
|
+
children = _ref4.children,
|
|
163
|
+
props = _objectWithoutProperties(_ref4, _excluded);
|
|
164
|
+
var match = /language-(\w+)/.exec(className || '');
|
|
165
|
+
var language = match ? match[1] : '';
|
|
166
|
+
|
|
167
|
+
// 渲染 LaTeX 公式块
|
|
168
|
+
if (language === 'latex' && !inline) {
|
|
169
|
+
return /*#__PURE__*/React.createElement(LatexBlock, null, children);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// 渲染 Mermaid 图表
|
|
173
|
+
if (language === 'mermaid' && !inline) {
|
|
174
|
+
return /*#__PURE__*/React.createElement(MermaidBlock, null, children);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// 普通代码块,使用默认渲染
|
|
178
|
+
return /*#__PURE__*/React.createElement("code", _extends({
|
|
179
|
+
className: className
|
|
180
|
+
}, props), children);
|
|
181
|
+
};
|
|
182
|
+
export default (function (_ref5) {
|
|
183
|
+
var data = _ref5.data,
|
|
184
|
+
_ref5$linkTarget = _ref5.linkTarget,
|
|
185
|
+
linkTarget = _ref5$linkTarget === void 0 ? '_blank' : _ref5$linkTarget,
|
|
186
|
+
_ref5$className = _ref5.className,
|
|
187
|
+
className = _ref5$className === void 0 ? '' : _ref5$className,
|
|
188
|
+
otherProps = _objectWithoutProperties(_ref5, _excluded2);
|
|
189
|
+
// 从 otherProps 中提取并排除已处理的 props
|
|
190
|
+
var extraRemarkPlugins = otherProps.remarkPlugins,
|
|
191
|
+
extraRehypePlugins = otherProps.rehypePlugins,
|
|
192
|
+
extraComponents = otherProps.components,
|
|
193
|
+
restProps = _objectWithoutProperties(otherProps, _excluded3);
|
|
194
|
+
var finalRemarkPlugins = [[remarkGfm, {
|
|
195
|
+
singleTilde: false
|
|
196
|
+
}],
|
|
197
|
+
// 继承默认:GitHub Flavored Markdown
|
|
198
|
+
remarkMath].concat(_toConsumableArray(extraRemarkPlugins || []));
|
|
199
|
+
var finalRehypePlugins = [[rehypeHighlight, {
|
|
200
|
+
ignoreMissing: true,
|
|
201
|
+
detect: true
|
|
202
|
+
}],
|
|
203
|
+
// 继承默认:代码高亮
|
|
204
|
+
rehypeRaw,
|
|
205
|
+
// 继承默认:支持 HTML
|
|
206
|
+
rehypeKatex].concat(_toConsumableArray(extraRehypePlugins || []));
|
|
207
|
+
var finalComponents = _objectSpread({
|
|
208
|
+
code: CodeBlock
|
|
209
|
+
}, extraComponents || {});
|
|
210
|
+
return /*#__PURE__*/React.createElement(MarkDown, _extends({
|
|
211
|
+
hasOptions: true,
|
|
212
|
+
previewImg: previewImg,
|
|
213
|
+
linkTarget: linkTarget,
|
|
214
|
+
transformLinkUri: function transformLinkUri(url) {
|
|
215
|
+
return url;
|
|
216
|
+
},
|
|
217
|
+
className: "assist-chat-markdown-content ".concat(className),
|
|
218
|
+
remarkPlugins: finalRemarkPlugins,
|
|
219
|
+
rehypePlugins: finalRehypePlugins,
|
|
220
|
+
components: finalComponents
|
|
221
|
+
}, restProps), data);
|
|
222
|
+
});
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
.assist-chat-markdown-content {
|
|
2
|
+
position: relative;
|
|
3
|
+
overflow: auto;
|
|
4
|
+
line-height: 1.8;
|
|
5
|
+
|
|
6
|
+
table {
|
|
7
|
+
display: table;
|
|
8
|
+
border: unset !important;
|
|
9
|
+
padding: unset !important;
|
|
10
|
+
border-collapse: separate; // 需要设置为 separate 才能应用圆角
|
|
11
|
+
border-spacing: 0; // 移除单元格间距
|
|
12
|
+
border-radius: 8px; // 为整个表格设置圆角
|
|
13
|
+
overflow: hidden; // 确保圆角效果可见
|
|
14
|
+
|
|
15
|
+
thead tr {
|
|
16
|
+
background: #f5f5f5;
|
|
17
|
+
|
|
18
|
+
th {
|
|
19
|
+
font-weight: 500;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
color: #474a52;
|
|
22
|
+
line-height: 18px;
|
|
23
|
+
padding: 9px 16px;
|
|
24
|
+
|
|
25
|
+
// 为表头单元格设置圆角
|
|
26
|
+
&:first-child {
|
|
27
|
+
border-top-left-radius: 8px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:last-child {
|
|
31
|
+
border-top-right-radius: 8px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
tbody tr {
|
|
37
|
+
// 为最后一行的单元格设置底部圆角
|
|
38
|
+
&:last-child {
|
|
39
|
+
td:first-child {
|
|
40
|
+
border-bottom-left-radius: 8px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
td:last-child {
|
|
44
|
+
border-bottom-right-radius: 8px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
td {
|
|
49
|
+
border-top: none;
|
|
50
|
+
font-weight: 400;
|
|
51
|
+
font-size: 12px;
|
|
52
|
+
color: #474a52;
|
|
53
|
+
line-height: 20px;
|
|
54
|
+
padding: 10px 16px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
tr,
|
|
59
|
+
td,
|
|
60
|
+
th {
|
|
61
|
+
border: 1px solid #e6e8eb;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
thead tr th,
|
|
65
|
+
tbody tr td {
|
|
66
|
+
&:not(:first-child) {
|
|
67
|
+
border-left: none;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// 确保最后一行有底部边框
|
|
72
|
+
tbody:last-child tr:last-child td {
|
|
73
|
+
border-bottom: 1px solid #e6e8eb;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
img {
|
|
78
|
+
max-width: 100% !important;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
b,
|
|
82
|
+
strong {
|
|
83
|
+
color: #1f2024;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
h1 {
|
|
87
|
+
font-size: 24px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
h2 {
|
|
91
|
+
font-size: 20px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
h3 {
|
|
95
|
+
font-size: 18px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
h4 {
|
|
99
|
+
font-size: 16px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
h5,
|
|
103
|
+
h6 {
|
|
104
|
+
font-size: 14px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
ol {
|
|
108
|
+
padding-left: 20px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
blockquote {
|
|
112
|
+
margin: 0 0 1em;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
li {
|
|
116
|
+
padding-left: 0;
|
|
117
|
+
margin: 4px 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
hr {
|
|
121
|
+
background: #e6e8eb;
|
|
122
|
+
height: 1px;
|
|
123
|
+
border: none;
|
|
124
|
+
margin: 14px 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Mermaid 图表样式
|
|
128
|
+
.mermaid-wrapper {
|
|
129
|
+
margin: 16px 0;
|
|
130
|
+
text-align: center;
|
|
131
|
+
background: transparent;
|
|
132
|
+
|
|
133
|
+
svg {
|
|
134
|
+
max-width: 100%;
|
|
135
|
+
height: auto;
|
|
136
|
+
display: inline-block;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// LaTeX 代码块样式(```latex 格式)
|
|
141
|
+
.latex-wrapper {
|
|
142
|
+
margin: 0;
|
|
143
|
+
padding: 0;
|
|
144
|
+
background: transparent;
|
|
145
|
+
text-align: center;
|
|
146
|
+
overflow-x: auto;
|
|
147
|
+
|
|
148
|
+
.katex {
|
|
149
|
+
font-size: 1.1em;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// 移除 LaTeX 代码块父级 pre 标签的 border 和背景
|
|
154
|
+
pre:has(.latex-wrapper) {
|
|
155
|
+
border: none !important;
|
|
156
|
+
background: transparent !important;
|
|
157
|
+
padding: 0 !important;
|
|
158
|
+
margin: 0 !important;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// LaTeX 公式样式($...$ 和 $$...$$ 格式)
|
|
162
|
+
.katex-display {
|
|
163
|
+
margin: 16px 0;
|
|
164
|
+
overflow: auto hidden;
|
|
165
|
+
|
|
166
|
+
> .katex {
|
|
167
|
+
text-align: center;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.katex {
|
|
172
|
+
font-size: 1.1em;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// 行内公式样式优化
|
|
176
|
+
p .katex {
|
|
177
|
+
font-size: 1em;
|
|
178
|
+
}
|
|
179
|
+
}
|