netstar-ai-chat 1.0.6 → 1.0.7
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/ChatPanel/AgentPicker.vue.d.ts +8 -35
- package/dist/index.cjs +10 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2331 -2171
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,47 +1,29 @@
|
|
|
1
|
-
import { AgentOption
|
|
1
|
+
import { AgentOption } from '../types/agent';
|
|
2
2
|
|
|
3
3
|
/** 自定义代理人配置(保存到 localStorage) */
|
|
4
4
|
export interface CustomAgentConfig {
|
|
5
5
|
apiBaseUrl?: string;
|
|
6
6
|
apiKey?: string;
|
|
7
7
|
app?: string;
|
|
8
|
-
/** 新通用格式:JSON 配置对象,由 agentFactory 解析 */
|
|
9
|
-
config?: Record<string, unknown>;
|
|
10
|
-
/** 旧格式兼容 */
|
|
11
8
|
endpoint?: string;
|
|
12
9
|
historyEndpoint?: string;
|
|
13
10
|
id: string;
|
|
14
11
|
label: string;
|
|
15
|
-
mode?:
|
|
12
|
+
mode?: 'astream' | 'astream_events';
|
|
16
13
|
resumeEndpoint?: string;
|
|
17
|
-
resumeMode?:
|
|
18
|
-
type:
|
|
14
|
+
resumeMode?: 'create_agent' | 'langgraph';
|
|
15
|
+
type: 'dify_sdk' | 'langchain_py';
|
|
19
16
|
user?: string;
|
|
20
17
|
}
|
|
21
|
-
/** Agent 工厂函数签名 */
|
|
22
|
-
export type AgentFactory = (config: CustomAgentConfig) => AgentRuntime;
|
|
23
|
-
/** Agent 类型选项 */
|
|
24
|
-
export interface AgentTypeOption {
|
|
25
|
-
label: string;
|
|
26
|
-
value: string;
|
|
27
|
-
}
|
|
28
18
|
interface Props {
|
|
29
|
-
/**
|
|
30
|
-
* Agent 工厂函数。当用户在 UI 中新增代理人后,
|
|
31
|
-
* 调用此函数基于配置创建 AgentRuntime 实例。
|
|
32
|
-
* 若不提供,则仅支持内置 agents,无法新增自定义代理。
|
|
33
|
-
*/
|
|
34
|
-
agentFactory?: AgentFactory;
|
|
35
|
-
/**
|
|
36
|
-
* 自定义代理人类型选项列表(下拉)。
|
|
37
|
-
* 默认提供通用选项,使用者可按需覆盖。
|
|
38
|
-
*/
|
|
39
|
-
agentTypeOptions?: AgentTypeOption[];
|
|
40
19
|
/** 代码中内置的代理人列表,不可删除 */
|
|
41
20
|
builtInAgents: AgentOption[];
|
|
42
21
|
/** 是否禁用选择器 */
|
|
43
22
|
disabled?: boolean;
|
|
44
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* localStorage 存储键前缀,默认 "chat_panel_agent"。
|
|
25
|
+
* 不同 ChatPanel 实例可传不同值以隔离数据。
|
|
26
|
+
*/
|
|
45
27
|
storageKey?: string;
|
|
46
28
|
/** 当前选中的 Agent key(v-model:value) */
|
|
47
29
|
value?: string;
|
|
@@ -50,10 +32,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
50
32
|
value: string;
|
|
51
33
|
disabled: boolean;
|
|
52
34
|
storageKey: string;
|
|
53
|
-
agentTypeOptions: () => {
|
|
54
|
-
value: string;
|
|
55
|
-
label: string;
|
|
56
|
-
}[];
|
|
57
35
|
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
58
36
|
"update:value": (value: string) => void;
|
|
59
37
|
"update:agents": (agents: AgentOption[]) => void;
|
|
@@ -61,16 +39,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
61
39
|
value: string;
|
|
62
40
|
disabled: boolean;
|
|
63
41
|
storageKey: string;
|
|
64
|
-
agentTypeOptions: () => {
|
|
65
|
-
value: string;
|
|
66
|
-
label: string;
|
|
67
|
-
}[];
|
|
68
42
|
}>>> & Readonly<{
|
|
69
43
|
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
70
44
|
"onUpdate:agents"?: ((agents: AgentOption[]) => any) | undefined;
|
|
71
45
|
}>, {
|
|
72
46
|
value: string;
|
|
73
|
-
agentTypeOptions: AgentTypeOption[];
|
|
74
47
|
disabled: boolean;
|
|
75
48
|
storageKey: string;
|
|
76
49
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|