Skip to content

Commit 1f8a569

Browse files
committed
Update context selection UI with improved icons, navigation, and state persistence for better user experience
1 parent d52b68a commit 1f8a569

4 files changed

Lines changed: 332 additions & 234 deletions

File tree

‎packages/vscode/src/commands/apply-context-command/apply-context-command.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ export const apply_context_command = (
6767
})
6868

6969
const open_file_button = {
70-
iconPath: new vscode.ThemeIcon('file'),
71-
tooltip: 'Open the file'
70+
iconPath: new vscode.ThemeIcon('go-to-file'),
71+
tooltip: 'Open contexts.json'
7272
}
7373

7474
main_quick_pick_options.push({
@@ -158,7 +158,6 @@ export const apply_context_command = (
158158
const picked = await vscode.window.showQuickPick(
159159
workspace_folders.map((f) => ({
160160
label: f.name,
161-
description: f.uri.fsPath,
162161
folder: f
163162
})),
164163
{ placeHolder: 'Select workspace folder' }

‎packages/vscode/src/commands/apply-context-command/sources/json-file-source.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const handle_json_file_source = async (
106106

107107
if (file_contexts.length > 0) {
108108
items.push({
109-
label: 'entries',
109+
label: 'entries (A-Z)',
110110
kind: vscode.QuickPickItemKind.Separator
111111
})
112112

@@ -169,7 +169,6 @@ export const handle_json_file_source = async (
169169
const picked = await vscode.window.showQuickPick(
170170
folders.map((f) => ({
171171
label: f.name,
172-
description: f.uri.fsPath,
173172
folder: f
174173
})),
175174
{ placeHolder: 'Select workspace folder' }

‎packages/vscode/src/constants/state-keys.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ export const LAST_REFACTOR_INSTRUCTION_SOURCE_STATE_KEY =
2626
'last-refactor-instruction-source'
2727
export const LAST_REFACTOR_INSTRUCTION_STATE_KEY = 'last-refactor-instruction'
2828

29+
export const LAST_SELECTED_SYMBOL_STATE_KEY = 'last-selected-symbol'
30+
export const LAST_SELECTED_CONTEXT_SOURCE_IN_SYMBOLS_QUICK_PICK_STATE_KEY =
31+
'last-selected-context-source-in-symbols-quick-pick'
32+
export const LAST_SELECTED_REPOSITORY_IN_SYMBOLS_QUCK_PICK_STATE_KEY =
33+
'last-selected-repository-in-symbols-quick-pick'
34+
2935
export const CHECKPOINTS_STATE_KEY = 'checkpoints'
3036
export const TEMPORARY_CHECKPOINT_STATE_KEY = 'temporary-checkpoint'
3137
export const CHECKPOINT_OPERATION_IN_PROGRESS_STATE_KEY =

0 commit comments

Comments
 (0)