@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
|
@@ -0,0 +1,77 @@
|
|
|
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-process h3 {
|
|
14
|
+
margin: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.aheart-ai-process small {
|
|
18
|
+
display: block;
|
|
19
|
+
color: var(--aheart-ai-text-secondary);
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.aheart-ai-process {
|
|
24
|
+
display: grid;
|
|
25
|
+
gap: 8px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.aheart-ai-process ol {
|
|
29
|
+
margin: 0;
|
|
30
|
+
padding: 0;
|
|
31
|
+
list-style: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.aheart-ai-process h3 {
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
color: var(--aheart-ai-text-secondary);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.aheart-ai-process ol {
|
|
40
|
+
display: grid;
|
|
41
|
+
gap: 6px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.aheart-ai-process li {
|
|
45
|
+
position: relative;
|
|
46
|
+
display: grid;
|
|
47
|
+
gap: 2px;
|
|
48
|
+
padding-inline-start: 16px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.aheart-ai-process li::before {
|
|
52
|
+
content: "";
|
|
53
|
+
position: absolute;
|
|
54
|
+
inset-block-start: 7px;
|
|
55
|
+
inset-inline-start: 2px;
|
|
56
|
+
inline-size: 6px;
|
|
57
|
+
block-size: 6px;
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
background: #98a2b3;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.aheart-ai-process li.is-running::before {
|
|
63
|
+
background: var(--aheart-ai-cyan);
|
|
64
|
+
box-shadow: 0 0 0 3px #cffafe;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.aheart-ai-process li.is-complete::before {
|
|
68
|
+
background: #12b76a;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.aheart-ai-process li.is-stopped::before {
|
|
72
|
+
background: #98a2b3;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.aheart-ai-process li.is-error {
|
|
76
|
+
color: var(--aheart-color-danger, #d92d20);
|
|
77
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { AIProcessItem } from './types';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
+
items?: AIProcessItem[] | undefined;
|
|
4
|
+
}>, {
|
|
5
|
+
items: () => never[];
|
|
6
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
+
items?: AIProcessItem[] | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
items: () => never[];
|
|
10
|
+
}>>> & Readonly<{}>, {
|
|
11
|
+
items: AIProcessItem[];
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
16
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
17
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
18
|
+
} : {
|
|
19
|
+
type: import('vue').PropType<T[K]>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
type __VLS_WithDefaults<P, D> = {
|
|
24
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
25
|
+
default: D[K];
|
|
26
|
+
}> : P[K];
|
|
27
|
+
};
|
|
28
|
+
type __VLS_Prettify<T> = {
|
|
29
|
+
[K in keyof T]: T[K];
|
|
30
|
+
} & {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineComponent as t, openBlock as n, createBlock as o } from "vue";
|
|
2
|
+
import m from "./process.vue.js";
|
|
3
|
+
const s = /* @__PURE__ */ t({
|
|
4
|
+
name: "AAIThoughtChain",
|
|
5
|
+
__name: "thought-chain",
|
|
6
|
+
props: {
|
|
7
|
+
items: { default: () => [] }
|
|
8
|
+
},
|
|
9
|
+
setup(e) {
|
|
10
|
+
return (a, i) => (n(), o(m, { items: e.items }, null, 8, ["items"]));
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
s as default
|
|
15
|
+
};
|
package/es/types.d.ts
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
export type AIMessageRole = 'user' | 'assistant' | 'system' | 'tool';
|
|
2
|
+
export type AIMessageStatus = 'complete' | 'streaming' | 'stopped' | 'error';
|
|
3
|
+
export type AIProcessStatus = 'pending' | 'running' | 'complete' | 'stopped' | 'error';
|
|
4
|
+
export interface AIAttachment {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
size?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface AISource {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
url?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface AIProcessItem {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
status: AIProcessStatus;
|
|
21
|
+
detail?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface AIMessage {
|
|
24
|
+
id: string;
|
|
25
|
+
role: AIMessageRole;
|
|
26
|
+
content: string;
|
|
27
|
+
status?: AIMessageStatus;
|
|
28
|
+
attachments?: AIAttachment[];
|
|
29
|
+
sources?: AISource[];
|
|
30
|
+
process?: AIProcessItem[];
|
|
31
|
+
error?: string;
|
|
32
|
+
retryable?: boolean;
|
|
33
|
+
toolCall?: AIToolCallDisplay;
|
|
34
|
+
}
|
|
35
|
+
export interface AIToolCallDisplay {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
summary: string;
|
|
39
|
+
inputStatus?: 'pending' | 'ready' | 'redacted';
|
|
40
|
+
inputSummary?: string;
|
|
41
|
+
resultStatus?: 'pending' | 'success' | 'error';
|
|
42
|
+
resultSummary?: string;
|
|
43
|
+
error?: string;
|
|
44
|
+
}
|
|
45
|
+
export type AIContentRenderer = (message: AIMessage) => VNodeChild;
|
|
46
|
+
export type AIChatAction = 'send' | 'retry' | 'regenerate' | 'edit';
|
|
47
|
+
export interface AIChatRequest {
|
|
48
|
+
conversationId?: string;
|
|
49
|
+
messages: AIMessage[];
|
|
50
|
+
action?: AIChatAction;
|
|
51
|
+
messageId?: string;
|
|
52
|
+
}
|
|
53
|
+
export type AIStreamEvent = {
|
|
54
|
+
type: 'text-delta';
|
|
55
|
+
delta: string;
|
|
56
|
+
} | {
|
|
57
|
+
type: 'process';
|
|
58
|
+
item: AIProcessItem;
|
|
59
|
+
} | {
|
|
60
|
+
type: 'sources';
|
|
61
|
+
sources: AISource[];
|
|
62
|
+
} | {
|
|
63
|
+
type: 'done';
|
|
64
|
+
} | {
|
|
65
|
+
type: 'cancelled';
|
|
66
|
+
} | {
|
|
67
|
+
type: 'error';
|
|
68
|
+
error: string;
|
|
69
|
+
};
|
|
70
|
+
export interface AITransport {
|
|
71
|
+
send(request: AIChatRequest, signal: AbortSignal): AsyncIterable<AIStreamEvent>;
|
|
72
|
+
}
|
|
73
|
+
export interface AIStreamEventBaseV2 {
|
|
74
|
+
version: '2';
|
|
75
|
+
requestId: string;
|
|
76
|
+
messageId: string;
|
|
77
|
+
sequence: number;
|
|
78
|
+
revision: number;
|
|
79
|
+
}
|
|
80
|
+
export type AIStreamEventV2 = (AIStreamEventBaseV2 & {
|
|
81
|
+
type: 'text-delta';
|
|
82
|
+
delta: string;
|
|
83
|
+
}) | (AIStreamEventBaseV2 & {
|
|
84
|
+
type: 'process-upsert';
|
|
85
|
+
item: AIProcessItem;
|
|
86
|
+
}) | (AIStreamEventBaseV2 & {
|
|
87
|
+
type: 'sources-replace';
|
|
88
|
+
sources: AISource[];
|
|
89
|
+
}) | (AIStreamEventBaseV2 & {
|
|
90
|
+
type: 'snapshot';
|
|
91
|
+
message: AIMessage;
|
|
92
|
+
}) | (AIStreamEventBaseV2 & {
|
|
93
|
+
type: 'final';
|
|
94
|
+
message: AIMessage;
|
|
95
|
+
}) | (AIStreamEventBaseV2 & {
|
|
96
|
+
type: 'cancelled';
|
|
97
|
+
reason?: string;
|
|
98
|
+
}) | (AIStreamEventBaseV2 & {
|
|
99
|
+
type: 'error';
|
|
100
|
+
error: string;
|
|
101
|
+
retryable?: boolean;
|
|
102
|
+
});
|
|
103
|
+
export interface AIChatResumeCursorV2 {
|
|
104
|
+
afterSequence: number;
|
|
105
|
+
revision: number;
|
|
106
|
+
}
|
|
107
|
+
export interface AIChatRequestV2 extends Omit<AIChatRequest, 'messageId'> {
|
|
108
|
+
version: '2';
|
|
109
|
+
requestId: string;
|
|
110
|
+
messageId: string;
|
|
111
|
+
targetMessageId?: string;
|
|
112
|
+
idempotencyKey: string;
|
|
113
|
+
resume?: AIChatResumeCursorV2;
|
|
114
|
+
}
|
|
115
|
+
export interface AITransportV2 {
|
|
116
|
+
version: '2';
|
|
117
|
+
send(request: AIChatRequestV2, signal: AbortSignal): AsyncIterable<AIStreamEventV2>;
|
|
118
|
+
resume?(request: AIChatRequestV2, signal: AbortSignal): AsyncIterable<AIStreamEventV2>;
|
|
119
|
+
}
|
|
120
|
+
export interface AIPrompt {
|
|
121
|
+
key: string;
|
|
122
|
+
label: string;
|
|
123
|
+
description?: string;
|
|
124
|
+
}
|
|
125
|
+
export interface AIConversation {
|
|
126
|
+
key: string;
|
|
127
|
+
label: string;
|
|
128
|
+
disabled?: boolean;
|
|
129
|
+
}
|
|
130
|
+
export interface AIAction {
|
|
131
|
+
key: string;
|
|
132
|
+
label: string;
|
|
133
|
+
disabled?: boolean;
|
|
134
|
+
}
|
|
135
|
+
export type AIAgentTaskStatus = 'pending' | 'running' | 'waiting-approval' | 'complete' | 'error' | 'cancelled';
|
|
136
|
+
export type AIAgentApprovalStatus = 'pending' | 'approved' | 'rejected';
|
|
137
|
+
export type AIAgentTaskKind = 'task' | 'tool' | 'approval';
|
|
138
|
+
export interface AIAgentApproval {
|
|
139
|
+
id: string;
|
|
140
|
+
title: string;
|
|
141
|
+
description?: string;
|
|
142
|
+
artifactId?: string;
|
|
143
|
+
status?: AIAgentApprovalStatus;
|
|
144
|
+
}
|
|
145
|
+
export interface AIAgentTask {
|
|
146
|
+
id: string;
|
|
147
|
+
label: string;
|
|
148
|
+
status: AIAgentTaskStatus;
|
|
149
|
+
kind?: AIAgentTaskKind;
|
|
150
|
+
detail?: string;
|
|
151
|
+
error?: string;
|
|
152
|
+
toolName?: string;
|
|
153
|
+
progress?: number;
|
|
154
|
+
startedAt?: string;
|
|
155
|
+
completedAt?: string;
|
|
156
|
+
approval?: AIAgentApproval;
|
|
157
|
+
revision?: string | number;
|
|
158
|
+
dependsOn?: string[];
|
|
159
|
+
reorderable?: boolean;
|
|
160
|
+
lockedReason?: string;
|
|
161
|
+
toolCall?: AIToolCallDisplay;
|
|
162
|
+
}
|
|
163
|
+
export interface AIAgentContextItem {
|
|
164
|
+
id: string;
|
|
165
|
+
label: string;
|
|
166
|
+
description?: string;
|
|
167
|
+
disabled?: boolean;
|
|
168
|
+
}
|
|
169
|
+
export interface AIAgentArtifact {
|
|
170
|
+
id: string;
|
|
171
|
+
title: string;
|
|
172
|
+
description?: string;
|
|
173
|
+
type?: string;
|
|
174
|
+
url?: string;
|
|
175
|
+
status?: 'draft' | 'ready' | 'error';
|
|
176
|
+
updatedAt?: string;
|
|
177
|
+
revision?: string | number;
|
|
178
|
+
}
|
|
179
|
+
export type AIAgentOperationAction = 'approve' | 'reject' | 'cancel' | 'retry';
|
|
180
|
+
export type AIAgentOperationStatus = 'idle' | 'pending' | 'success' | 'error';
|
|
181
|
+
export interface AIAgentOperationRequest {
|
|
182
|
+
operationId: string;
|
|
183
|
+
idempotencyKey: string;
|
|
184
|
+
conversationId?: string;
|
|
185
|
+
taskId: string;
|
|
186
|
+
taskRevision: string | number;
|
|
187
|
+
action: AIAgentOperationAction;
|
|
188
|
+
approvalId?: string;
|
|
189
|
+
artifactId?: string;
|
|
190
|
+
artifactRevision?: string | number;
|
|
191
|
+
}
|
|
192
|
+
export type AIAgentOperationResult = {
|
|
193
|
+
status: 'success';
|
|
194
|
+
operationId: string;
|
|
195
|
+
} | {
|
|
196
|
+
status: 'error';
|
|
197
|
+
operationId: string;
|
|
198
|
+
error: string;
|
|
199
|
+
retryable?: boolean;
|
|
200
|
+
outcome?: 'not-applied' | 'unknown';
|
|
201
|
+
};
|
|
202
|
+
export type AIAgentActionHandler = (request: AIAgentOperationRequest, signal: AbortSignal) => Promise<AIAgentOperationResult>;
|
|
203
|
+
import type { VNodeChild } from 'vue';
|
|
@@ -0,0 +1,33 @@
|
|
|
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-welcome {
|
|
14
|
+
display: grid;
|
|
15
|
+
gap: 6px;
|
|
16
|
+
max-inline-size: 620px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.aheart-ai-welcome__title,
|
|
20
|
+
.aheart-ai-welcome__description {
|
|
21
|
+
margin: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.aheart-ai-welcome__title {
|
|
25
|
+
color: var(--aheart-ai-text);
|
|
26
|
+
font-size: 24px;
|
|
27
|
+
line-height: 1.35;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.aheart-ai-welcome__description {
|
|
31
|
+
color: var(--aheart-ai-text-secondary);
|
|
32
|
+
line-height: 1.65;
|
|
33
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
title?: string | undefined;
|
|
3
|
+
description?: string | undefined;
|
|
4
|
+
}>, {
|
|
5
|
+
title: string;
|
|
6
|
+
description: undefined;
|
|
7
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
title?: string | undefined;
|
|
9
|
+
description?: string | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
title: string;
|
|
12
|
+
description: undefined;
|
|
13
|
+
}>>> & Readonly<{}>, {
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
17
|
+
default?(_: {}): any;
|
|
18
|
+
}>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
+
} : {
|
|
25
|
+
type: import('vue').PropType<T[K]>;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
type __VLS_WithDefaults<P, D> = {
|
|
30
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
31
|
+
default: D[K];
|
|
32
|
+
}> : P[K];
|
|
33
|
+
};
|
|
34
|
+
type __VLS_Prettify<T> = {
|
|
35
|
+
[K in keyof T]: T[K];
|
|
36
|
+
} & {};
|
|
37
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent as i, openBlock as t, createElementBlock as o, createElementVNode as l, toDisplayString as s, createCommentVNode as c, renderSlot as n } from "vue";
|
|
2
|
+
const r = { class: "aheart-ai-welcome" }, d = { class: "aheart-ai-welcome__title" }, m = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "aheart-ai-welcome__description"
|
|
5
|
+
}, _ = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "aheart-ai-welcome__content"
|
|
8
|
+
}, p = /* @__PURE__ */ i({
|
|
9
|
+
name: "AAIWelcome",
|
|
10
|
+
__name: "welcome",
|
|
11
|
+
props: {
|
|
12
|
+
title: { default: "你好,我能为你做些什么?" },
|
|
13
|
+
description: { default: void 0 }
|
|
14
|
+
},
|
|
15
|
+
setup(e) {
|
|
16
|
+
return (a, h) => (t(), o("section", r, [
|
|
17
|
+
l("h2", d, s(e.title), 1),
|
|
18
|
+
e.description ? (t(), o("p", m, s(e.description), 1)) : c("", !0),
|
|
19
|
+
a.$slots.default ? (t(), o("div", _, [
|
|
20
|
+
n(a.$slots, "default")
|
|
21
|
+
])) : c("", !0)
|
|
22
|
+
]));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
p as default
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../actions.vue.js");exports.AIActions=e.default;exports.default=e.default;
|
|
@@ -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 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c={key:0,class:"aheart-ai-actions","aria-label":"消息操作"},s=["disabled","onClick"],a=e.defineComponent({name:"AAIActions",__name:"actions",props:{actions:{default:()=>[]}},emits:["select"],setup(n,{emit:o}){const l=o;return(i,r)=>n.actions.length?(e.openBlock(),e.createElementBlock("div",c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.actions,t=>(e.openBlock(),e.createElementBlock("button",{key:t.key,type:"button",disabled:t.disabled,onClick:u=>l("select",t)},e.toDisplayString(t.label),9,s))),128))])):e.createCommentVNode("",!0)}});exports.default=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./actions.vue.js");exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../process.vue.js"),t=require("../thought-chain.vue.js"),r=require("../form.vue.js"),e=require("../form-schema.js");exports.AIProcess=_.default;exports.AIThoughtChain=t.default;exports.AIForm=r.default;exports.AI_FORM_CONDITION_OPERATORS=e.AI_FORM_CONDITION_OPERATORS;exports.AI_FORM_FIELD_TYPES=e.AI_FORM_FIELD_TYPES;exports.validateAIFormSchema=e.validateAIFormSchema;
|