From 97d2ccc154ddf3a7111d837461d91ac7f4559a3a Mon Sep 17 00:00:00 2001 From: xjs Date: Thu, 29 May 2025 11:46:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20AI=E5=AF=B9=E8=AF=9D=E6=B5=81=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Provider/RealtimeClientProvider.tsx | 2 +- src/hooks/useRealtimeClient.ts | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/components/Provider/RealtimeClientProvider.tsx b/src/components/Provider/RealtimeClientProvider.tsx index 0a6a8f4..7f7d8ce 100644 --- a/src/components/Provider/RealtimeClientProvider.tsx +++ b/src/components/Provider/RealtimeClientProvider.tsx @@ -122,7 +122,7 @@ export const RealtimeClientProvider = ({ allowPersonalAccessTokenInBrowser: true, suppressStationaryNoise: true, suppressNonStationaryNoise: true, - debug: false, + debug: true, }); clientRef.current = client; diff --git a/src/hooks/useRealtimeClient.ts b/src/hooks/useRealtimeClient.ts index e69de29..2200a05 100644 --- a/src/hooks/useRealtimeClient.ts +++ b/src/hooks/useRealtimeClient.ts @@ -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 { + + } +}