Skip to content

Commit 403bc25

Browse files
committed
Refine the display logic for open editor file descriptions to consistently format workspace and relative path information
1 parent a09e532 commit 403bc25

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎packages/vscode/src/context/providers/open-editors-provider.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,11 @@ export class OpenEditorsProvider
276276

277277
let description = relative_path ? `${relative_path}` : ''
278278

279-
if (this._workspace_roots.length > 1 && workspace_root) {
279+
if (this._workspace_roots.length > 1 && workspace_root && relative_path) {
280280
const workspace_folder_name = path.basename(workspace_root)
281-
description = relative_path
282-
? `· ${workspace_folder_name}/${relative_path}`
283-
: workspace_folder_name
281+
description = `${workspace_folder_name} · ${relative_path}`
282+
} else if (this._workspace_roots.length > 1 && workspace_root) {
283+
description = path.basename(workspace_root)
284284
}
285285

286286
const token_count = await this.workspace_provider.calculate_file_tokens(

0 commit comments

Comments
 (0)