@myun/gimi-chat 0.9.6 → 0.9.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/client/components/history-list/index.js +14 -11
- package/dist/client/components/slider/index.js +5 -2
- package/dist/client/core/index.js +6 -2
- package/dist/components/ai-chat-dialogue/index.js +26 -23
- package/dist/components/ai-loading/index.js +4 -1
- package/dist/components/answer-item/index.js +7 -4
- package/dist/components/ask-card/index.js +5 -2
- package/dist/components/ask-card/index.module.css +8 -1
- package/dist/components/chat-input/index.js +29 -25
- package/dist/components/chat-voice/VoiceCommunication.js +6 -4
- package/dist/components/chat-voice/VoiceRecord.js +6 -3
- package/dist/components/conversation-delete/index.js +5 -2
- package/dist/components/excel-components/ExcelExcuting.js +28 -23
- package/dist/components/excel-components/ExcelFailCard.js +4 -1
- package/dist/components/excel-components/ExcelSuccessCard.js +8 -5
- package/dist/components/excel-components/index.module.css +1 -1
- package/dist/components/file-card/fileCardSidebar.js +7 -2
- package/dist/components/file-card/index.js +10 -5
- package/dist/components/file-card/index.module.css +3 -1
- package/dist/components/file-upload/index.js +15 -7
- package/dist/components/file-upload/uploadV1.js +15 -8
- package/dist/components/knowledge-trace/KnowledgeIconComponent.js +10 -2
- package/dist/components/knowledge-trace/classList.js +11 -4
- package/dist/components/knowledge-trace/documentList.js +11 -4
- package/dist/components/knowledge-trace/index.js +6 -3
- package/dist/components/knowledge-trace/index.module.css +6 -3
- package/dist/components/knowledge-trace/videoList.js +16 -6
- package/dist/components/message-actions/CopyButton.js +4 -1
- package/dist/components/message-actions/LikeButton.js +4 -1
- package/dist/components/message-actions/RegenerateButton.js +5 -2
- package/dist/components/message-actions/UnLikeButton.js +4 -1
- package/dist/components/message-actions/VoicePlay.js +6 -2
- package/dist/components/no-microphone-root/index.js +9 -7
- package/dist/components/no-microphone-root/index.module.css +10 -1
- package/dist/components/product-tag/index.js +10 -7
- package/dist/components/quoted-content/index.js +17 -12
- package/dist/components/reasoning-content/index.js +8 -5
- package/dist/components/reasoning-search/index.d.ts +1 -1
- package/dist/components/reasoning-search/index.js +15 -6
- package/dist/components/reference-content/index.js +10 -3
- package/dist/components/search-course-list/index.js +13 -6
- package/dist/components/search-course-list/index.module.css +6 -3
- package/dist/components/search-course-list/sidebar.js +7 -2
- package/dist/components/templates/GimiChatComponent.js +5 -1
- package/dist/components/unified-sidebar/FileListContent.js +8 -2
- package/dist/components/unified-sidebar/KnowledgeTraceContent.d.ts +1 -0
- package/dist/components/unified-sidebar/KnowledgeTraceContent.js +33 -3
- package/dist/components/unified-sidebar/SearchCourseListContent.js +8 -4
- package/dist/components/unified-sidebar/index.js +14 -8
- package/dist/components/upload-list/index.js +6 -3
- package/dist/components/voice-recording/index.js +10 -7
- package/dist/components/work-flow-content/index.js +7 -1
- package/dist/hooks/useChatActions.js +9 -6
- package/dist/hooks/useChatHistory.js +4 -1
- package/dist/hooks/useChatRecommend.js +7 -4
- package/dist/hooks/useChatStream.js +12 -2
- package/dist/hooks/useChatVoice.js +12 -6
- package/dist/hooks/useCommonChatAPI.js +25 -21
- package/dist/hooks/useFile.js +14 -9
- package/dist/hooks/useLongPoll.js +5 -2
- package/dist/hooks/useSearchCase.js +5 -2
- package/dist/i18n/GimiChatI18nProvider.d.ts +9 -0
- package/dist/i18n/GimiChatI18nProvider.js +25 -0
- package/dist/i18n/core.d.ts +12 -0
- package/dist/i18n/core.js +71 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/locales/en-US.d.ts +216 -0
- package/dist/i18n/locales/en-US.js +242 -0
- package/dist/i18n/locales/zh-CN.d.ts +216 -0
- package/dist/i18n/locales/zh-CN.js +242 -0
- package/dist/i18n/useGimiChatTranslation.d.ts +2 -0
- package/dist/i18n/useGimiChatTranslation.js +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/types/chat.d.ts +4 -1
- package/dist/types/modules.d.ts +1 -0
- package/dist/umd/index.min.js +1 -1
- package/dist/utils/tools.d.ts +1 -1
- package/dist/utils/tools.js +5 -5
- package/dist/utils/voice-stream.d.ts +2 -0
- package/dist/utils/voice-stream.js +43 -20
- package/package.json +6 -4
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
var zhCN = {
|
|
2
|
+
'common.serviceError': '服务异常',
|
|
3
|
+
'common.workflowRunningOnOtherDevice': '当前工作流正在其它设备运行中,请稍作等待后刷新页面重试',
|
|
4
|
+
'common.contentTooLarge': '内容过大,请精简后开启新对话',
|
|
5
|
+
// Sidebar
|
|
6
|
+
'sidebar.knowledgeTrace': '引用来源',
|
|
7
|
+
'sidebar.fileList': '全部',
|
|
8
|
+
'sidebar.reasoningSearch': '搜索来源',
|
|
9
|
+
'sidebar.searchCourseList': '搜索结果',
|
|
10
|
+
// KnowledgeTraceContent
|
|
11
|
+
'knowledgeTrace.type.document': '文档',
|
|
12
|
+
'knowledgeTrace.type.video': '视频',
|
|
13
|
+
'knowledgeTrace.type.course': '课程',
|
|
14
|
+
// ReasoningSearch
|
|
15
|
+
'reasoningSearch.summary': '搜索结果',
|
|
16
|
+
// ChatInput
|
|
17
|
+
'chatInput.maxLength': '最多输入10000个字符',
|
|
18
|
+
'chatInput.uploadLimitOne': '最多上传一个文件哦',
|
|
19
|
+
'chatInput.flowUnsupported': '当前流程不支持该按钮的使用,请等待正在进行的流程结束或按对话卡片指示继续流程',
|
|
20
|
+
'chatInput.uploadFile': '上传文件',
|
|
21
|
+
'chatInput.newConversation': '新对话',
|
|
22
|
+
'chatInput.deepThinkTip': '系统智能切换思考模式',
|
|
23
|
+
'chatInput.deepThinkModeAuto': '深度思考: 自动',
|
|
24
|
+
'chatInput.fetchingVoice': '正在获取语音内容...',
|
|
25
|
+
'chatInput.voiceCallUnsupported': '当前流程不支持语音通话',
|
|
26
|
+
'chatInput.micPermissionRequired': '需要麦克风访问权限',
|
|
27
|
+
// AnswerItem
|
|
28
|
+
'answer.taskCompleted': '本次任务已完成!',
|
|
29
|
+
'answer.stopped': '已停止',
|
|
30
|
+
'answer.courseRecommend': '相关课程推荐',
|
|
31
|
+
'answer.allCourses': '全部课程',
|
|
32
|
+
// Trace Lists
|
|
33
|
+
'trace.jumpUnsupported': '当前平台不支持溯源跳转',
|
|
34
|
+
'trace.video.coverAlt': '视频封面图片',
|
|
35
|
+
'trace.video.playAlt': '播放按钮图片',
|
|
36
|
+
'trace.video.segment': '视频片段: {{start}} - {{end}}',
|
|
37
|
+
'trace.video.invalid': '视频失效',
|
|
38
|
+
'trace.video.total': '本对话共{{count}}个视频',
|
|
39
|
+
'trace.course.coverAlt': '课程封面',
|
|
40
|
+
'trace.course.invalid': '课程失效',
|
|
41
|
+
'trace.course.total': '本对话共{{count}}个课程',
|
|
42
|
+
'trace.document.coverAlt': '文档图片',
|
|
43
|
+
'trace.document.invalid': '文档失效',
|
|
44
|
+
'trace.document.total': '本对话共{{count}}个文档',
|
|
45
|
+
'trace.iconAlt': '知识库溯源图标',
|
|
46
|
+
'trace.countByType': '{{count}}个{{type}}',
|
|
47
|
+
// File Card
|
|
48
|
+
'file.totalInConversation': '本对话共{{count}}个文档',
|
|
49
|
+
'file.download': '下载',
|
|
50
|
+
'file.previewTitle': '文档预览',
|
|
51
|
+
'file.previewBusy': '抱歉,当前服务繁忙',
|
|
52
|
+
'file.previewRetryHint': '请点击重试刷新预览,或直接下载查看',
|
|
53
|
+
'file.viewAll': '全部',
|
|
54
|
+
// Quote
|
|
55
|
+
'quote.name': '名称',
|
|
56
|
+
'quote.currentVideo': '当前视频',
|
|
57
|
+
'quote.currentCourseVideo': '本课程视频',
|
|
58
|
+
'quote.relatedVideos': '相关视频',
|
|
59
|
+
'quote.courseTooltip': '引用课程',
|
|
60
|
+
'quote.maxResources': '最多添加10个资源',
|
|
61
|
+
'quote.imageAlt': '资料引用图片',
|
|
62
|
+
'quote.durationMinutes': '时长{{minutes}}分钟',
|
|
63
|
+
'quote.empty': '暂无数据',
|
|
64
|
+
// Reasoning
|
|
65
|
+
'reasoning.deepThinking': '进行深度思考',
|
|
66
|
+
'reasoning.startAnalysis': '开始分析问题',
|
|
67
|
+
'reasoning.status.thinking': '正在思考',
|
|
68
|
+
'reasoning.status.completed': '思考完成',
|
|
69
|
+
'reasoning.status.stopped': '思考已停止',
|
|
70
|
+
// Course
|
|
71
|
+
'course.jumpUnsupported': '当前平台暂不支持跳转查看课程',
|
|
72
|
+
'course.noValidCourse': '暂无有效的课程查看',
|
|
73
|
+
'course.noRights': '暂无权益',
|
|
74
|
+
'course.noPermission': '暂无权益',
|
|
75
|
+
'course.searchSummary': '搜到{{count}}个相关内容',
|
|
76
|
+
'course.viewMore': '查看更多',
|
|
77
|
+
'course.totalInConversation': '本对话共{{count}}个课程',
|
|
78
|
+
'course.viewCourse': '查看课程',
|
|
79
|
+
'course.coverAlt': '课程封面',
|
|
80
|
+
// Common
|
|
81
|
+
'common.search': '搜索',
|
|
82
|
+
'common.download': '下载',
|
|
83
|
+
'common.loading': '加载中...',
|
|
84
|
+
'common.dataLoading': '数据加载中~',
|
|
85
|
+
'common.pleaseWait': '请稍等...',
|
|
86
|
+
'common.empty': '暂无内容',
|
|
87
|
+
'common.delete': '删除',
|
|
88
|
+
'common.cancel': '取消',
|
|
89
|
+
'common.retry': '重试',
|
|
90
|
+
'common.gotIt': '我知道了',
|
|
91
|
+
'common.scoreUnit': '分',
|
|
92
|
+
'common.networkUnavailable': '无法连接到网络',
|
|
93
|
+
// AskCard
|
|
94
|
+
'askCard.fileUpload': '文件上传',
|
|
95
|
+
// Upload
|
|
96
|
+
'upload.readFailed': '文件读取失败',
|
|
97
|
+
'upload.networkRetry': '网络异常,等待恢复后重试',
|
|
98
|
+
'upload.failedMaxRetry': '文件上传失败,已达到最大重试次数',
|
|
99
|
+
'upload.retrying': '上传失败,正在重试({{current}}/{{total}})',
|
|
100
|
+
'upload.clickToUpload': '点击上传',
|
|
101
|
+
'upload.limitExceeded': '最多只能上传{{limit}}个文件',
|
|
102
|
+
'upload.sizeExceeded': '文件大小超出限制',
|
|
103
|
+
'upload.fileFailedWithName': '{{name}} 上传失败',
|
|
104
|
+
'upload.failed': '上传失败',
|
|
105
|
+
'upload.batchLimit': '单次仅支持上传{{limit}}个文件',
|
|
106
|
+
'upload.typeUnsupported': '不支持该文件类型',
|
|
107
|
+
'upload.status.uploadFailed': '上传失败',
|
|
108
|
+
'upload.status.networkError': '网络错误',
|
|
109
|
+
'upload.status.parseFailed': '解析失败',
|
|
110
|
+
'upload.status.parsing': '解析中...',
|
|
111
|
+
'upload.status.uploading': '上传中...',
|
|
112
|
+
'upload.status.retrying': '重试中...',
|
|
113
|
+
'upload.parseFailed': '文件解析失败',
|
|
114
|
+
'upload.parseFailedMaxRetry': '文件解析失败,已达到最大重试次数',
|
|
115
|
+
'upload.successWithName': '{{name}} 上传成功',
|
|
116
|
+
// History
|
|
117
|
+
'history.deleteModal.title': '永久删除对话',
|
|
118
|
+
'history.deleteModal.content': '本条会话记录将被永久删除,不可恢复及撤销。确定要删除吗?',
|
|
119
|
+
'history.deleteSuccess': '删除成功',
|
|
120
|
+
'history.deleteFailed': '删除失败',
|
|
121
|
+
'history.noMore': '没有更多记录了',
|
|
122
|
+
'history.empty': '暂无最近对话',
|
|
123
|
+
'history.fetchFailed': '获取历史记录失败',
|
|
124
|
+
// Slider
|
|
125
|
+
'slider.newConversation': '新对话',
|
|
126
|
+
'slider.recentConversations': '最近对话',
|
|
127
|
+
// Voice
|
|
128
|
+
'voice.recording': '语音输入中',
|
|
129
|
+
'voice.countdownPrefix': '(倒计时',
|
|
130
|
+
'voice.countdownSuffix': '秒)',
|
|
131
|
+
'voice.abandon': '放弃转写',
|
|
132
|
+
'voice.startTranscribe': '开始转写',
|
|
133
|
+
'voice.inputUnsupported': '当前流程不支持语音输入',
|
|
134
|
+
'voice.inputAlt': '语音输入',
|
|
135
|
+
'voice.callUnsupported': '当前流程不支持语音通话',
|
|
136
|
+
'voice.callAlt': '语音通话',
|
|
137
|
+
'voice.micPermissionTitle': '尚未获得麦克风权限',
|
|
138
|
+
'voice.micPermissionDesc': '语音通话需要开启浏览器的麦克风权限,请点击前往设置进行开启',
|
|
139
|
+
'voice.readAloud': '语音朗读',
|
|
140
|
+
'voice.pauseReadAloud': '暂停朗读',
|
|
141
|
+
'voice.noRecognizedContent': '未识别到语音内容',
|
|
142
|
+
'voice.transcribeFailed': '转写失败,请重试',
|
|
143
|
+
'voice.stopRecordingFirst': '请先停止录音',
|
|
144
|
+
'voice.playFailed': '语音播放失败',
|
|
145
|
+
// Chat API
|
|
146
|
+
'chatApi.conversationIdMissing': '会话ID不存在',
|
|
147
|
+
'chatApi.retryFailed': '重试失败',
|
|
148
|
+
'chatApi.aiResponding': 'AI正在输出中,请稍后',
|
|
149
|
+
'chatApi.retryActionText': '重试',
|
|
150
|
+
'chatApi.retryUnavailable': '当前消息不可进行重试',
|
|
151
|
+
'chatApi.agentMissing': '请先关联智能体',
|
|
152
|
+
'chatApi.createFailed': '创建会话失败',
|
|
153
|
+
'chatApi.deleteSuccess': '删除会话成功',
|
|
154
|
+
'chatApi.deleteFailed': '删除会话失败',
|
|
155
|
+
'chatApi.noRequestToCancel': '没有可取消的请求',
|
|
156
|
+
// Message Action
|
|
157
|
+
'messageAction.copy': '复制',
|
|
158
|
+
'messageAction.likeDone': '已点赞',
|
|
159
|
+
'messageAction.like': '点赞',
|
|
160
|
+
'messageAction.dislikeDone': '已点踩',
|
|
161
|
+
'messageAction.dislike': '点踩',
|
|
162
|
+
'messageAction.regenerate': '重新生成',
|
|
163
|
+
'action.copySuccess': '复制成功',
|
|
164
|
+
'action.copyFailed': '复制失败',
|
|
165
|
+
'action.likeDone': '已点赞',
|
|
166
|
+
'action.dislikeDone': '已点踩',
|
|
167
|
+
'action.likeCancel': '取消点赞',
|
|
168
|
+
'action.dislikeCancel': '取消点踩',
|
|
169
|
+
'action.failed': '操作失败',
|
|
170
|
+
// Conversation Delete
|
|
171
|
+
'conversationDelete.title': '确定是否要删除会话?',
|
|
172
|
+
'conversationDelete.content': '此操作将不可逆',
|
|
173
|
+
// File Validation
|
|
174
|
+
'fileValidation.uploadFailed': '文件上传失败,请重试',
|
|
175
|
+
'fileValidation.parseFailed': '文件解析失败,请重试',
|
|
176
|
+
'fileValidation.uploading': '文件正在上传中,请稍后',
|
|
177
|
+
'fileValidation.parsing': '文件正在解析中,请稍后',
|
|
178
|
+
'fileValidation.retrying': '文件正在重试处理中,请稍后',
|
|
179
|
+
// Polling
|
|
180
|
+
'polling.timeoutStopped': '轮询已超过最大时长,自动终止',
|
|
181
|
+
// Common Errors
|
|
182
|
+
'common.requestTimeout': '请求超时',
|
|
183
|
+
'common.searchCourseFailed': '搜索相关课程失败',
|
|
184
|
+
// Excel
|
|
185
|
+
'excel.steps.start': '启动核心分析模块',
|
|
186
|
+
'excel.steps.parse': '解析关键要素',
|
|
187
|
+
'excel.steps.build': '构建多场景解法',
|
|
188
|
+
'excel.steps.evaluate': '评估执行策略',
|
|
189
|
+
'excel.steps.determine': '确定最优路径',
|
|
190
|
+
'excel.steps.generate': '输出结果载体生成中',
|
|
191
|
+
'excel.analyzing': '正在分析与生成模版...',
|
|
192
|
+
'excel.analyzingDesc': '正在启动任务处理流程, 结合上下文信息, 系统已进入深度分析阶段, 请稍候5~10分钟。',
|
|
193
|
+
'excel.finishing': '分析完成,结果载体即将生成,正准备呈现...',
|
|
194
|
+
'excel.finished': '分析完成,结果载体即将生成,正在准备呈现',
|
|
195
|
+
'excel.retry': '重试',
|
|
196
|
+
'excel.defaultFileName': '文件下载.xlsx',
|
|
197
|
+
'excel.download': '下载',
|
|
198
|
+
// AI Chat Dialogue
|
|
199
|
+
'aiDialogue.newConversation': '新对话',
|
|
200
|
+
'aiDialogue.mutedThinking': '你已静音(正在思考中)',
|
|
201
|
+
'aiDialogue.muted': '你已静音',
|
|
202
|
+
'aiDialogue.connecting': '正在连接',
|
|
203
|
+
'aiDialogue.listening': '正在聆听',
|
|
204
|
+
'aiDialogue.interrupt': '说话或点击可以打断我',
|
|
205
|
+
'aiDialogue.reconnect': '点击重新连接',
|
|
206
|
+
'aiDialogue.startSpeaking': '你可以开始说话',
|
|
207
|
+
'aiDialogue.thinking': '正在思考',
|
|
208
|
+
'aiDialogue.micPermissionRequired': '需要麦克风访问权限',
|
|
209
|
+
'aiDialogue.micPermissionDenied': '未开启麦克风权限',
|
|
210
|
+
'aiDialogue.networkError': '无法连接到网络',
|
|
211
|
+
'aiDialogue.reloadConfirm': '重新加载页面将结束当前语音通话,是否继续?',
|
|
212
|
+
'aiDialogue.closeCaptions': '关闭字幕',
|
|
213
|
+
'aiDialogue.openCaptions': '打开字幕',
|
|
214
|
+
'aiDialogue.pleaseSpeak': '请说话',
|
|
215
|
+
'aiDialogue.listeningEllipsis': '正在听...',
|
|
216
|
+
'aiDialogue.closeMic': '关闭麦克风',
|
|
217
|
+
'aiDialogue.openMic': '打开麦克风',
|
|
218
|
+
'aiDialogue.hangUp': '挂断电话',
|
|
219
|
+
'aiDialogue.unsupportedCall': '后续流程暂不支持通话展示,可挂断后继续',
|
|
220
|
+
// Work Flow
|
|
221
|
+
'workflow.querying': '正在查询可用工作流...',
|
|
222
|
+
'workflow.terminated': '运行终止',
|
|
223
|
+
'workflow.calling': '正在调用 {{name}}...',
|
|
224
|
+
'workflow.defaultName': '工作流',
|
|
225
|
+
// Voice Stream Errors
|
|
226
|
+
'voice.error.connectFailed': '连接失败',
|
|
227
|
+
'voice.error.sendStartFailed': '发送start失败: {{message}}',
|
|
228
|
+
'voice.error.micPermissionDenied': '麦克风权限被拒: {{message}}',
|
|
229
|
+
'voice.error.stopRecordFailed': '停止录音失败: {{message}}',
|
|
230
|
+
'voice.error.noRecordToStop': '不存在需要停止的录音',
|
|
231
|
+
'voice.error.noConnection': '无有效连接',
|
|
232
|
+
'voice.error.sendEndFailed': '发送end失败: {{message}}',
|
|
233
|
+
'voice.error.initFailed': '腾讯云录音未初始化,无法停止',
|
|
234
|
+
'voice.error.requestFailed': '请求失败',
|
|
235
|
+
'voice.error.streamError': '音频流错误: {{message}}',
|
|
236
|
+
'voice.error.needWebSocket': '请先建立WebSocket连接',
|
|
237
|
+
'voice.error.inputEmpty': '请输入合成文本',
|
|
238
|
+
'voice.error.sendTextFailed': '发送文本失败: {{message}}',
|
|
239
|
+
'voice.error.blobError': 'Blob 转换 Base64 失败:结果不是字符串类型',
|
|
240
|
+
'voice.error.blobFormatError': 'Blob 转换 Base64 失败:格式异常'
|
|
241
|
+
};
|
|
242
|
+
export default zhCN;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/types/chat.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Content } from "@douyinfe/semi-ui/lib/cjs/aiChatInput";
|
|
2
|
+
import { GimiChatMessages } from '../i18n';
|
|
2
3
|
|
|
3
4
|
export interface ChatInputRef {
|
|
4
5
|
getValue: () => string;
|
|
@@ -114,6 +115,8 @@ export interface CommonChatProps {
|
|
|
114
115
|
showInput?: boolean;
|
|
115
116
|
baseUrl: string;
|
|
116
117
|
token: string;
|
|
118
|
+
locale?: string;
|
|
119
|
+
localeMessages?: GimiChatMessages;
|
|
117
120
|
showHeader?: boolean;
|
|
118
121
|
autoSendValue?: string;
|
|
119
122
|
initSendValue?: string;
|
|
@@ -296,4 +299,4 @@ interface RelatedResource {
|
|
|
296
299
|
/** 资源类型 */
|
|
297
300
|
type: number;
|
|
298
301
|
recommendQuestions: string;
|
|
299
|
-
}
|
|
302
|
+
}
|
package/dist/types/modules.d.ts
CHANGED