@blueking/chat-helper 0.0.1-beta.20 → 0.0.1-beta.21
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/event/ag-ui.d.ts
CHANGED
|
@@ -147,7 +147,7 @@ export declare class AGUIProtocol implements ISSEProtocol {
|
|
|
147
147
|
handleToolCallStartEvent(event: IToolCallStartEvent): void;
|
|
148
148
|
injectMessageModule(message: IMessageModule): void;
|
|
149
149
|
onDone(): void;
|
|
150
|
-
onError(error:
|
|
150
|
+
onError(error: unknown): void;
|
|
151
151
|
onMessage(message: unknown): void;
|
|
152
152
|
onStart(): void;
|
|
153
153
|
}
|
package/dist/event/ag-ui.ts.js
CHANGED
|
@@ -334,12 +334,12 @@ import { CustomEventName, EventType } from './type.ts.js';
|
|
|
334
334
|
(_this_onDoneCallback = (_this = this).onDoneCallback) === null || _this_onDoneCallback === void 0 ? void 0 : _this_onDoneCallback.call(_this);
|
|
335
335
|
}
|
|
336
336
|
onError(error) {
|
|
337
|
-
var // 回调给上层
|
|
337
|
+
var _error_error, // 回调给上层
|
|
338
338
|
_this_onErrorCallback, _this;
|
|
339
339
|
// 创建一个错误消息
|
|
340
340
|
this.messageModule.plusMessage({
|
|
341
341
|
role: MessageRole.Assistant,
|
|
342
|
-
content: error.message,
|
|
342
|
+
content: (_error_error = error.error) === null || _error_error === void 0 ? void 0 : _error_error.message,
|
|
343
343
|
status: MessageStatus.Error
|
|
344
344
|
});
|
|
345
345
|
(_this_onErrorCallback = (_this = this).onErrorCallback) === null || _this_onErrorCallback === void 0 ? void 0 : _this_onErrorCallback.call(_this, error);
|
|
@@ -36,7 +36,7 @@ export interface ISSEConfig extends ISSEProtocol, Omit<IRequestConfig, 'response
|
|
|
36
36
|
}
|
|
37
37
|
export interface ISSEProtocol {
|
|
38
38
|
onDone?: () => void;
|
|
39
|
-
onError?: (error:
|
|
39
|
+
onError?: (error: unknown) => void;
|
|
40
40
|
onMessage?: (event: unknown) => void;
|
|
41
41
|
onStart?: () => void;
|
|
42
42
|
}
|