Skip to content

Commit fb02928

Browse files
committed
Send HIDE_PROGRESS message at necessary stages of the chat response application process to ensure the progress indicator is hidden correctly
1 parent fa48d50 commit fb02928

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

‎apps/editor/src/commands/apply-chat-response-command/apply-chat-response-command.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,11 @@ export const apply_chat_response_command = (params: {
222222
workspace_provider: params.workspace_provider
223223
})
224224

225-
params.panel_provider.send_message({
226-
command: 'HIDE_PROGRESS'
227-
})
225+
if (!preview_data) {
226+
params.panel_provider.send_message({
227+
command: 'HIDE_PROGRESS'
228+
})
229+
}
228230

229231
if (preview_data) {
230232
let created_at_for_preview = args?.created_at

‎apps/editor/src/commands/apply-chat-response-command/response-processor.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ export const process_chat_response = async (params: {
198198
history
199199
})
200200

201+
params.panel_provider.send_message({
202+
command: 'HIDE_PROGRESS'
203+
})
204+
201205
params.panel_provider.send_message({
202206
command: 'RESPONSE_PREVIEW_STARTED',
203207
items: files_for_preview,

‎apps/editor/src/commands/apply-chat-response-command/utils/preview/preview.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ export const preview = async (params: {
137137
)
138138

139139
if (params.panel_provider) {
140+
params.panel_provider.send_message({
141+
command: 'HIDE_PROGRESS'
142+
})
140143
params.panel_provider.send_message({
141144
command: 'RESPONSE_PREVIEW_STARTED',
142145
items: items_for_preview,

0 commit comments

Comments
 (0)