@myun/gimi-chat 0.1.1 → 0.1.2

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/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  import { GimiChatComponent } from './components';
2
2
  export * from './types';
3
- export * from './interfaces';
4
3
  export default GimiChatComponent;
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
1
  import { GimiChatComponent } from "./components";
2
2
  export * from "./types";
3
- export * from "./interfaces";
4
3
  export default GimiChatComponent;
@@ -1,7 +1,12 @@
1
- import { IChatMessageItem } from "../interfaces/chatMessage";
2
- import { ChatInputRef } from "../components/chat-input";
3
1
  import { Content } from "@douyinfe/semi-ui/lib/cjs/aiChatInput";
4
2
 
3
+ export interface ChatInputRef {
4
+ getValue: () => string;
5
+ setValue: (value: string) => void;
6
+ focus: () => void;
7
+ blur: () => void;
8
+ }
9
+
5
10
  export interface CommonChatRef {
6
11
  messageList: IChatMessageItem[];
7
12
  agentDetail?: AgentConfig;
@@ -121,4 +126,138 @@ export interface MessageConfig {
121
126
  enableRegenerate?: boolean;
122
127
  enableVoicePlay?: boolean;
123
128
  reasoningTitle?: string;
129
+ }
130
+
131
+ export interface IChatMessageItem {
132
+ /** 代理ID(可选,无值时为 null) */
133
+ agentId?: number | null;
134
+ /** 机器人ID(可选,无值时为 null) */
135
+ botId?: string | null;
136
+ /** 聊天ID */
137
+ chatId?: string;
138
+ /** 消息内容 */
139
+ content?: string;
140
+ /** 内容状态标识 */
141
+ contentState?: boolean;
142
+ /** 内容类型 */
143
+ contentType?: number;
144
+ /** 会话ID */
145
+ conversationId?: string;
146
+ /** 创建时间(时间戳格式) */
147
+ createdTime?: number;
148
+ /** 消息唯一标识ID */
149
+ id: number;
150
+ /** 问题ID(可选,无值时为 null) */
151
+ questionId?: number | null;
152
+ /** 输入模型(空字符串) */
153
+ inputModel?: string | null;
154
+ /** 是否完整输出标识 */
155
+ isCompleteOut?: number;
156
+ /** 是否系统自动发送标识 */
157
+ isSystemAuto?: number;
158
+ /** 标记标识 */
159
+ mark?: number;
160
+ /** 消息附件文件(可选,无值时为 null) */
161
+ messageFiles?: null | FileItem; // 若后续明确文件结构,可替换 unknown[] 为具体文件接口
162
+ /** 消息ID(可选,无值时为 null) */
163
+ messageId?: number | string | null;
164
+ /** 模块类型 */
165
+ moduleType?: string;
166
+ /** 是否需要搜索标识 */
167
+ needSearch?: boolean;
168
+ /** 查询内容(可选,无值时为 null) */
169
+ query?: null | string;
170
+ /** 引用产品ID列表(字符串格式,多个用分隔符分隔) */
171
+ quoteProductIds?: string;
172
+ /** 引用产品列表(可选,无值时为 null) */
173
+ quoteProductList?: null | {productId: number}[]; // 若后续明确产品结构,可替换 unknown[] 为具体产品接口
174
+ /** 引用教学模型ID列表(字符串格式,多个用分隔符分隔) */
175
+ quoteTeachModelIds?: string;
176
+ /** 引用教学模型列表(可选,无值时为 null) */
177
+ quoteTeachModelList?: null | {teachModelId: number}[]; // 若后续明确模型结构,可替换 unknown[] 为具体模型接口
178
+ /** 推理内容(可选,无值时为 null) */
179
+ reasoningContent?: null | string;
180
+ /** 推理内容状态标识 */
181
+ reasoningContentState?: boolean;
182
+ /** 相关内容数量 */
183
+ relatedCount?: number | null;
184
+ /** 相关课程推荐(可选,无值时为 null) */
185
+ relatedCourseRecommendation?: null | unknown[]; // 若后续明确课程结构,可替换 unknown[] 为具体课程接口
186
+ /** 相关资源列表 */
187
+ relatedResourceList?: RelatedResource[] | null;
188
+ /** 角色标识 */
189
+ role?: number;
190
+ /** 章节ID(可选,无值时为 null) */
191
+ sectionId?: number | string | null;
192
+ /** 技能结果(可选,无值时为 null) */
193
+ skillResult?: null | unknown;
194
+ /** 令牌数量 */
195
+ tokens?: number;
196
+ /** 工具调用(可选,无值时为 null) */
197
+ toolCall?: null | unknown;
198
+ /** 消息类型 */
199
+ type?: number;
200
+ /** 更新时间(时间戳格式) */
201
+ updatedTime?: number;
202
+ /** 视频资源列表(可选,无值时为 null) */
203
+ videoResourceList?: null | unknown[]; // 若后续明确视频结构,可替换 unknown[] 为具体视频接口
204
+ /** VIP等级 */
205
+ vipLevel?: number;
206
+
207
+ moduleInfo?: ModuleInfo | null;
208
+
209
+ reTryed?: boolean;
210
+
211
+ selectValue?: string;
212
+
213
+ disableUploadFile?: boolean;
214
+
215
+ mcp?: MCPItem | null;
216
+
217
+ loading?: boolean;
218
+
219
+ stop?: number;
220
+
221
+ reasoningStatus?: number;
222
+ /** 是否展开推理内容 */
223
+ expand?: boolean;
224
+ /** 推理内容是否加载中 */
225
+ reasoningLoading?: boolean;
226
+ /** 消息是否加载中 */
227
+ msgLoading?: boolean;
228
+ }
229
+
230
+ interface ModuleInfo {
231
+ moduleType: string;
232
+ id: string;
233
+ data: {
234
+ results: {
235
+ skillResult: {
236
+ message: string;
237
+ requestId: number;
238
+ requestStatus: number;
239
+ };
240
+ askShowInfo: {
241
+ questionContent: string;
242
+ answerType: number;
243
+ };
244
+ };
245
+ };
246
+ }
247
+
248
+ /**
249
+ * 相关资源子接口
250
+ */
251
+ interface RelatedResource {
252
+ /** 资源内容(JSON字符串格式,包含推荐问题列表) */
253
+ content: string;
254
+ /** 资源唯一标识ID */
255
+ id: number;
256
+ /** 关联的消息ID */
257
+ messageId: number;
258
+ /** 资源总数量 */
259
+ totalCount: number;
260
+ /** 资源类型 */
261
+ type: number;
262
+ recommendQuestions: string;
124
263
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myun/gimi-chat",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -1,3 +0,0 @@
1
- export * from './chatMessage';
2
- export * from './fileInterface';
3
- export * from './knowledgeTrace';
@@ -1,3 +0,0 @@
1
- export * from "./chatMessage";
2
- export * from "./fileInterface";
3
- export * from "./knowledgeTrace";