@@ -758,29 +758,29 @@ export class InlineChatController implements IEditorContribution {
758
758
let newPosition : Position | undefined ;
759
759
760
760
if ( response . result ?. errorDetails ) {
761
- //
761
+ // error -> no message, errors are shown with the request
762
762
763
763
} else if ( response . response . value . length === 0 ) {
764
764
// empty -> show message
765
765
const status = localize ( 'empty' , "No results, please refine your input and try again" ) ;
766
766
this . _ui . value . zone . widget . updateStatus ( status , { classes : [ 'warn' ] } ) ;
767
767
768
768
} else {
769
- // real response -> complex...
769
+ // real response -> no message
770
770
this . _ui . value . zone . widget . updateStatus ( '' ) ;
771
+ }
771
772
772
- const position = await this . _strategy . renderChanges ( ) ;
773
- if ( position ) {
774
- // if the selection doesn't start far off we keep the widget at its current position
775
- // because it makes reading this nicer
776
- const selection = this . _editor . getSelection ( ) ;
777
- if ( selection ?. containsPosition ( position ) ) {
778
- if ( position . lineNumber - selection . startLineNumber > 8 ) {
779
- newPosition = position ;
780
- }
781
- } else {
773
+ const position = await this . _strategy . renderChanges ( ) ;
774
+ if ( position ) {
775
+ // if the selection doesn't start far off we keep the widget at its current position
776
+ // because it makes reading this nicer
777
+ const selection = this . _editor . getSelection ( ) ;
778
+ if ( selection ?. containsPosition ( position ) ) {
779
+ if ( position . lineNumber - selection . startLineNumber > 8 ) {
782
780
newPosition = position ;
783
781
}
782
+ } else {
783
+ newPosition = position ;
784
784
}
785
785
}
786
786
this . _showWidget ( this . _session . headless , false , newPosition ) ;
0 commit comments