netstar-ai-chat 1.0.4 → 1.0.6
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/AgentChat/index.vue.d.ts +10 -0
- package/dist/ChatPanel/AgentPicker.vue.d.ts +18 -18
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +25 -23
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -20,6 +20,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
20
20
|
hideHistory?: boolean;
|
|
21
21
|
/** 透传当前 Agent 的运行时事件 */
|
|
22
22
|
onAgentEvent?: AgentEventCallback;
|
|
23
|
+
/**
|
|
24
|
+
* 自定义 BubbleList roles 配置(覆盖默认 ai / user 气泡样式)。
|
|
25
|
+
* 不传时使用内置默认样式。
|
|
26
|
+
*/
|
|
27
|
+
roles?: Record<string, any>;
|
|
23
28
|
/** 对话面板标题(不设置时使用当前会话标题) */
|
|
24
29
|
title?: string;
|
|
25
30
|
}>, {
|
|
@@ -53,6 +58,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
53
58
|
hideHistory?: boolean;
|
|
54
59
|
/** 透传当前 Agent 的运行时事件 */
|
|
55
60
|
onAgentEvent?: AgentEventCallback;
|
|
61
|
+
/**
|
|
62
|
+
* 自定义 BubbleList roles 配置(覆盖默认 ai / user 气泡样式)。
|
|
63
|
+
* 不传时使用内置默认样式。
|
|
64
|
+
*/
|
|
65
|
+
roles?: Record<string, any>;
|
|
56
66
|
/** 对话面板标题(不设置时使用当前会话标题) */
|
|
57
67
|
title?: string;
|
|
58
68
|
}>, {
|
|
@@ -2,38 +2,30 @@ import { AgentOption, AgentRuntime } from '../types/agent';
|
|
|
2
2
|
|
|
3
3
|
/** 自定义代理人配置(保存到 localStorage) */
|
|
4
4
|
export interface CustomAgentConfig {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
apiBaseUrl?: string;
|
|
6
|
+
apiKey?: string;
|
|
7
|
+
app?: string;
|
|
8
8
|
/** 新通用格式:JSON 配置对象,由 agentFactory 解析 */
|
|
9
9
|
config?: Record<string, unknown>;
|
|
10
10
|
/** 旧格式兼容 */
|
|
11
11
|
endpoint?: string;
|
|
12
12
|
historyEndpoint?: string;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
15
|
mode?: string;
|
|
16
|
-
resumeMode?: string;
|
|
17
16
|
resumeEndpoint?: string;
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
resumeMode?: string;
|
|
18
|
+
type: string;
|
|
19
|
+
user?: string;
|
|
20
20
|
}
|
|
21
21
|
/** Agent 工厂函数签名 */
|
|
22
22
|
export type AgentFactory = (config: CustomAgentConfig) => AgentRuntime;
|
|
23
23
|
/** Agent 类型选项 */
|
|
24
24
|
export interface AgentTypeOption {
|
|
25
|
-
value: string;
|
|
26
25
|
label: string;
|
|
26
|
+
value: string;
|
|
27
27
|
}
|
|
28
28
|
interface Props {
|
|
29
|
-
/** 代码中内置的代理人列表,不可删除 */
|
|
30
|
-
builtInAgents: AgentOption[];
|
|
31
|
-
/** 当前选中的 Agent key(v-model:value) */
|
|
32
|
-
value?: string;
|
|
33
|
-
/** 是否禁用选择器 */
|
|
34
|
-
disabled?: boolean;
|
|
35
|
-
/** localStorage 存储键前缀,默认 "chat_panel_agent" */
|
|
36
|
-
storageKey?: string;
|
|
37
29
|
/**
|
|
38
30
|
* Agent 工厂函数。当用户在 UI 中新增代理人后,
|
|
39
31
|
* 调用此函数基于配置创建 AgentRuntime 实例。
|
|
@@ -45,6 +37,14 @@ interface Props {
|
|
|
45
37
|
* 默认提供通用选项,使用者可按需覆盖。
|
|
46
38
|
*/
|
|
47
39
|
agentTypeOptions?: AgentTypeOption[];
|
|
40
|
+
/** 代码中内置的代理人列表,不可删除 */
|
|
41
|
+
builtInAgents: AgentOption[];
|
|
42
|
+
/** 是否禁用选择器 */
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
/** localStorage 存储键前缀,默认 "chat_panel_agent" */
|
|
45
|
+
storageKey?: string;
|
|
46
|
+
/** 当前选中的 Agent key(v-model:value) */
|
|
47
|
+
value?: string;
|
|
48
48
|
}
|
|
49
49
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
50
50
|
value: string;
|
|
@@ -70,9 +70,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
70
70
|
"onUpdate:agents"?: ((agents: AgentOption[]) => any) | undefined;
|
|
71
71
|
}>, {
|
|
72
72
|
value: string;
|
|
73
|
+
agentTypeOptions: AgentTypeOption[];
|
|
73
74
|
disabled: boolean;
|
|
74
75
|
storageKey: string;
|
|
75
|
-
agentTypeOptions: AgentTypeOption[];
|
|
76
76
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
77
77
|
export default _default;
|
|
78
78
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|