File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -313,14 +313,10 @@ export class ChatPromptInput {
313
313
314
314
private readonly handleInputFocus = ( ) : void => {
315
315
const inputValue = this . promptTextInput . getTextInputValue ( ) ;
316
- if ( inputValue . startsWith ( '/' ) || inputValue . startsWith ( '@' ) ) {
317
- this . quickPickType = inputValue . startsWith ( '@' ) ? 'context' : 'quick-action' ;
318
- const quickPickItems =
319
- this . quickPickType === 'context'
320
- ? MynahUITabsStore . getInstance ( ) . getTabDataStore ( this . props . tabId ) . getValue ( 'contextCommands' ) as QuickActionCommandGroup [ ]
321
- : MynahUITabsStore . getInstance ( ) . getTabDataStore ( this . props . tabId ) . getValue ( 'quickActionCommands' ) as QuickActionCommandGroup [ ] ;
316
+ if ( inputValue . startsWith ( '/' ) ) {
317
+ const quickPickItems = MynahUITabsStore . getInstance ( ) . getTabDataStore ( this . props . tabId ) . getValue ( 'quickActionCommands' ) as QuickActionCommandGroup [ ] ;
322
318
this . quickPickItemGroups = [ ...quickPickItems ] ;
323
- this . quickPickTriggerIndex = inputValue . startsWith ( '@' ) ? inputValue . indexOf ( '@' ) : 1 ;
319
+ this . quickPickTriggerIndex = 1 ;
324
320
this . textAfter = inputValue . substring ( this . quickPickTriggerIndex ) ;
325
321
this . promptTextInput . setContextReplacement ( this . quickPickItemGroups . length > 0 ) ;
326
322
const restorePreviousFilteredQuickPickItemGroups : QuickActionCommandGroup [ ] = [ ] ;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export class PromptTextInput {
73
73
} ,
74
74
focus : ( ) => {
75
75
this . render . addClass ( 'input-has-focus' ) ;
76
- if ( this . props . onFocus !== undefined ) {
76
+ if ( typeof this . props . onFocus !== ' undefined' ) {
77
77
this . props . onFocus ( ) ;
78
78
}
79
79
} ,
You can’t perform that action at this time.
0 commit comments