File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
src/vs/platform/terminal/common/capabilities Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,13 @@ export class PromptInputModel extends Disposable implements IPromptInputModel {
111
111
this . _continuationPrompt = value ;
112
112
}
113
113
114
+ setConfidentCommandLine ( value : string ) : void {
115
+ if ( this . _value !== value ) {
116
+ this . _value = value ;
117
+ this . _onDidChangeInput . fire ( this . _createStateObject ( ) ) ;
118
+ }
119
+ }
120
+
114
121
getCombinedString ( ) : string {
115
122
const value = this . _value . replaceAll ( '\n' , '\u23CE' ) ;
116
123
if ( this . _cursorIndex === - 1 ) {
@@ -152,6 +159,7 @@ export class PromptInputModel extends Disposable implements IPromptInputModel {
152
159
this . _onDidInterrupt . fire ( event ) ;
153
160
}
154
161
162
+
155
163
this . _state = PromptInputState . Execute ;
156
164
this . _onDidFinishInput . fire ( event ) ;
157
165
this . _onDidChangeInput . fire ( event ) ;
Original file line number Diff line number Diff line change @@ -402,6 +402,10 @@ export class CommandDetectionCapability extends Disposable implements ICommandDe
402
402
this . _currentCommand . command = commandLine ;
403
403
this . _currentCommand . commandLineConfidence = 'high' ;
404
404
this . _currentCommand . isTrusted = isTrusted ;
405
+
406
+ if ( isTrusted ) {
407
+ this . _promptInputModel . setConfidentCommandLine ( commandLine ) ;
408
+ }
405
409
}
406
410
407
411
serialize ( ) : ISerializedCommandDetectionCapability {
You can’t perform that action at this time.
0 commit comments