Commit bfca2ca 1 parent d1e7383 commit bfca2ca Copy full SHA for bfca2ca
File tree 2 files changed +5
-11
lines changed
ai-native/src/browser/components
file-tree-next/src/browser
2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ const CodeBlock = ({
180
180
for ( const root of roots ) {
181
181
uri = new URI ( root . uri ) . resolve ( text ) ;
182
182
try {
183
- await commandService ?. executeCommand ( FILE_COMMANDS . LOCATION . id , uri ) ;
183
+ await commandService ?. executeCommand ( FILE_COMMANDS . REVEAL_IN_EXPLORER . id , uri ) ;
184
184
if ( type === MentionType . FILE ) {
185
185
await commandService ?. executeCommand ( EDITOR_COMMANDS . OPEN_RESOURCE . id , uri ) ;
186
186
}
Original file line number Diff line number Diff line change @@ -444,13 +444,6 @@ export class FileTreeContribution
444
444
445
445
commands . registerCommand ( FILE_COMMANDS . LOCATION , {
446
446
execute : ( locationUri ?: URI ) => {
447
- const handler = this . mainLayoutService . getTabbarHandler ( EXPLORER_CONTAINER_ID ) ;
448
- if ( handler && ! handler . isVisible ) {
449
- handler . activate ( ) ;
450
- setTimeout ( ( ) => {
451
- handler . setCollapsed ( RESOURCE_VIEW_ID , false ) ;
452
- } , 200 ) ;
453
- }
454
447
if ( locationUri ) {
455
448
this . revealFile ( locationUri ) ;
456
449
} else if ( this . fileTreeModelService . selectedFiles && this . fileTreeModelService . selectedFiles . length > 0 ) {
@@ -1023,9 +1016,10 @@ export class FileTreeContribution
1023
1016
const handler = this . mainLayoutService . getTabbarHandler ( EXPLORER_CONTAINER_ID ) ;
1024
1017
if ( handler && ! handler . isVisible ) {
1025
1018
handler . activate ( ) ;
1026
- }
1027
- if ( handler && handler . isCollapsed ( RESOURCE_VIEW_ID ) ) {
1028
- handler ?. setCollapsed ( RESOURCE_VIEW_ID , false ) ;
1019
+ setTimeout ( ( ) => {
1020
+ // FIXME: 目前通过 handler.isCollapsed 方法获取到的这段状态不准确
1021
+ handler . setCollapsed ( RESOURCE_VIEW_ID , false ) ;
1022
+ } , 200 ) ;
1029
1023
}
1030
1024
if ( ! uri && this . workbenchEditorService . currentEditor ?. currentUri ) {
1031
1025
uri = this . workbenchEditorService . currentEditor . currentUri ;
You can’t perform that action at this time.
0 commit comments