Skip to content

Commit aeaeada

Browse files
committed
fix: Autoscroll on regenerating message
1 parent 49ff4e3 commit aeaeada

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/server/webui/src/lib/stores/chat.svelte.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,10 @@ class ChatStore {
905905
return;
906906
}
907907

908+
// Set loading state for regeneration
909+
this.isLoading = true;
910+
this.currentResponse = '';
911+
908912
// Create new assistant message branch with empty content
909913
const newAssistantMessage = await DatabaseService.createMessageBranch({
910914
convId: this.activeConversation.id,
@@ -933,6 +937,7 @@ class ChatStore {
933937
await this.streamChatCompletion(conversationPath, newAssistantMessage);
934938
} catch (error) {
935939
console.error('Failed to regenerate message with branching:', error);
940+
this.isLoading = false;
936941
}
937942
}
938943

0 commit comments

Comments
 (0)