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,185 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
+
import React, { useContext, useState } from 'react';
|
|
5
|
+
import { Button, Input, message, Modal, Select } from '@alife/magic-basic';
|
|
6
|
+
import { customRequest } from '@alife/magic-request';
|
|
7
|
+
import { AssistantChatContext } from "../../context";
|
|
8
|
+
import { CSECustomIcon } from "../../utils/CSEIconTool";
|
|
9
|
+
import ShareContent from "../ShareContent";
|
|
10
|
+
import "./index.scss";
|
|
11
|
+
var ShareModal = function ShareModal(_ref) {
|
|
12
|
+
var visible = _ref.visible,
|
|
13
|
+
onClose = _ref.onClose,
|
|
14
|
+
onCancelShareMode = _ref.onCancelShareMode,
|
|
15
|
+
shareLink = _ref.shareLink,
|
|
16
|
+
data = _ref.data;
|
|
17
|
+
var _useContext = useContext(AssistantChatContext),
|
|
18
|
+
cardComponentMap = _useContext.cardComponentMap;
|
|
19
|
+
var _useState = useState('internal'),
|
|
20
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21
|
+
shareType = _useState2[0],
|
|
22
|
+
setShareType = _useState2[1];
|
|
23
|
+
var _useState3 = useState(false),
|
|
24
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
25
|
+
isCanceling = _useState4[0],
|
|
26
|
+
setIsCanceling = _useState4[1]; // State to manage canceling process
|
|
27
|
+
|
|
28
|
+
// Helper function to extract shareId from shareLink
|
|
29
|
+
var extractShareId = function extractShareId(link) {
|
|
30
|
+
if (!link) return null;
|
|
31
|
+
try {
|
|
32
|
+
var url = new URL(link);
|
|
33
|
+
return url.searchParams.get('shareId');
|
|
34
|
+
} catch (error) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** 取消分享 */
|
|
40
|
+
var cancelShare = /*#__PURE__*/function () {
|
|
41
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(shareId) {
|
|
42
|
+
var res;
|
|
43
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
44
|
+
while (1) switch (_context.prev = _context.next) {
|
|
45
|
+
case 0:
|
|
46
|
+
if (shareId) {
|
|
47
|
+
_context.next = 3;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
message.error('分享ID无效,无法取消分享');
|
|
51
|
+
return _context.abrupt("return", false);
|
|
52
|
+
case 3:
|
|
53
|
+
_context.prev = 3;
|
|
54
|
+
_context.next = 6;
|
|
55
|
+
return customRequest({
|
|
56
|
+
method: 'DELETE',
|
|
57
|
+
url: "/cognipilot/api/assistant/chat/message/share?shareId=".concat(shareId),
|
|
58
|
+
query: {
|
|
59
|
+
shareId: shareId
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
case 6:
|
|
63
|
+
res = _context.sent;
|
|
64
|
+
if (!(res.code !== '200')) {
|
|
65
|
+
_context.next = 12;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
message.error("\u53D6\u6D88\u5206\u4EAB\u5931\u8D25: ".concat(res.message));
|
|
69
|
+
return _context.abrupt("return", false);
|
|
70
|
+
case 12:
|
|
71
|
+
message.success('分享已取消');
|
|
72
|
+
return _context.abrupt("return", true);
|
|
73
|
+
case 14:
|
|
74
|
+
_context.next = 21;
|
|
75
|
+
break;
|
|
76
|
+
case 16:
|
|
77
|
+
_context.prev = 16;
|
|
78
|
+
_context.t0 = _context["catch"](3);
|
|
79
|
+
console.error('取消分享失败:', _context.t0);
|
|
80
|
+
message.error('取消分享失败,请重试');
|
|
81
|
+
return _context.abrupt("return", false);
|
|
82
|
+
case 21:
|
|
83
|
+
case "end":
|
|
84
|
+
return _context.stop();
|
|
85
|
+
}
|
|
86
|
+
}, _callee, null, [[3, 16]]);
|
|
87
|
+
}));
|
|
88
|
+
return function cancelShare(_x) {
|
|
89
|
+
return _ref2.apply(this, arguments);
|
|
90
|
+
};
|
|
91
|
+
}();
|
|
92
|
+
var handleCopyLink = function handleCopyLink() {
|
|
93
|
+
navigator.clipboard.writeText(shareLink);
|
|
94
|
+
message.success('复制成功!');
|
|
95
|
+
};
|
|
96
|
+
var handleCancelShare = /*#__PURE__*/function () {
|
|
97
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
98
|
+
var shareId, cancalSuccess;
|
|
99
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
100
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
101
|
+
case 0:
|
|
102
|
+
setIsCanceling(true);
|
|
103
|
+
shareId = extractShareId(shareLink);
|
|
104
|
+
_context2.next = 4;
|
|
105
|
+
return cancelShare(shareId);
|
|
106
|
+
case 4:
|
|
107
|
+
cancalSuccess = _context2.sent;
|
|
108
|
+
if (cancalSuccess) {
|
|
109
|
+
onClose(); // Close the modal
|
|
110
|
+
if (onCancelShareMode) {
|
|
111
|
+
onCancelShareMode(); // Exit share mode
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
setIsCanceling(false);
|
|
115
|
+
case 7:
|
|
116
|
+
case "end":
|
|
117
|
+
return _context2.stop();
|
|
118
|
+
}
|
|
119
|
+
}, _callee2);
|
|
120
|
+
}));
|
|
121
|
+
return function handleCancelShare() {
|
|
122
|
+
return _ref3.apply(this, arguments);
|
|
123
|
+
};
|
|
124
|
+
}();
|
|
125
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
126
|
+
open: visible,
|
|
127
|
+
onCancel: onClose,
|
|
128
|
+
className: "share-modal",
|
|
129
|
+
width: 960,
|
|
130
|
+
zIndex: 1002,
|
|
131
|
+
title: /*#__PURE__*/React.createElement("div", {
|
|
132
|
+
className: "share-modal-header"
|
|
133
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
134
|
+
className: "share-modal-title"
|
|
135
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
136
|
+
className: "share-modal-mainTitle"
|
|
137
|
+
}, "\u5BF9\u8BDD\u5206\u4EAB"), /*#__PURE__*/React.createElement("p", {
|
|
138
|
+
className: "share-modal-subtitle"
|
|
139
|
+
}, "\u5185\u5BB9\u7531AI\u751F\u6210,\u4EC5\u4F9B\u53C2\u8003"))),
|
|
140
|
+
footer: /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: "share-modal-footer"
|
|
142
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
143
|
+
className: "share-type-selector"
|
|
144
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
145
|
+
value: shareType,
|
|
146
|
+
onChange: setShareType,
|
|
147
|
+
style: {
|
|
148
|
+
width: 128
|
|
149
|
+
}
|
|
150
|
+
}, /*#__PURE__*/React.createElement(Select.Option, {
|
|
151
|
+
value: "internal"
|
|
152
|
+
}, "\u5185\u90E8\u5206\u4EAB"), /*#__PURE__*/React.createElement(Select.Option, {
|
|
153
|
+
value: "public",
|
|
154
|
+
disabled: true
|
|
155
|
+
}, "\u516C\u5F00\u5206\u4EAB"))), /*#__PURE__*/React.createElement("div", {
|
|
156
|
+
className: "share-link-input"
|
|
157
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
158
|
+
value: shareLink,
|
|
159
|
+
readOnly: true
|
|
160
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
161
|
+
className: "share-actions"
|
|
162
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
163
|
+
onClick: handleCancelShare,
|
|
164
|
+
loading: isCanceling,
|
|
165
|
+
className: "cancel-btn"
|
|
166
|
+
}, "\u53D6\u6D88\u5206\u4EAB"), /*#__PURE__*/React.createElement(Button, {
|
|
167
|
+
type: "primary",
|
|
168
|
+
onClick: handleCopyLink,
|
|
169
|
+
className: "copy-btn"
|
|
170
|
+
}, /*#__PURE__*/React.createElement(CSECustomIcon, {
|
|
171
|
+
type: "iconchain1-o",
|
|
172
|
+
size: "small"
|
|
173
|
+
}), "\u590D\u5236\u94FE\u63A5"))),
|
|
174
|
+
closable: true,
|
|
175
|
+
destroyOnClose: true
|
|
176
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
177
|
+
className: "share-modal-content"
|
|
178
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
179
|
+
className: "share-modal-body"
|
|
180
|
+
}, /*#__PURE__*/React.createElement(ShareContent, {
|
|
181
|
+
selectedData: (data === null || data === void 0 ? void 0 : data.selectedData) || [],
|
|
182
|
+
cardComponentMap: cardComponentMap
|
|
183
|
+
}))));
|
|
184
|
+
};
|
|
185
|
+
export default ShareModal;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
.share-modal {
|
|
2
|
+
.ant-modal-header {
|
|
3
|
+
padding: 16px 20px;
|
|
4
|
+
border-bottom: none;
|
|
5
|
+
background: transparent;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// 确保Modal本身不产生滚动条
|
|
9
|
+
.ant-modal-content {
|
|
10
|
+
height: 600px;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
background-color: #ffffff;
|
|
14
|
+
border: 1px solid #dcdee0;
|
|
15
|
+
box-shadow: 0 6px 12px 0 rgba(0, 0, 0, 0.1);
|
|
16
|
+
border-radius: 8px;
|
|
17
|
+
|
|
18
|
+
.ant-modal-close .ant-modal-close-x {
|
|
19
|
+
font-size: 22px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ant-modal-body {
|
|
24
|
+
flex: 1;
|
|
25
|
+
padding: 0;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ant-modal-footer {
|
|
30
|
+
padding: 0 20px 16px 20px;
|
|
31
|
+
border-top: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.share-modal-content {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
height: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.share-modal-header {
|
|
41
|
+
.share-modal-title {
|
|
42
|
+
.share-modal-mainTitle {
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
font-size: 16px;
|
|
45
|
+
color: #1f2024;
|
|
46
|
+
line-height: 24px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.share-modal-subtitle {
|
|
50
|
+
font-weight: 400;
|
|
51
|
+
font-size: 12px;
|
|
52
|
+
color: #81848f;
|
|
53
|
+
line-height: 12px;
|
|
54
|
+
margin-bottom: 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.share-modal-body {
|
|
60
|
+
flex: 1;
|
|
61
|
+
padding: 0 48px 16px 48px;
|
|
62
|
+
overflow-y: auto;
|
|
63
|
+
overflow-x: hidden;
|
|
64
|
+
min-height: 0; // 重要:允许flex子项收缩
|
|
65
|
+
|
|
66
|
+
.conversation-content {
|
|
67
|
+
.conversation-message {
|
|
68
|
+
margin-bottom: 16px;
|
|
69
|
+
padding: 12px 0;
|
|
70
|
+
|
|
71
|
+
&:last-child {
|
|
72
|
+
margin-bottom: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.message-header {
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: space-between;
|
|
79
|
+
margin-bottom: 8px;
|
|
80
|
+
|
|
81
|
+
.user-info {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: 8px;
|
|
85
|
+
|
|
86
|
+
.user-avatar {
|
|
87
|
+
width: 24px;
|
|
88
|
+
height: 24px;
|
|
89
|
+
border-radius: 50%;
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
font-size: 12px;
|
|
94
|
+
font-weight: 500;
|
|
95
|
+
color: #fff;
|
|
96
|
+
|
|
97
|
+
&.user {
|
|
98
|
+
background-color: #1890ff;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&.ai {
|
|
102
|
+
background-color: #8c8c8c;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.username {
|
|
107
|
+
font-size: 14px;
|
|
108
|
+
font-weight: 500;
|
|
109
|
+
color: #262626;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.timestamp {
|
|
114
|
+
font-size: 12px;
|
|
115
|
+
color: #8c8c8c;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.message-content {
|
|
120
|
+
font-size: 14px;
|
|
121
|
+
line-height: 1.6;
|
|
122
|
+
color: #262626;
|
|
123
|
+
white-space: pre-wrap;
|
|
124
|
+
word-break: break-word;
|
|
125
|
+
padding-left: 32px; // 为头像留出空间
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.share-modal-footer {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
background-color: #ffffff;
|
|
135
|
+
box-shadow: 0 4px 16px 0 rgba(129, 132, 143, 0.24);
|
|
136
|
+
border-radius: 8px;
|
|
137
|
+
padding: 16px;
|
|
138
|
+
|
|
139
|
+
.share-type-selector {
|
|
140
|
+
flex-shrink: 0;
|
|
141
|
+
|
|
142
|
+
.ant-select .ant-select-selector .ant-select-selection-item {
|
|
143
|
+
text-align: left;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.ant-select-dropdown .ant-select-item {
|
|
147
|
+
text-align: left !important;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.share-link-input {
|
|
152
|
+
flex: 1;
|
|
153
|
+
margin: 0 8px;
|
|
154
|
+
|
|
155
|
+
.ant-input {
|
|
156
|
+
height: 32px;
|
|
157
|
+
background-color: #edeef0;
|
|
158
|
+
border-radius: 2px;
|
|
159
|
+
font-family: HelveticaNeue;
|
|
160
|
+
font-weight: 400;
|
|
161
|
+
font-size: 11px;
|
|
162
|
+
color: #474a52;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.share-actions {
|
|
167
|
+
display: flex;
|
|
168
|
+
gap: 8px;
|
|
169
|
+
flex-shrink: 0;
|
|
170
|
+
|
|
171
|
+
.cancel-btn {
|
|
172
|
+
width: 88px;
|
|
173
|
+
background-color: #ffffff;
|
|
174
|
+
border: 1px solid #d4d6db;
|
|
175
|
+
border-radius: 2px;
|
|
176
|
+
font-size: 14px;
|
|
177
|
+
color: #474a52;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.copy-btn {
|
|
181
|
+
width: 90px;
|
|
182
|
+
display: flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
justify-content: center;
|
|
185
|
+
gap: 4px;
|
|
186
|
+
background-color: #1b58f4;
|
|
187
|
+
background-image: radial-gradient(
|
|
188
|
+
circle at 85% 72%,
|
|
189
|
+
rgba(255, 255, 255, 0.36) 0%,
|
|
190
|
+
rgba(255, 255, 255, 0) 75%
|
|
191
|
+
);
|
|
192
|
+
border-radius: 2px;
|
|
193
|
+
border: none;
|
|
194
|
+
margin: 0 !important;
|
|
195
|
+
padding: 0;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
+
import React, { useContext, useState } from 'react';
|
|
5
|
+
import { Button, message } from '@alife/magic-basic';
|
|
6
|
+
import { customRequest } from '@alife/magic-request';
|
|
7
|
+
import { AssistantChatContext } from "../../context";
|
|
8
|
+
import { CSECustomIcon } from "../../utils/CSEIconTool";
|
|
9
|
+
import { processAgentCardRenderScreenshot } from "../../utils/screenshot";
|
|
10
|
+
import ShareModal from "../ShareModal";
|
|
11
|
+
import "./index.scss";
|
|
12
|
+
var ShareOperationBar = function ShareOperationBar(props) {
|
|
13
|
+
var onCancel = props.onCancel,
|
|
14
|
+
getSelectedMessagesData = props.getSelectedMessagesData;
|
|
15
|
+
var _useContext = useContext(AssistantChatContext),
|
|
16
|
+
selectedMessages = _useContext.selectedMessages,
|
|
17
|
+
chatTitle = _useContext.chatTitle;
|
|
18
|
+
var _useState = useState(false),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
modalVisible = _useState2[0],
|
|
21
|
+
setModalVisible = _useState2[1];
|
|
22
|
+
var _useState3 = useState([]),
|
|
23
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
24
|
+
processedData = _useState4[0],
|
|
25
|
+
setProcessedData = _useState4[1];
|
|
26
|
+
var _useState5 = useState(false),
|
|
27
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
28
|
+
isProcessing = _useState6[0],
|
|
29
|
+
setIsProcessing = _useState6[1];
|
|
30
|
+
var _useState7 = useState(''),
|
|
31
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
32
|
+
shareLink = _useState8[0],
|
|
33
|
+
setShareLink = _useState8[1];
|
|
34
|
+
|
|
35
|
+
/** 保存分享数据 */
|
|
36
|
+
var saveShareDataRequest = function saveShareDataRequest(bodyParams) {
|
|
37
|
+
return customRequest({
|
|
38
|
+
method: 'POST',
|
|
39
|
+
url: '/cognipilot/api/assistant/chat/message/share',
|
|
40
|
+
query: bodyParams
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
var handleShare = /*#__PURE__*/function () {
|
|
44
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
45
|
+
var _selectedData$, selectedData, dataToShare, shareData, subjectId, bodyData, result;
|
|
46
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
47
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
48
|
+
case 0:
|
|
49
|
+
setIsProcessing(true);
|
|
50
|
+
_context2.prev = 1;
|
|
51
|
+
selectedData = (getSelectedMessagesData === null || getSelectedMessagesData === void 0 ? void 0 : getSelectedMessagesData()) || []; // 等待DOM更新后执行截图
|
|
52
|
+
_context2.next = 5;
|
|
53
|
+
return new Promise(function (resolve) {
|
|
54
|
+
return setTimeout(resolve, 500);
|
|
55
|
+
});
|
|
56
|
+
case 5:
|
|
57
|
+
_context2.next = 7;
|
|
58
|
+
return Promise.all(selectedData.map( /*#__PURE__*/function () {
|
|
59
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(message) {
|
|
60
|
+
var dialogId;
|
|
61
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
62
|
+
while (1) switch (_context.prev = _context.next) {
|
|
63
|
+
case 0:
|
|
64
|
+
dialogId = message.dialogId;
|
|
65
|
+
_context.next = 3;
|
|
66
|
+
return processAgentCardRenderScreenshot(message, dialogId);
|
|
67
|
+
case 3:
|
|
68
|
+
return _context.abrupt("return", _context.sent);
|
|
69
|
+
case 4:
|
|
70
|
+
case "end":
|
|
71
|
+
return _context.stop();
|
|
72
|
+
}
|
|
73
|
+
}, _callee);
|
|
74
|
+
}));
|
|
75
|
+
return function (_x) {
|
|
76
|
+
return _ref2.apply(this, arguments);
|
|
77
|
+
};
|
|
78
|
+
}()));
|
|
79
|
+
case 7:
|
|
80
|
+
dataToShare = _context2.sent;
|
|
81
|
+
setProcessedData(dataToShare);
|
|
82
|
+
shareData = {
|
|
83
|
+
title: chatTitle || '',
|
|
84
|
+
selectedData: dataToShare
|
|
85
|
+
};
|
|
86
|
+
subjectId = (_selectedData$ = selectedData[0]) === null || _selectedData$ === void 0 ? void 0 : _selectedData$.subjectId;
|
|
87
|
+
bodyData = {
|
|
88
|
+
subjectId: subjectId,
|
|
89
|
+
shareContent: shareData
|
|
90
|
+
};
|
|
91
|
+
_context2.next = 14;
|
|
92
|
+
return saveShareDataRequest(bodyData);
|
|
93
|
+
case 14:
|
|
94
|
+
result = _context2.sent;
|
|
95
|
+
if (result && result.data) {
|
|
96
|
+
setShareLink(result.data.shareUrl);
|
|
97
|
+
}
|
|
98
|
+
setModalVisible(true);
|
|
99
|
+
_context2.next = 23;
|
|
100
|
+
break;
|
|
101
|
+
case 19:
|
|
102
|
+
_context2.prev = 19;
|
|
103
|
+
_context2.t0 = _context2["catch"](1);
|
|
104
|
+
console.error('Failed to process share data:', _context2.t0);
|
|
105
|
+
message.error('分享出了问题:', _context2.t0);
|
|
106
|
+
case 23:
|
|
107
|
+
_context2.prev = 23;
|
|
108
|
+
setIsProcessing(false);
|
|
109
|
+
return _context2.finish(23);
|
|
110
|
+
case 26:
|
|
111
|
+
case "end":
|
|
112
|
+
return _context2.stop();
|
|
113
|
+
}
|
|
114
|
+
}, _callee2, null, [[1, 19, 23, 26]]);
|
|
115
|
+
}));
|
|
116
|
+
return function handleShare() {
|
|
117
|
+
return _ref.apply(this, arguments);
|
|
118
|
+
};
|
|
119
|
+
}();
|
|
120
|
+
var handleModalClose = function handleModalClose() {
|
|
121
|
+
setModalVisible(false);
|
|
122
|
+
};
|
|
123
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
124
|
+
id: "assistantChatBottomId",
|
|
125
|
+
className: "share-operation-bar"
|
|
126
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
127
|
+
className: "share-operation-actions"
|
|
128
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
129
|
+
onClick: onCancel,
|
|
130
|
+
className: "cancel-btn"
|
|
131
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
132
|
+
type: "primary",
|
|
133
|
+
onClick: handleShare,
|
|
134
|
+
className: "share-btn",
|
|
135
|
+
disabled: !(selectedMessages !== null && selectedMessages !== void 0 && selectedMessages.length) || isProcessing,
|
|
136
|
+
loading: isProcessing
|
|
137
|
+
}, !isProcessing && /*#__PURE__*/React.createElement(CSECustomIcon, {
|
|
138
|
+
type: "iconarrow1-o",
|
|
139
|
+
size: "small"
|
|
140
|
+
}), "\u5206\u4EAB"))), /*#__PURE__*/React.createElement(ShareModal, {
|
|
141
|
+
visible: modalVisible,
|
|
142
|
+
onClose: handleModalClose,
|
|
143
|
+
onCancelShareMode: onCancel // Pass the parent's onCancel to exit share mode
|
|
144
|
+
,
|
|
145
|
+
data: {
|
|
146
|
+
title: chatTitle || '',
|
|
147
|
+
selectedData: processedData.length > 0 ? processedData : (getSelectedMessagesData === null || getSelectedMessagesData === void 0 ? void 0 : getSelectedMessagesData()) || []
|
|
148
|
+
},
|
|
149
|
+
shareLink: shareLink
|
|
150
|
+
}));
|
|
151
|
+
};
|
|
152
|
+
export default ShareOperationBar;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.share-operation-bar {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
position: relative;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
height: 80px;
|
|
8
|
+
background-color: #fff;
|
|
9
|
+
box-shadow: 0 2px 16px 0 rgba(129, 132, 143, 0.24);
|
|
10
|
+
|
|
11
|
+
.share-operation-actions {
|
|
12
|
+
display: flex;
|
|
13
|
+
gap: 16px;
|
|
14
|
+
align-items: center;
|
|
15
|
+
|
|
16
|
+
.cancel-btn {
|
|
17
|
+
width: 80px;
|
|
18
|
+
height: 40px;
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
color: #474a52;
|
|
21
|
+
background-color: #fff;
|
|
22
|
+
border: 1px solid #d4d6db;
|
|
23
|
+
border-radius: 2px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.share-btn {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: 4px;
|
|
30
|
+
height: 40px;
|
|
31
|
+
width: 80px;
|
|
32
|
+
background-color: #1b58f4;
|
|
33
|
+
background-image: radial-gradient(
|
|
34
|
+
circle at 85% 72%,
|
|
35
|
+
rgba(255, 255, 255, 0.36) 0%,
|
|
36
|
+
rgba(255, 255, 255, 0) 75%
|
|
37
|
+
);
|
|
38
|
+
border-radius: 2px;
|
|
39
|
+
border: none;
|
|
40
|
+
|
|
41
|
+
&:disabled {
|
|
42
|
+
opacity: 0.6;
|
|
43
|
+
cursor: not-allowed;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.scss';
|
|
3
|
+
interface ITextContentProps {
|
|
4
|
+
msg: string;
|
|
5
|
+
textContentLabel?: string;
|
|
6
|
+
msgCollapseLength?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 文本内容
|
|
10
|
+
* @param props
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
declare const TextContent: React.FC<ITextContentProps>;
|
|
14
|
+
export default TextContent;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { Button } from '@alife/magic-basic';
|
|
4
|
+
import { ArrowDownO, ArrowTopO } from '@alife/magic-icons';
|
|
5
|
+
import { formatTextContentHtml } from "../../utils/formatData";
|
|
6
|
+
import "./index.scss";
|
|
7
|
+
/**
|
|
8
|
+
* 文本内容
|
|
9
|
+
* @param props
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
var TextContent = function TextContent(props) {
|
|
13
|
+
var msg = props.msg,
|
|
14
|
+
textContentLabel = props.textContentLabel,
|
|
15
|
+
_props$msgCollapseLen = props.msgCollapseLength,
|
|
16
|
+
msgCollapseLength = _props$msgCollapseLen === void 0 ? 2000 : _props$msgCollapseLen;
|
|
17
|
+
var initialCondition = typeof msg === 'string' && msg.length > msgCollapseLength;
|
|
18
|
+
var _useState = useState(initialCondition),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
collapse = _useState2[0],
|
|
21
|
+
setCollapse = _useState2[1];
|
|
22
|
+
var toggleCollapse = function toggleCollapse() {
|
|
23
|
+
setCollapse(!collapse);
|
|
24
|
+
};
|
|
25
|
+
var dom = /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: collapse ? 'text-content--collapse' : ''
|
|
27
|
+
}, textContentLabel, formatTextContentHtml(msg));
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: "text-content"
|
|
30
|
+
}, dom, /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: "operation ".concat(initialCondition ? '' : 'operation--hidden')
|
|
32
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
33
|
+
type: "link",
|
|
34
|
+
onClick: toggleCollapse
|
|
35
|
+
}, collapse ? '查看更多' : '收起', collapse ? /*#__PURE__*/React.createElement(ArrowDownO, null) : /*#__PURE__*/React.createElement(ArrowTopO, null))));
|
|
36
|
+
};
|
|
37
|
+
export default TextContent;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.text-content {
|
|
2
|
+
white-space: pre-wrap;
|
|
3
|
+
line-height: 20px;
|
|
4
|
+
word-break: break-word;
|
|
5
|
+
color: #393b3d;
|
|
6
|
+
|
|
7
|
+
&--collapse {
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
text-overflow: ellipsis;
|
|
10
|
+
display: -webkit-box;
|
|
11
|
+
-webkit-line-clamp: 5;
|
|
12
|
+
-webkit-box-orient: vertical;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.operation {
|
|
16
|
+
text-align: center;
|
|
17
|
+
font-size: 12px;
|
|
18
|
+
|
|
19
|
+
&--hidden {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.next-divider {
|
|
24
|
+
margin: 12px 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.next-icon {
|
|
28
|
+
margin-right: 8px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|