@blueking/ai-ui-sdk 0.0.15-beta.4 → 0.0.15-beta.6
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/assets/images/ai.png +0 -0
- package/dist/assets/images/user.png +0 -0
- package/dist/assets/svg/picture-fail.svg +1 -0
- package/dist/common/util.d.ts +10 -0
- package/dist/common/util.js +34 -0
- package/dist/component/render-image/index.script.vue.js +37 -0
- package/dist/component/render-image/index.vue.d.ts +6 -0
- package/dist/component/render-image/index.vue.js +3 -0
- package/dist/component/render-input/index.script.vue.js +205 -0
- package/dist/component/render-input/index.vue.css +134 -0
- package/dist/component/render-input/index.vue.d.ts +18 -0
- package/dist/component/render-input/index.vue.js +5 -0
- package/dist/component/render-input/render-drag.script.vue.js +61 -0
- package/dist/component/render-input/render-drag.vue.css +32 -0
- package/dist/component/render-input/render-drag.vue.d.ts +13 -0
- package/dist/component/render-input/render-drag.vue.js +5 -0
- package/dist/component/render-input/render-quill.script.vue.js +200 -0
- package/dist/component/render-input/render-quill.vue.css +27 -0
- package/dist/component/render-input/render-quill.vue.d.ts +25 -0
- package/dist/component/render-input/render-quill.vue.js +4 -0
- package/dist/component/render-knowledge-icon/index.script.vue.js +40 -0
- package/dist/component/render-knowledge-icon/index.vue.css +4 -0
- package/dist/component/render-knowledge-icon/index.vue.d.ts +14 -0
- package/dist/component/render-knowledge-icon/index.vue.js +5 -0
- package/dist/component/render-markdown/mark-down-code.d.ts +2 -0
- package/dist/component/render-markdown/mark-down-code.js +171 -0
- package/dist/component/render-markdown/mark-down-emoji.d.ts +2 -0
- package/dist/component/render-markdown/mark-down-emoji.js +4 -0
- package/dist/component/render-markdown/mark-down.d.ts +74 -0
- package/dist/component/render-markdown/mark-down.js +147 -0
- package/dist/component/render-markdown/mark-down.postcss.css +131 -0
- package/dist/component/render-message/image-not-supported-message.script.vue.js +99 -0
- package/dist/component/render-message/image-not-supported-message.vue.css +66 -0
- package/dist/component/render-message/image-not-supported-message.vue.d.ts +21 -0
- package/dist/component/render-message/image-not-supported-message.vue.js +5 -0
- package/dist/component/render-message/index.script.vue.js +104 -0
- package/dist/component/render-message/index.vue.d.ts +13 -0
- package/dist/component/render-message/index.vue.js +3 -0
- package/dist/component/render-message/openai-message.script.vue.js +215 -0
- package/dist/component/render-message/openai-message.vue.css +98 -0
- package/dist/component/render-message/openai-message.vue.d.ts +15 -0
- package/dist/component/render-message/openai-message.vue.js +5 -0
- package/dist/component/render-message/skeleton-message.script.vue.js +7 -0
- package/dist/component/render-message/skeleton-message.vue.css +7 -0
- package/dist/component/render-message/skeleton-message.vue.d.ts +2 -0
- package/dist/component/render-message/skeleton-message.vue.js +6 -0
- package/dist/component/render-message/system-message.script.vue.js +17 -0
- package/dist/component/render-message/system-message.vue.css +20 -0
- package/dist/component/render-message/system-message.vue.d.ts +6 -0
- package/dist/component/render-message/system-message.vue.js +5 -0
- package/dist/component/render-message/time-message.script.vue.js +41 -0
- package/dist/component/render-message/time-message.vue.css +14 -0
- package/dist/component/render-message/time-message.vue.d.ts +6 -0
- package/dist/component/render-message/time-message.vue.js +5 -0
- package/dist/component/render-message/token-expired-message.script.vue.js +78 -0
- package/dist/component/render-message/token-expired-message.vue.css +60 -0
- package/dist/component/render-message/token-expired-message.vue.d.ts +15 -0
- package/dist/component/render-message/token-expired-message.vue.js +5 -0
- package/dist/component/render-message/user-message.script.vue.js +241 -0
- package/dist/component/render-message/user-message.vue.css +100 -0
- package/dist/component/render-message/user-message.vue.d.ts +21 -0
- package/dist/component/render-message/user-message.vue.js +5 -0
- package/dist/event/index.js +2 -1
- package/dist/hooks/use-chat.d.ts +6 -5
- package/dist/hooks/use-chat.js +19 -17
- package/dist/hooks/use-mouse-drag.d.ts +13 -0
- package/dist/hooks/use-mouse-drag.js +59 -0
- package/dist/http/fetch/error-interceptor.js +23 -2
- package/dist/main.d.ts +3 -0
- package/dist/main.js +4 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-double-down-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-double-left-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-double-left.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-double-right-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-double-right.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-double-up-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-down-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-down-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-down.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-left.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-right.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-up-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-up.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/archive-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/arrows-left.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/arrows-right.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/assistant.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/audio-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/bk.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/circle.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/close-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/close.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/code.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/cog-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/collapse-left.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/copy-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/copy.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/data-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/del.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/doc-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/done.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/down-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/down-small.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/edit-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/ellipsis.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/enlarge-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/error.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/excel-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/exclamation-circle-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/eye.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/filliscreen-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/fix-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/fix-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/folder-open.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/folder-shape-open.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/folder-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/folder.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/funnel.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/grag-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/help-document-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/help-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/help.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/image-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/img-error.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/img-placehoulder.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/index.js +113 -0
- package/dist/node_modules/bkui-vue/lib/icon/info-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/info.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/left-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/left-turn-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/loading.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/narrow-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/original.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/pdf-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/play-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/plus.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/ppt-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/qq.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/right-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/right-turn-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/search.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/share.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/spinner.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/success.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/switcher-loading.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/text-all.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/text-file.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/text-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/transfer.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/tree-application-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/unfull-screen.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/unvisible.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/up-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/upload.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/video-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/warn.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/weixin-pro.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/weixin.js +191 -0
- package/dist/node_modules/bkui-vue/lib/styles/reset.css +439 -0
- package/dist/node_modules/call-bind/index.js +24 -0
- package/dist/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/dist/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/dist/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/dist/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/dist/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/dist/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/dist/node_modules/call-bound/index.js +19 -0
- package/dist/node_modules/deep-equal/index.js +112 -0
- package/dist/node_modules/define-data-property/index.js +56 -0
- package/dist/node_modules/define-properties/index.js +47 -0
- package/dist/node_modules/dunder-proto/get.js +30 -0
- package/dist/node_modules/es-define-property/index.js +14 -0
- package/dist/node_modules/es-errors/eval.js +4 -0
- package/dist/node_modules/es-errors/index.js +4 -0
- package/dist/node_modules/es-errors/range.js +4 -0
- package/dist/node_modules/es-errors/ref.js +4 -0
- package/dist/node_modules/es-errors/syntax.js +4 -0
- package/dist/node_modules/es-errors/type.js +4 -0
- package/dist/node_modules/es-errors/uri.js +4 -0
- package/dist/node_modules/es-object-atoms/index.js +4 -0
- package/dist/node_modules/extend/index.js +117 -0
- package/dist/node_modules/fast-diff/diff.js +738 -0
- package/dist/node_modules/function-bind/implementation.js +84 -0
- package/dist/node_modules/function-bind/index.js +5 -0
- package/dist/node_modules/functions-have-names/index.js +31 -0
- package/dist/node_modules/get-intrinsic/index.js +378 -0
- package/dist/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/dist/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/dist/node_modules/get-proto/index.js +27 -0
- package/dist/node_modules/gopd/gOPD.js +4 -0
- package/dist/node_modules/gopd/index.js +15 -0
- package/dist/node_modules/has-property-descriptors/index.js +22 -0
- package/dist/node_modules/has-symbols/index.js +14 -0
- package/dist/node_modules/has-symbols/shams.js +45 -0
- package/dist/node_modules/has-tostringtag/shams.js +8 -0
- package/dist/node_modules/hasown/index.js +8 -0
- package/dist/node_modules/is-arguments/index.js +44 -0
- package/dist/node_modules/is-date-object/index.js +27 -0
- package/dist/node_modules/is-regex/index.js +69 -0
- package/dist/node_modules/math-intrinsics/abs.js +4 -0
- package/dist/node_modules/math-intrinsics/floor.js +4 -0
- package/dist/node_modules/math-intrinsics/isNaN.js +6 -0
- package/dist/node_modules/math-intrinsics/max.js +4 -0
- package/dist/node_modules/math-intrinsics/min.js +4 -0
- package/dist/node_modules/math-intrinsics/pow.js +4 -0
- package/dist/node_modules/math-intrinsics/round.js +4 -0
- package/dist/node_modules/math-intrinsics/sign.js +11 -0
- package/dist/node_modules/object-is/implementation.js +19 -0
- package/dist/node_modules/object-is/index.js +18 -0
- package/dist/node_modules/object-is/polyfill.js +7 -0
- package/dist/node_modules/object-is/shim.js +14 -0
- package/dist/node_modules/object-keys/implementation.js +122 -0
- package/dist/node_modules/object-keys/index.js +32 -0
- package/dist/node_modules/object-keys/isArguments.js +17 -0
- package/dist/node_modules/quill/dist/quill.js +11562 -0
- package/dist/node_modules/quill/dist/quill.snow.css +945 -0
- package/dist/node_modules/quill-delta/lib/delta.js +344 -0
- package/dist/node_modules/quill-delta/lib/op.js +155 -0
- package/dist/node_modules/quill-image-uploader/dist/blots/image.js +30 -0
- package/dist/node_modules/quill-image-uploader/dist/quill.imageUploader.js +198 -0
- package/dist/node_modules/quill-image-uploader/dist/quill.imageUploader.min.css +33 -0
- package/dist/node_modules/regexp.prototype.flags/implementation.js +39 -0
- package/dist/node_modules/regexp.prototype.flags/index.js +18 -0
- package/dist/node_modules/regexp.prototype.flags/polyfill.js +39 -0
- package/dist/node_modules/regexp.prototype.flags/shim.js +26 -0
- package/dist/node_modules/set-function-length/index.js +42 -0
- package/dist/node_modules/set-function-name/index.js +23 -0
- package/dist/node_modules/x-mavon-editor/dist/css/index.css +1 -0
- package/dist/node_modules/x-mavon-editor/dist/font/fontello.eot +0 -0
- package/dist/node_modules/x-mavon-editor/dist/font/fontello.svg +72 -0
- package/dist/node_modules/x-mavon-editor/dist/font/fontello.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/font/fontello.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/font/fontello.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/highlight.min.js +1150 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/bash.min.js +20 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/css.min.js +31 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/go.min.js +14 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/java.min.js +37 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/javascript.min.js +76 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/json.min.js +7 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/markdown.min.js +31 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/perl.min.js +36 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/php.min.js +37 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/python.min.js +42 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/ruby.min.js +48 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/sql.min.js +17 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/swift.min.js +60 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/typescript.min.js +92 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/xml.min.js +28 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/styles/atom-one-dark.min.css +1 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/katex.min.css +1 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/katex.min.js +1 -0
- package/dist/node_modules/x-mavon-editor/dist/markdown/github-markdown.min.css +2 -0
- package/dist/node_modules/x-mavon-editor/dist/mavon-editor.js +31 -0
- package/dist/types/enum.d.ts +6 -1
- package/dist/types/enum.js +7 -1
- package/dist/types/model.d.ts +14 -0
- package/dist/types/session.d.ts +0 -2
- package/package.json +11 -4
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><g ><path fill="#979BA5" d="M208 198.88l168 0-7.84 86.08 51.68 87.36L382.4 486.72l114.88-98.4 7.84-112 41.76-78.08H824.64a56 56 0 0 1 51.68 52.8V721.6L747.04 555.36a40.96 40.96 0 0 0-67.36-5.12l-145.76 146.88L384 502.56c-16-20.96-41.76-20.96-62.56 0L150.56 712.96 152 252.48A54.4 54.4 0 0 1 208 198.88M823.84 145.44l-315.04 0-48 134.4 10.08 96.8L416 432l32.96-64-37.28-96 33.76-128-242.56 1.44A106.24 106.24 0 0 0 96 248.16l2.08 524.8A104.64 104.64 0 0 0 200.16 880h624A104.64 104.64 0 0 0 928 775.2V250.24a104.96 104.96 0 0 0-104.16-104.8"/><path fill="#979BA5" d="M569.28 405.44a88.32 88.32 0 0 0 43.04 75.52 84.64 84.64 0 0 0 86.88 0 86.72 86.72 0 0 0 43.04-75.52 88.64 88.64 0 0 0-43.04-75.52 85.44 85.44 0 0 0-86.88 0 88.64 88.64 0 0 0-43.04 75.52"/></g></svg>
|
package/dist/common/util.d.ts
CHANGED
@@ -51,3 +51,13 @@ export declare const processPromptTemplate: (prompt: string, selectedText: strin
|
|
51
51
|
* @returns 全屏的父元素
|
52
52
|
*/
|
53
53
|
export declare const getFullScreenWrap: (target: HTMLElement) => HTMLElement | null;
|
54
|
+
/**
|
55
|
+
* 获取用户头像
|
56
|
+
* @param username 用户名
|
57
|
+
* @returns 头像地址
|
58
|
+
*/
|
59
|
+
export declare function getUserImageUrl(username?: string): any;
|
60
|
+
/**
|
61
|
+
* 处理头像加载失败的场景
|
62
|
+
*/
|
63
|
+
export declare function handleImageError(event: Event): void;
|
package/dist/common/util.js
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
import { Message } from 'bkui-vue';
|
2
|
+
import { emitEvent } from '../event/index.js';
|
3
|
+
import { EventType } from '../types/enum.js';
|
4
|
+
import userImageUrl from '../assets/images/user.png';
|
2
5
|
/**
|
3
6
|
* 节流,每隔一段时间执行
|
4
7
|
* @param {*} fn 需要执行的函数
|
@@ -141,3 +144,34 @@ export const handleCopy = (text)=>{
|
|
141
144
|
}
|
142
145
|
return parentElement;
|
143
146
|
};
|
147
|
+
/**
|
148
|
+
* 获取用户头像
|
149
|
+
* @param username 用户名
|
150
|
+
* @returns 头像地址
|
151
|
+
*/ export function getUserImageUrl(username = '') {
|
152
|
+
var _process_env_BK_USER_IMAGE_URL;
|
153
|
+
if (username === 'admin') {
|
154
|
+
return userImageUrl;
|
155
|
+
}
|
156
|
+
return ((_process_env_BK_USER_IMAGE_URL = process.env.BK_USER_IMAGE_URL) === null || _process_env_BK_USER_IMAGE_URL === void 0 ? void 0 : _process_env_BK_USER_IMAGE_URL.replace('{placeholder}', username)) || userImageUrl;
|
157
|
+
}
|
158
|
+
/**
|
159
|
+
* 处理头像加载失败的场景
|
160
|
+
*/ export function handleImageError(event) {
|
161
|
+
const { target } = event;
|
162
|
+
if (target.naturalWidth === 0) {
|
163
|
+
// 使用fetch API检查图片URL
|
164
|
+
fetch(target.src, {
|
165
|
+
method: 'HEAD',
|
166
|
+
credentials: 'include',
|
167
|
+
redirect: 'manual'
|
168
|
+
}).then((response)=>{
|
169
|
+
if (response.type === 'opaqueredirect') {
|
170
|
+
// 检测到重定向,调用登录方法
|
171
|
+
emitEvent(EventType.Unlogin);
|
172
|
+
}
|
173
|
+
}).catch((error)=>{
|
174
|
+
console.error('Failed to check image status:', error);
|
175
|
+
});
|
176
|
+
}
|
177
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
2
|
+
import { mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
3
|
+
const _hoisted_1 = [
|
4
|
+
"src"
|
5
|
+
];
|
6
|
+
import fallbackPng from '../../assets/svg/picture-fail.svg';
|
7
|
+
export default /*@__PURE__*/ _defineComponent({
|
8
|
+
props: {
|
9
|
+
url: {},
|
10
|
+
size: {}
|
11
|
+
},
|
12
|
+
setup (__props) {
|
13
|
+
const handleImageError = (e)=>{
|
14
|
+
const target = e.target;
|
15
|
+
target.src = fallbackPng;
|
16
|
+
};
|
17
|
+
return (_ctx, _cache)=>{
|
18
|
+
return /http(s)?:\/\//.test(_ctx.url) ? (_openBlock(), _createElementBlock("img", _mergeProps({
|
19
|
+
key: 0
|
20
|
+
}, _ctx.$attrs, {
|
21
|
+
src: _ctx.url,
|
22
|
+
style: {
|
23
|
+
width: `${_ctx.size}px`,
|
24
|
+
height: `${_ctx.size}px`
|
25
|
+
},
|
26
|
+
onError: handleImageError
|
27
|
+
}), null, 16 /* FULL_PROPS */ , _hoisted_1)) : (_openBlock(), _createElementBlock("i", _mergeProps({
|
28
|
+
key: 1
|
29
|
+
}, _ctx.$attrs, {
|
30
|
+
class: `bkaidev-icon bkaidev-${_ctx.url}`,
|
31
|
+
style: {
|
32
|
+
fontSize: `${_ctx.size}px`
|
33
|
+
}
|
34
|
+
}), null, 16 /* FULL_PROPS */ ));
|
35
|
+
};
|
36
|
+
}
|
37
|
+
});
|
@@ -0,0 +1,6 @@
|
|
1
|
+
interface IProps {
|
2
|
+
url: string;
|
3
|
+
size: number;
|
4
|
+
}
|
5
|
+
declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
6
|
+
export default _default;
|
@@ -0,0 +1,205 @@
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
2
|
+
import { normalizeClass as _normalizeClass, createVNode as _createVNode, createElementVNode as _createElementVNode, unref as _unref, withDirectives as _withDirectives, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from "vue";
|
3
|
+
const _hoisted_1 = {
|
4
|
+
class: "quill-container"
|
5
|
+
};
|
6
|
+
import { bkTooltips as vBkTooltips } from 'bkui-vue';
|
7
|
+
import { Close } from '../../../dist/node_modules/bkui-vue/lib/icon/index.js';
|
8
|
+
import { computed, getCurrentInstance, nextTick, onMounted, ref, watch } from 'vue';
|
9
|
+
import RenderDrag from './render-drag.vue.js';
|
10
|
+
import RenderQuill from './render-quill.vue.js';
|
11
|
+
import { SessionContentRole } from '../../types/enum.js';
|
12
|
+
export default /*@__PURE__*/ _defineComponent({
|
13
|
+
props: {
|
14
|
+
isChatting: {
|
15
|
+
type: Boolean
|
16
|
+
},
|
17
|
+
width: {},
|
18
|
+
dragPosition: {},
|
19
|
+
id: {},
|
20
|
+
supportTools: {
|
21
|
+
type: Boolean
|
22
|
+
},
|
23
|
+
supportImage: {
|
24
|
+
type: Boolean
|
25
|
+
},
|
26
|
+
sessionId: {},
|
27
|
+
placeholder: {},
|
28
|
+
sessionContents: {}
|
29
|
+
},
|
30
|
+
emits: [
|
31
|
+
"send"
|
32
|
+
],
|
33
|
+
setup (__props, { emit: __emit }) {
|
34
|
+
const props = __props;
|
35
|
+
const emit = __emit;
|
36
|
+
const vm = getCurrentInstance();
|
37
|
+
const quillRef = ref();
|
38
|
+
const textHeight = ref(120);
|
39
|
+
const defaultHeight = ref(120);
|
40
|
+
const prompt = ref('');
|
41
|
+
const isUploadingImage = ref(false);
|
42
|
+
const disableTips = computed(()=>{
|
43
|
+
if (!prompt.value) {
|
44
|
+
return '请输入 Prompt 后再发送';
|
45
|
+
}
|
46
|
+
if (!prompt.value.trim()) {
|
47
|
+
return '输入的 Prompt 不能只包含空格';
|
48
|
+
}
|
49
|
+
if (props.isChatting) {
|
50
|
+
return '当前会话进行中,请等待会话结束后再发送';
|
51
|
+
}
|
52
|
+
if (isUploadingImage.value) {
|
53
|
+
return '正在上传图片,请等待图片上传完成后再发送';
|
54
|
+
}
|
55
|
+
return '';
|
56
|
+
});
|
57
|
+
const placeholder = computed(()=>{
|
58
|
+
let placeholder = '请输入 Prompt';
|
59
|
+
if (props.supportImage) {
|
60
|
+
placeholder += '\n您可以粘贴并发送图片,以查询图片相关问题';
|
61
|
+
}
|
62
|
+
if (props.supportTools) {
|
63
|
+
placeholder += '\n您可以键入“@”来快速获取该会话绑定的“知识和工具”名称来进行问答';
|
64
|
+
}
|
65
|
+
if (props.placeholder) {
|
66
|
+
placeholder = props.placeholder;
|
67
|
+
}
|
68
|
+
return placeholder;
|
69
|
+
});
|
70
|
+
const autoFocus = ()=>{
|
71
|
+
nextTick(()=>{
|
72
|
+
var _quillRef_value;
|
73
|
+
(_quillRef_value = quillRef.value) === null || _quillRef_value === void 0 ? void 0 : _quillRef_value.focus();
|
74
|
+
});
|
75
|
+
};
|
76
|
+
const handleChangeTextHeight = ()=>{
|
77
|
+
nextTick(()=>{
|
78
|
+
var _vm_proxy;
|
79
|
+
const elm = vm === null || vm === void 0 ? void 0 : (_vm_proxy = vm.proxy) === null || _vm_proxy === void 0 ? void 0 : _vm_proxy.$el.nextElementSibling.querySelector('.send-prompt-container .ql-editor');
|
80
|
+
if ((elm === null || elm === void 0 ? void 0 : elm.scrollHeight) > defaultHeight.value && prompt.value) {
|
81
|
+
textHeight.value = elm.scrollHeight <= 400 ? elm.scrollHeight : 400;
|
82
|
+
} else {
|
83
|
+
textHeight.value = defaultHeight.value;
|
84
|
+
}
|
85
|
+
});
|
86
|
+
};
|
87
|
+
// 从历史里面选择文本
|
88
|
+
const handleChooseHistory = ()=>{
|
89
|
+
var _props_sessionContents;
|
90
|
+
const userSessionContents = ((_props_sessionContents = props.sessionContents) === null || _props_sessionContents === void 0 ? void 0 : _props_sessionContents.filter((sessionContent)=>[
|
91
|
+
SessionContentRole.User,
|
92
|
+
SessionContentRole.Role,
|
93
|
+
SessionContentRole.UserImage
|
94
|
+
].includes(sessionContent.role))) || [];
|
95
|
+
const { content } = userSessionContents[userSessionContents.length - 1];
|
96
|
+
if (content !== prompt.value) {
|
97
|
+
var _quillRef_value;
|
98
|
+
(_quillRef_value = quillRef.value) === null || _quillRef_value === void 0 ? void 0 : _quillRef_value.setText(content);
|
99
|
+
}
|
100
|
+
};
|
101
|
+
const handleKeyDown = (event)=>{
|
102
|
+
var _props_sessionContents;
|
103
|
+
// 数据
|
104
|
+
const isEmpty = prompt.value === '' || prompt.value === undefined;
|
105
|
+
// 状态
|
106
|
+
const isSpecialEnter = event.key === 'Enter' && !event.shiftKey && !event.ctrlKey && !event.metaKey && !event.isComposing;
|
107
|
+
const isShowUpHistory = event.key === 'ArrowUp' && ((_props_sessionContents = props.sessionContents) === null || _props_sessionContents === void 0 ? void 0 : _props_sessionContents.length) && isEmpty;
|
108
|
+
if (isSpecialEnter) {
|
109
|
+
event.preventDefault();
|
110
|
+
handleSendPrompt();
|
111
|
+
}
|
112
|
+
if (isShowUpHistory) {
|
113
|
+
handleChooseHistory();
|
114
|
+
}
|
115
|
+
};
|
116
|
+
const handleChangeInput = (val)=>{
|
117
|
+
prompt.value = val;
|
118
|
+
};
|
119
|
+
const handleClearUserPrompt = ()=>{
|
120
|
+
var _quillRef_value;
|
121
|
+
(_quillRef_value = quillRef.value) === null || _quillRef_value === void 0 ? void 0 : _quillRef_value.setText('');
|
122
|
+
};
|
123
|
+
const handleSendPrompt = ()=>{
|
124
|
+
var // 清空
|
125
|
+
_quillRef_value;
|
126
|
+
// 没内容或执行中不做操作
|
127
|
+
if (disableTips.value) return;
|
128
|
+
// 发送
|
129
|
+
emit('send', prompt.value);
|
130
|
+
(_quillRef_value = quillRef.value) === null || _quillRef_value === void 0 ? void 0 : _quillRef_value.setText('');
|
131
|
+
};
|
132
|
+
watch(()=>prompt.value, (val)=>{
|
133
|
+
handleChangeTextHeight();
|
134
|
+
});
|
135
|
+
onMounted(autoFocus);
|
136
|
+
return (_ctx, _cache)=>{
|
137
|
+
return _openBlock(), _createElementBlock("section", {
|
138
|
+
class: _normalizeClass([
|
139
|
+
'send-prompt-container',
|
140
|
+
_ctx.$attrs.class
|
141
|
+
]),
|
142
|
+
style: _normalizeStyle({
|
143
|
+
'--text-height': textHeight.value + 'px',
|
144
|
+
'--default-height': defaultHeight.value + 'px',
|
145
|
+
'--textarea-bottom': -textHeight.value + 'px'
|
146
|
+
})
|
147
|
+
}, [
|
148
|
+
_createElementVNode("section", _hoisted_1, [
|
149
|
+
_createVNode(RenderQuill, {
|
150
|
+
"is-uploading-image": isUploadingImage.value,
|
151
|
+
"onUpdate:isUploadingImage": _cache[0] || (_cache[0] = ($event)=>isUploadingImage.value = $event),
|
152
|
+
value: prompt.value,
|
153
|
+
placeholder: placeholder.value,
|
154
|
+
"session-id": _ctx.sessionId,
|
155
|
+
"support-image": _ctx.supportImage,
|
156
|
+
class: _normalizeClass({
|
157
|
+
'send-prompt': true
|
158
|
+
}),
|
159
|
+
ref_key: "quillRef",
|
160
|
+
ref: quillRef,
|
161
|
+
onKeydown: handleKeyDown,
|
162
|
+
onChange: handleChangeInput
|
163
|
+
}, null, 8 /* PROPS */ , [
|
164
|
+
"is-uploading-image",
|
165
|
+
"value",
|
166
|
+
"placeholder",
|
167
|
+
"session-id",
|
168
|
+
"support-image"
|
169
|
+
])
|
170
|
+
]),
|
171
|
+
_withDirectives(_createElementVNode("i", {
|
172
|
+
class: _normalizeClass({
|
173
|
+
'bkaidev-icon bkaidev-fasong': true,
|
174
|
+
'disable': disableTips.value
|
175
|
+
}),
|
176
|
+
onMousedown: handleSendPrompt
|
177
|
+
}, null, 34 /* CLASS, NEED_HYDRATION */ ), [
|
178
|
+
[
|
179
|
+
_unref(vBkTooltips),
|
180
|
+
{
|
181
|
+
content: disableTips.value,
|
182
|
+
disabled: !disableTips.value
|
183
|
+
}
|
184
|
+
]
|
185
|
+
]),
|
186
|
+
prompt.value ? (_openBlock(), _createBlock(_unref(Close), {
|
187
|
+
key: 0,
|
188
|
+
class: "show-clear-only-hover bk-input--clear-icon bk-input--suffix-icon clear-icon",
|
189
|
+
onClick: handleClearUserPrompt
|
190
|
+
})) : _createCommentVNode("v-if", true),
|
191
|
+
_createVNode(RenderDrag, {
|
192
|
+
"default-height": defaultHeight.value,
|
193
|
+
"onUpdate:defaultHeight": _cache[1] || (_cache[1] = ($event)=>defaultHeight.value = $event),
|
194
|
+
"text-height": textHeight.value,
|
195
|
+
"onUpdate:textHeight": _cache[2] || (_cache[2] = ($event)=>textHeight.value = $event),
|
196
|
+
position: _ctx.dragPosition
|
197
|
+
}, null, 8 /* PROPS */ , [
|
198
|
+
"default-height",
|
199
|
+
"text-height",
|
200
|
+
"position"
|
201
|
+
])
|
202
|
+
], 6 /* CLASS, STYLE */ );
|
203
|
+
};
|
204
|
+
}
|
205
|
+
});
|
@@ -0,0 +1,134 @@
|
|
1
|
+
|
2
|
+
.send-prompt-container {
|
3
|
+
&[data-v-jzxupr6c] {
|
4
|
+
width: 800px;
|
5
|
+
z-index: 1501;
|
6
|
+
overflow: visible;
|
7
|
+
position: relative;
|
8
|
+
}
|
9
|
+
[data-v-jzxupr6c] .textarea-list {
|
10
|
+
bottom: var(--textarea-bottom);
|
11
|
+
}
|
12
|
+
&:hover {
|
13
|
+
.clear-icon[data-v-jzxupr6c] {
|
14
|
+
display: inline-flex !important;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
.quill-container {
|
19
|
+
&[data-v-jzxupr6c] {
|
20
|
+
background: #fff;
|
21
|
+
box-shadow: 0 0 6px 0 #0000001a;
|
22
|
+
border-radius: 4px;
|
23
|
+
box-sizing: border-box !important;
|
24
|
+
border: 1px solid transparent;
|
25
|
+
}
|
26
|
+
&.active[data-v-jzxupr6c] {
|
27
|
+
border: 1px solid #3A84FF !important;
|
28
|
+
}
|
29
|
+
&[data-v-jzxupr6c]:has(.ql-editor:focus) {
|
30
|
+
border: 1px solid #3A84FF !important;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
.send-prompt {
|
34
|
+
&[data-v-jzxupr6c] {
|
35
|
+
width: 800px;
|
36
|
+
border: 1px solid transparent;
|
37
|
+
flex-direction: row;
|
38
|
+
height: var(--default-height);
|
39
|
+
min-height: 50px;
|
40
|
+
position: relative;
|
41
|
+
border-radius: 4px;
|
42
|
+
border: 1px solid transparent !important;
|
43
|
+
}
|
44
|
+
[data-v-jzxupr6c] .content-input-wrapper {
|
45
|
+
padding: 0 !important;
|
46
|
+
height: 100% !important;
|
47
|
+
}
|
48
|
+
[data-v-jzxupr6c] .auto-textarea-wrapper {
|
49
|
+
height: 100% !important;
|
50
|
+
}
|
51
|
+
[data-v-jzxupr6c] .v-note-panel {
|
52
|
+
border-radius: 4px;
|
53
|
+
}
|
54
|
+
[data-v-jzxupr6c] .scroll-style {
|
55
|
+
overflow-y: hidden !important;
|
56
|
+
}
|
57
|
+
[data-v-jzxupr6c] .auto-textarea-block {
|
58
|
+
display: none;
|
59
|
+
}
|
60
|
+
&[data-v-jzxupr6c]:has(.ql-editor:focus) {
|
61
|
+
height: var(--text-height);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
.bkaidev-fasong {
|
65
|
+
&[data-v-jzxupr6c] {
|
66
|
+
width: 28px;
|
67
|
+
height: 28px;
|
68
|
+
line-height: 28px;
|
69
|
+
border-radius: 2px;
|
70
|
+
font-size: 20px;
|
71
|
+
cursor: pointer;
|
72
|
+
color: #979BA5;
|
73
|
+
position: absolute;
|
74
|
+
right: 6px;
|
75
|
+
bottom: 35px;
|
76
|
+
text-align: center;
|
77
|
+
z-index: 1501;
|
78
|
+
}
|
79
|
+
&[data-v-jzxupr6c]:hover {
|
80
|
+
background: #F0F5FF;
|
81
|
+
color: #3a84ff;
|
82
|
+
}
|
83
|
+
&.disable[data-v-jzxupr6c] {
|
84
|
+
color: #dcdee5;
|
85
|
+
cursor: not-allowed;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
.clear-icon[data-v-jzxupr6c] {
|
89
|
+
display: none !important;
|
90
|
+
position: absolute;
|
91
|
+
bottom: 42px;
|
92
|
+
right: 28px;
|
93
|
+
height: 14px;
|
94
|
+
z-index: 1501;
|
95
|
+
}
|
96
|
+
|
97
|
+
|
98
|
+
.input-search {
|
99
|
+
margin: 8px 12px 0;
|
100
|
+
width: calc(100% - 24px);
|
101
|
+
position: relative;
|
102
|
+
border-bottom: 1px solid #eaebf0 !important;
|
103
|
+
&:before {
|
104
|
+
content: '';
|
105
|
+
position: absolute;
|
106
|
+
left: -13px;
|
107
|
+
top: -9px;
|
108
|
+
height: 42px;
|
109
|
+
width: 1px;
|
110
|
+
background-color: #DCDEE5;
|
111
|
+
}
|
112
|
+
&::after {
|
113
|
+
content: '';
|
114
|
+
position: absolute;
|
115
|
+
right: -13px;
|
116
|
+
top: -9px;
|
117
|
+
height: 42px;
|
118
|
+
width: 1px;
|
119
|
+
background-color: #DCDEE5;
|
120
|
+
}
|
121
|
+
}
|
122
|
+
.input-search.is-focused, .input-search:hover {
|
123
|
+
background-color: transparent !important;
|
124
|
+
.bk-input--text {
|
125
|
+
background-color: transparent !important;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
.search-icon {
|
129
|
+
font-size: 18px;
|
130
|
+
color: #979BA5;
|
131
|
+
}
|
132
|
+
.prompt-tips {
|
133
|
+
max-width: 300px;
|
134
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import type { ISessionContent } from '@/types/session';
|
2
|
+
interface IProps {
|
3
|
+
isChatting: boolean;
|
4
|
+
width: number | string;
|
5
|
+
dragPosition?: string;
|
6
|
+
id: number | string;
|
7
|
+
supportTools: boolean;
|
8
|
+
supportImage: boolean;
|
9
|
+
sessionId: string;
|
10
|
+
placeholder?: string;
|
11
|
+
sessionContents?: ISessionContent[];
|
12
|
+
}
|
13
|
+
declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
14
|
+
send: (prompt: string) => any;
|
15
|
+
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
16
|
+
onSend?: ((prompt: string) => any) | undefined;
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
18
|
+
export default _default;
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
2
|
+
import { unref as _unref, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
3
|
+
import { useMouseDrag } from '../../hooks/use-mouse-drag.js';
|
4
|
+
export default /*@__PURE__*/ _defineComponent({
|
5
|
+
props: {
|
6
|
+
defaultHeight: {},
|
7
|
+
textHeight: {},
|
8
|
+
position: {}
|
9
|
+
},
|
10
|
+
emits: [
|
11
|
+
"update:defaultHeight",
|
12
|
+
"update:textHeight"
|
13
|
+
],
|
14
|
+
setup (__props, { emit: __emit }) {
|
15
|
+
const props = __props;
|
16
|
+
const emits = __emit;
|
17
|
+
const handleMouseDrag = (positionInfo)=>{
|
18
|
+
let defaultHeight = props.position === 'bottom' ? props.defaultHeight + positionInfo.singleMoveDistance.y : props.defaultHeight - positionInfo.singleMoveDistance.y;
|
19
|
+
if (defaultHeight >= 400) {
|
20
|
+
defaultHeight = 400;
|
21
|
+
}
|
22
|
+
if (defaultHeight <= 84) {
|
23
|
+
defaultHeight = 84;
|
24
|
+
}
|
25
|
+
emits('update:defaultHeight', defaultHeight);
|
26
|
+
emits('update:textHeight', defaultHeight);
|
27
|
+
};
|
28
|
+
const { isDragging } = useMouseDrag([
|
29
|
+
'send-tool-container',
|
30
|
+
'bkaidev-gengduo'
|
31
|
+
], handleMouseDrag);
|
32
|
+
return (_ctx, _cache)=>{
|
33
|
+
return _ctx.position === 'bottom' ? (_openBlock(), _createElementBlock("span", {
|
34
|
+
key: 0,
|
35
|
+
class: _normalizeClass([
|
36
|
+
'send-tool-container',
|
37
|
+
'bottom',
|
38
|
+
{
|
39
|
+
'is-dragging': _unref(isDragging)
|
40
|
+
}
|
41
|
+
])
|
42
|
+
}, _cache[0] || (_cache[0] = [
|
43
|
+
_createElementVNode("i", {
|
44
|
+
class: "bkaidev-icon bkaidev-gengduo"
|
45
|
+
}, null, -1 /* HOISTED */ )
|
46
|
+
]), 2 /* CLASS */ )) : (_openBlock(), _createElementBlock("span", {
|
47
|
+
key: 1,
|
48
|
+
class: _normalizeClass([
|
49
|
+
'send-tool-container',
|
50
|
+
{
|
51
|
+
'is-dragging': _unref(isDragging)
|
52
|
+
}
|
53
|
+
])
|
54
|
+
}, _cache[1] || (_cache[1] = [
|
55
|
+
_createElementVNode("i", {
|
56
|
+
class: "bkaidev-icon bkaidev-gengduo"
|
57
|
+
}, null, -1 /* HOISTED */ )
|
58
|
+
]), 2 /* CLASS */ ));
|
59
|
+
};
|
60
|
+
}
|
61
|
+
});
|
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
.send-tool-container {
|
3
|
+
&[data-v-0yp8a4wv] {
|
4
|
+
position: absolute;
|
5
|
+
left: 50%;
|
6
|
+
top: 16px;
|
7
|
+
transform: translateX(-50%);
|
8
|
+
height: 1.5px;
|
9
|
+
width: 100%;
|
10
|
+
display: flex;
|
11
|
+
justify-content: center;
|
12
|
+
font-size: 14px;
|
13
|
+
cursor: row-resize;
|
14
|
+
z-index: 15001;
|
15
|
+
}
|
16
|
+
&.bottom {
|
17
|
+
&[data-v-0yp8a4wv] {
|
18
|
+
bottom: 0;
|
19
|
+
top: auto;
|
20
|
+
}
|
21
|
+
.bkaidev-gengduo[data-v-0yp8a4wv] {
|
22
|
+
margin-top: -10px;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
&[data-v-0yp8a4wv]:hover, &.is-dragging[data-v-0yp8a4wv] {
|
26
|
+
background: #3A84FF;
|
27
|
+
}
|
28
|
+
.bkaidev-gengduo[data-v-0yp8a4wv] {
|
29
|
+
margin-top: -2px;
|
30
|
+
color: #63656E;
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
interface IProps {
|
2
|
+
defaultHeight: number;
|
3
|
+
textHeight: number;
|
4
|
+
position?: string;
|
5
|
+
}
|
6
|
+
declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
7
|
+
"update:defaultHeight": (defaultHeight: number) => any;
|
8
|
+
"update:textHeight": (textHeight: number) => any;
|
9
|
+
}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
|
10
|
+
"onUpdate:defaultHeight"?: ((defaultHeight: number) => any) | undefined;
|
11
|
+
"onUpdate:textHeight"?: ((textHeight: number) => any) | undefined;
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
13
|
+
export default _default;
|