@blueking/chat-helper 0.0.6 → 0.0.8
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/agent/type.d.ts +16 -0
- package/dist/agent/use-agent.d.ts +14 -0
- package/dist/http/transform/agent.ts.js +8 -1
- package/dist/index.d.ts +14 -0
- package/package.json +1 -1
package/dist/agent/type.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export interface IAgentCommandComponentApi {
|
|
|
58
58
|
}
|
|
59
59
|
export interface IAgentInfo {
|
|
60
60
|
agentName?: string;
|
|
61
|
+
relatedSkills?: IRelatedSkill[];
|
|
61
62
|
resources?: IAgentResourceItem[];
|
|
62
63
|
saasUrl?: string;
|
|
63
64
|
chatGroup?: {
|
|
@@ -78,6 +79,7 @@ export interface IAgentInfo {
|
|
|
78
79
|
}
|
|
79
80
|
export interface IAgentInfoApi {
|
|
80
81
|
agent_name: string;
|
|
82
|
+
related_skills?: IRelatedSkillApi[];
|
|
81
83
|
resources?: IAgentResourceItem[];
|
|
82
84
|
saas_url?: string;
|
|
83
85
|
chat_group?: {
|
|
@@ -103,6 +105,20 @@ export interface IAgentResourceItem {
|
|
|
103
105
|
name: string;
|
|
104
106
|
type: string;
|
|
105
107
|
}
|
|
108
|
+
export interface IRelatedSkill {
|
|
109
|
+
description: string;
|
|
110
|
+
icon: string;
|
|
111
|
+
id: number;
|
|
112
|
+
skill_code: string;
|
|
113
|
+
skill_name: string;
|
|
114
|
+
}
|
|
115
|
+
export interface IRelatedSkillApi {
|
|
116
|
+
description: string;
|
|
117
|
+
icon: string;
|
|
118
|
+
id: number;
|
|
119
|
+
skill_code: string;
|
|
120
|
+
skill_name: string;
|
|
121
|
+
}
|
|
106
122
|
/** @deprecated 后端已改为扁平列表 IAgentResourceItem[],不再使用分组结构 */
|
|
107
123
|
export interface IAgentResources {
|
|
108
124
|
command?: IAgentResourceItem[];
|
|
@@ -11,6 +11,13 @@ import type { IAgentInfo } from './type';
|
|
|
11
11
|
export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtocol) => {
|
|
12
12
|
info: import("vue").Ref<{
|
|
13
13
|
agentName?: string;
|
|
14
|
+
relatedSkills?: {
|
|
15
|
+
description: string;
|
|
16
|
+
icon: string;
|
|
17
|
+
id: number;
|
|
18
|
+
skill_code: string;
|
|
19
|
+
skill_name: string;
|
|
20
|
+
}[];
|
|
14
21
|
resources?: {
|
|
15
22
|
code: string;
|
|
16
23
|
icon: null | string;
|
|
@@ -310,6 +317,13 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
|
|
|
310
317
|
};
|
|
311
318
|
}, IAgentInfo | {
|
|
312
319
|
agentName?: string;
|
|
320
|
+
relatedSkills?: {
|
|
321
|
+
description: string;
|
|
322
|
+
icon: string;
|
|
323
|
+
id: number;
|
|
324
|
+
skill_code: string;
|
|
325
|
+
skill_name: string;
|
|
326
|
+
}[];
|
|
313
327
|
resources?: {
|
|
314
328
|
code: string;
|
|
315
329
|
icon: null | string;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* @param data API 返回的 agent 信息数据
|
|
28
28
|
* @returns 前端使用的 agent 信息数据
|
|
29
29
|
*/ export const transferAgentInfoApi2AgentInfo = (data)=>{
|
|
30
|
-
var _data_conversation_settings, _data_conversation_settings1, _data_conversation_settings_commands, _data_conversation_settings2, _data_conversation_settings3;
|
|
30
|
+
var _data_conversation_settings, _data_conversation_settings1, _data_conversation_settings_commands, _data_conversation_settings2, _data_conversation_settings3, _data_related_skills;
|
|
31
31
|
return {
|
|
32
32
|
conversationSettings: {
|
|
33
33
|
openingRemark: data === null || data === void 0 ? void 0 : (_data_conversation_settings = data.conversation_settings) === null || _data_conversation_settings === void 0 ? void 0 : _data_conversation_settings.opening_remark,
|
|
@@ -63,6 +63,13 @@
|
|
|
63
63
|
supportUpload: data.prompt_setting.support_upload
|
|
64
64
|
} : undefined,
|
|
65
65
|
agentName: data === null || data === void 0 ? void 0 : data.agent_name,
|
|
66
|
+
relatedSkills: data === null || data === void 0 ? void 0 : (_data_related_skills = data.related_skills) === null || _data_related_skills === void 0 ? void 0 : _data_related_skills.map((skill)=>({
|
|
67
|
+
id: skill.id,
|
|
68
|
+
skill_name: skill.skill_name,
|
|
69
|
+
skill_code: skill.skill_code,
|
|
70
|
+
description: skill.description,
|
|
71
|
+
icon: skill.icon
|
|
72
|
+
})),
|
|
66
73
|
chatGroup: (data === null || data === void 0 ? void 0 : data.chat_group) ? {
|
|
67
74
|
enabled: data.chat_group.enabled,
|
|
68
75
|
staff: data.chat_group.staff,
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,13 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
|
|
|
14
14
|
agent: {
|
|
15
15
|
info: import("vue").Ref<{
|
|
16
16
|
agentName?: string;
|
|
17
|
+
relatedSkills?: {
|
|
18
|
+
description: string;
|
|
19
|
+
icon: string;
|
|
20
|
+
id: number;
|
|
21
|
+
skill_code: string;
|
|
22
|
+
skill_name: string;
|
|
23
|
+
}[];
|
|
17
24
|
resources?: {
|
|
18
25
|
code: string;
|
|
19
26
|
icon: null | string;
|
|
@@ -313,6 +320,13 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
|
|
|
313
320
|
};
|
|
314
321
|
}, import("./agent").IAgentInfo | {
|
|
315
322
|
agentName?: string;
|
|
323
|
+
relatedSkills?: {
|
|
324
|
+
description: string;
|
|
325
|
+
icon: string;
|
|
326
|
+
id: number;
|
|
327
|
+
skill_code: string;
|
|
328
|
+
skill_name: string;
|
|
329
|
+
}[];
|
|
316
330
|
resources?: {
|
|
317
331
|
code: string;
|
|
318
332
|
icon: null | string;
|