File tree Expand file tree Collapse file tree
apps/editor/src/commands/apply-chat-response-command Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,10 +165,21 @@ export const apply_chat_response_command = (params: {
165165 }
166166 }
167167
168- params . panel_provider . send_message ( {
169- command : 'SHOW_PROGRESS' ,
170- title : t ( 'common.progress.preparing-preview' )
171- } )
168+ const has_valid_blocks =
169+ ( args ?. files_with_content && args . files_with_content . length > 0 ) ||
170+ clipboard_items . some (
171+ ( item ) =>
172+ item . type == 'file' ||
173+ item . type == 'diff' ||
174+ item . type == 'code-at-cursor'
175+ )
176+
177+ if ( has_valid_blocks ) {
178+ params . panel_provider . send_message ( {
179+ command : 'SHOW_PROGRESS' ,
180+ title : t ( 'common.progress.preparing-preview' )
181+ } )
182+ }
172183
173184 before_checkpoint = await create_checkpoint ( {
174185 workspace_provider : params . workspace_provider ,
You can’t perform that action at this time.
0 commit comments