Skip to content

Commit 4629b39

Browse files
committed
chore: comment context history
1 parent d33e772 commit 4629b39

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

app/components/realtime-chat/realtime-chat.tsx

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -85,27 +85,28 @@ export function RealtimeChat({
8585
startResponseListener();
8686

8787
setIsConnected(true);
88-
try {
89-
const recentMessages = chatStore.getMessagesWithMemory();
90-
for (const message of recentMessages) {
91-
const { role, content } = message;
92-
if (typeof content === "string") {
93-
await clientRef.current.sendItem({
94-
type: "message",
95-
role: role as any,
96-
content: [
97-
{
98-
type: (role === "assistant" ? "text" : "input_text") as any,
99-
text: content as string,
100-
},
101-
],
102-
});
103-
}
104-
}
105-
// await clientRef.current.generateResponse();
106-
} catch (error) {
107-
console.error("Set message failed:", error);
108-
}
88+
// TODO
89+
// try {
90+
// const recentMessages = chatStore.getMessagesWithMemory();
91+
// for (const message of recentMessages) {
92+
// const { role, content } = message;
93+
// if (typeof content === "string") {
94+
// await clientRef.current.sendItem({
95+
// type: "message",
96+
// role: role as any,
97+
// content: [
98+
// {
99+
// type: (role === "assistant" ? "text" : "input_text") as any,
100+
// text: content as string,
101+
// },
102+
// ],
103+
// });
104+
// }
105+
// }
106+
// // await clientRef.current.generateResponse();
107+
// } catch (error) {
108+
// console.error("Set message failed:", error);
109+
// }
109110
} catch (error) {
110111
console.error("Connection failed:", error);
111112
setStatus("Connection failed");

0 commit comments

Comments
 (0)