@ant-design/agentic-ui 2.29.5 → 2.29.7
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/dist/AILabel/index.js +17 -8
- package/dist/AgenticLayout/index.js +3 -5
- package/dist/BackTo/BackBottom.js +17 -8
- package/dist/BackTo/BackTop.js +17 -8
- package/dist/BackTo/ScrollVisibleButton.js +75 -11
- package/dist/Bubble/AIBubble.js +131 -121
- package/dist/Bubble/Avatar/index.js +19 -10
- package/dist/Bubble/FileView.js +2 -2
- package/dist/Bubble/List/PureBubbleList.js +4 -5
- package/dist/Bubble/List/index.js +4 -5
- package/dist/Bubble/List/style.js +3 -0
- package/dist/Bubble/MessagesContent/BubbleExtra.js +108 -93
- package/dist/Bubble/MessagesContent/CopyButton/index.js +36 -26
- package/dist/Bubble/MessagesContent/DocInfo.js +19 -10
- package/dist/Bubble/MessagesContent/MarkdownPreview.js +2 -2
- package/dist/Bubble/MessagesContent/index.js +149 -130
- package/dist/Bubble/PureBubble.js +151 -133
- package/dist/Bubble/UserBubble.js +1 -1
- package/dist/Bubble/style.js +2 -2
- package/dist/Bubble/types/BubbleExtra.js +4 -1
- package/dist/Bubble/types/DocInfo.js +9 -1
- package/dist/ChatLayout/components/FooterBackgroundLottie/images/img_0.png +0 -0
- package/dist/ChatLayout/components/FooterBackgroundLottie/images/img_1.png +0 -0
- package/dist/ChatLayout/components/FooterBackgroundLottie/images/img_2.png +0 -0
- package/dist/ChatLayout/components/FooterBackgroundLottie/index.d.ts +51 -0
- package/dist/ChatLayout/components/FooterBackgroundLottie/index.js +45 -0
- package/dist/ChatLayout/components/FooterBackgroundLottie/lottie.d.ts +85 -0
- package/dist/ChatLayout/components/FooterBackgroundLottie/lottie.js +382 -0
- package/dist/ChatLayout/index.js +52 -14
- package/dist/ChatLayout/style.js +11 -0
- package/dist/ChatLayout/types.d.ts +28 -0
- package/dist/Components/ActionIconBox/index.js +30 -38
- package/dist/Components/ActionItemBox/ActionItemBox.js +1 -1
- package/dist/Components/Button/SwitchButton/index.js +18 -17
- package/dist/Components/LayoutHeader/index.js +5 -3
- package/dist/Components/LayoutHeader/style.js +5 -0
- package/dist/Components/Loading/CreativeRecommendationLoading.js +2 -2
- package/dist/Components/Loading/CreativeSparkLoading.js +2 -2
- package/dist/Components/SuggestionList/index.js +20 -19
- package/dist/Components/TextAnimate/index.js +19 -10
- package/dist/Components/TypingAnimation/index.js +19 -10
- package/dist/Components/effects/EffectPlayer.js +20 -11
- package/dist/Components/icons/LoadingSpinnerIcon.js +19 -10
- package/dist/History/components/HistoryActionsBox.js +21 -23
- package/dist/History/components/HistoryItem.js +61 -53
- package/dist/History/components/HistoryRunningIcon.js +19 -10
- package/dist/History/components/LoadMoreComponent.js +61 -55
- package/dist/History/components/NewChatComponent.js +53 -47
- package/dist/History/components/SearchComponent.js +24 -26
- package/dist/History/hooks/useHistory.js +80 -73
- package/dist/History/index.js +17 -16
- package/dist/History/menu.js +17 -8
- package/dist/Hooks/useAutoScroll.js +19 -19
- package/dist/Hooks/useDebounceFn/index.js +51 -45
- package/dist/Hooks/useElementSize.d.ts +5 -0
- package/dist/Hooks/useElementSize.js +71 -0
- package/dist/Hooks/useIntersectionOnce.js +17 -8
- package/dist/Hooks/useLanguage.d.ts +3 -0
- package/dist/I18n/locales.d.ts +3 -0
- package/dist/I18n/locales.js +8 -0
- package/dist/MarkdownEditor/BaseMarkdownEditor.js +22 -12
- package/dist/MarkdownEditor/editor/Editor.js +31 -39
- package/dist/MarkdownEditor/editor/components/CommentList/index.js +29 -37
- package/dist/MarkdownEditor/editor/elements/Image/index.js +86 -71
- package/dist/MarkdownEditor/editor/elements/List/ListItem.js +17 -16
- package/dist/MarkdownEditor/editor/elements/Media/index.js +107 -92
- package/dist/MarkdownEditor/editor/elements/Table/Table.js +19 -10
- package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +17 -16
- package/dist/MarkdownEditor/editor/parser/parse/parseBlockElements.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseCode.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseEmptyLines.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseTable.js +4 -1
- package/dist/MarkdownEditor/editor/parser/parserSlateNodeToMarkdown.js +2 -2
- package/dist/MarkdownEditor/editor/parser/remarkParse.js +3 -1
- package/dist/MarkdownEditor/editor/plugins/handlePaste.js +25 -30
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/arrow.js +0 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/enter.js +0 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/match.js +0 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/tab.js +0 -1
- package/dist/MarkdownEditor/editor/plugins/insertParsedHtmlNodes.js +39 -53
- package/dist/MarkdownEditor/editor/plugins/useKeyboard.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/useOnchange.js +28 -22
- package/dist/MarkdownEditor/editor/plugins/withMarkdown.js +1 -1
- package/dist/MarkdownEditor/editor/store.js +17 -13
- package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.js +202 -197
- package/dist/MarkdownEditor/editor/tools/InsertLink.js +2 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.js +142 -134
- package/dist/MarkdownEditor/editor/utils/ace.js +61 -61
- package/dist/MarkdownEditor/editor/utils/editorUtils.js +11 -4
- package/dist/MarkdownEditor/editor/utils/index.js +8 -2
- package/dist/MarkdownEditor/editor/utils/keyboard.js +31 -35
- package/dist/MarkdownEditor/editor/utils/markdownToHtml.js +23 -17
- package/dist/MarkdownEditor/editor/utils/media.js +21 -23
- package/dist/MarkdownEditor/editor/utils/performanceMonitor.js +55 -50
- package/dist/MarkdownEditor/editor/utils/useLocalState.js +11 -4
- package/dist/MarkdownEditor/types.d.ts +1 -0
- package/dist/MarkdownEditor/types.js +4 -1
- package/dist/MarkdownEditor/utils/native-table/native-table-editor.js +14 -14
- package/dist/MarkdownEditor/utils/native-table/native-table-keyboard.js +2 -2
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/style.js +1 -0
- package/dist/MarkdownInputField/AttachmentButton/index.js +33 -31
- package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +14 -7
- package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +2 -2
- package/dist/MarkdownInputField/FileMapView/index.js +17 -16
- package/dist/MarkdownInputField/FilePaste/index.js +25 -30
- package/dist/MarkdownInputField/FileUploadManager/index.js +39 -40
- package/dist/MarkdownInputField/MarkdownInputField.js +38 -29
- package/dist/MarkdownInputField/QuickActions/index.js +66 -60
- package/dist/MarkdownInputField/SendButton/index.js +22 -13
- package/dist/MarkdownInputField/Suggestion/index.js +17 -16
- package/dist/MarkdownInputField/VoiceInput/index.js +51 -45
- package/dist/MarkdownInputField/VoiceInputManager/index.js +133 -125
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldHandlers.js +103 -101
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldStyles.js +1 -1
- package/dist/MarkdownInputField/style.js +1 -2
- package/dist/MarkdownInputField/types/MarkdownInputFieldProps.js +14 -1
- package/dist/Plugins/chart/BarChart/index.js +8 -8
- package/dist/Plugins/chart/ChartRender.js +52 -46
- package/dist/Plugins/chart/DonutChart/index.js +26 -17
- package/dist/Plugins/chart/DonutChart/plugins.js +1 -1
- package/dist/Plugins/chart/DonutChart/types.js +1 -1
- package/dist/Plugins/chart/FunnelChart/index.js +31 -28
- package/dist/Plugins/chart/LineChart/index.js +19 -10
- package/dist/Plugins/chart/RadarChart/index.js +19 -10
- package/dist/Plugins/chart/ScatterChart/index.js +19 -10
- package/dist/Plugins/chart/components/ChartContainer/ChartContainer.js +20 -11
- package/dist/Plugins/chart/index.js +31 -13
- package/dist/Plugins/chart/loadChartRuntime.js +17 -16
- package/dist/Plugins/chart/types/classNames.js +4 -1
- package/dist/Plugins/chart/utils.js +20 -20
- package/dist/Plugins/code/CodeUI/Katex/Katex.js +52 -46
- package/dist/Plugins/code/components/AceEditor.js +149 -133
- package/dist/Plugins/code/components/CodeRenderer.js +7 -7
- package/dist/Plugins/code/components/CodeToolbar.js +2 -2
- package/dist/Plugins/code/components/LanguageSelector.js +6 -6
- package/dist/Plugins/code/components/LoadImage.js +5 -5
- package/dist/Plugins/code/components/ThinkBlock.js +8 -8
- package/dist/Plugins/code/hooks/useCodeEditorState.js +5 -5
- package/dist/Plugins/code/index.js +6 -6
- package/dist/Plugins/code/langIconMap.js +0 -1
- package/dist/Plugins/code/langIcons/AbapIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ActionscriptIcon.js +19 -10
- package/dist/Plugins/code/langIcons/AdaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ApacheIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ApexIcon.js +19 -10
- package/dist/Plugins/code/langIcons/AplIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ApplescriptIcon.js +19 -10
- package/dist/Plugins/code/langIcons/AstroIcon.js +19 -10
- package/dist/Plugins/code/langIcons/AwkIcon.js +19 -10
- package/dist/Plugins/code/langIcons/BallerinaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/BatIcon.js +19 -10
- package/dist/Plugins/code/langIcons/BicepIcon.js +19 -10
- package/dist/Plugins/code/langIcons/BladeIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CadenceIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ClojureIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CmakeIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CobolIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CodeqlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CoffeeIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ConsoleIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CppIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CrystalIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CsharpIcon.js +19 -10
- package/dist/Plugins/code/langIcons/CssIcon.js +19 -10
- package/dist/Plugins/code/langIcons/DIcon.js +19 -10
- package/dist/Plugins/code/langIcons/DartIcon.js +19 -10
- package/dist/Plugins/code/langIcons/DatabaseIcon.js +19 -10
- package/dist/Plugins/code/langIcons/DiffIcon.js +19 -10
- package/dist/Plugins/code/langIcons/DockerIcon.js +19 -10
- package/dist/Plugins/code/langIcons/DotenvIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ElixirIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ElmIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ErbIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ErlangIcon.js +19 -10
- package/dist/Plugins/code/langIcons/FsharpIcon.js +19 -10
- package/dist/Plugins/code/langIcons/GdscriptIcon.js +19 -10
- package/dist/Plugins/code/langIcons/GlslIcon.js +19 -10
- package/dist/Plugins/code/langIcons/GnuplotIcon.js +19 -10
- package/dist/Plugins/code/langIcons/GoIcon.js +19 -10
- package/dist/Plugins/code/langIcons/GraphqlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/GroovyIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HackIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HamlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HandlebarsIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HaskellIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HclIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HclLightIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HjsonIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HlslIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HtmlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/HttpIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ImbaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/IniIcon.js +19 -10
- package/dist/Plugins/code/langIcons/JavaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/JavascriptIcon.js +19 -10
- package/dist/Plugins/code/langIcons/JinjaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/Json5Icon.js +19 -10
- package/dist/Plugins/code/langIcons/JsonIcon.js +19 -10
- package/dist/Plugins/code/langIcons/JsonnetIcon.js +19 -10
- package/dist/Plugins/code/langIcons/JuliaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/KotlinIcon.js +19 -10
- package/dist/Plugins/code/langIcons/KustoIcon.js +19 -10
- package/dist/Plugins/code/langIcons/LessIcon.js +19 -10
- package/dist/Plugins/code/langIcons/LiquidIcon.js +19 -10
- package/dist/Plugins/code/langIcons/LispIcon.js +19 -10
- package/dist/Plugins/code/langIcons/LuaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MakefileIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MarkdownIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MarkojsIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MatlabIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MdxIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MermaidIcon.js +19 -10
- package/dist/Plugins/code/langIcons/MojoIcon.js +19 -10
- package/dist/Plugins/code/langIcons/NginxIcon.js +19 -10
- package/dist/Plugins/code/langIcons/NimIcon.js +19 -10
- package/dist/Plugins/code/langIcons/NixIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ObjectiveCIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ObjectiveCppIcon.js +19 -10
- package/dist/Plugins/code/langIcons/OcamlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PascalIcon.js +19 -10
- package/dist/Plugins/code/langIcons/Perl6Icon.js +19 -10
- package/dist/Plugins/code/langIcons/PerlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PhpIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PostcssIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PowershellIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PrismaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PrologIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ProtoIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PugIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PuppetIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PurescriptIcon.js +19 -10
- package/dist/Plugins/code/langIcons/PythonIcon.js +19 -10
- package/dist/Plugins/code/langIcons/RIcon.js +19 -10
- package/dist/Plugins/code/langIcons/RazorIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ReactIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ReactTsIcon.js +19 -10
- package/dist/Plugins/code/langIcons/RubyIcon.js +19 -10
- package/dist/Plugins/code/langIcons/RustIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SasIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SassIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ScalaIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SchemeIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ShaderlabIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SolidityIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SparqlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/StataIcon.js +19 -10
- package/dist/Plugins/code/langIcons/StylusIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SvelteIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SwiftIcon.js +19 -10
- package/dist/Plugins/code/langIcons/SystemverilogIcon.js +19 -10
- package/dist/Plugins/code/langIcons/TclIcon.js +19 -10
- package/dist/Plugins/code/langIcons/TexIcon.js +19 -10
- package/dist/Plugins/code/langIcons/TomlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/TwigIcon.js +19 -10
- package/dist/Plugins/code/langIcons/TypescriptIcon.js +19 -10
- package/dist/Plugins/code/langIcons/VerilogIcon.js +19 -10
- package/dist/Plugins/code/langIcons/VhdlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/VimIcon.js +19 -10
- package/dist/Plugins/code/langIcons/VueIcon.js +19 -10
- package/dist/Plugins/code/langIcons/WebassemblyIcon.js +19 -10
- package/dist/Plugins/code/langIcons/WenyanIcon.js +19 -10
- package/dist/Plugins/code/langIcons/WgslIcon.js +19 -10
- package/dist/Plugins/code/langIcons/WolframlanguageIcon.js +19 -10
- package/dist/Plugins/code/langIcons/XmlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/XslIcon.js +19 -10
- package/dist/Plugins/code/langIcons/YamlIcon.js +19 -10
- package/dist/Plugins/code/langIcons/ZigIcon.js +19 -10
- package/dist/Plugins/code/loadAceEditor.js +21 -23
- package/dist/Plugins/code/utils/langOptions.js +6 -6
- package/dist/Plugins/formatter/index.js +6 -6
- package/dist/Plugins/katex/InlineKatex.js +52 -46
- package/dist/Plugins/katex/Katex.js +53 -47
- package/dist/Plugins/katex/index.js +6 -6
- package/dist/Plugins/katex/loadKatex.js +27 -29
- package/dist/Plugins/mermaid/Mermaid.js +34 -28
- package/dist/Plugins/mermaid/useMermaidRender.js +103 -97
- package/dist/Plugins/mermaid/utils.js +25 -17
- package/dist/Schema/SchemaEditor/AceEditorWrapper.js +162 -150
- package/dist/Schema/SchemaEditor/index.js +8 -1
- package/dist/Schema/SchemaForm/index.js +2 -2
- package/dist/Schema/SchemaRenderer/index.js +45 -46
- package/dist/ThoughtChainList/index.js +22 -13
- package/dist/ToolUseBar/BarItem/Content.js +3 -3
- package/dist/ToolUseBar/BarItem/index.js +10 -3
- package/dist/ToolUseBar/index.js +19 -10
- package/dist/ToolUseBar/style.js +4 -4
- package/dist/Types/common.js +4 -1
- package/dist/Types/message.js +4 -1
- package/dist/Utils/debugUtils.js +8 -8
- package/dist/Utils/getScroll.js +12 -5
- package/dist/Utils/loadCSS.js +23 -22
- package/dist/Utils/proxySandbox/ProxySandbox.js +42 -34
- package/dist/Utils/proxySandbox/SecurityContextManager.js +54 -54
- package/dist/Utils/proxySandbox/index.js +25 -22
- package/dist/Utils/proxySandbox/types.js +11 -11
- package/dist/Utils/scrollTo.js +8 -1
- package/dist/WelcomeMessage/index.js +1 -1
- package/dist/Workspace/File/FileComponent.js +91 -66
- package/dist/Workspace/File/PreviewComponent.js +15 -8
- package/dist/Workspace/File/index.d.ts +1 -1
- package/dist/Workspace/File/style.js +7 -0
- package/dist/Workspace/RealtimeFollow/index.js +1 -2
- package/dist/Workspace/index.js +13 -11
- package/dist/Workspace/style.js +8 -14
- package/dist/Workspace/types.d.ts +50 -0
- package/dist/Workspace/types.js +0 -1
- package/package.json +25 -25
|
@@ -102,7 +102,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
102
102
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
103
103
|
}
|
|
104
104
|
function _ts_generator(thisArg, body) {
|
|
105
|
-
var f, y, t,
|
|
105
|
+
var f, y, t, _ = {
|
|
106
106
|
label: 0,
|
|
107
107
|
sent: function() {
|
|
108
108
|
if (t[0] & 1) throw t[1];
|
|
@@ -110,13 +110,17 @@ function _ts_generator(thisArg, body) {
|
|
|
110
110
|
},
|
|
111
111
|
trys: [],
|
|
112
112
|
ops: []
|
|
113
|
-
};
|
|
114
|
-
return g
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
|
|
113
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
114
|
+
return d(g, "next", {
|
|
115
|
+
value: verb(0)
|
|
116
|
+
}), d(g, "throw", {
|
|
117
|
+
value: verb(1)
|
|
118
|
+
}), d(g, "return", {
|
|
119
|
+
value: verb(2)
|
|
120
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
121
|
+
value: function() {
|
|
122
|
+
return this;
|
|
123
|
+
}
|
|
120
124
|
}), g;
|
|
121
125
|
function verb(n) {
|
|
122
126
|
return function(v) {
|
|
@@ -128,7 +132,7 @@ function _ts_generator(thisArg, body) {
|
|
|
128
132
|
}
|
|
129
133
|
function step(op) {
|
|
130
134
|
if (f) throw new TypeError("Generator is already executing.");
|
|
131
|
-
while(_)try {
|
|
135
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
132
136
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
133
137
|
if (y = 0, t) op = [
|
|
134
138
|
op[0] & 2,
|
|
@@ -325,28 +329,30 @@ var getMaskStyle = function(isOverflow) {
|
|
|
325
329
|
});
|
|
326
330
|
/**
|
|
327
331
|
* 处理删除历史记录项事件
|
|
328
|
-
*/ var handleDelete = useRefFunction(
|
|
329
|
-
return
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
332
|
+
*/ var handleDelete = useRefFunction(function() {
|
|
333
|
+
return _async_to_generator(function() {
|
|
334
|
+
return _ts_generator(this, function(_state) {
|
|
335
|
+
switch(_state.label){
|
|
336
|
+
case 0:
|
|
337
|
+
if (!onDeleteItem) return [
|
|
338
|
+
3,
|
|
339
|
+
2
|
|
340
|
+
];
|
|
341
|
+
return [
|
|
342
|
+
4,
|
|
343
|
+
onDeleteItem(item.sessionId)
|
|
344
|
+
];
|
|
345
|
+
case 1:
|
|
346
|
+
_state.sent();
|
|
347
|
+
_state.label = 2;
|
|
348
|
+
case 2:
|
|
349
|
+
return [
|
|
350
|
+
2
|
|
351
|
+
];
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
})();
|
|
355
|
+
});
|
|
350
356
|
/**
|
|
351
357
|
* 渲染单行模式的历史记录项
|
|
352
358
|
* @returns 历史记录项组件
|
|
@@ -502,28 +508,30 @@ HistoryItemSingle.displayName = 'HistoryItemSingle';
|
|
|
502
508
|
});
|
|
503
509
|
/**
|
|
504
510
|
* 处理删除事件
|
|
505
|
-
*/ var handleDelete = useRefFunction(
|
|
506
|
-
return
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
511
|
+
*/ var handleDelete = useRefFunction(function() {
|
|
512
|
+
return _async_to_generator(function() {
|
|
513
|
+
return _ts_generator(this, function(_state) {
|
|
514
|
+
switch(_state.label){
|
|
515
|
+
case 0:
|
|
516
|
+
if (!onDeleteItem) return [
|
|
517
|
+
3,
|
|
518
|
+
2
|
|
519
|
+
];
|
|
520
|
+
return [
|
|
521
|
+
4,
|
|
522
|
+
onDeleteItem(item.sessionId)
|
|
523
|
+
];
|
|
524
|
+
case 1:
|
|
525
|
+
_state.sent();
|
|
526
|
+
_state.label = 2;
|
|
527
|
+
case 2:
|
|
528
|
+
return [
|
|
529
|
+
2
|
|
530
|
+
];
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
})();
|
|
534
|
+
});
|
|
527
535
|
/**
|
|
528
536
|
* 渲染多行模式的历史记录项
|
|
529
537
|
* @returns 历史记录项组件
|
|
@@ -28,12 +28,22 @@ function _object_spread(target) {
|
|
|
28
28
|
}
|
|
29
29
|
function _object_without_properties(source, excluded) {
|
|
30
30
|
if (source == null) return {};
|
|
31
|
-
var target =
|
|
32
|
-
|
|
31
|
+
var target = {}, sourceKeys, key, i;
|
|
32
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
33
|
+
sourceKeys = Reflect.ownKeys(source);
|
|
34
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
35
|
+
key = sourceKeys[i];
|
|
36
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
37
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
38
|
+
target[key] = source[key];
|
|
39
|
+
}
|
|
40
|
+
return target;
|
|
41
|
+
}
|
|
42
|
+
target = _object_without_properties_loose(source, excluded);
|
|
33
43
|
if (Object.getOwnPropertySymbols) {
|
|
34
|
-
|
|
35
|
-
for(i = 0; i <
|
|
36
|
-
key =
|
|
44
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
45
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
46
|
+
key = sourceKeys[i];
|
|
37
47
|
if (excluded.indexOf(key) >= 0) continue;
|
|
38
48
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
39
49
|
target[key] = source[key];
|
|
@@ -43,12 +53,11 @@ function _object_without_properties(source, excluded) {
|
|
|
43
53
|
}
|
|
44
54
|
function _object_without_properties_loose(source, excluded) {
|
|
45
55
|
if (source == null) return {};
|
|
46
|
-
var target = {};
|
|
47
|
-
var sourceKeys = Object.keys(source);
|
|
48
|
-
var key, i;
|
|
56
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
49
57
|
for(i = 0; i < sourceKeys.length; i++){
|
|
50
58
|
key = sourceKeys[i];
|
|
51
59
|
if (excluded.indexOf(key) >= 0) continue;
|
|
60
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
52
61
|
target[key] = source[key];
|
|
53
62
|
}
|
|
54
63
|
return target;
|
|
@@ -92,8 +101,8 @@ import React from "react";
|
|
|
92
101
|
* animationStyle={{ animationTimingFunction: 'ease-in-out' }}
|
|
93
102
|
* />
|
|
94
103
|
* ```
|
|
95
|
-
*/ export var HistoryRunningIcon = /*#__PURE__*/ React.memo(function(
|
|
96
|
-
var
|
|
104
|
+
*/ export var HistoryRunningIcon = /*#__PURE__*/ React.memo(function(_0) {
|
|
105
|
+
var _0_animated = _0.animated, animated = _0_animated === void 0 ? true : _0_animated, _0_duration = _0.duration, duration = _0_duration === void 0 ? 2 : _0_duration, _0_paused = _0.paused, paused = _0_paused === void 0 ? false : _0_paused, animationStyle = _0.animationStyle, style = _0.style, className = _0.className, svgProps = _object_without_properties(_0, [
|
|
97
106
|
"animated",
|
|
98
107
|
"duration",
|
|
99
108
|
"paused",
|
|
@@ -102,7 +102,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
102
102
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
103
103
|
}
|
|
104
104
|
function _ts_generator(thisArg, body) {
|
|
105
|
-
var f, y, t,
|
|
105
|
+
var f, y, t, _ = {
|
|
106
106
|
label: 0,
|
|
107
107
|
sent: function() {
|
|
108
108
|
if (t[0] & 1) throw t[1];
|
|
@@ -110,13 +110,17 @@ function _ts_generator(thisArg, body) {
|
|
|
110
110
|
},
|
|
111
111
|
trys: [],
|
|
112
112
|
ops: []
|
|
113
|
-
};
|
|
114
|
-
return g
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
|
|
113
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
114
|
+
return d(g, "next", {
|
|
115
|
+
value: verb(0)
|
|
116
|
+
}), d(g, "throw", {
|
|
117
|
+
value: verb(1)
|
|
118
|
+
}), d(g, "return", {
|
|
119
|
+
value: verb(2)
|
|
120
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
121
|
+
value: function() {
|
|
122
|
+
return this;
|
|
123
|
+
}
|
|
120
124
|
}), g;
|
|
121
125
|
function verb(n) {
|
|
122
126
|
return function(v) {
|
|
@@ -128,7 +132,7 @@ function _ts_generator(thisArg, body) {
|
|
|
128
132
|
}
|
|
129
133
|
function step(op) {
|
|
130
134
|
if (f) throw new TypeError("Generator is already executing.");
|
|
131
|
-
while(_)try {
|
|
135
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
132
136
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
133
137
|
if (y = 0, t) op = [
|
|
134
138
|
op[0] & 2,
|
|
@@ -252,52 +256,54 @@ export var HistoryLoadMore = function(param) {
|
|
|
252
256
|
var locale = useContext(I18nContext).locale;
|
|
253
257
|
var _useState = _sliced_to_array(useState(false), 2), loading = _useState[0], setLoading = _useState[1];
|
|
254
258
|
var loadingRef = React.useRef(false);
|
|
255
|
-
var onClickFn = useRefFunction(
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
259
|
+
var onClickFn = useRefFunction(function() {
|
|
260
|
+
return _async_to_generator(function() {
|
|
261
|
+
var error;
|
|
262
|
+
return _ts_generator(this, function(_state) {
|
|
263
|
+
switch(_state.label){
|
|
264
|
+
case 0:
|
|
265
|
+
_state.trys.push([
|
|
266
|
+
0,
|
|
267
|
+
2,
|
|
268
|
+
3,
|
|
269
|
+
4
|
|
270
|
+
]);
|
|
271
|
+
if (loadingRef.current) return [
|
|
272
|
+
2
|
|
273
|
+
];
|
|
274
|
+
loadingRef.current = true;
|
|
275
|
+
setLoading(true);
|
|
276
|
+
return [
|
|
277
|
+
4,
|
|
278
|
+
onLoadMore()
|
|
279
|
+
];
|
|
280
|
+
case 1:
|
|
281
|
+
_state.sent();
|
|
282
|
+
return [
|
|
283
|
+
3,
|
|
284
|
+
4
|
|
285
|
+
];
|
|
286
|
+
case 2:
|
|
287
|
+
error = _state.sent();
|
|
288
|
+
console.error(error);
|
|
289
|
+
return [
|
|
290
|
+
3,
|
|
291
|
+
4
|
|
292
|
+
];
|
|
293
|
+
case 3:
|
|
294
|
+
loadingRef.current = false;
|
|
295
|
+
setLoading(false);
|
|
296
|
+
return [
|
|
297
|
+
7
|
|
298
|
+
];
|
|
299
|
+
case 4:
|
|
300
|
+
return [
|
|
301
|
+
2
|
|
302
|
+
];
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
})();
|
|
306
|
+
});
|
|
301
307
|
var handleKeyDown = useRefFunction(function(event) {
|
|
302
308
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
303
309
|
event.preventDefault();
|
|
@@ -74,7 +74,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
74
74
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
75
75
|
}
|
|
76
76
|
function _ts_generator(thisArg, body) {
|
|
77
|
-
var f, y, t,
|
|
77
|
+
var f, y, t, _ = {
|
|
78
78
|
label: 0,
|
|
79
79
|
sent: function() {
|
|
80
80
|
if (t[0] & 1) throw t[1];
|
|
@@ -82,13 +82,17 @@ function _ts_generator(thisArg, body) {
|
|
|
82
82
|
},
|
|
83
83
|
trys: [],
|
|
84
84
|
ops: []
|
|
85
|
-
};
|
|
86
|
-
return g
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
|
|
85
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
86
|
+
return d(g, "next", {
|
|
87
|
+
value: verb(0)
|
|
88
|
+
}), d(g, "throw", {
|
|
89
|
+
value: verb(1)
|
|
90
|
+
}), d(g, "return", {
|
|
91
|
+
value: verb(2)
|
|
92
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
93
|
+
value: function() {
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
92
96
|
}), g;
|
|
93
97
|
function verb(n) {
|
|
94
98
|
return function(v) {
|
|
@@ -100,7 +104,7 @@ function _ts_generator(thisArg, body) {
|
|
|
100
104
|
}
|
|
101
105
|
function step(op) {
|
|
102
106
|
if (f) throw new TypeError("Generator is already executing.");
|
|
103
|
-
while(_)try {
|
|
107
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
104
108
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
105
109
|
if (y = 0, t) op = [
|
|
106
110
|
op[0] & 2,
|
|
@@ -209,44 +213,46 @@ import { useNewChatStyle } from "./NewChatComponent.style";
|
|
|
209
213
|
var _useNewChatStyle = useNewChatStyle(menuPrefixCls), wrapSSR = _useNewChatStyle.wrapSSR, hashId = _useNewChatStyle.hashId;
|
|
210
214
|
var locale = useContext(I18nContext).locale;
|
|
211
215
|
var _useState = _sliced_to_array(useState(false), 2), loading = _useState[0], setLoading = _useState[1];
|
|
212
|
-
var handleClick = useRefFunction(
|
|
213
|
-
return
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
216
|
+
var handleClick = useRefFunction(function() {
|
|
217
|
+
return _async_to_generator(function() {
|
|
218
|
+
return _ts_generator(this, function(_state) {
|
|
219
|
+
switch(_state.label){
|
|
220
|
+
case 0:
|
|
221
|
+
if (loading) return [
|
|
222
|
+
2
|
|
223
|
+
];
|
|
224
|
+
_state.label = 1;
|
|
225
|
+
case 1:
|
|
226
|
+
_state.trys.push([
|
|
227
|
+
1,
|
|
228
|
+
,
|
|
229
|
+
3,
|
|
230
|
+
4
|
|
231
|
+
]);
|
|
232
|
+
setLoading(true);
|
|
233
|
+
return [
|
|
234
|
+
4,
|
|
235
|
+
onNewChat()
|
|
236
|
+
];
|
|
237
|
+
case 2:
|
|
238
|
+
_state.sent();
|
|
239
|
+
return [
|
|
240
|
+
3,
|
|
241
|
+
4
|
|
242
|
+
];
|
|
243
|
+
case 3:
|
|
244
|
+
setLoading(false);
|
|
245
|
+
return [
|
|
246
|
+
7
|
|
247
|
+
];
|
|
248
|
+
case 4:
|
|
249
|
+
return [
|
|
250
|
+
2
|
|
251
|
+
];
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
})();
|
|
255
|
+
});
|
|
250
256
|
var handleKeyDown = useRefFunction(function(event) {
|
|
251
257
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
252
258
|
event.preventDefault();
|
|
@@ -102,7 +102,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
102
102
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
103
103
|
}
|
|
104
104
|
function _ts_generator(thisArg, body) {
|
|
105
|
-
var f, y, t,
|
|
105
|
+
var f, y, t, _ = {
|
|
106
106
|
label: 0,
|
|
107
107
|
sent: function() {
|
|
108
108
|
if (t[0] & 1) throw t[1];
|
|
@@ -110,13 +110,17 @@ function _ts_generator(thisArg, body) {
|
|
|
110
110
|
},
|
|
111
111
|
trys: [],
|
|
112
112
|
ops: []
|
|
113
|
-
};
|
|
114
|
-
return g
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
|
|
113
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
114
|
+
return d(g, "next", {
|
|
115
|
+
value: verb(0)
|
|
116
|
+
}), d(g, "throw", {
|
|
117
|
+
value: verb(1)
|
|
118
|
+
}), d(g, "return", {
|
|
119
|
+
value: verb(2)
|
|
120
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
121
|
+
value: function() {
|
|
122
|
+
return this;
|
|
123
|
+
}
|
|
120
124
|
}), g;
|
|
121
125
|
function verb(n) {
|
|
122
126
|
return function(v) {
|
|
@@ -128,7 +132,7 @@ function _ts_generator(thisArg, body) {
|
|
|
128
132
|
}
|
|
129
133
|
function step(op) {
|
|
130
134
|
if (f) throw new TypeError("Generator is already executing.");
|
|
131
|
-
while(_)try {
|
|
135
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
132
136
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
133
137
|
if (y = 0, t) op = [
|
|
134
138
|
op[0] & 2,
|
|
@@ -253,6 +257,7 @@ function SearchIcon(props) {
|
|
|
253
257
|
* - 默认显示搜索图标,点击后展开搜索框
|
|
254
258
|
*/ export var HistorySearch = function(param) {
|
|
255
259
|
var onSearch = param.onSearch, type = param.type, searchOptions = param.searchOptions;
|
|
260
|
+
var _ref, _ref1;
|
|
256
261
|
var locale = useContext(I18nContext).locale;
|
|
257
262
|
var _useState = _sliced_to_array(useState(false), 2), loading = _useState[0], setLoading = _useState[1];
|
|
258
263
|
var _useState1 = _sliced_to_array(useState(false), 2), isExpanded = _useState1[0], setIsExpanded = _useState1[1];
|
|
@@ -264,8 +269,8 @@ function SearchIcon(props) {
|
|
|
264
269
|
setIsExpanded(false);
|
|
265
270
|
}
|
|
266
271
|
}, ref);
|
|
267
|
-
var handleSearchWithLoading =
|
|
268
|
-
|
|
272
|
+
var handleSearchWithLoading = function(value) {
|
|
273
|
+
return _async_to_generator(function() {
|
|
269
274
|
var error;
|
|
270
275
|
return _ts_generator(this, function(_state) {
|
|
271
276
|
switch(_state.label){
|
|
@@ -304,16 +309,13 @@ function SearchIcon(props) {
|
|
|
304
309
|
];
|
|
305
310
|
}
|
|
306
311
|
});
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
return _ref.apply(this, arguments);
|
|
310
|
-
};
|
|
311
|
-
}();
|
|
312
|
+
})();
|
|
313
|
+
};
|
|
312
314
|
var handleToggleSearch = function() {
|
|
313
315
|
setIsExpanded(!isExpanded);
|
|
314
316
|
};
|
|
315
|
-
var handleSearchChange = useDebounceFn(
|
|
316
|
-
|
|
317
|
+
var handleSearchChange = useDebounceFn(function(e) {
|
|
318
|
+
return _async_to_generator(function() {
|
|
317
319
|
var value;
|
|
318
320
|
return _ts_generator(this, function(_state) {
|
|
319
321
|
value = e.target.value;
|
|
@@ -322,11 +324,8 @@ function SearchIcon(props) {
|
|
|
322
324
|
2
|
|
323
325
|
];
|
|
324
326
|
});
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
return _ref.apply(this, arguments);
|
|
328
|
-
};
|
|
329
|
-
}(), 360);
|
|
327
|
+
})();
|
|
328
|
+
}, 360);
|
|
330
329
|
var handleInputChange = function(e) {
|
|
331
330
|
var value = e.target.value;
|
|
332
331
|
setInputValue(value);
|
|
@@ -339,7 +338,6 @@ function SearchIcon(props) {
|
|
|
339
338
|
handleSearchWithLoading(inputValue);
|
|
340
339
|
}
|
|
341
340
|
};
|
|
342
|
-
var _searchOptions_placeholder, _searchOptions_text;
|
|
343
341
|
// 展开后显示搜索框
|
|
344
342
|
return /*#__PURE__*/ React.createElement("div", {
|
|
345
343
|
ref: ref,
|
|
@@ -351,7 +349,7 @@ function SearchIcon(props) {
|
|
|
351
349
|
padding: isExpanded ? 0 : '0 6px 0 12px'
|
|
352
350
|
}
|
|
353
351
|
}, isExpanded ? /*#__PURE__*/ React.createElement(Input, {
|
|
354
|
-
placeholder: (
|
|
352
|
+
placeholder: (_ref = searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.placeholder) !== null && _ref !== void 0 ? _ref : type === 'task' ? (locale === null || locale === void 0 ? void 0 : locale['chat.task.search.placeholder']) || '搜索任务' : (locale === null || locale === void 0 ? void 0 : locale['chat.history.search.placeholder']) || '搜索话题',
|
|
355
353
|
prefix: loading ? /*#__PURE__*/ React.createElement(Spin, {
|
|
356
354
|
size: "small"
|
|
357
355
|
}) : /*#__PURE__*/ React.createElement(SearchIcon, {
|
|
@@ -381,7 +379,7 @@ function SearchIcon(props) {
|
|
|
381
379
|
color: 'var(--color-gray-text-light)',
|
|
382
380
|
flex: 1
|
|
383
381
|
}
|
|
384
|
-
}, (
|
|
382
|
+
}, (_ref1 = searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.text) !== null && _ref1 !== void 0 ? _ref1 : type === 'task' ? (locale === null || locale === void 0 ? void 0 : locale['chat.history.historyTasks']) || '历史任务' : (locale === null || locale === void 0 ? void 0 : locale['chat.history.historyChats']) || '历史对话'), /*#__PURE__*/ React.createElement(ActionIconBox, {
|
|
385
383
|
onClick: handleToggleSearch,
|
|
386
384
|
title: (locale === null || locale === void 0 ? void 0 : locale['chat.history.search']) || '搜索',
|
|
387
385
|
style: {
|