From 99947208893f10194b4d52ad85098e5ee2440f3e Mon Sep 17 00:00:00 2001 From: akhisud3195 Date: Thu, 10 Apr 2025 19:21:00 +0530 Subject: [PATCH] Add chat counter back to playground app --- apps/rowboat/app/projects/[projectId]/playground/app.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/rowboat/app/projects/[projectId]/playground/app.tsx b/apps/rowboat/app/projects/[projectId]/playground/app.tsx index 858994f6..6684d9be 100644 --- a/apps/rowboat/app/projects/[projectId]/playground/app.tsx +++ b/apps/rowboat/app/projects/[projectId]/playground/app.tsx @@ -30,6 +30,7 @@ export function App({ mcpServerUrls: Array>; toolWebhookUrl: string; }) { + const [counter, setCounter] = useState(0); const [testProfile, setTestProfile] = useState> | null>(null); const [systemMessage, setSystemMessage] = useState(defaultSystemMessage); const [chat, setChat] = useState>({ @@ -45,13 +46,16 @@ export function App({ function handleSystemMessageChange(message: string) { setSystemMessage(message); + setCounter(counter + 1); } function handleTestProfileChange(profile: WithStringId> | null) { setTestProfile(profile); + setCounter(counter + 1); } function handleNewChatButtonClick() { + setCounter(counter + 1); setChat({ projectId, createdAt: new Date().toISOString(), @@ -139,6 +143,7 @@ export function App({ />