@blueking/chat-helper 0.0.1-beta.23 → 0.0.1-beta.24

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.
@@ -589,7 +589,7 @@ export declare const useAgent: (mediator: IMediatorModule, protocol: ISSEProtoco
589
589
  isInfoLoading: import("vue").Ref<boolean, boolean>;
590
590
  isChatting: import("vue").Ref<boolean, boolean>;
591
591
  chat: (userInput: IUserMessage["content"], sessionCode: string, url?: string, config?: IRequestConfig, property?: IMessageProperty) => Promise<void>;
592
- handleRole: (data: IAgentInfo) => void;
592
+ handleRole: (data: IAgentInfo, sessionCode: string) => void;
593
593
  resendMessage: (messageId: string, sessionCode: string, newContent?: IUserMessage["content"], url?: string, config?: IRequestConfig) => Promise<void>;
594
594
  resumeStreamingChat: (sessionCode: string, url?: string, config?: IRequestConfig) => void;
595
595
  abortChat: () => void;
@@ -102,7 +102,7 @@ import { MessageRole, MessageStatus } from '../message/index.ts.js';
102
102
  });
103
103
  };
104
104
  // 处理角色消息
105
- const handleRole = (data)=>{
105
+ const handleRole = (data, sessionCode)=>{
106
106
  var _data_promptSetting_content, _data_promptSetting;
107
107
  const lastRoleMessage = (_data_promptSetting = data.promptSetting) === null || _data_promptSetting === void 0 ? void 0 : (_data_promptSetting_content = _data_promptSetting.content) === null || _data_promptSetting_content === void 0 ? void 0 : _data_promptSetting_content.at(-1);
108
108
  if ((lastRoleMessage === null || lastRoleMessage === void 0 ? void 0 : lastRoleMessage.role) === MessageRole.Pause) {
@@ -110,7 +110,8 @@ import { MessageRole, MessageStatus } from '../message/index.ts.js';
110
110
  (_mediator_message = mediator.message) === null || _mediator_message === void 0 ? void 0 : _mediator_message.createAndPlusMessage({
111
111
  role: MessageRole.Assistant,
112
112
  content: lastRoleMessage.content,
113
- status: MessageStatus.Complete
113
+ status: MessageStatus.Complete,
114
+ sessionCode
114
115
  });
115
116
  }
116
117
  };
package/dist/index.d.ts CHANGED
@@ -591,7 +591,7 @@ export declare const useChatHelper: (options: IUseChatHelperOptions) => {
591
591
  isInfoLoading: import("vue").Ref<boolean, boolean>;
592
592
  isChatting: import("vue").Ref<boolean, boolean>;
593
593
  chat: (userInput: import("./message").IUserMessage["content"], sessionCode: string, url?: string, config?: import("./http").IRequestConfig, property?: import("./message").IMessageProperty) => Promise<void>;
594
- handleRole: (data: import("./agent").IAgentInfo) => void;
594
+ handleRole: (data: import("./agent").IAgentInfo, sessionCode: string) => void;
595
595
  resendMessage: (messageId: string, sessionCode: string, newContent?: import("./message").IUserMessage["content"], url?: string, config?: import("./http").IRequestConfig) => Promise<void>;
596
596
  resumeStreamingChat: (sessionCode: string, url?: string, config?: import("./http").IRequestConfig) => void;
597
597
  abortChat: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/chat-helper",
3
- "version": "0.0.1-beta.23",
3
+ "version": "0.0.1-beta.24",
4
4
  "description": "",
5
5
  "main": "./dist/index.ts.js",
6
6
  "types": "./dist/index.d.ts",