@opentiny/tiny-robot 0.1.0-alpha.0 → 0.1.0
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/{bubble-item → bubble}/components/actions/copy.vue.d.ts +3 -3
- package/dist/{bubble-item → bubble}/components/actions/refresh.vue.d.ts +1 -1
- package/dist/bubble/index.d.ts +12 -0
- package/dist/bubble/index.type.d.ts +53 -0
- package/dist/bubble/useScroll.d.ts +4 -0
- package/dist/index.d.ts +9 -5
- package/dist/index.js +25 -18
- package/dist/node_modules/.pnpm/@opentiny_utils@1.0.0/node_modules/@opentiny/utils/dist/opentiny-utils.es.js +832 -0
- package/dist/node_modules/.pnpm/@opentiny_utils@3.22.0/node_modules/@opentiny/utils/dist/index.es.js +959 -1496
- package/dist/node_modules/.pnpm/{@opentiny_vue-button@3.22.0 → @opentiny_vue-button@3.21.0}/node_modules/@opentiny/vue-button/lib/index.js +21 -21
- package/dist/node_modules/.pnpm/{@opentiny_vue-button@3.22.0 → @opentiny_vue-button@3.21.0}/node_modules/@opentiny/vue-button/lib/pc.js +3 -3
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.21.0/node_modules/@opentiny/vue-common/lib/index.js +727 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-common@3.22.0/node_modules/@opentiny/vue-common/lib/index.js +144 -675
- package/dist/node_modules/.pnpm/{@opentiny_vue-dialog-box@3.22.0 → @opentiny_vue-dialog-box@3.21.0}/node_modules/@opentiny/vue-dialog-box/lib/index.js +9 -9
- package/dist/node_modules/.pnpm/{@opentiny_vue-dialog-box@3.22.0 → @opentiny_vue-dialog-box@3.21.0}/node_modules/@opentiny/vue-dialog-box/lib/pc.js +5 -5
- package/dist/node_modules/.pnpm/@opentiny_vue-icon@3.21.0/node_modules/@opentiny/vue-icon/lib/close.js +29 -0
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/eyeclose.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/eyeopen.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/finish.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/fullscreen.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/loading-shadow.js +21 -22
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/minscreen.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-after.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-add-column-before.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-after.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-add-row-before.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-align-center.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-align-left.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-align-right.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-bold.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-code-block.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-code-view.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-color.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-delete-column.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-delete-row.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-delete-table.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-font-size.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-format-clear.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-h1.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-h2.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-h3.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-h4.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-h5.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-h6.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-heading.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-high-light.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-image.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-italic.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-line-height.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-link-unlink.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-link.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-list-ordered.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-list-unordered.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells-vertical.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-merge-cells.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-node-delete.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-paragraph.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-quote-text.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-redo.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-horizontal.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-split-cells-vertical.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-strike-through.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-subscript.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-superscript.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-table.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-task-list.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-underline.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/rich-text-undo.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/sub-script.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-icon@3.22.0 → @opentiny_vue-icon@3.21.0}/node_modules/@opentiny/vue-icon/lib/warn.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-input@3.22.0 → @opentiny_vue-input@3.21.0}/node_modules/@opentiny/vue-input/lib/index.js +3 -3
- package/dist/node_modules/.pnpm/{@opentiny_vue-input@3.22.0 → @opentiny_vue-input@3.21.0}/node_modules/@opentiny/vue-input/lib/pc.js +36 -36
- package/dist/node_modules/.pnpm/{@opentiny_vue-locale@3.22.0 → @opentiny_vue-locale@3.21.0}/node_modules/@opentiny/vue-locale/lib/index.js +63 -63
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/button/index.js +1 -1
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/browser.js +36 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/clickoutside.js +47 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/debounce.js +7 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/dom.js +45 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popper.js +320 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/popup-manager.js +118 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/throttle.js +23 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useEventListener.js +9 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useInstanceSlots.js +14 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/useRelation.js +54 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popper.js +84 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/deps/vue-popup.js +73 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/event.js +13 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/function.js +5 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/index.js +11 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/object.js +84 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/string.js +28 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/common/type.js +28 -0
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/dialog-box/index.js +136 -0
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/dialog-box/vue.js +33 -34
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/input/index.js +22 -22
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/input/vue.js +9 -9
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/tall-storage/index.js +1 -1
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/tall-storage/vue.js +5 -5
- package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/tooltip/index.js +41 -40
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.21.2/node_modules/@opentiny/vue-renderless/tooltip/vue.js +90 -0
- package/dist/node_modules/.pnpm/{@opentiny_vue-tooltip@3.22.0 → @opentiny_vue-tooltip@3.21.0}/node_modules/@opentiny/vue-tooltip/lib/index.js +3 -6
- package/dist/node_modules/.pnpm/{@opentiny_vue-tooltip@3.22.0 → @opentiny_vue-tooltip@3.21.0}/node_modules/@opentiny/vue-tooltip/lib/pc.js +2 -2
- package/dist/packages/components/src/{bubble-list → bubble}/bubble-list.vue.js +2 -2
- package/dist/packages/components/src/bubble/bubble-list.vue2.js +38 -0
- package/dist/packages/components/src/bubble/bubble.vue.js +7 -0
- package/dist/packages/components/src/bubble/bubble.vue2.js +118 -0
- package/dist/packages/components/src/bubble/components/actions/copy.vue.js +7 -0
- package/dist/packages/components/src/bubble/components/actions/copy.vue2.js +35 -0
- package/dist/packages/components/src/bubble/components/actions/refresh.vue.js +7 -0
- package/dist/packages/components/src/bubble/components/actions/refresh.vue2.js +16 -0
- package/dist/packages/components/src/bubble/index.js +18 -0
- package/dist/packages/components/src/bubble/useScroll.js +13 -0
- package/dist/packages/components/src/conversations/index.js +1 -1
- package/dist/packages/components/src/prompts/index.js +18 -0
- package/dist/packages/components/src/prompts/prompt.vue.js +7 -0
- package/dist/packages/components/src/prompts/prompt.vue2.js +37 -0
- package/dist/packages/components/src/prompts/prompts.vue.js +7 -0
- package/dist/packages/components/src/prompts/prompts.vue2.js +36 -0
- package/dist/packages/components/src/question/components/CommonQuestions.vue.js +89 -0
- package/dist/packages/components/src/question/components/CommonQuestions.vue2.js +4 -0
- package/dist/packages/components/src/question/components/HotQuestions.vue.js +140 -0
- package/dist/packages/components/src/question/components/HotQuestions.vue2.js +4 -0
- package/dist/packages/components/src/question/composables/useQuestions.js +48 -0
- package/dist/packages/components/src/question/index.js +9 -0
- package/dist/packages/components/src/question/index.vue.js +113 -0
- package/dist/packages/components/src/question/index.vue2.js +4 -0
- package/dist/packages/components/src/sender/components/ActionButtons.vue.js +105 -123
- package/dist/packages/components/src/sender/composables/useInputHandler.js +26 -22
- package/dist/packages/components/src/sender/composables/useKeyboardHandler.js +11 -11
- package/dist/packages/components/src/sender/composables/useSpeechHandler.js +9 -9
- package/dist/packages/components/src/sender/index.vue.js +67 -66
- package/dist/packages/components/src/welcome/index.vue.js +5 -7
- package/dist/packages/components/src/welcome/index.vue2.js +32 -0
- package/dist/packages/svgs/dist/tiny-robot-svgs.js +144 -0
- package/dist/prompts/index.d.ts +12 -0
- package/dist/prompts/index.type.d.ts +55 -0
- package/dist/prompts/prompt.vue.d.ts +3 -0
- package/dist/prompts/prompts.vue.d.ts +20 -0
- package/dist/question/components/CommonQuestions.vue.d.ts +32 -0
- package/dist/question/components/HotQuestions.vue.d.ts +89 -0
- package/dist/question/composables/useQuestions.d.ts +17 -0
- package/dist/question/index.d.ts +7 -0
- package/dist/question/index.type.d.ts +74 -0
- package/dist/question/index.vue.d.ts +46 -0
- package/dist/sender/components/ActionButtons.vue.d.ts +6 -4
- package/dist/sender/composables/useSpeechHandler.d.ts +0 -6
- package/dist/sender/index.type.d.ts +1 -1
- package/dist/sender/index.vue.d.ts +1 -2
- package/dist/style.css +1 -1
- package/dist/welcome/index.type.d.ts +10 -0
- package/dist/welcome/index.vue.d.ts +17 -1
- package/package.json +5 -3
- package/src/bubble/bubble-list.vue +44 -0
- package/src/bubble/bubble.vue +247 -0
- package/src/bubble/components/actions/copy.vue +54 -0
- package/src/bubble/components/actions/refresh.vue +31 -0
- package/src/bubble/index.ts +23 -0
- package/src/bubble/index.type.ts +63 -0
- package/src/bubble/useScroll.ts +14 -0
- package/src/conversations/index.ts +1 -1
- package/src/index.ts +23 -12
- package/src/prompts/index.ts +25 -0
- package/src/prompts/index.type.ts +59 -0
- package/src/prompts/prompt.vue +115 -0
- package/src/prompts/prompts.vue +50 -0
- package/src/question/components/CommonQuestions.vue +146 -0
- package/src/question/components/HotQuestions.vue +148 -0
- package/src/question/composables/useQuestions.ts +106 -0
- package/src/question/index.less +448 -0
- package/src/question/index.ts +12 -0
- package/src/question/index.type.ts +86 -0
- package/src/question/index.vue +140 -0
- package/src/question/vars.less +135 -0
- package/src/sender/components/ActionButtons.vue +42 -39
- package/src/sender/composables/useInputHandler.ts +15 -10
- package/src/sender/composables/useKeyboardHandler.ts +6 -4
- package/src/sender/composables/useSpeechHandler.ts +5 -11
- package/src/sender/index.less +3 -5
- package/src/sender/index.type.ts +1 -1
- package/src/sender/index.vue +3 -2
- package/src/welcome/index.type.ts +12 -0
- package/src/welcome/index.vue +68 -2
- package/dist/bubble-item/components/icons/ai.vue.d.ts +0 -2
- package/dist/bubble-item/components/icons/index.d.ts +0 -2
- package/dist/bubble-item/components/icons/user.vue.d.ts +0 -2
- package/dist/bubble-item/index.d.ts +0 -7
- package/dist/bubble-list/index.d.ts +0 -8
- package/dist/bubble-list/index.type.d.ts +0 -55
- package/dist/node_modules/.pnpm/@opentiny_vue-directive@3.22.0/node_modules/@opentiny/vue-directive/index.js +0 -57
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popper.js +0 -85
- package/dist/node_modules/.pnpm/@opentiny_vue-hooks@3.22.0/node_modules/@opentiny/vue-hooks/dist/src/vue-popup.js +0 -69
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/dialog-box/index.js +0 -135
- package/dist/node_modules/.pnpm/@opentiny_vue-renderless@3.22.0/node_modules/@opentiny/vue-renderless/tooltip/vue.js +0 -90
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js +0 -8
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +0 -15
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js +0 -54
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js +0 -7
- package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js +0 -22
- package/dist/packages/components/src/bubble-item/bubble-item.vue.js +0 -7
- package/dist/packages/components/src/bubble-item/bubble-item.vue2.js +0 -111
- package/dist/packages/components/src/bubble-item/components/actions/copy.vue.js +0 -46
- package/dist/packages/components/src/bubble-item/components/actions/copy.vue2.js +0 -4
- package/dist/packages/components/src/bubble-item/components/actions/refresh.vue.js +0 -12
- package/dist/packages/components/src/bubble-item/components/icons/ai.vue.js +0 -45
- package/dist/packages/components/src/bubble-item/components/icons/user.vue.js +0 -63
- package/dist/packages/components/src/bubble-item/index.js +0 -9
- package/dist/packages/components/src/bubble-list/bubble-list.vue2.js +0 -52
- package/dist/packages/components/src/bubble-list/index.js +0 -9
- package/src/bubble-item/bubble-item.vue +0 -264
- package/src/bubble-item/components/actions/copy.vue +0 -47
- package/src/bubble-item/components/actions/refresh.vue +0 -27
- package/src/bubble-item/components/icons/ai.vue +0 -30
- package/src/bubble-item/components/icons/index.ts +0 -2
- package/src/bubble-item/components/icons/user.vue +0 -78
- package/src/bubble-item/index.ts +0 -12
- package/src/bubble-list/bubble-list.vue +0 -53
- package/src/bubble-list/index.ts +0 -14
- package/src/bubble-list/index.type.ts +0 -65
- package/src/sender/global.d.ts +0 -44
- /package/dist/{bubble-list → bubble}/bubble-list.vue.d.ts +0 -0
- /package/dist/{bubble-item → bubble}/components/actions/index.d.ts +0 -0
- /package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/button/vue.js +0 -0
- /package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/chunk-G2ADBYYC.js +0 -0
- /package/dist/node_modules/.pnpm/{@opentiny_vue-renderless@3.22.0 → @opentiny_vue-renderless@3.21.2}/node_modules/@opentiny/vue-renderless/tall-storage/vue-storage-box.js +0 -0
- /package/src/{bubble-item → bubble}/components/actions/index.ts +0 -0
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import markdownit from 'markdown-it'
|
|
3
|
-
import { computed } from 'vue'
|
|
4
|
-
import { BubbleActionOptions, BubbleItemProps } from '../bubble-list/index.type'
|
|
5
|
-
import { CopyAction, RefreshAction } from './components/actions'
|
|
6
|
-
import { AIIcon, UserIcon } from './components/icons'
|
|
7
|
-
|
|
8
|
-
const props = withDefaults(defineProps<BubbleItemProps>(), {
|
|
9
|
-
content: '',
|
|
10
|
-
type: 'text',
|
|
11
|
-
status: 'complete',
|
|
12
|
-
maxWidth: '80%',
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
const bubbleContent = computed(() => {
|
|
16
|
-
if (props.type === 'markdown') {
|
|
17
|
-
return markdownit(props.mdConfig || {}).render(props.content)
|
|
18
|
-
}
|
|
19
|
-
return props.content
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
const isUserRole = computed(() => props.role === 'user')
|
|
23
|
-
|
|
24
|
-
const isAlignRight = computed(() => {
|
|
25
|
-
if (props.roleConfig?.align) {
|
|
26
|
-
return props.roleConfig.align === 'right'
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return isUserRole.value
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
const avatarVNode = computed(() => {
|
|
33
|
-
const avatar = props.roleConfig?.avatar
|
|
34
|
-
if (avatar) {
|
|
35
|
-
return () => avatar
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return isUserRole.value ? UserIcon : AIIcon
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
-
const defaultActionsMap = new Map<string, BubbleActionOptions>([
|
|
42
|
-
[
|
|
43
|
-
'copy',
|
|
44
|
-
{
|
|
45
|
-
name: 'copy',
|
|
46
|
-
vnode: CopyAction,
|
|
47
|
-
show: () => props.status === 'complete' || props.status === 'aborted',
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
[
|
|
51
|
-
'regenerate',
|
|
52
|
-
{
|
|
53
|
-
name: 'regenerate',
|
|
54
|
-
vnode: RefreshAction,
|
|
55
|
-
show: () => props.status === 'complete' || props.status === 'aborted',
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
|
-
])
|
|
59
|
-
|
|
60
|
-
const computedActions = computed(() => {
|
|
61
|
-
const getActions = () => {
|
|
62
|
-
if (Array.isArray(props.actions) && props.actions.length > 0) {
|
|
63
|
-
return props.actions
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (props.role === 'ai') {
|
|
67
|
-
return ['regenerate', 'copy']
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return ['copy']
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const actions = getActions().map((action) => {
|
|
74
|
-
if (typeof action === 'string') {
|
|
75
|
-
return defaultActionsMap.get(action)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return action
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
return actions.filter((action): action is BubbleActionOptions => Boolean(action))
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
const emit = defineEmits(['actionClick'])
|
|
85
|
-
|
|
86
|
-
const handleActionClick = (name: string, ...args: unknown[]) => {
|
|
87
|
-
emit('actionClick', name, ...args)
|
|
88
|
-
}
|
|
89
|
-
</script>
|
|
90
|
-
|
|
91
|
-
<template>
|
|
92
|
-
<div
|
|
93
|
-
:class="[
|
|
94
|
-
'tr-bubble',
|
|
95
|
-
{
|
|
96
|
-
'align-left': !isAlignRight,
|
|
97
|
-
'align-right': isAlignRight,
|
|
98
|
-
},
|
|
99
|
-
]"
|
|
100
|
-
>
|
|
101
|
-
<div class="tr-bubble__avatar">
|
|
102
|
-
<component :is="avatarVNode"></component>
|
|
103
|
-
</div>
|
|
104
|
-
<slot v-if="props.status === 'loading'" name="loading">
|
|
105
|
-
<div class="tr-bubble__load-wrap">
|
|
106
|
-
<span></span>
|
|
107
|
-
<span></span>
|
|
108
|
-
<span></span>
|
|
109
|
-
</div>
|
|
110
|
-
</slot>
|
|
111
|
-
<div
|
|
112
|
-
v-else
|
|
113
|
-
:class="[
|
|
114
|
-
'tr-bubble__content',
|
|
115
|
-
{ 'tr-bubble__content-role-ai': !isUserRole },
|
|
116
|
-
{ 'tr-bubble__content-role-user': isUserRole },
|
|
117
|
-
]"
|
|
118
|
-
>
|
|
119
|
-
<div class="tr-bubbule__body">
|
|
120
|
-
<span v-if="props.type === 'markdown'" v-html="bubbleContent"></span>
|
|
121
|
-
<span v-else>{{ bubbleContent }}</span>
|
|
122
|
-
<span v-if="props.status === 'aborted'" class="tr-bubbule__aborted">(用户停止)</span>
|
|
123
|
-
</div>
|
|
124
|
-
<div class="tr-bubbule__footer">
|
|
125
|
-
<div class="tr-bubbule__footer-left">
|
|
126
|
-
<slot name="footer"></slot>
|
|
127
|
-
</div>
|
|
128
|
-
<div v-if="props.showActions" class="tr-bubbule__footer-actions">
|
|
129
|
-
<template v-for="action in computedActions" :key="action?.name">
|
|
130
|
-
<component
|
|
131
|
-
:is="action.vnode"
|
|
132
|
-
v-show="typeof action.show === 'function' ? action.show(props) : action.show"
|
|
133
|
-
:bubbleItem="props"
|
|
134
|
-
@click="handleActionClick(action.name, $event)"
|
|
135
|
-
></component>
|
|
136
|
-
</template>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
|
-
</template>
|
|
142
|
-
|
|
143
|
-
<style lang="less" scoped>
|
|
144
|
-
.tr-bubble {
|
|
145
|
-
display: flex;
|
|
146
|
-
gap: 16px;
|
|
147
|
-
max-width: v-bind('props.maxWidth');
|
|
148
|
-
|
|
149
|
-
&.align-left {
|
|
150
|
-
flex-direction: row;
|
|
151
|
-
|
|
152
|
-
.tr-bubble__content {
|
|
153
|
-
border-top-left-radius: 0;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
&.align-right {
|
|
158
|
-
flex-direction: row-reverse;
|
|
159
|
-
margin-left: auto;
|
|
160
|
-
|
|
161
|
-
.tr-bubble__content {
|
|
162
|
-
border-top-right-radius: 0;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.tr-bubble__avatar {
|
|
168
|
-
width: 40px;
|
|
169
|
-
height: 40px;
|
|
170
|
-
flex-shrink: 0;
|
|
171
|
-
display: flex;
|
|
172
|
-
align-items: center;
|
|
173
|
-
justify-content: center;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.tr-bubble__load-wrap {
|
|
177
|
-
display: flex;
|
|
178
|
-
align-items: center;
|
|
179
|
-
justify-content: center;
|
|
180
|
-
padding: 8px 0;
|
|
181
|
-
|
|
182
|
-
span {
|
|
183
|
-
height: 8px;
|
|
184
|
-
width: 8px;
|
|
185
|
-
margin: 0 2px;
|
|
186
|
-
background-color: #bbb;
|
|
187
|
-
border-radius: 50%;
|
|
188
|
-
display: inline-block;
|
|
189
|
-
animation: typing 1.4s infinite ease-in-out both;
|
|
190
|
-
|
|
191
|
-
&:nth-child(1) {
|
|
192
|
-
animation-delay: 0s;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
&:nth-child(2) {
|
|
196
|
-
animation-delay: 0.2s;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
&:nth-child(3) {
|
|
200
|
-
animation-delay: 0.4s;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
@keyframes typing {
|
|
205
|
-
0%,
|
|
206
|
-
80%,
|
|
207
|
-
100% {
|
|
208
|
-
transform: scale(0);
|
|
209
|
-
}
|
|
210
|
-
40% {
|
|
211
|
-
transform: scale(1);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.tr-bubble__content {
|
|
217
|
-
padding: 16px 24px;
|
|
218
|
-
border-radius: 24px;
|
|
219
|
-
box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.02);
|
|
220
|
-
|
|
221
|
-
&.tr-bubble__content-role-ai {
|
|
222
|
-
background-color: white;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
&.tr-bubble__content-role-user {
|
|
226
|
-
background-color: rgb(222, 236, 255);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.tr-bubbule__body {
|
|
230
|
-
color: rgb(25, 25, 25);
|
|
231
|
-
font-size: 16px;
|
|
232
|
-
line-height: 26px;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.tr-bubbule__aborted {
|
|
236
|
-
color: rgb(128, 128, 128);
|
|
237
|
-
font-size: 14px;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.tr-bubbule__footer {
|
|
241
|
-
display: flex;
|
|
242
|
-
gap: 12px;
|
|
243
|
-
|
|
244
|
-
.tr-bubbule__footer-left {
|
|
245
|
-
flex: 1;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.tr-bubbule__footer-actions {
|
|
249
|
-
display: flex;
|
|
250
|
-
flex-shrink: 0;
|
|
251
|
-
gap: 4px;
|
|
252
|
-
margin-top: 12px;
|
|
253
|
-
|
|
254
|
-
& > * {
|
|
255
|
-
display: flex;
|
|
256
|
-
align-items: center;
|
|
257
|
-
justify-content: center;
|
|
258
|
-
width: 24px;
|
|
259
|
-
height: 24px;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
</style>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { BubbleItemProps } from '../../../bubble-list/index.type'
|
|
3
|
-
|
|
4
|
-
const { bubbleItem } = defineProps<{ bubbleItem: BubbleItemProps }>()
|
|
5
|
-
|
|
6
|
-
const emit = defineEmits(['click'])
|
|
7
|
-
|
|
8
|
-
async function copyToClipboard(text: string) {
|
|
9
|
-
try {
|
|
10
|
-
await navigator.clipboard.writeText(text)
|
|
11
|
-
return true
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13
|
-
} catch (err: unknown) {
|
|
14
|
-
return false
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const handleClick = async () => {
|
|
19
|
-
const result = bubbleItem.content ? await copyToClipboard(bubbleItem.content) : false
|
|
20
|
-
|
|
21
|
-
emit('click', result)
|
|
22
|
-
}
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<template>
|
|
26
|
-
<span @click="handleClick">
|
|
27
|
-
<svg
|
|
28
|
-
width="1em"
|
|
29
|
-
height="1em"
|
|
30
|
-
viewBox="0 0 16 16"
|
|
31
|
-
fill="none"
|
|
32
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
33
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
34
|
-
>
|
|
35
|
-
<desc>Created with Pixso.</desc>
|
|
36
|
-
<defs />
|
|
37
|
-
<path
|
|
38
|
-
id="矢量 22"
|
|
39
|
-
d="M4 4.76C2.89 4.76 2 5.66 2 6.76L2 11.99C2 13.1 2.89 13.99 4 13.99L9.23 13.99C10.33 13.99 11.23 13.1 11.23 11.99L11.23 6.76C11.23 5.66 10.33 4.76 9.23 4.76L4 4.76ZM14 8.46L14 3.84C14 2.82 13.17 2 12.15 2L7.53 2"
|
|
40
|
-
stroke="#191919"
|
|
41
|
-
stroke-opacity="1.000000"
|
|
42
|
-
stroke-width="1.000000"
|
|
43
|
-
stroke-linecap="round"
|
|
44
|
-
/>
|
|
45
|
-
</svg>
|
|
46
|
-
</span>
|
|
47
|
-
</template>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span>
|
|
3
|
-
<svg
|
|
4
|
-
width="1em"
|
|
5
|
-
height="1em"
|
|
6
|
-
viewBox="0 0 16 16"
|
|
7
|
-
fill="none"
|
|
8
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
10
|
-
>
|
|
11
|
-
<desc>Created with Pixso.</desc>
|
|
12
|
-
<defs>
|
|
13
|
-
<clipPath id="clip521_64343">
|
|
14
|
-
<rect id="刷新-refresh" width="16.000000" height="16.000000" fill="white" fill-opacity="0" />
|
|
15
|
-
</clipPath>
|
|
16
|
-
</defs>
|
|
17
|
-
<g clip-path="url(#clip521_64343)">
|
|
18
|
-
<path
|
|
19
|
-
id="形状结合"
|
|
20
|
-
d="M11.8 2.75C14.55 4.73 15.27 8.46 13.54 11.3L15.24 10.84C15.47 10.78 15.7 10.9 15.8 11.1L15.83 11.18C15.9 11.44 15.75 11.7 15.49 11.77L12.59 12.54C12.34 12.61 12.08 12.46 12.01 12.2L11.23 9.31C11.16 9.06 11.31 8.79 11.57 8.72C11.82 8.65 12.08 8.81 12.16 9.06L12.65 10.91C14.21 8.49 13.62 5.24 11.24 3.52C8.77 1.74 5.32 2.28 3.53 4.73C1.74 7.18 2.29 10.61 4.76 12.39C6.42 13.59 8.28 13.84 10.39 13.16C10.64 13.08 10.91 13.22 10.99 13.47C11.07 13.72 10.94 13.99 10.68 14.07C8.29 14.85 6.11 14.55 4.19 13.16C1.3 11.07 0.65 7.04 2.75 4.16C4.85 1.29 8.91 0.66 11.8 2.75Z"
|
|
21
|
-
fill="#191919"
|
|
22
|
-
fill-opacity="1.000000"
|
|
23
|
-
fill-rule="nonzero"
|
|
24
|
-
/>
|
|
25
|
-
</g></svg
|
|
26
|
-
></span>
|
|
27
|
-
</template>
|