@myun/gimi-chat 0.9.45 → 0.9.46

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.
Files changed (52) hide show
  1. package/dist/apis/useApi.d.ts +6 -0
  2. package/dist/apis/useApi.js +45 -1
  3. package/dist/components/ai-chat-dialogue/index copy.js +1 -1
  4. package/dist/components/ai-chat-dialogue/index.js +4 -2
  5. package/dist/components/answer-item/component/artifacts/index.d.ts +13 -0
  6. package/dist/components/answer-item/component/artifacts/index.js +52 -0
  7. package/dist/components/answer-item/component/artifacts/index.module.css +24 -0
  8. package/dist/components/answer-item/component/tool-list/index.d.ts +7 -0
  9. package/dist/components/answer-item/component/tool-list/index.js +97 -0
  10. package/dist/components/answer-item/component/tool-list/index.module.css +92 -0
  11. package/dist/components/answer-item/index.d.ts +2 -1
  12. package/dist/components/answer-item/index.js +160 -7
  13. package/dist/components/answer-item/index.module.css +24 -0
  14. package/dist/components/ask-card/index.d.ts +1 -1
  15. package/dist/components/chat-input/extension/index.d.ts +1 -0
  16. package/dist/components/chat-input/extension/index.js +2 -1
  17. package/dist/components/chat-input/extension/skill/MentionList.d.ts +30 -0
  18. package/dist/components/chat-input/extension/skill/MentionList.js +181 -0
  19. package/dist/components/chat-input/extension/skill/ReferSlot.d.ts +3 -0
  20. package/dist/components/chat-input/extension/skill/ReferSlot.js +100 -0
  21. package/dist/components/chat-input/extension/skill/data.d.ts +10 -0
  22. package/dist/components/chat-input/extension/skill/data.js +49 -0
  23. package/dist/components/chat-input/extension/skill/index.d.ts +7 -0
  24. package/dist/components/chat-input/extension/skill/index.js +5 -0
  25. package/dist/components/chat-input/extension/skill/index.less +100 -0
  26. package/dist/components/chat-input/extension/skill/suggestion.d.ts +14 -0
  27. package/dist/components/chat-input/extension/skill/suggestion.js +173 -0
  28. package/dist/components/chat-input/index.js +63 -15
  29. package/dist/components/file-card/index.js +2 -1
  30. package/dist/components/file-card/index.module.css +1 -0
  31. package/dist/components/knowledge-trace/tryWatch.js +8 -1
  32. package/dist/components/message-list/index.js +15 -3
  33. package/dist/components/message-list/index.module.css +3 -0
  34. package/dist/components/message-list/skill-tag/index.d.ts +5 -0
  35. package/dist/components/message-list/skill-tag/index.js +24 -0
  36. package/dist/components/message-list/skill-tag/index.module.css +22 -0
  37. package/dist/components/templates/CommonChat.js +3 -1
  38. package/dist/hooks/useChatActions.d.ts +2 -1
  39. package/dist/hooks/useChatActions.js +41 -3
  40. package/dist/hooks/useChatStream.d.ts +6 -1
  41. package/dist/hooks/useChatStream.js +96 -5
  42. package/dist/hooks/useCommonChatAPI.d.ts +1 -1
  43. package/dist/hooks/useCommonChatAPI.js +190 -54
  44. package/dist/i18n/locales/en-US.d.ts +3 -0
  45. package/dist/i18n/locales/en-US.js +10 -7
  46. package/dist/i18n/locales/zh-CN.d.ts +3 -0
  47. package/dist/i18n/locales/zh-CN.js +4 -1
  48. package/dist/interfaces/chatMessage.d.ts +38 -0
  49. package/dist/umd/index.min.js +1 -1
  50. package/dist/utils/tools.d.ts +6 -0
  51. package/dist/utils/tools.js +31 -0
  52. package/package.json +3 -2
@@ -1,6 +1,28 @@
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
  */
@@ -101,6 +123,22 @@ export interface IChatMessageItem {
101
123
  reasoningLoading?: boolean;
102
124
  /** 消息是否加载中 */
103
125
  msgLoading?: boolean;
126
+ /** 消息处理耗时(毫秒) */
127
+ durationMs?: number;
128
+ /** 总token数量 */
129
+ totalTokens?: number;
130
+ /** 工具调用列表 */
131
+ toolList?: ToolItem[] | null ;
132
+ /** 思考信息 */
133
+ thinkingInfo?: {
134
+ status?: string;
135
+ toolName?: string;
136
+ collapse?: boolean;
137
+ loaded?: boolean;
138
+ };
139
+ /** 资产列表 */
140
+ artifacts?: Artifact[] | null;
141
+ attachedEvents?: any[] | null;
104
142
  }
105
143
 
106
144
  interface ModuleInfo {