@aheart-ui/ai 0.0.0-stage → 1.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/LICENSE +21 -0
- package/README.md +30 -2
- 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 +34 -0
- package/es/actions.vue.js +27 -0
- package/es/actions.vue2.js +4 -0
- package/es/agent/index.d.ts +5 -0
- package/es/agent/index.js +12 -0
- package/es/agent/style.css +308 -0
- package/es/agent-execution.vue.d.ts +106 -0
- package/es/agent-execution.vue.js +441 -0
- package/es/agent-execution.vue2.js +4 -0
- package/es/agent-workbench/index.d.ts +2 -0
- package/es/agent-workbench/index.js +5 -0
- package/es/agent-workbench/style.css +1332 -0
- package/es/agent-workbench.vue.d.ts +186 -0
- package/es/agent-workbench.vue.js +537 -0
- package/es/agent-workbench.vue2.js +4 -0
- 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 +39 -0
- package/es/attachments.vue.js +39 -0
- package/es/attachments.vue2.js +4 -0
- 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 +27 -0
- package/es/bubble.vue.js +82 -0
- package/es/bubble.vue2.js +4 -0
- 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 +595 -0
- package/es/chat-panel.vue.d.ts +108 -0
- package/es/chat-panel.vue.js +330 -0
- package/es/chat-panel.vue2.js +4 -0
- 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 +39 -0
- package/es/conversations.vue.js +29 -0
- package/es/conversations.vue2.js +4 -0
- package/es/form/index.d.ts +3 -0
- package/es/form/index.js +9 -0
- package/es/form/style.css +242 -0
- package/es/form-field.vue.d.ts +28 -0
- package/es/form-field.vue.js +176 -0
- package/es/form-field.vue2.js +4 -0
- package/es/form-schema.d.ts +73 -0
- package/es/form-schema.js +105 -0
- package/es/form.vue.d.ts +81 -0
- package/es/form.vue.js +376 -0
- package/es/form.vue2.js +4 -0
- package/es/index.d.ts +20 -0
- package/es/index.js +42 -0
- package/es/package.json +3 -0
- 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 +30 -0
- package/es/process.vue.js +29 -0
- package/es/process.vue2.js +4 -0
- 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 +39 -0
- package/es/prompts.vue.js +33 -0
- package/es/prompts.vue2.js +4 -0
- package/es/safe-markdown.d.ts +3 -0
- package/es/safe-markdown.js +23 -0
- 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 +52 -0
- package/es/sender.vue.js +46 -0
- package/es/sender.vue2.js +4 -0
- 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 +30 -0
- package/es/sources.vue.js +34 -0
- package/es/sources.vue2.js +4 -0
- package/es/stream-reducer.d.ts +35 -0
- package/es/stream-reducer.js +85 -0
- package/es/style.css +1586 -0
- 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 +30 -0
- package/es/thought-chain.vue.js +15 -0
- package/es/thought-chain.vue2.js +4 -0
- package/es/types.d.ts +203 -0
- 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 +41 -0
- package/es/welcome.vue.js +27 -0
- package/es/welcome.vue2.js +4 -0
- 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 +34 -0
- package/lib/actions.vue.js +1 -0
- package/lib/actions.vue2.js +1 -0
- package/lib/agent/index.d.ts +5 -0
- package/lib/agent/index.js +1 -0
- package/lib/agent/style.css +308 -0
- package/lib/agent-execution.vue.d.ts +106 -0
- package/lib/agent-execution.vue.js +1 -0
- package/lib/agent-execution.vue2.js +1 -0
- package/lib/agent-workbench/index.d.ts +2 -0
- package/lib/agent-workbench/index.js +1 -0
- package/lib/agent-workbench/style.css +1332 -0
- package/lib/agent-workbench.vue.d.ts +186 -0
- package/lib/agent-workbench.vue.js +1 -0
- package/lib/agent-workbench.vue2.js +1 -0
- 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 +39 -0
- package/lib/attachments.vue.js +1 -0
- package/lib/attachments.vue2.js +1 -0
- 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 +27 -0
- package/lib/bubble.vue.js +1 -0
- package/lib/bubble.vue2.js +1 -0
- 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 +595 -0
- package/lib/chat-panel.vue.d.ts +108 -0
- package/lib/chat-panel.vue.js +1 -0
- package/lib/chat-panel.vue2.js +1 -0
- 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 +39 -0
- package/lib/conversations.vue.js +1 -0
- package/lib/conversations.vue2.js +1 -0
- package/lib/form/index.d.ts +3 -0
- package/lib/form/index.js +1 -0
- package/lib/form/style.css +242 -0
- package/lib/form-field.vue.d.ts +28 -0
- package/lib/form-field.vue.js +1 -0
- package/lib/form-field.vue2.js +1 -0
- package/lib/form-schema.d.ts +73 -0
- package/lib/form-schema.js +1 -0
- package/lib/form.vue.d.ts +81 -0
- package/lib/form.vue.js +1 -0
- package/lib/form.vue2.js +1 -0
- package/lib/index.d.ts +20 -0
- package/lib/index.js +1 -0
- package/lib/package.json +3 -0
- 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 +30 -0
- package/lib/process.vue.js +1 -0
- package/lib/process.vue2.js +1 -0
- 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 +39 -0
- package/lib/prompts.vue.js +1 -0
- package/lib/prompts.vue2.js +1 -0
- package/lib/safe-markdown.d.ts +3 -0
- package/lib/safe-markdown.js +2 -0
- 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 +52 -0
- package/lib/sender.vue.js +1 -0
- package/lib/sender.vue2.js +1 -0
- 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 +30 -0
- package/lib/sources.vue.js +1 -0
- package/lib/sources.vue2.js +1 -0
- package/lib/stream-reducer.d.ts +35 -0
- package/lib/stream-reducer.js +1 -0
- package/lib/style.css +1586 -0
- 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 +30 -0
- package/lib/thought-chain.vue.js +1 -0
- package/lib/thought-chain.vue2.js +1 -0
- package/lib/types.d.ts +203 -0
- 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 +41 -0
- package/lib/welcome.vue.js +1 -0
- package/lib/welcome.vue2.js +1 -0
- package/package.json +172 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aheart UI contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @aheart-ui/ai
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Aheart UI 的后端无关 AI 产品组件包,提供 AIChatPanel、AIForm、AIAgentWorkbench 与配套原子组件。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @aheart-ui/ai @aheart-ui/dnd aheart-ui vue
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { AIChatPanel } from '@aheart-ui/ai'
|
|
13
|
+
import 'aheart-ui/style.css'
|
|
14
|
+
import '@aheart-ui/dnd/style.css'
|
|
15
|
+
import '@aheart-ui/ai/style.css'
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
该包不包含模型 SDK、API Key、鉴权或持久化。业务层通过 `AITransport` 接入流式服务。Vue `>=3.5.0 <4` 和 `aheart-ui` 由业务应用提供。
|
|
19
|
+
|
|
20
|
+
AIForm 的日期时间字段包含 `date`、`time`、`date-range` 与 `time-range`,所有值均为字符串或完整双端字符串范围,不向业务 schema 暴露 Dayjs。运行时会拒绝不可解析的日期时间默认值;必填范围不允许单端为空。
|
|
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
|
+
|
|
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
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AIAction } from './types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
actions?: AIAction[] | undefined;
|
|
4
|
+
}>, {
|
|
5
|
+
actions: () => never[];
|
|
6
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
select: (action: AIAction) => void;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
9
|
+
actions?: AIAction[] | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
actions: () => never[];
|
|
12
|
+
}>>> & Readonly<{
|
|
13
|
+
onSelect?: ((action: AIAction) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
actions: AIAction[];
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
20
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
21
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
+
} : {
|
|
23
|
+
type: import('vue').PropType<T[K]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
type __VLS_WithDefaults<P, D> = {
|
|
28
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
29
|
+
default: D[K];
|
|
30
|
+
}> : P[K];
|
|
31
|
+
};
|
|
32
|
+
type __VLS_Prettify<T> = {
|
|
33
|
+
[K in keyof T]: T[K];
|
|
34
|
+
} & {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent as i, openBlock as t, createElementBlock as n, Fragment as l, renderList as c, toDisplayString as r, createCommentVNode as d } from "vue";
|
|
2
|
+
const m = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "aheart-ai-actions",
|
|
5
|
+
"aria-label": "消息操作"
|
|
6
|
+
}, u = ["disabled", "onClick"], f = /* @__PURE__ */ i({
|
|
7
|
+
name: "AAIActions",
|
|
8
|
+
__name: "actions",
|
|
9
|
+
props: {
|
|
10
|
+
actions: { default: () => [] }
|
|
11
|
+
},
|
|
12
|
+
emits: ["select"],
|
|
13
|
+
setup(s, { emit: a }) {
|
|
14
|
+
const o = a;
|
|
15
|
+
return (_, b) => s.actions.length ? (t(), n("div", m, [
|
|
16
|
+
(t(!0), n(l, null, c(s.actions, (e) => (t(), n("button", {
|
|
17
|
+
key: e.key,
|
|
18
|
+
type: "button",
|
|
19
|
+
disabled: e.disabled,
|
|
20
|
+
onClick: (k) => o("select", e)
|
|
21
|
+
}, r(e.label), 9, u))), 128))
|
|
22
|
+
])) : d("", !0);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
f as default
|
|
27
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,308 @@
|
|
|
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-visually-hidden {
|
|
14
|
+
position: absolute;
|
|
15
|
+
width: 1px;
|
|
16
|
+
height: 1px;
|
|
17
|
+
padding: 0;
|
|
18
|
+
margin: -1px;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
clip: rect(0, 0, 0, 0);
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
border: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.aheart-ai-form {
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
color: var(--aheart-color-text, var(--aheart-ai-text));
|
|
28
|
+
letter-spacing: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.aheart-ai-form * {
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.aheart-ai-process h3 {
|
|
36
|
+
margin: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.aheart-ai-process small {
|
|
40
|
+
display: block;
|
|
41
|
+
color: var(--aheart-ai-text-secondary);
|
|
42
|
+
font-size: 12px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.aheart-ai-process {
|
|
46
|
+
display: grid;
|
|
47
|
+
gap: 8px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.aheart-ai-process ol {
|
|
51
|
+
margin: 0;
|
|
52
|
+
padding: 0;
|
|
53
|
+
list-style: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.aheart-ai-process h3 {
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
color: var(--aheart-ai-text-secondary);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.aheart-ai-process ol {
|
|
62
|
+
display: grid;
|
|
63
|
+
gap: 6px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.aheart-ai-process li {
|
|
67
|
+
position: relative;
|
|
68
|
+
display: grid;
|
|
69
|
+
gap: 2px;
|
|
70
|
+
padding-inline-start: 16px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.aheart-ai-process li::before {
|
|
74
|
+
content: "";
|
|
75
|
+
position: absolute;
|
|
76
|
+
inset-block-start: 7px;
|
|
77
|
+
inset-inline-start: 2px;
|
|
78
|
+
inline-size: 6px;
|
|
79
|
+
block-size: 6px;
|
|
80
|
+
border-radius: 50%;
|
|
81
|
+
background: #98a2b3;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.aheart-ai-process li.is-running::before {
|
|
85
|
+
background: var(--aheart-ai-cyan);
|
|
86
|
+
box-shadow: 0 0 0 3px #cffafe;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.aheart-ai-process li.is-complete::before {
|
|
90
|
+
background: #12b76a;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.aheart-ai-process li.is-stopped::before {
|
|
94
|
+
background: #98a2b3;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.aheart-ai-process li.is-error {
|
|
98
|
+
color: var(--aheart-color-danger, #d92d20);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.aheart-ai-form {
|
|
102
|
+
display: grid;
|
|
103
|
+
gap: 20px;
|
|
104
|
+
inline-size: min(100%, 760px);
|
|
105
|
+
padding: clamp(18px, 4vw, 32px);
|
|
106
|
+
border: 1px solid var(--aheart-ai-line);
|
|
107
|
+
border-radius: 8px;
|
|
108
|
+
background: var(--aheart-ai-surface);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.aheart-ai-form__header {
|
|
112
|
+
display: grid;
|
|
113
|
+
gap: 5px;
|
|
114
|
+
padding-block-end: 18px;
|
|
115
|
+
border-block-end: 1px solid var(--aheart-ai-line);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.aheart-ai-form__header h2,
|
|
119
|
+
.aheart-ai-form__header p {
|
|
120
|
+
margin: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.aheart-ai-form__header h2 {
|
|
124
|
+
color: var(--aheart-ai-text);
|
|
125
|
+
font-size: 20px;
|
|
126
|
+
line-height: 1.4;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.aheart-ai-form__header p {
|
|
130
|
+
color: var(--aheart-ai-text-secondary);
|
|
131
|
+
line-height: 1.6;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.aheart-ai-form__group {
|
|
135
|
+
display: grid;
|
|
136
|
+
gap: 16px;
|
|
137
|
+
min-inline-size: 0;
|
|
138
|
+
margin: 0;
|
|
139
|
+
padding: 0;
|
|
140
|
+
border: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
fieldset.aheart-ai-form__group {
|
|
144
|
+
padding-block-start: 16px;
|
|
145
|
+
border-block-start: 1px solid var(--aheart-ai-line);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.aheart-ai-form__group legend {
|
|
149
|
+
display: grid;
|
|
150
|
+
gap: 3px;
|
|
151
|
+
inline-size: 100%;
|
|
152
|
+
padding: 0;
|
|
153
|
+
color: var(--aheart-ai-text);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.aheart-ai-form__group legend span {
|
|
157
|
+
font-weight: 650;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.aheart-ai-form__group legend small,
|
|
161
|
+
.aheart-ai-form__field-description {
|
|
162
|
+
color: var(--aheart-ai-text-secondary);
|
|
163
|
+
font-size: 12px;
|
|
164
|
+
line-height: 1.5;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.aheart-ai-form__field {
|
|
168
|
+
display: grid;
|
|
169
|
+
grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
|
|
170
|
+
column-gap: 18px;
|
|
171
|
+
row-gap: 6px;
|
|
172
|
+
align-items: start;
|
|
173
|
+
padding: 3px 0;
|
|
174
|
+
border-radius: 5px;
|
|
175
|
+
outline: none;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.aheart-ai-form__field:focus-visible {
|
|
179
|
+
box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.15);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.aheart-ai-form__field > label {
|
|
183
|
+
grid-column: 1;
|
|
184
|
+
grid-row: 1;
|
|
185
|
+
padding-block-start: 7px;
|
|
186
|
+
color: #344054;
|
|
187
|
+
font-weight: 550;
|
|
188
|
+
line-height: 1.5;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.aheart-ai-form__field-description {
|
|
192
|
+
grid-column: 1;
|
|
193
|
+
grid-row: 2;
|
|
194
|
+
margin: 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.aheart-ai-form__field > :not(label):not(.aheart-ai-form__field-description):not(.aheart-ai-form__field-error):not(.aheart-switch) {
|
|
198
|
+
grid-column: 2;
|
|
199
|
+
grid-row: 1 / span 2;
|
|
200
|
+
inline-size: 100%;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.aheart-ai-form__field > .aheart-switch {
|
|
204
|
+
grid-column: 2;
|
|
205
|
+
grid-row: 1 / span 2;
|
|
206
|
+
justify-self: start;
|
|
207
|
+
inline-size: fit-content;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.aheart-ai-form__required {
|
|
211
|
+
margin-inline-start: 3px;
|
|
212
|
+
color: var(--aheart-color-danger, #d92d20);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.aheart-ai-form__field-error {
|
|
216
|
+
grid-column: 2;
|
|
217
|
+
margin: 0;
|
|
218
|
+
color: var(--aheart-color-danger, #d92d20);
|
|
219
|
+
font-size: 12px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.aheart-ai-form__field.is-error {
|
|
223
|
+
padding: 8px;
|
|
224
|
+
background: #fff7f6;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.aheart-ai-form__error-summary,
|
|
228
|
+
.aheart-ai-form__submit-error,
|
|
229
|
+
.aheart-ai-form__error {
|
|
230
|
+
border-inline-start: 3px solid var(--aheart-color-danger, #d92d20);
|
|
231
|
+
background: #fff7f6;
|
|
232
|
+
color: #912018;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.aheart-ai-form__error-summary {
|
|
236
|
+
display: grid;
|
|
237
|
+
gap: 8px;
|
|
238
|
+
padding: 12px 14px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.aheart-ai-form__error-summary ul,
|
|
242
|
+
.aheart-ai-form__error ul {
|
|
243
|
+
display: grid;
|
|
244
|
+
gap: 4px;
|
|
245
|
+
margin: 0;
|
|
246
|
+
padding-inline-start: 20px;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.aheart-ai-form__error-summary button {
|
|
250
|
+
padding: 0;
|
|
251
|
+
border: 0;
|
|
252
|
+
background: transparent;
|
|
253
|
+
color: inherit;
|
|
254
|
+
font: inherit;
|
|
255
|
+
text-decoration: underline;
|
|
256
|
+
cursor: pointer;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.aheart-ai-form__submit-error {
|
|
260
|
+
margin: 0;
|
|
261
|
+
padding: 9px 12px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.aheart-ai-form__footer {
|
|
265
|
+
display: flex;
|
|
266
|
+
justify-content: flex-end;
|
|
267
|
+
padding-block-start: 16px;
|
|
268
|
+
border-block-start: 1px solid var(--aheart-ai-line);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.aheart-ai-form__error {
|
|
272
|
+
display: grid;
|
|
273
|
+
gap: 8px;
|
|
274
|
+
max-inline-size: 760px;
|
|
275
|
+
padding: 16px;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@media (max-width: 760px) {
|
|
279
|
+
|
|
280
|
+
.aheart-ai-form {
|
|
281
|
+
padding: 18px 14px;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.aheart-ai-form__field {
|
|
285
|
+
grid-template-columns: minmax(0, 1fr);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.aheart-ai-form__field > label,
|
|
289
|
+
.aheart-ai-form__field-description,
|
|
290
|
+
.aheart-ai-form__field > :not(label):not(.aheart-ai-form__field-description):not(.aheart-ai-form__field-error):not(.aheart-switch),
|
|
291
|
+
.aheart-ai-form__field > .aheart-switch,
|
|
292
|
+
.aheart-ai-form__field-error {
|
|
293
|
+
grid-column: 1;
|
|
294
|
+
grid-row: auto;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.aheart-ai-form__field > label {
|
|
298
|
+
padding-block-start: 0;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@media (prefers-reduced-motion: reduce) {
|
|
303
|
+
.aheart-ai-form * {
|
|
304
|
+
scroll-behavior: auto !important;
|
|
305
|
+
transition-duration: 0.01ms !important;
|
|
306
|
+
animation-duration: 0.01ms !important;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { AIAgentArtifact, AIAgentTask } from './types';
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
tasks?: AIAgentTask[] | undefined;
|
|
4
|
+
artifacts?: AIAgentArtifact[] | undefined;
|
|
5
|
+
activeArtifact?: string | undefined;
|
|
6
|
+
disabled?: boolean | undefined;
|
|
7
|
+
reorderable?: boolean | undefined;
|
|
8
|
+
tasksRevision?: string | number | undefined;
|
|
9
|
+
scopeKey?: string | undefined;
|
|
10
|
+
actionDisabled?: ((task: AIAgentTask, action: string) => boolean) | undefined;
|
|
11
|
+
operationMessages?: Record<string, string> | undefined;
|
|
12
|
+
validateCandidate?: ((tasks: AIAgentTask[]) => string | undefined) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
tasks: () => never[];
|
|
15
|
+
artifacts: () => never[];
|
|
16
|
+
activeArtifact: undefined;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
reorderable: boolean;
|
|
19
|
+
scopeKey: string;
|
|
20
|
+
actionDisabled: () => false;
|
|
21
|
+
operationMessages: () => {};
|
|
22
|
+
validateCandidate: () => undefined;
|
|
23
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
retry: (task: AIAgentTask) => void;
|
|
25
|
+
approve: (task: AIAgentTask) => void;
|
|
26
|
+
reject: (task: AIAgentTask) => void;
|
|
27
|
+
cancel: (task: AIAgentTask) => void;
|
|
28
|
+
"update:tasks": (tasks: AIAgentTask[]) => void;
|
|
29
|
+
"move-task": (id: string, direction: "up" | "down") => void;
|
|
30
|
+
"move-task-reject": (reason: string) => void;
|
|
31
|
+
"select-artifact": (artifact: AIAgentArtifact) => void;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
33
|
+
tasks?: AIAgentTask[] | undefined;
|
|
34
|
+
artifacts?: AIAgentArtifact[] | undefined;
|
|
35
|
+
activeArtifact?: string | undefined;
|
|
36
|
+
disabled?: boolean | undefined;
|
|
37
|
+
reorderable?: boolean | undefined;
|
|
38
|
+
tasksRevision?: string | number | undefined;
|
|
39
|
+
scopeKey?: string | undefined;
|
|
40
|
+
actionDisabled?: ((task: AIAgentTask, action: string) => boolean) | undefined;
|
|
41
|
+
operationMessages?: Record<string, string> | undefined;
|
|
42
|
+
validateCandidate?: ((tasks: AIAgentTask[]) => string | undefined) | undefined;
|
|
43
|
+
}>, {
|
|
44
|
+
tasks: () => never[];
|
|
45
|
+
artifacts: () => never[];
|
|
46
|
+
activeArtifact: undefined;
|
|
47
|
+
disabled: boolean;
|
|
48
|
+
reorderable: boolean;
|
|
49
|
+
scopeKey: string;
|
|
50
|
+
actionDisabled: () => false;
|
|
51
|
+
operationMessages: () => {};
|
|
52
|
+
validateCandidate: () => undefined;
|
|
53
|
+
}>>> & Readonly<{
|
|
54
|
+
onRetry?: ((task: AIAgentTask) => any) | undefined;
|
|
55
|
+
onApprove?: ((task: AIAgentTask) => any) | undefined;
|
|
56
|
+
onReject?: ((task: AIAgentTask) => any) | undefined;
|
|
57
|
+
onCancel?: ((task: AIAgentTask) => any) | undefined;
|
|
58
|
+
"onUpdate:tasks"?: ((tasks: AIAgentTask[]) => any) | undefined;
|
|
59
|
+
"onMove-task"?: ((id: string, direction: "up" | "down") => any) | undefined;
|
|
60
|
+
"onMove-task-reject"?: ((reason: string) => any) | undefined;
|
|
61
|
+
"onSelect-artifact"?: ((artifact: AIAgentArtifact) => any) | undefined;
|
|
62
|
+
}>, {
|
|
63
|
+
disabled: boolean;
|
|
64
|
+
tasks: AIAgentTask[];
|
|
65
|
+
artifacts: AIAgentArtifact[];
|
|
66
|
+
activeArtifact: string;
|
|
67
|
+
reorderable: boolean;
|
|
68
|
+
scopeKey: string;
|
|
69
|
+
actionDisabled: (task: AIAgentTask, action: string) => boolean;
|
|
70
|
+
operationMessages: Record<string, string>;
|
|
71
|
+
validateCandidate: (tasks: AIAgentTask[]) => string | undefined;
|
|
72
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
73
|
+
task?(_: {
|
|
74
|
+
task: AIAgentTask;
|
|
75
|
+
index: number;
|
|
76
|
+
}): any;
|
|
77
|
+
artifact?(_: {
|
|
78
|
+
artifact: AIAgentArtifact;
|
|
79
|
+
}): any;
|
|
80
|
+
"artifact-preview"?(_: {
|
|
81
|
+
artifact: AIAgentArtifact;
|
|
82
|
+
}): any;
|
|
83
|
+
}>;
|
|
84
|
+
export default _default;
|
|
85
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
86
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
87
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
88
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
89
|
+
} : {
|
|
90
|
+
type: import('vue').PropType<T[K]>;
|
|
91
|
+
required: true;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
type __VLS_WithDefaults<P, D> = {
|
|
95
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
96
|
+
default: D[K];
|
|
97
|
+
}> : P[K];
|
|
98
|
+
};
|
|
99
|
+
type __VLS_Prettify<T> = {
|
|
100
|
+
[K in keyof T]: T[K];
|
|
101
|
+
} & {};
|
|
102
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
103
|
+
new (): {
|
|
104
|
+
$slots: S;
|
|
105
|
+
};
|
|
106
|
+
};
|