mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-13 17:22:37 +02:00
fix playground chat effects
This commit is contained in:
parent
d74dbb25d9
commit
023223270f
2 changed files with 9 additions and 2 deletions
|
|
@ -53,6 +53,7 @@ export function Chat({
|
|||
createdAt: new Date().toISOString(),
|
||||
}];
|
||||
setMessages(updatedMessages);
|
||||
setFetchResponseError(null);
|
||||
}
|
||||
|
||||
function handleToolCallResults(results: z.infer<typeof apiV1.ToolMessage>[]) {
|
||||
|
|
@ -126,7 +127,9 @@ export function Chat({
|
|||
setFetchResponseError(`Failed to get assistant response: ${err instanceof Error ? err.message : 'Unknown error'}`);
|
||||
}
|
||||
} finally {
|
||||
setLoadingAssistantResponse(false);
|
||||
if (!ignore) {
|
||||
setLoadingAssistantResponse(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -183,6 +186,7 @@ export function Chat({
|
|||
chatId: chatId ?? '',
|
||||
createdAt: new Date().toISOString(),
|
||||
}]);
|
||||
setFetchResponseError(null);
|
||||
} catch (err) {
|
||||
setFetchResponseError(`Failed to simulate user response: ${err instanceof Error ? err.message : 'Unknown error'}`);
|
||||
} finally {
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@ function App({
|
|||
role: 'user',
|
||||
content: prompt,
|
||||
}]);
|
||||
setResponseError(null);
|
||||
}
|
||||
|
||||
const handleApplyChange = useCallback((
|
||||
|
|
@ -351,7 +352,9 @@ function App({
|
|||
setResponseError(`Failed to get copilot response: ${err instanceof Error ? err.message : 'Unknown error'}`);
|
||||
}
|
||||
} finally {
|
||||
setLoadingResponse(false);
|
||||
if (!ignore) {
|
||||
setLoadingResponse(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue