netstar-ai-chat 1.0.5 → 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 +15 -42
- 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,59 +1,37 @@
|
|
|
1
|
-
import { AgentOption
|
|
1
|
+
import { AgentOption } from '../types/agent';
|
|
2
2
|
|
|
3
3
|
/** 自定义代理人配置(保存到 localStorage) */
|
|
4
4
|
export interface CustomAgentConfig {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/** 新通用格式:JSON 配置对象,由 agentFactory 解析 */
|
|
9
|
-
config?: Record<string, unknown>;
|
|
10
|
-
/** 旧格式兼容 */
|
|
5
|
+
apiBaseUrl?: string;
|
|
6
|
+
apiKey?: string;
|
|
7
|
+
app?: string;
|
|
11
8
|
endpoint?: string;
|
|
12
9
|
historyEndpoint?: string;
|
|
13
|
-
|
|
14
|
-
app?: string;
|
|
15
|
-
mode?: string;
|
|
16
|
-
resumeMode?: string;
|
|
17
|
-
resumeEndpoint?: string;
|
|
18
|
-
apiKey?: string;
|
|
19
|
-
apiBaseUrl?: string;
|
|
20
|
-
}
|
|
21
|
-
/** Agent 工厂函数签名 */
|
|
22
|
-
export type AgentFactory = (config: CustomAgentConfig) => AgentRuntime;
|
|
23
|
-
/** Agent 类型选项 */
|
|
24
|
-
export interface AgentTypeOption {
|
|
25
|
-
value: string;
|
|
10
|
+
id: string;
|
|
26
11
|
label: string;
|
|
12
|
+
mode?: 'astream' | 'astream_events';
|
|
13
|
+
resumeEndpoint?: string;
|
|
14
|
+
resumeMode?: 'create_agent' | 'langgraph';
|
|
15
|
+
type: 'dify_sdk' | 'langchain_py';
|
|
16
|
+
user?: string;
|
|
27
17
|
}
|
|
28
18
|
interface Props {
|
|
29
19
|
/** 代码中内置的代理人列表,不可删除 */
|
|
30
20
|
builtInAgents: AgentOption[];
|
|
31
|
-
/** 当前选中的 Agent key(v-model:value) */
|
|
32
|
-
value?: string;
|
|
33
21
|
/** 是否禁用选择器 */
|
|
34
22
|
disabled?: boolean;
|
|
35
|
-
/** localStorage 存储键前缀,默认 "chat_panel_agent" */
|
|
36
|
-
storageKey?: string;
|
|
37
23
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* 若不提供,则仅支持内置 agents,无法新增自定义代理。
|
|
24
|
+
* localStorage 存储键前缀,默认 "chat_panel_agent"。
|
|
25
|
+
* 不同 ChatPanel 实例可传不同值以隔离数据。
|
|
41
26
|
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
* 默认提供通用选项,使用者可按需覆盖。
|
|
46
|
-
*/
|
|
47
|
-
agentTypeOptions?: AgentTypeOption[];
|
|
27
|
+
storageKey?: string;
|
|
28
|
+
/** 当前选中的 Agent key(v-model:value) */
|
|
29
|
+
value?: string;
|
|
48
30
|
}
|
|
49
31
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
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,10 +39,6 @@ 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;
|
|
@@ -72,7 +46,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
72
46
|
value: string;
|
|
73
47
|
disabled: boolean;
|
|
74
48
|
storageKey: string;
|
|
75
|
-
agentTypeOptions: AgentTypeOption[];
|
|
76
49
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
77
50
|
export default _default;
|
|
78
51
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|