File tree 2 files changed +12
-26
lines changed
packages/nx/src/native/tui/components
2 files changed +12
-26
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use std::any::Any;
12
12
use tokio:: sync:: mpsc:: UnboundedSender ;
13
13
14
14
use super :: { Component , Frame } ;
15
- use crate :: native:: tui:: action:: Action ;
15
+ use crate :: native:: tui:: { action:: Action , nx_console } ;
16
16
17
17
use crate :: native:: tui:: theme:: THEME ;
18
18
@@ -159,11 +159,19 @@ impl HelpPopup {
159
159
160
160
if self . console_available {
161
161
// add Copilot specific keybindings for AI assistance
162
+
162
163
keybindings. extend ( [
163
164
( "" , "" ) ,
164
165
(
165
166
"<ctrl>+a" ,
166
- "Send this output to Copilot so that it can assist with any issues" ,
167
+ match nx_console:: get_current_editor ( ) {
168
+ nx_console:: SupportedEditor :: VSCode => {
169
+ "Send terminal output to Copilot so that it can assist with any issues"
170
+ }
171
+ _ => {
172
+ "Send terminal output to your AI assistant so that it can assist with any issues"
173
+ }
174
+ } ,
167
175
) ,
168
176
] ) ;
169
177
}
Original file line number Diff line number Diff line change @@ -509,37 +509,15 @@ impl<'a> StatefulWidget for TerminalPane<'a> {
509
509
) ,
510
510
] )
511
511
} else {
512
- let mut spans = vec ! [
512
+ let spans = vec ! [
513
513
Span :: raw( " " ) ,
514
514
Span :: styled( "i" , Style :: default ( ) . fg( THEME . info) ) ,
515
515
Span :: styled(
516
516
" to make interactive " ,
517
517
Style :: default ( ) . fg( THEME . secondary_fg) ,
518
518
) ,
519
519
] ;
520
- if state. console_available {
521
- let mut ai_info = vec ! [
522
- Span :: raw( " " ) ,
523
- Span :: styled( "<ctrl>+a" , Style :: default ( ) . fg( THEME . info) ) ,
524
- ] ;
525
-
526
- if matches ! (
527
- nx_console:: get_current_editor( ) ,
528
- nx_console:: SupportedEditor :: VSCode
529
- ) {
530
- ai_info. push ( Span :: styled (
531
- " to this send output to Copilot" ,
532
- Style :: default ( ) . fg ( THEME . secondary_fg ) ,
533
- ) )
534
- } else {
535
- ai_info. push ( Span :: styled (
536
- " to send output to your editor's AI assistant" ,
537
- Style :: default ( ) . fg ( THEME . secondary_fg ) ,
538
- ) )
539
- }
540
-
541
- spans. extend ( ai_info) ;
542
- }
520
+
543
521
Line :: from ( spans)
544
522
} ;
545
523
You can’t perform that action at this time.
0 commit comments