@shwfed/config 2.11.5 → 2.12.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/module.json +1 -1
- package/dist/module.mjs +1 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.http.request.json.confirm/schema.d.ts +13 -7
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.prototype/config.vue +1 -0
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.d.ts +13 -7
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/schema.d.ts +13 -7
- package/dist/runtime/components/actions/config.vue +2 -0
- package/dist/runtime/components/actions/items/2026-05-21/com.shwfed.actions.item.markdown/schema.d.ts +13 -7
- package/dist/runtime/components/actions/schema.d.ts +82 -52
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.actions/schema.d.ts +5 -5
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/schema.d.ts +13 -7
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +62 -38
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.d.ts +26 -14
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.xy/schema.d.ts +39 -21
- package/dist/runtime/components/config/blocks/2026-06-01/com.shwfed.block.animated.number/schema.d.ts +13 -7
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.d.ts +26 -14
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/schema.d.ts +44 -26
- package/dist/runtime/components/config/schema.d.ts +13 -7
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +26 -14
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +57 -33
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +52 -28
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +18 -12
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/schema.d.ts +65 -35
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +91 -49
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +91 -49
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +39 -21
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +39 -21
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +57 -33
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +65 -35
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +65 -35
- package/dist/runtime/components/form/fields/2026-04-29/com.shwfed.form.field.combobox.single/schema.d.ts +104 -56
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +65 -35
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +91 -49
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +91 -49
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +39 -21
- package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/schema.d.ts +13 -7
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +91 -49
- package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/schema.d.ts +65 -35
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +169 -91
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +169 -91
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +22 -22
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/schema.d.ts +78 -42
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/schema.d.ts +130 -70
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/schema.d.ts +130 -70
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/schema.d.ts +26 -14
- package/dist/runtime/components/form/utils/common.d.ts +26 -14
- package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/schema.d.ts +13 -7
- package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/schema.d.ts +13 -7
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/schema.d.ts +13 -7
- package/dist/runtime/components/table/ai-generate.d.vue.ts +16 -0
- package/dist/runtime/components/table/ai-generate.system.d.ts +1 -0
- package/dist/runtime/components/table/ai-generate.system.js +10 -0
- package/dist/runtime/components/table/ai-generate.system.md +95 -0
- package/dist/runtime/components/table/ai-generate.vue +172 -0
- package/dist/runtime/components/table/ai-generate.vue.d.ts +16 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.actions/schema.d.ts +18 -12
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +26 -14
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/runtime.vue +3 -4
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +26 -14
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/runtime.vue +3 -3
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/schema.d.ts +39 -21
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +26 -14
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +26 -14
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/runtime.vue +5 -6
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch/schema.d.ts +26 -14
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/runtime.vue +5 -6
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +26 -14
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.combobox-single/schema.d.ts +91 -49
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +44 -26
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch/schema.d.ts +52 -28
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +52 -28
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +44 -26
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-remote/schema.d.ts +52 -28
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-24/com.shwfed.table.column.combobox-single.remote.options-static/schema.d.ts +91 -49
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/schema.d.ts +91 -49
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-remote/schema.d.ts +52 -28
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi.remote.options-static/schema.d.ts +91 -49
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/schema.d.ts +156 -84
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/schema.d.ts +156 -84
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single/schema.d.ts +156 -84
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-single.remote/schema.d.ts +156 -84
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +65 -35
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/schema.d.ts +65 -35
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +156 -84
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +156 -84
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +65 -35
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +65 -35
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.d.ts +117 -63
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.d.ts +117 -63
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +52 -28
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/runtime.vue +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.d.ts +52 -28
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/runtime.vue +3 -3
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.d.ts +70 -40
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/runtime.vue +4 -4
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.d.ts +78 -42
- package/dist/runtime/components/table/config.d.vue.ts +3 -3
- package/dist/runtime/components/table/config.vue +38 -3
- package/dist/runtime/components/table/config.vue.d.ts +3 -3
- package/dist/runtime/components/table/row-provider.vue +2 -2
- package/dist/runtime/components/table/schema.d.ts +114 -66
- package/dist/runtime/components/table/utils/ai-tools.d.ts +11 -0
- package/dist/runtime/components/table/utils/ai-tools.js +458 -0
- package/dist/runtime/components/table/utils/resolve.d.ts +23 -0
- package/dist/runtime/components/table/utils/resolve.js +3 -0
- package/dist/runtime/components/table/utils/shared.d.ts +65 -35
- package/dist/runtime/components/table/utils/shared.js +16 -17
- package/dist/runtime/components/ui/alert-dialog/AlertDialogFooter.vue +1 -1
- package/dist/runtime/components/ui/chat/ChatMessage.d.vue.ts +7 -0
- package/dist/runtime/components/ui/chat/ChatMessage.vue +35 -0
- package/dist/runtime/components/ui/chat/ChatMessage.vue.d.ts +7 -0
- package/dist/runtime/components/ui/chat/ChatMessagePart.d.vue.ts +7 -0
- package/dist/runtime/components/ui/chat/ChatMessagePart.vue +43 -0
- package/dist/runtime/components/ui/chat/ChatMessagePart.vue.d.ts +7 -0
- package/dist/runtime/components/ui/chat/ChatMessages.d.vue.ts +18 -0
- package/dist/runtime/components/ui/chat/ChatMessages.vue +63 -0
- package/dist/runtime/components/ui/chat/ChatMessages.vue.d.ts +18 -0
- package/dist/runtime/components/ui/chat/ChatPrompt.d.vue.ts +24 -0
- package/dist/runtime/components/ui/chat/ChatPrompt.vue +43 -0
- package/dist/runtime/components/ui/chat/ChatPrompt.vue.d.ts +24 -0
- package/dist/runtime/components/ui/chat/ChatPromptSubmit.d.vue.ts +18 -0
- package/dist/runtime/components/ui/chat/ChatPromptSubmit.vue +41 -0
- package/dist/runtime/components/ui/chat/ChatPromptSubmit.vue.d.ts +18 -0
- package/dist/runtime/components/ui/chat/ChatReasoning.d.vue.ts +7 -0
- package/dist/runtime/components/ui/chat/ChatReasoning.vue +33 -0
- package/dist/runtime/components/ui/chat/ChatReasoning.vue.d.ts +7 -0
- package/dist/runtime/components/ui/chat/ChatToolCall.d.vue.ts +10 -0
- package/dist/runtime/components/ui/chat/ChatToolCall.vue +92 -0
- package/dist/runtime/components/ui/chat/ChatToolCall.vue.d.ts +10 -0
- package/dist/runtime/components/ui/chat/index.d.ts +9 -0
- package/dist/runtime/components/ui/chat/index.js +8 -0
- package/dist/runtime/components/ui/stream-markdown/StreamMarkdown.d.vue.ts +15 -0
- package/dist/runtime/components/ui/stream-markdown/StreamMarkdown.vue +22 -0
- package/dist/runtime/components/ui/stream-markdown/StreamMarkdown.vue.d.ts +15 -0
- package/dist/runtime/components/ui/stream-markdown/index.d.ts +1 -0
- package/dist/runtime/components/ui/stream-markdown/index.js +1 -0
- package/dist/runtime/share/coerce-from-string.d.ts +62 -0
- package/dist/runtime/share/coerce-from-string.js +154 -0
- package/dist/runtime/share/locale.d.ts +13 -7
- package/dist/runtime/share/locale.js +27 -5
- package/dist/runtime/share/use-persisted-chat.d.ts +30 -0
- package/dist/runtime/share/use-persisted-chat.js +34 -0
- package/dist/runtime/utils/ai/index.d.ts +10 -0
- package/dist/runtime/utils/ai/index.js +123 -33
- package/dist/runtime/utils/ai/parts.d.ts +30 -0
- package/dist/runtime/utils/ai/parts.js +9 -0
- package/dist/runtime/utils/cel-context.d.ts +1 -0
- package/dist/runtime/utils/cel-context.js +28 -0
- package/package.json +4 -8
- package/dist/mcp.mjs +0 -102434
- package/dist/preview/assets/FieldGroup.vue_vue_type_script_setup_true_lang-BK4nj6mF.js +0 -1
- package/dist/preview/assets/badge-Df9KgnrB.js +0 -1
- package/dist/preview/assets/config-B3NwVBxT.js +0 -1
- package/dist/preview/assets/config-BrtNnMlJ.js +0 -1
- package/dist/preview/assets/config-CUJNegvX.js +0 -1
- package/dist/preview/assets/config-ChrXUmKf.js +0 -1
- package/dist/preview/assets/config-CmEXMpIU.js +0 -1
- package/dist/preview/assets/config-CrBoFiYB.js +0 -1
- package/dist/preview/assets/config-D-Hf0dls.js +0 -1
- package/dist/preview/assets/config-D4cXwy75.js +0 -1
- package/dist/preview/assets/config-DCj5Qyiq.js +0 -1
- package/dist/preview/assets/config-DPfx03nM.js +0 -1
- package/dist/preview/assets/config-DWF0bcmF.js +0 -1
- package/dist/preview/assets/config-Do4K9hI7.js +0 -1
- package/dist/preview/assets/config-DwblM1r8.js +0 -1
- package/dist/preview/assets/config-MW5Hs8yE.js +0 -1
- package/dist/preview/assets/config-uNoNEc-1.js +0 -1
- package/dist/preview/assets/definition.vue_vue_type_script_setup_true_lang-CbtpddWK.js +0 -1
- package/dist/preview/assets/index-Bm7I4Tr0.css +0 -1
- package/dist/preview/assets/index-CkyV576r.js +0 -775
- package/dist/preview/assets/index-CtW2E0ME.js +0 -1
- package/dist/preview/assets/index-xDmBF3zO.js +0 -1
- package/dist/preview/assets/item-D0e9Cx1Q.js +0 -1
- package/dist/preview/assets/runtime-3tGIbclh.js +0 -1
- package/dist/preview/assets/runtime-BCePD3XR.js +0 -1
- package/dist/preview/assets/runtime-BMyFUaSM.js +0 -1
- package/dist/preview/assets/runtime-BXZU3EqA.js +0 -1
- package/dist/preview/assets/runtime-BySNFNSO.js +0 -1
- package/dist/preview/assets/runtime-CI02gDFj.js +0 -1
- package/dist/preview/assets/runtime-DCo1Qp8a.js +0 -1
- package/dist/preview/assets/runtime-DDSKV70N.js +0 -1
- package/dist/preview/assets/runtime-Dc7pytUy.js +0 -1
- package/dist/preview/assets/runtime-ckLrkTMm.js +0 -1
- package/dist/preview/assets/runtime-y4oJ8VkY.js +0 -1
- package/dist/preview/assets/schema-meta-D0y0sKal.js +0 -1
- package/dist/preview/index.html +0 -19
|
@@ -26,36 +26,35 @@ export function columnFields(configure) {
|
|
|
26
26
|
// → still validated as a CEL expression (empty string stays invalid).
|
|
27
27
|
accessor: Schema.optional(CelRowAccess(configure).annotations({
|
|
28
28
|
title: "\u8DEF\u5F84",
|
|
29
|
-
description:
|
|
29
|
+
description: md`
|
|
30
|
+
使用 CEL 获取该列的值,建议使用 optional 语法。如
|
|
31
|
+
|
|
32
|
+
- \`row.?foo\`
|
|
33
|
+
- \`row.?foo.?bar\`
|
|
34
|
+
`
|
|
30
35
|
})),
|
|
31
36
|
enableSorting: Schema.optional(Schema.Boolean.annotations({
|
|
32
|
-
title: "\
|
|
37
|
+
title: "\u6392\u5E8F",
|
|
33
38
|
description: md`
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
排序分为两类:**服务端排序** 和 **客户端排序**。
|
|
37
|
-
|
|
38
|
-
| | 服务端排序 | 客户端排序 |
|
|
39
|
-
| --- | --- | --- |
|
|
40
|
-
| 数据量 | **全量**,能够跨越多页 | 当前页 |
|
|
41
|
-
| 开发量 | 需要后端支持,可能影响性能 | **配置即启用,无需后端支持** |
|
|
39
|
+
在该列向用户展示排序按钮。如果需要通过后端对全库排序,务必同时配置
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
- **排序字段** 用来指定传给后端的字段名
|
|
42
|
+
- 在表格数据源中,使用 \`sorts\` 变量构造符合需求的请求
|
|
44
43
|
`
|
|
45
44
|
})),
|
|
46
45
|
sortKey: Schema.optional(Schema.String.pipe(Schema.minLength(1)).annotations({
|
|
47
46
|
title: "\u6392\u5E8F\u5B57\u6BB5",
|
|
48
|
-
description: "\
|
|
47
|
+
description: "\u540E\u7AEF\u9700\u8981\u7684\u6392\u5E8F\u5B57\u6BB5\u540D"
|
|
49
48
|
})),
|
|
50
49
|
size: Schema.optional(Schema.Number.pipe(Schema.finite(), Schema.positive()).annotations({
|
|
51
50
|
title: "\u5217\u5BBD",
|
|
52
|
-
description: "\
|
|
51
|
+
description: "\u5BF9\u4E8E\u6CA1\u6709\u6307\u5B9A\u5217\u5BBD\u7684\u5217\uFF0C\u5C06\u9ED8\u8BA4\u4E3A 150px"
|
|
53
52
|
})),
|
|
54
|
-
grow: Schema.optional(Schema.Boolean.annotations({ title: "\
|
|
55
|
-
tooltip: Schema.optional(Locale.annotations({ title: "\u63D0\u793A", description: "\u5217\u6807\u9898\
|
|
53
|
+
grow: Schema.optional(Schema.Boolean.annotations({ title: "\u6491\u5F00", description: "\u5BF9\u4E8E\u4E00\u4E9B\u5173\u952E\u5B57\u6BB5\uFF0C\u53EF\u4EE5\u5F00\u542F\u8FD9\u4E2A\u9009\u9879\u4F7F\u5176\u5C3D\u53EF\u80FD\u5360\u636E\u66F4\u591A\u7684\u7A7A\u95F4" })),
|
|
54
|
+
tooltip: Schema.optional(Locale.annotations({ title: "\u63D0\u793A", description: "\u5F53\u7528\u6237\u9F20\u6807\u79FB\u52A8\u81F3\u5217\u6807\u9898\u4E0A\u65F6\uFF0C\u5C06\u5411\u7528\u6237\u5C55\u793A\u6B64\u5904\u914D\u7F6E\u7684\u5185\u5BB9" })),
|
|
56
55
|
hidden: Schema.optional(Schema.Boolean.annotations({
|
|
57
|
-
title: "\
|
|
58
|
-
description: "\
|
|
56
|
+
title: "\u9690\u85CF",
|
|
57
|
+
description: "\u9ED8\u8BA4\u9690\u85CF\u8BE5\u5217\u3002\u7528\u6237\u53EF\u4EE5\u5728\u5176\u81EA\u5B9A\u4E49\u8868\u683C\u7684\u914D\u7F6E\u4E2D\u663E\u793A\u8BE5\u5217\uFF0C\u6B64\u65F6\u7528\u6237\u914D\u7F6E\u4F18\u5148\u7EA7\u9AD8\u4E8E\u6B64\u5904\u7684\u914D\u7F6E"
|
|
59
58
|
}))
|
|
60
59
|
};
|
|
61
60
|
}
|
|
@@ -8,7 +8,7 @@ const props = defineProps({
|
|
|
8
8
|
<template>
|
|
9
9
|
<div
|
|
10
10
|
data-slot="alert-dialog-footer"
|
|
11
|
-
:class="cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-
|
|
11
|
+
:class="cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-center sm:mx-auto', props.class)"
|
|
12
12
|
>
|
|
13
13
|
<slot />
|
|
14
14
|
</div>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UIMessage } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
message: UIMessage;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import ChatMessagePart from "./ChatMessagePart.vue";
|
|
4
|
+
defineOptions({ name: "UiChatMessage" });
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
message: { type: Object, required: true }
|
|
7
|
+
});
|
|
8
|
+
const isUser = computed(() => props.message.role === "user");
|
|
9
|
+
const userText = computed(
|
|
10
|
+
() => props.message.parts.filter((p) => p.type === "text").map((p) => p.text).join("")
|
|
11
|
+
);
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div
|
|
16
|
+
v-if="isUser"
|
|
17
|
+
:data-role="message.role"
|
|
18
|
+
data-slot="user-message"
|
|
19
|
+
class="max-w-[85%] self-end whitespace-pre-wrap break-words rounded-lg bg-[color-mix(in_srgb,var(--primary)_10%,white)] px-3 py-2 text-sm text-zinc-700"
|
|
20
|
+
>
|
|
21
|
+
{{ userText }}
|
|
22
|
+
</div>
|
|
23
|
+
<div
|
|
24
|
+
v-else
|
|
25
|
+
:data-role="message.role"
|
|
26
|
+
data-slot="assistant-message"
|
|
27
|
+
class="flex w-full flex-col items-stretch gap-2"
|
|
28
|
+
>
|
|
29
|
+
<ChatMessagePart
|
|
30
|
+
v-for="(part, i) in message.parts"
|
|
31
|
+
:key="i"
|
|
32
|
+
:part="part"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UIMessage } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
message: UIMessage;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UIMessagePart } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
part: UIMessagePart;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { isToolUIPart } from "../../../utils/ai/parts";
|
|
4
|
+
import { StreamMarkdown } from "../stream-markdown";
|
|
5
|
+
import ChatReasoning from "./ChatReasoning.vue";
|
|
6
|
+
import ChatToolCall from "./ChatToolCall.vue";
|
|
7
|
+
defineOptions({ name: "UiChatMessagePart" });
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
part: { type: Object, required: true }
|
|
10
|
+
});
|
|
11
|
+
const toolPart = computed(() => isToolUIPart(props.part) ? props.part : null);
|
|
12
|
+
const reasoningPart = computed(() => props.part.type === "reasoning" ? props.part : null);
|
|
13
|
+
const textPart = computed(
|
|
14
|
+
() => props.part.type === "text" && props.part.text.trim().length > 0 ? props.part : null
|
|
15
|
+
);
|
|
16
|
+
const isStepStart = computed(() => props.part.type === "step-start");
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<ChatToolCall
|
|
21
|
+
v-if="toolPart"
|
|
22
|
+
:part="toolPart"
|
|
23
|
+
/>
|
|
24
|
+
<ChatReasoning
|
|
25
|
+
v-else-if="reasoningPart"
|
|
26
|
+
:part="reasoningPart"
|
|
27
|
+
/>
|
|
28
|
+
<hr
|
|
29
|
+
v-else-if="isStepStart"
|
|
30
|
+
data-slot="chat-step-start"
|
|
31
|
+
class="my-1 border-zinc-200/70"
|
|
32
|
+
>
|
|
33
|
+
<div
|
|
34
|
+
v-else-if="textPart"
|
|
35
|
+
data-slot="chat-text"
|
|
36
|
+
class="w-fit max-w-full rounded-lg bg-zinc-100 px-3 py-2"
|
|
37
|
+
>
|
|
38
|
+
<StreamMarkdown
|
|
39
|
+
:source="textPart.text"
|
|
40
|
+
class="prose prose-sm prose-zinc max-w-none text-sm text-zinc-700"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UIMessagePart } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
part: UIMessagePart;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { UIMessage } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
messages: ReadonlyArray<UIMessage>;
|
|
4
|
+
pending?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_19: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
empty?: (props: typeof __VLS_19) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { nextTick, ref, watch } from "vue";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { ScrollArea } from "../scroll-area";
|
|
5
|
+
import ChatMessage from "./ChatMessage.vue";
|
|
6
|
+
defineOptions({ name: "UiChatMessages" });
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
messages: { type: Array, required: true },
|
|
9
|
+
pending: { type: Boolean, required: false }
|
|
10
|
+
});
|
|
11
|
+
const root = ref(null);
|
|
12
|
+
function scrollToBottom() {
|
|
13
|
+
const viewport = root.value?.$el?.querySelector?.(
|
|
14
|
+
'[data-slot="scroll-area-viewport"]'
|
|
15
|
+
);
|
|
16
|
+
if (viewport) viewport.scrollTop = viewport.scrollHeight;
|
|
17
|
+
}
|
|
18
|
+
watch(
|
|
19
|
+
() => [props.messages, props.pending],
|
|
20
|
+
() => nextTick(scrollToBottom),
|
|
21
|
+
{ flush: "post" }
|
|
22
|
+
);
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<div class="relative">
|
|
27
|
+
<ScrollArea
|
|
28
|
+
ref="root"
|
|
29
|
+
class="size-full"
|
|
30
|
+
>
|
|
31
|
+
<div class="flex flex-col gap-4 p-3">
|
|
32
|
+
<ChatMessage
|
|
33
|
+
v-for="m in messages"
|
|
34
|
+
:key="m.id"
|
|
35
|
+
:message="m"
|
|
36
|
+
/>
|
|
37
|
+
|
|
38
|
+
<div
|
|
39
|
+
v-if="pending"
|
|
40
|
+
data-slot="chat-typing"
|
|
41
|
+
class="flex items-center gap-2 self-start text-xs text-zinc-400"
|
|
42
|
+
>
|
|
43
|
+
<Icon
|
|
44
|
+
icon="fluent:spinner-ios-20-regular"
|
|
45
|
+
class="size-4 animate-spin"
|
|
46
|
+
/>
|
|
47
|
+
<span>生成中…</span>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</ScrollArea>
|
|
51
|
+
|
|
52
|
+
<!-- Empty state, physically centered over the FULL message area: the root is
|
|
53
|
+
`relative` and this overlay is `inset-0`, so it sits dead-center rather
|
|
54
|
+
than pinned to the top of the scroll content. `pointer-events-none` so it
|
|
55
|
+
never intercepts (there's nothing to click when empty anyway). -->
|
|
56
|
+
<div
|
|
57
|
+
v-if="messages.length === 0 && !pending"
|
|
58
|
+
class="pointer-events-none absolute inset-0 flex items-center justify-center"
|
|
59
|
+
>
|
|
60
|
+
<slot name="empty" />
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { UIMessage } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
messages: ReadonlyArray<UIMessage>;
|
|
4
|
+
pending?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_19: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
empty?: (props: typeof __VLS_19) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ChatStatus } from '.';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
status?: ChatStatus;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue?: string;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
stop: () => any;
|
|
12
|
+
submit: () => any;
|
|
13
|
+
"update:modelValue": (value: string) => any;
|
|
14
|
+
retry: () => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
+
onStop?: (() => any) | undefined;
|
|
17
|
+
onSubmit?: (() => any) | undefined;
|
|
18
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
+
onRetry?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
status: ChatStatus;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { InputGroup, InputGroupAddon, InputGroupTextarea } from "../input-group";
|
|
3
|
+
import ChatPromptSubmit from "./ChatPromptSubmit.vue";
|
|
4
|
+
defineOptions({ name: "UiChatPrompt" });
|
|
5
|
+
const text = defineModel({ type: String, ...{ default: "" } });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
status: { type: String, required: false, default: "ready" },
|
|
8
|
+
placeholder: { type: String, required: false }
|
|
9
|
+
});
|
|
10
|
+
const emit = defineEmits(["submit", "stop", "retry"]);
|
|
11
|
+
function submit() {
|
|
12
|
+
if (props.status === "streaming") return;
|
|
13
|
+
if (!text.value.trim()) return;
|
|
14
|
+
emit("submit");
|
|
15
|
+
}
|
|
16
|
+
function onKeydown(e) {
|
|
17
|
+
if (e.key === "Enter" && !e.shiftKey && !e.isComposing) {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
submit();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<InputGroup class="bg-white">
|
|
26
|
+
<InputGroupTextarea
|
|
27
|
+
v-model="text"
|
|
28
|
+
:disabled="status === 'streaming'"
|
|
29
|
+
:placeholder="placeholder"
|
|
30
|
+
class="max-h-48 min-h-20 text-sm"
|
|
31
|
+
@keydown="onKeydown"
|
|
32
|
+
/>
|
|
33
|
+
<InputGroupAddon align="block-end">
|
|
34
|
+
<ChatPromptSubmit
|
|
35
|
+
:status="status"
|
|
36
|
+
:disabled="!text.trim()"
|
|
37
|
+
@submit="submit"
|
|
38
|
+
@stop="emit('stop')"
|
|
39
|
+
@retry="emit('retry')"
|
|
40
|
+
/>
|
|
41
|
+
</InputGroupAddon>
|
|
42
|
+
</InputGroup>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ChatStatus } from '.';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
status?: ChatStatus;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue?: string;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
stop: () => any;
|
|
12
|
+
submit: () => any;
|
|
13
|
+
"update:modelValue": (value: string) => any;
|
|
14
|
+
retry: () => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
+
onStop?: (() => any) | undefined;
|
|
17
|
+
onSubmit?: (() => any) | undefined;
|
|
18
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
+
onRetry?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
status: ChatStatus;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ChatStatus } from '.';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
status?: ChatStatus;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
stop: () => any;
|
|
8
|
+
submit: () => any;
|
|
9
|
+
retry: () => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onStop?: (() => any) | undefined;
|
|
12
|
+
onSubmit?: (() => any) | undefined;
|
|
13
|
+
onRetry?: (() => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
status: ChatStatus;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { Button } from "../button";
|
|
5
|
+
defineOptions({ name: "UiChatPromptSubmit" });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
status: { type: String, required: false, default: "ready" },
|
|
8
|
+
disabled: { type: Boolean, required: false }
|
|
9
|
+
});
|
|
10
|
+
const emit = defineEmits(["submit", "stop", "retry"]);
|
|
11
|
+
const view = computed(() => {
|
|
12
|
+
switch (props.status) {
|
|
13
|
+
case "streaming":
|
|
14
|
+
return { icon: "fluent:stop-20-filled", label: "\u505C\u6B62", variant: "default", action: "stop" };
|
|
15
|
+
case "error":
|
|
16
|
+
return { icon: "fluent:arrow-clockwise-20-regular", label: "\u91CD\u8BD5", variant: "default", action: "retry" };
|
|
17
|
+
default:
|
|
18
|
+
return { icon: "fluent:send-20-regular", label: "\u53D1\u9001", variant: "primary", action: "submit" };
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
function onClick() {
|
|
22
|
+
const action = view.value.action;
|
|
23
|
+
if (action === "stop") emit("stop");
|
|
24
|
+
else if (action === "retry") emit("retry");
|
|
25
|
+
else emit("submit");
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<Button
|
|
31
|
+
type="button"
|
|
32
|
+
size="sm"
|
|
33
|
+
:variant="view.variant"
|
|
34
|
+
:disabled="disabled && status === 'ready'"
|
|
35
|
+
data-slot="chat-prompt-submit"
|
|
36
|
+
@click="onClick"
|
|
37
|
+
>
|
|
38
|
+
<Icon :icon="view.icon" />
|
|
39
|
+
{{ view.label }}
|
|
40
|
+
</Button>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ChatStatus } from '.';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
status?: ChatStatus;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
stop: () => any;
|
|
8
|
+
submit: () => any;
|
|
9
|
+
retry: () => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onStop?: (() => any) | undefined;
|
|
12
|
+
onSubmit?: (() => any) | undefined;
|
|
13
|
+
onRetry?: (() => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
status: ChatStatus;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReasoningUIPart } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
part: ReasoningUIPart;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../collapsible";
|
|
5
|
+
defineOptions({ name: "UiChatReasoning" });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
part: { type: Object, required: true }
|
|
8
|
+
});
|
|
9
|
+
const streaming = computed(() => props.part.state === "streaming");
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<Collapsible
|
|
14
|
+
data-slot="chat-reasoning"
|
|
15
|
+
class="text-xs text-zinc-400"
|
|
16
|
+
>
|
|
17
|
+
<CollapsibleTrigger class="group/reason flex items-center gap-1">
|
|
18
|
+
<Icon
|
|
19
|
+
:icon="streaming ? 'fluent:spinner-ios-20-regular' : 'fluent:brain-circuit-20-regular'"
|
|
20
|
+
class="size-3.5"
|
|
21
|
+
:class="streaming ? 'animate-spin' : ''"
|
|
22
|
+
/>
|
|
23
|
+
<span>{{ streaming ? "\u601D\u8003\u4E2D\u2026" : "\u5DF2\u601D\u8003" }}</span>
|
|
24
|
+
<Icon
|
|
25
|
+
icon="fluent:chevron-down-20-regular"
|
|
26
|
+
class="size-3.5 transition-transform duration-180 group-data-[state=open]/reason:rotate-180"
|
|
27
|
+
/>
|
|
28
|
+
</CollapsibleTrigger>
|
|
29
|
+
<CollapsibleContent class="mt-1 whitespace-pre-wrap border-l-2 border-zinc-100 pl-2">
|
|
30
|
+
{{ part.text }}
|
|
31
|
+
</CollapsibleContent>
|
|
32
|
+
</Collapsible>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReasoningUIPart } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
part: ReasoningUIPart;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ToolUIPart } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
part: ToolUIPart;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
defaultOpen: boolean;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { Icon } from "@iconify/vue";
|
|
4
|
+
import { toolNameOf } from "../../../utils/ai/parts";
|
|
5
|
+
import { Badge } from "../badge";
|
|
6
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../collapsible";
|
|
7
|
+
defineOptions({ name: "UiChatToolCall" });
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
part: { type: Object, required: true },
|
|
10
|
+
defaultOpen: { type: Boolean, required: false, default: false }
|
|
11
|
+
});
|
|
12
|
+
const name = computed(() => toolNameOf(props.part));
|
|
13
|
+
const badge = computed(() => {
|
|
14
|
+
switch (props.part.state) {
|
|
15
|
+
case "output-available":
|
|
16
|
+
return { label: "\u5B8C\u6210", variant: "secondary", spin: false };
|
|
17
|
+
case "output-error":
|
|
18
|
+
return { label: "\u5931\u8D25", variant: "destructive", spin: false };
|
|
19
|
+
default:
|
|
20
|
+
return { label: "\u8FD0\u884C\u4E2D", variant: "outline", spin: true };
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
function pretty(v) {
|
|
24
|
+
if (v === void 0) return "";
|
|
25
|
+
if (typeof v === "string") return v;
|
|
26
|
+
try {
|
|
27
|
+
return JSON.stringify(v, null, 2);
|
|
28
|
+
} catch {
|
|
29
|
+
return String(v);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const inputText = computed(() => pretty(props.part.input));
|
|
33
|
+
const isError = computed(() => props.part.state === "output-error");
|
|
34
|
+
const bodyText = computed(
|
|
35
|
+
() => isError.value ? props.part.errorText ?? "" : pretty(props.part.output)
|
|
36
|
+
);
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<Collapsible
|
|
41
|
+
:default-open="defaultOpen"
|
|
42
|
+
data-slot="chat-tool-call"
|
|
43
|
+
class="w-full overflow-hidden rounded-lg border border-zinc-200 bg-white"
|
|
44
|
+
>
|
|
45
|
+
<CollapsibleTrigger
|
|
46
|
+
class="group/tool flex w-full items-center gap-2 px-3 py-2 text-left"
|
|
47
|
+
>
|
|
48
|
+
<Icon
|
|
49
|
+
icon="fluent:wrench-screwdriver-20-regular"
|
|
50
|
+
class="size-4 shrink-0 text-zinc-400"
|
|
51
|
+
/>
|
|
52
|
+
<span class="font-mono text-xs text-zinc-600">{{ name }}</span>
|
|
53
|
+
<Badge
|
|
54
|
+
:variant="badge.variant"
|
|
55
|
+
class="ml-auto"
|
|
56
|
+
data-slot="chat-tool-call-badge"
|
|
57
|
+
>
|
|
58
|
+
<Icon
|
|
59
|
+
v-if="badge.spin"
|
|
60
|
+
icon="fluent:spinner-ios-20-regular"
|
|
61
|
+
class="animate-spin"
|
|
62
|
+
/>
|
|
63
|
+
{{ badge.label }}
|
|
64
|
+
</Badge>
|
|
65
|
+
<Icon
|
|
66
|
+
icon="fluent:chevron-down-20-regular"
|
|
67
|
+
class="size-4 shrink-0 text-zinc-400 transition-transform duration-180 group-data-[state=open]/tool:rotate-180"
|
|
68
|
+
/>
|
|
69
|
+
</CollapsibleTrigger>
|
|
70
|
+
<CollapsibleContent class="space-y-2 border-t border-zinc-100 px-3 py-2 text-xs">
|
|
71
|
+
<div v-if="inputText">
|
|
72
|
+
<p class="mb-1 text-zinc-400">
|
|
73
|
+
输入
|
|
74
|
+
</p>
|
|
75
|
+
<pre
|
|
76
|
+
class="whitespace-pre-wrap break-words rounded bg-zinc-50 p-2 text-zinc-600"
|
|
77
|
+
data-slot="chat-tool-call-input"
|
|
78
|
+
>{{ inputText }}</pre>
|
|
79
|
+
</div>
|
|
80
|
+
<div v-if="bodyText">
|
|
81
|
+
<p class="mb-1 text-zinc-400">
|
|
82
|
+
{{ isError ? "\u9519\u8BEF" : "\u7ED3\u679C" }}
|
|
83
|
+
</p>
|
|
84
|
+
<pre
|
|
85
|
+
class="whitespace-pre-wrap break-words rounded p-2"
|
|
86
|
+
:class="isError ? 'bg-red-50 text-red-600' : 'bg-zinc-50 text-zinc-600'"
|
|
87
|
+
data-slot="chat-tool-call-output"
|
|
88
|
+
>{{ bodyText }}</pre>
|
|
89
|
+
</div>
|
|
90
|
+
</CollapsibleContent>
|
|
91
|
+
</Collapsible>
|
|
92
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ToolUIPart } from '../../../utils/ai/parts.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
part: ToolUIPart;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
+
defaultOpen: boolean;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ChatStatus = 'ready' | 'streaming' | 'error';
|
|
2
|
+
export { default as ChatMessages } from './ChatMessages.vue.js';
|
|
3
|
+
export { default as ChatMessage } from './ChatMessage.vue.js';
|
|
4
|
+
export { default as ChatMessagePart } from './ChatMessagePart.vue.js';
|
|
5
|
+
export { default as ChatToolCall } from './ChatToolCall.vue.js';
|
|
6
|
+
export { default as ChatReasoning } from './ChatReasoning.vue.js';
|
|
7
|
+
export { default as ChatPrompt } from './ChatPrompt.vue.js';
|
|
8
|
+
export { default as ChatPromptSubmit } from './ChatPromptSubmit.vue.js';
|
|
9
|
+
export { StreamMarkdown as ChatMarkdown } from '../stream-markdown/index.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as ChatMessages } from "./ChatMessages.vue";
|
|
2
|
+
export { default as ChatMessage } from "./ChatMessage.vue";
|
|
3
|
+
export { default as ChatMessagePart } from "./ChatMessagePart.vue";
|
|
4
|
+
export { default as ChatToolCall } from "./ChatToolCall.vue";
|
|
5
|
+
export { default as ChatReasoning } from "./ChatReasoning.vue";
|
|
6
|
+
export { default as ChatPrompt } from "./ChatPrompt.vue";
|
|
7
|
+
export { default as ChatPromptSubmit } from "./ChatPromptSubmit.vue";
|
|
8
|
+
export { StreamMarkdown as ChatMarkdown } from "../stream-markdown/index.js";
|