@blueking/chat-helper 0.0.1-beta.12 → 0.0.1-beta.13

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.
@@ -535,7 +535,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
535
535
  isInfoLoading: import("vue").Ref<boolean, boolean>;
536
536
  isChatting: import("vue").Ref<boolean, boolean>;
537
537
  chat: (userInput: IUserMessage["content"], sessionCode: string, url?: string, config?: IRequestConfig, property?: IMessageProperty) => Promise<void>;
538
- resendMessage: (messageId: string, sessionCode: string, newContent?: string, url?: string, config?: IRequestConfig) => Promise<void>;
538
+ resendMessage: (messageId: string, sessionCode: string, newContent?: IUserMessage["content"], url?: string, config?: IRequestConfig) => Promise<void>;
539
539
  resumeStreamingChat: (sessionCode: string, url?: string, config?: IRequestConfig) => void;
540
540
  abortChat: () => void;
541
541
  stopChat: (sessionCode: string) => Promise<void>;
@@ -212,7 +212,7 @@ import { MessageRole, MessageStatus } from '../message/index.ts.js';
212
212
  *
213
213
  * @param messageId - 用户消息 ID(id 字段)
214
214
  * @param sessionCode - 会话编码
215
- * @param newContent - 新内容(可选,不传则使用原消息内容)
215
+ * @param newContent - 新内容(可选,不传则使用原消息内容;支持多模态)
216
216
  * @param url - 请求 URL(可选)
217
217
  * @param config - 请求配置(可选)
218
218
  */ const resendMessage = function() {
@@ -229,7 +229,7 @@ import { MessageRole, MessageStatus } from '../message/index.ts.js';
229
229
  throw new Error('Can only resend user messages');
230
230
  }
231
231
  // 2. 获取原消息内容和 property(在删除前保存)
232
- const originalContent = typeof targetMessage.content === 'string' ? targetMessage.content : JSON.stringify(targetMessage.content);
232
+ const originalContent = targetMessage.content;
233
233
  const originalProperty = targetMessage.property;
234
234
  // 3. 确定最终发送的内容
235
235
  const finalContent = newContent !== null && newContent !== void 0 ? newContent : originalContent;
package/dist/index.d.ts CHANGED
@@ -537,7 +537,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
537
537
  isInfoLoading: import("vue").Ref<boolean, boolean>;
538
538
  isChatting: import("vue").Ref<boolean, boolean>;
539
539
  chat: (userInput: import("./message").IUserMessage["content"], sessionCode: string, url?: string, config?: import("./http").IRequestConfig, property?: import("./message").IMessageProperty) => Promise<void>;
540
- resendMessage: (messageId: string, sessionCode: string, newContent?: string, url?: string, config?: import("./http").IRequestConfig) => Promise<void>;
540
+ resendMessage: (messageId: string, sessionCode: string, newContent?: import("./message").IUserMessage["content"], url?: string, config?: import("./http").IRequestConfig) => Promise<void>;
541
541
  resumeStreamingChat: (sessionCode: string, url?: string, config?: import("./http").IRequestConfig) => void;
542
542
  abortChat: () => void;
543
543
  stopChat: (sessionCode: string) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/chat-helper",
3
- "version": "0.0.1-beta.12",
3
+ "version": "0.0.1-beta.13",
4
4
  "description": "",
5
5
  "main": "./dist/index.ts.js",
6
6
  "types": "./dist/index.d.ts",