feat: AI对话流模式设计

master
xjs 2025-05-29 11:46:23 +08:00
parent 207f28c728
commit 97d2ccc154
2 changed files with 21 additions and 1 deletions

View File

@ -122,7 +122,7 @@ export const RealtimeClientProvider = ({
allowPersonalAccessTokenInBrowser: true,
suppressStationaryNoise: true,
suppressNonStationaryNoise: true,
debug: false,
debug: true,
});
clientRef.current = client;

View File

@ -0,0 +1,20 @@
class MessageHandler {
canHandle(_eventType: string, _dataType: string) {
throw new Error("Subclass must implement canHandle method");
}
handle(_event: string) {
throw new Error("Subclass must implement handle method");
}
setNextHandle(){}
}
class ToolResponseHandler extends MessageHandler{
canHandle(eventType: string, dataType: string): void {
}
handle(event: string): void {
}
}