@aheart-ui/ai 1.0.0 → 1.2.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/README.md +10 -1
- package/es/actions/index.d.ts +2 -0
- package/es/actions/index.js +5 -0
- package/es/actions/style.css +36 -0
- package/es/actions.vue.d.ts +4 -4
- package/es/agent/index.d.ts +5 -0
- package/es/agent/index.js +12 -0
- package/es/agent/style.css +3241 -0
- package/es/agent-execution.vue.d.ts +4 -4
- package/es/agent-execution.vue.js +2 -2
- package/es/agent-workbench/index.d.ts +2 -0
- package/es/agent-workbench/index.js +5 -0
- package/es/agent-workbench/style.css +2423 -0
- package/es/agent-workbench.vue.d.ts +4 -4
- package/es/agent-workbench.vue.js +10 -7
- package/es/attachments/index.d.ts +2 -0
- package/es/attachments/index.js +5 -0
- package/es/attachments/style.css +62 -0
- package/es/attachments.vue.d.ts +4 -4
- package/es/bubble/index.d.ts +2 -0
- package/es/bubble/index.js +5 -0
- package/es/bubble/style.css +241 -0
- package/es/bubble.vue.d.ts +3 -3
- package/es/chat/index.d.ts +11 -0
- package/es/chat/index.js +23 -0
- package/es/chat/style.css +595 -0
- package/es/chat-panel/index.d.ts +3 -0
- package/es/chat-panel/index.js +8 -0
- package/es/chat-panel/style.css +591 -0
- package/es/chat-panel.vue.d.ts +4 -4
- package/es/conversations/index.d.ts +2 -0
- package/es/conversations/index.js +5 -0
- package/es/conversations/style.css +48 -0
- package/es/conversations.vue.d.ts +4 -4
- package/es/form/index.d.ts +3 -0
- package/es/form/index.js +9 -0
- package/es/form/style.css +3175 -0
- package/es/form-field.vue.d.ts +4 -4
- package/es/form-field.vue.js +53 -43
- package/es/form.vue.d.ts +4 -4
- package/es/form.vue.js +7 -6
- package/es/process/index.d.ts +2 -0
- package/es/process/index.js +5 -0
- package/es/process/style.css +77 -0
- package/es/process.vue.d.ts +3 -3
- package/es/prompts/index.d.ts +2 -0
- package/es/prompts/index.js +5 -0
- package/es/prompts/style.css +76 -0
- package/es/prompts.vue.d.ts +4 -4
- package/es/sender/index.d.ts +2 -0
- package/es/sender/index.js +5 -0
- package/es/sender/style.css +88 -0
- package/es/sender.vue.d.ts +4 -4
- package/es/sources/index.d.ts +2 -0
- package/es/sources/index.js +5 -0
- package/es/sources/style.css +54 -0
- package/es/sources.vue.d.ts +3 -3
- package/es/thought-chain/index.d.ts +2 -0
- package/es/thought-chain/index.js +5 -0
- package/es/thought-chain/style.css +77 -0
- package/es/thought-chain.vue.d.ts +3 -3
- package/es/welcome/index.d.ts +2 -0
- package/es/welcome/index.js +5 -0
- package/es/welcome/style.css +33 -0
- package/es/welcome.vue.d.ts +3 -3
- package/lib/actions/index.d.ts +2 -0
- package/lib/actions/index.js +1 -0
- package/lib/actions/style.css +36 -0
- package/lib/actions.vue.d.ts +4 -4
- package/lib/agent/index.d.ts +5 -0
- package/lib/agent/index.js +1 -0
- package/lib/agent/style.css +3241 -0
- package/lib/agent-execution.vue.d.ts +4 -4
- package/lib/agent-execution.vue.js +1 -1
- package/lib/agent-workbench/index.d.ts +2 -0
- package/lib/agent-workbench/index.js +1 -0
- package/lib/agent-workbench/style.css +2423 -0
- package/lib/agent-workbench.vue.d.ts +4 -4
- package/lib/agent-workbench.vue.js +1 -1
- package/lib/attachments/index.d.ts +2 -0
- package/lib/attachments/index.js +1 -0
- package/lib/attachments/style.css +62 -0
- package/lib/attachments.vue.d.ts +4 -4
- package/lib/bubble/index.d.ts +2 -0
- package/lib/bubble/index.js +1 -0
- package/lib/bubble/style.css +241 -0
- package/lib/bubble.vue.d.ts +3 -3
- package/lib/chat/index.d.ts +11 -0
- package/lib/chat/index.js +1 -0
- package/lib/chat/style.css +595 -0
- package/lib/chat-panel/index.d.ts +3 -0
- package/lib/chat-panel/index.js +1 -0
- package/lib/chat-panel/style.css +591 -0
- package/lib/chat-panel.vue.d.ts +4 -4
- package/lib/conversations/index.d.ts +2 -0
- package/lib/conversations/index.js +1 -0
- package/lib/conversations/style.css +48 -0
- package/lib/conversations.vue.d.ts +4 -4
- package/lib/form/index.d.ts +3 -0
- package/lib/form/index.js +1 -0
- package/lib/form/style.css +3175 -0
- package/lib/form-field.vue.d.ts +4 -4
- package/lib/form-field.vue.js +1 -1
- package/lib/form.vue.d.ts +4 -4
- package/lib/form.vue.js +1 -1
- package/lib/process/index.d.ts +2 -0
- package/lib/process/index.js +1 -0
- package/lib/process/style.css +77 -0
- package/lib/process.vue.d.ts +3 -3
- package/lib/prompts/index.d.ts +2 -0
- package/lib/prompts/index.js +1 -0
- package/lib/prompts/style.css +76 -0
- package/lib/prompts.vue.d.ts +4 -4
- package/lib/sender/index.d.ts +2 -0
- package/lib/sender/index.js +1 -0
- package/lib/sender/style.css +88 -0
- package/lib/sender.vue.d.ts +4 -4
- package/lib/sources/index.d.ts +2 -0
- package/lib/sources/index.js +1 -0
- package/lib/sources/style.css +54 -0
- package/lib/sources.vue.d.ts +3 -3
- package/lib/thought-chain/index.d.ts +2 -0
- package/lib/thought-chain/index.js +1 -0
- package/lib/thought-chain/style.css +77 -0
- package/lib/thought-chain.vue.d.ts +3 -3
- package/lib/welcome/index.d.ts +2 -0
- package/lib/welcome/index.js +1 -0
- package/lib/welcome/style.css +33 -0
- package/lib/welcome.vue.d.ts +3 -3
- package/package.json +106 -4
package/README.md
CHANGED
|
@@ -15,8 +15,17 @@ import '@aheart-ui/dnd/style.css'
|
|
|
15
15
|
import '@aheart-ui/ai/style.css'
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
该包不包含模型 SDK、API Key、鉴权或持久化。业务层通过 `AITransport` 接入流式服务。Vue `>=3.
|
|
18
|
+
该包不包含模型 SDK、API Key、鉴权或持久化。业务层通过 `AITransport` 接入流式服务。Vue `>=3.5.0 <4` 和 `aheart-ui` 由业务应用提供。
|
|
19
19
|
|
|
20
20
|
AIForm 的日期时间字段包含 `date`、`time`、`date-range` 与 `time-range`,所有值均为字符串或完整双端字符串范围,不向业务 schema 暴露 Dayjs。运行时会拒绝不可解析的日期时间默认值;必填范围不允许单端为空。
|
|
21
21
|
|
|
22
|
+
## 1.1 候选按需入口
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { AIChatPanel } from '@aheart-ui/ai/chat'
|
|
26
|
+
import '@aheart-ui/ai/chat/style.css'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
使用 Agent 表单时导入 `@aheart-ui/ai/agent` 与基础表单样式。Workbench 使用 `@aheart-ui/ai/workbench`、该场景样式和 `@aheart-ui/dnd/sortable/style.css`。旧根入口与样式仍可用于逐步迁移。
|
|
30
|
+
|
|
22
31
|
完整用法见[中文 AI 对话文档](https://github.com/wzfdhr/aheart-ui/blob/master/docs/components/ai.md)、[AIForm 文档](https://github.com/wzfdhr/aheart-ui/blob/master/docs/components/ai-form.md)和[工作台文档](https://github.com/wzfdhr/aheart-ui/blob/master/docs/components/ai-agent-workbench.md)。
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--aheart-ai-cyan: #0e7490;
|
|
3
|
+
--aheart-ai-cyan-strong: #0e7490;
|
|
4
|
+
--aheart-ai-brand-strong: #0958d9;
|
|
5
|
+
--aheart-ai-cyan-soft: #ecfeff;
|
|
6
|
+
--aheart-ai-line: #e4e7ec;
|
|
7
|
+
--aheart-ai-surface: #ffffff;
|
|
8
|
+
--aheart-ai-surface-subtle: #f8fafc;
|
|
9
|
+
--aheart-ai-text: #182230;
|
|
10
|
+
--aheart-ai-text-secondary: #667085;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.aheart-ai-actions button {
|
|
14
|
+
min-block-size: 28px;
|
|
15
|
+
padding: 3px 8px;
|
|
16
|
+
border: 1px solid transparent;
|
|
17
|
+
border-radius: 4px;
|
|
18
|
+
background: transparent;
|
|
19
|
+
color: var(--aheart-ai-text-secondary);
|
|
20
|
+
font: 12px/1.4 inherit;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
transition: border-color 120ms ease-out, background-color 120ms ease-out, color 120ms ease-out;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.aheart-ai-actions button:hover,
|
|
26
|
+
.aheart-ai-actions button:focus-visible {
|
|
27
|
+
border-color: #b9c2cf;
|
|
28
|
+
background: var(--aheart-ai-surface-subtle);
|
|
29
|
+
color: var(--aheart-ai-text);
|
|
30
|
+
outline: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.aheart-ai-actions {
|
|
34
|
+
display: grid;
|
|
35
|
+
gap: 8px;
|
|
36
|
+
}
|
package/es/actions.vue.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { AIAction } from './types';
|
|
2
|
-
declare const _default: import("
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
actions?: AIAction[] | undefined;
|
|
4
4
|
}>, {
|
|
5
5
|
actions: () => never[];
|
|
6
|
-
}>>, {}, {}, {}, {}, import("
|
|
6
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
7
|
select: (action: AIAction) => void;
|
|
8
|
-
}, string, import("
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
9
9
|
actions?: AIAction[] | undefined;
|
|
10
10
|
}>, {
|
|
11
11
|
actions: () => never[];
|
|
@@ -13,7 +13,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<import("@vue
|
|
|
13
13
|
onSelect?: ((action: AIAction) => any) | undefined;
|
|
14
14
|
}>, {
|
|
15
15
|
actions: AIAction[];
|
|
16
|
-
}, {}, {}, {}, string, import("
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
17
|
export default _default;
|
|
18
18
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
19
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as a } from "../process.vue.js";
|
|
2
|
+
import { default as t } from "../thought-chain.vue.js";
|
|
3
|
+
import { default as f } from "../form.vue.js";
|
|
4
|
+
import { AI_FORM_CONDITION_OPERATORS as A, AI_FORM_FIELD_TYPES as O, validateAIFormSchema as _ } from "../form-schema.js";
|
|
5
|
+
export {
|
|
6
|
+
f as AIForm,
|
|
7
|
+
a as AIProcess,
|
|
8
|
+
t as AIThoughtChain,
|
|
9
|
+
A as AI_FORM_CONDITION_OPERATORS,
|
|
10
|
+
O as AI_FORM_FIELD_TYPES,
|
|
11
|
+
_ as validateAIFormSchema
|
|
12
|
+
};
|