mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 16:00:58 +00:00
Fix spinner showing on aborted tool calls in javascript-repl and artifacts renderers
When isStreaming is false and there's no result (aborted state), show 'complete' state instead of 'inprogress' to avoid showing the spinner.
This commit is contained in:
parent
46b1abff1d
commit
b3cce7b400
2 changed files with 2 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ export class ArtifactsToolRenderer implements ToolRenderer<ArtifactsParams, unde
|
|||
result: ToolResultMessage<undefined> | undefined,
|
||||
isStreaming?: boolean,
|
||||
): TemplateResult {
|
||||
const state = result ? (result.isError ? "error" : "complete") : isStreaming ? "inprogress" : "inprogress";
|
||||
const state = result ? (result.isError ? "error" : "complete") : isStreaming ? "inprogress" : "complete";
|
||||
|
||||
// Create refs for collapsible sections
|
||||
const contentRef = createRef<HTMLDivElement>();
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ export const javascriptReplRenderer: ToolRenderer<JavaScriptReplParams, JavaScri
|
|||
isStreaming?: boolean,
|
||||
): TemplateResult {
|
||||
// Determine status
|
||||
const state = result ? (result.isError ? "error" : "complete") : isStreaming ? "inprogress" : "inprogress";
|
||||
const state = result ? (result.isError ? "error" : "complete") : isStreaming ? "inprogress" : "complete";
|
||||
|
||||
// Create refs for collapsible code section
|
||||
const codeContentRef = createRef<HTMLDivElement>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue