diff --git a/src/renderer/src/windows/mini/home/HomeWindow.tsx b/src/renderer/src/windows/mini/home/HomeWindow.tsx index 19a9a92ec6..0784d0536f 100644 --- a/src/renderer/src/windows/mini/home/HomeWindow.tsx +++ b/src/renderer/src/windows/mini/home/HomeWindow.tsx @@ -340,10 +340,23 @@ const HomeWindow: FC = () => { ) } break - case ChunkType.ERROR: + case ChunkType.ERROR: { + const possibleBlockId = thinkingBlockId || blockId + if (possibleBlockId) { + store.dispatch( + updateOneBlock({ + id: possibleBlockId, + changes: { + status: isAbortError(chunk.error) ? MessageBlockStatus.PAUSED : MessageBlockStatus.ERROR + } + }) + ) + } if (!isAbortError(chunk.error)) { throw new Error(chunk.error.message) } + break + } //fall through case ChunkType.BLOCK_COMPLETE: setIsLoading(false)