@myun/gimi-chat 0.9.65 → 0.9.67
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/apis/useApi.d.ts +6 -0
- package/dist/apis/useApi.js +45 -1
- package/dist/components/ai-chat-dialogue/index copy.js +1 -1
- package/dist/components/ai-chat-dialogue/index.js +4 -2
- package/dist/components/answer-item/component/artifacts/index.d.ts +13 -0
- package/dist/components/answer-item/component/artifacts/index.js +52 -0
- package/dist/components/answer-item/component/artifacts/index.module.css +24 -0
- package/dist/components/answer-item/component/tool-list/index.d.ts +7 -0
- package/dist/components/answer-item/component/tool-list/index.js +117 -0
- package/dist/components/answer-item/component/tool-list/index.module.css +97 -0
- package/dist/components/answer-item/index.d.ts +2 -1
- package/dist/components/answer-item/index.js +179 -8
- package/dist/components/answer-item/index.module.css +35 -0
- package/dist/components/ask-card/index.d.ts +1 -1
- package/dist/components/chat-input/extension/index.d.ts +1 -0
- package/dist/components/chat-input/extension/index.js +2 -1
- package/dist/components/chat-input/extension/skill/MentionList.d.ts +32 -0
- package/dist/components/chat-input/extension/skill/MentionList.js +206 -0
- package/dist/components/chat-input/extension/skill/ReferSlot.d.ts +3 -0
- package/dist/components/chat-input/extension/skill/ReferSlot.js +100 -0
- package/dist/components/chat-input/extension/skill/data.d.ts +10 -0
- package/dist/components/chat-input/extension/skill/data.js +49 -0
- package/dist/components/chat-input/extension/skill/index.d.ts +7 -0
- package/dist/components/chat-input/extension/skill/index.js +5 -0
- package/dist/components/chat-input/extension/skill/index.less +117 -0
- package/dist/components/chat-input/extension/skill/suggestion.d.ts +16 -0
- package/dist/components/chat-input/extension/skill/suggestion.js +228 -0
- package/dist/components/chat-input/index.js +145 -24
- package/dist/components/chat-input/index.module.css +6 -0
- package/dist/components/file-card/index.js +2 -1
- package/dist/components/file-card/index.module.css +1 -0
- package/dist/components/knowledge-trace/KnowledgeIconComponent.js +6 -1
- package/dist/components/knowledge-trace/tryWatch.js +2 -2
- package/dist/components/message-list/index.js +15 -3
- package/dist/components/message-list/index.module.css +3 -0
- package/dist/components/message-list/skill-tag/index.d.ts +5 -0
- package/dist/components/message-list/skill-tag/index.js +23 -0
- package/dist/components/message-list/skill-tag/index.module.css +22 -0
- package/dist/components/templates/CommonChat.js +3 -1
- package/dist/hooks/useChatActions.d.ts +2 -1
- package/dist/hooks/useChatActions.js +52 -12
- package/dist/hooks/useChatStream.d.ts +6 -1
- package/dist/hooks/useChatStream.js +97 -5
- package/dist/hooks/useCommonChatAPI.d.ts +1 -1
- package/dist/hooks/useCommonChatAPI.js +212 -58
- package/dist/i18n/locales/en-US.d.ts +7 -0
- package/dist/i18n/locales/en-US.js +8 -1
- package/dist/i18n/locales/zh-CN.d.ts +7 -0
- package/dist/i18n/locales/zh-CN.js +8 -1
- package/dist/interfaces/chatMessage.d.ts +40 -0
- package/dist/umd/index.min.js +1 -1
- package/dist/utils/tools.d.ts +7 -0
- package/dist/utils/tools.js +38 -1
- package/package.json +4 -2
|
@@ -59,6 +59,7 @@ declare const zhCN: {
|
|
|
59
59
|
'trace.document.trialInvalidDoc': string;
|
|
60
60
|
'trace.document.trialFailed': string;
|
|
61
61
|
'trace.tryFullTips': string;
|
|
62
|
+
'trace.tryFullTipsNoEntitlement': string;
|
|
62
63
|
'trace.tryFull': string;
|
|
63
64
|
'trace.iconAlt': string;
|
|
64
65
|
'trace.countByType': string;
|
|
@@ -99,6 +100,8 @@ declare const zhCN: {
|
|
|
99
100
|
'common.dataLoading': string;
|
|
100
101
|
'common.pleaseWait': string;
|
|
101
102
|
'common.empty': string;
|
|
103
|
+
'common.noSkill': string;
|
|
104
|
+
'common.skillExceedLimit': string;
|
|
102
105
|
'common.delete': string;
|
|
103
106
|
'common.cancel': string;
|
|
104
107
|
'common.retry': string;
|
|
@@ -167,6 +170,9 @@ declare const zhCN: {
|
|
|
167
170
|
'chatApi.deleteSuccess': string;
|
|
168
171
|
'chatApi.deleteFailed': string;
|
|
169
172
|
'chatApi.noRequestToCancel': string;
|
|
173
|
+
'chatApi.completed': string;
|
|
174
|
+
'chatApi.organizingAnswer': string;
|
|
175
|
+
'chatApi.waitingForConfirmation': string;
|
|
170
176
|
'messageAction.copy': string;
|
|
171
177
|
'messageAction.likeDone': string;
|
|
172
178
|
'messageAction.like': string;
|
|
@@ -258,5 +264,6 @@ declare const zhCN: {
|
|
|
258
264
|
'informationDetail.applicableCountry': string;
|
|
259
265
|
'informationDetail.signDate': string;
|
|
260
266
|
'informationDetail.executeDate': string;
|
|
267
|
+
'common.selectSkill': string;
|
|
261
268
|
};
|
|
262
269
|
export default zhCN;
|
|
@@ -59,6 +59,7 @@ var zhCN = {
|
|
|
59
59
|
'trace.document.trialInvalidDoc': '该文档暂不支持试看',
|
|
60
60
|
'trace.document.trialFailed': '试看加载失败',
|
|
61
61
|
'trace.tryFullTips': '您当前可试看部分内容,点击右侧按钮查看完整内容。',
|
|
62
|
+
'trace.tryFullTipsNoEntitlement': '您的账号暂无查看权益,查看完整内容需升级A类权益账号,可联系企业管理员或课程顾问进行沟通调整。',
|
|
62
63
|
'trace.tryFull': '查看',
|
|
63
64
|
'trace.iconAlt': '知识库溯源图标',
|
|
64
65
|
'trace.countByType': '{{count}}{{unit}}{{type}}',
|
|
@@ -99,6 +100,8 @@ var zhCN = {
|
|
|
99
100
|
'common.dataLoading': '数据加载中~',
|
|
100
101
|
'common.pleaseWait': '请稍等...',
|
|
101
102
|
'common.empty': '暂无内容',
|
|
103
|
+
'common.noSkill': '暂无技能',
|
|
104
|
+
'common.skillExceedLimit': '添加该技能后内容将超过10000字,请精简输入内容后再选择',
|
|
102
105
|
'common.delete': '删除',
|
|
103
106
|
'common.cancel': '取消',
|
|
104
107
|
'common.retry': '重试',
|
|
@@ -167,6 +170,9 @@ var zhCN = {
|
|
|
167
170
|
'chatApi.deleteSuccess': '删除会话成功',
|
|
168
171
|
'chatApi.deleteFailed': '删除会话失败',
|
|
169
172
|
'chatApi.noRequestToCancel': '没有可取消的请求',
|
|
173
|
+
'chatApi.completed': '已完成',
|
|
174
|
+
'chatApi.organizingAnswer': '正在整理答案',
|
|
175
|
+
'chatApi.waitingForConfirmation': '等待人工确认',
|
|
170
176
|
'messageAction.copy': '复制',
|
|
171
177
|
'messageAction.likeDone': '已点赞',
|
|
172
178
|
'messageAction.like': '点赞',
|
|
@@ -257,6 +263,7 @@ var zhCN = {
|
|
|
257
263
|
'informationDetail.taxPreferenceLabel': '是否税费优惠及类型:',
|
|
258
264
|
'informationDetail.applicableCountry': '适用国别:',
|
|
259
265
|
'informationDetail.signDate': '签署日期:',
|
|
260
|
-
'informationDetail.executeDate': '执行日期:'
|
|
266
|
+
'informationDetail.executeDate': '执行日期:',
|
|
267
|
+
'common.selectSkill': '选择技能'
|
|
261
268
|
};
|
|
262
269
|
export default zhCN;
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
import { MCPItem } from "../types/answer";
|
|
2
2
|
import { FileItem } from "../types/file";
|
|
3
3
|
|
|
4
|
+
|
|
5
|
+
export interface ToolItem {
|
|
6
|
+
/** 工具类型 */
|
|
7
|
+
moduleType?: string;
|
|
8
|
+
/** 工具名称 */
|
|
9
|
+
toolName?: string;
|
|
10
|
+
/** 工具调用状态 */
|
|
11
|
+
status?: string;
|
|
12
|
+
/** 工具调用ID */
|
|
13
|
+
id?: string;
|
|
14
|
+
/** 工具调用内容 */
|
|
15
|
+
content?: string;
|
|
16
|
+
/** 工具调用数据 */
|
|
17
|
+
data?: any;
|
|
18
|
+
/** 确认状态
|
|
19
|
+
* PENDING:等待用户处理
|
|
20
|
+
* CONFIRMED:全部同意
|
|
21
|
+
* REJECTED:全部拒绝
|
|
22
|
+
* PARTIAL:部分同意;
|
|
23
|
+
*/
|
|
24
|
+
confirmStatus?: "PENDING" | "CONFIRMED" | "REJECTED" | "PARTIAL";
|
|
25
|
+
}
|
|
4
26
|
/**
|
|
5
27
|
* 聊天消息主接口
|
|
6
28
|
*/
|
|
7
29
|
export interface IChatMessageItem {
|
|
30
|
+
pendingUserConfirm: any;
|
|
8
31
|
/** 代理ID(可选,无值时为 null) */
|
|
9
32
|
agentId?: number | null;
|
|
10
33
|
/** 机器人ID(可选,无值时为 null) */
|
|
@@ -101,6 +124,23 @@ export interface IChatMessageItem {
|
|
|
101
124
|
reasoningLoading?: boolean;
|
|
102
125
|
/** 消息是否加载中 */
|
|
103
126
|
msgLoading?: boolean;
|
|
127
|
+
/** 消息处理耗时(毫秒) */
|
|
128
|
+
durationMs?: number;
|
|
129
|
+
/** 总token数量 */
|
|
130
|
+
totalTokens?: number;
|
|
131
|
+
/** 工具调用列表 */
|
|
132
|
+
toolList?: ToolItem[] | null ;
|
|
133
|
+
/** 思考信息 */
|
|
134
|
+
thinkingInfo?: {
|
|
135
|
+
status?: string;
|
|
136
|
+
toolName?: string;
|
|
137
|
+
collapse?: boolean;
|
|
138
|
+
loaded?: boolean;
|
|
139
|
+
needInit?: boolean;
|
|
140
|
+
};
|
|
141
|
+
/** 资产列表 */
|
|
142
|
+
artifacts?: Artifact[] | null;
|
|
143
|
+
attachedEvents?: any[] | null;
|
|
104
144
|
}
|
|
105
145
|
|
|
106
146
|
interface ModuleInfo {
|