Skip to content

Commit d103bd6

Browse files
CopilotBernardXiong
andcommitted
Improve UX: Directly open settings with auto-dismiss notification
- Settings now open automatically without requiring button click - Status bar message shows temporary notification (5 seconds) - More streamlined user experience as requested in review Co-authored-by: BernardXiong <[email protected]>
1 parent ea202da commit d103bd6

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/extension.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,9 @@ function setupStatusBarItems(context: vscode.ExtensionContext) {
179179
let disposable = vscode.commands.registerCommand('extension.openMenu', () => {
180180
const items = getMenuItems();
181181
if (!items || items.length === 0) {
182-
// Show message and open settings when no menu items configured
183-
vscode.window.showInformationMessage(
184-
'自定义菜单命令未配置,请在设置中添加自定义命令。',
185-
'打开设置'
186-
).then(selection => {
187-
if (selection === '打开设置') {
188-
vscode.commands.executeCommand('workbench.action.openSettings', 'smart.menuCommands');
189-
}
190-
});
182+
// Directly open settings and show a temporary notification
183+
vscode.commands.executeCommand('workbench.action.openSettings', 'smart.menuCommands');
184+
vscode.window.setStatusBarMessage('$(info) 自定义菜单命令未配置,请添加自定义命令', 5000);
191185
} else {
192186
vscode.window.showQuickPick(items).then(selectedItem => {
193187
if (selectedItem) {

0 commit comments

Comments
 (0)