mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-22 00:42:47 +08:00
✨ feat(shortcuts): 接受 SQL AI 自动补全默认键改为 Tab
测试同步:默认 Tab 接受/不拦截 Tab 场景,改绑 Right/Shift+Tab 保留可配置覆盖。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -922,9 +922,9 @@ describe('comboToMonacoKeyBinding', () => {
|
||||
// ─── acceptSqlAiCompletion ──────────────────────────────────────────
|
||||
|
||||
describe('acceptSqlAiCompletion', () => {
|
||||
it('默认绑定为 Right 且启用(win/mac 一致)', () => {
|
||||
expect(DEFAULT_SHORTCUT_OPTIONS.acceptSqlAiCompletion.mac).toEqual({ combo: 'Right', enabled: true });
|
||||
expect(DEFAULT_SHORTCUT_OPTIONS.acceptSqlAiCompletion.windows).toEqual({ combo: 'Right', enabled: true });
|
||||
it('默认绑定为 Tab 且启用(win/mac 一致)', () => {
|
||||
expect(DEFAULT_SHORTCUT_OPTIONS.acceptSqlAiCompletion.mac).toEqual({ combo: 'Tab', enabled: true });
|
||||
expect(DEFAULT_SHORTCUT_OPTIONS.acceptSqlAiCompletion.windows).toEqual({ combo: 'Tab', enabled: true });
|
||||
});
|
||||
|
||||
it('允许录制无修饰键的 Tab(裸键场景)', () => {
|
||||
@@ -939,8 +939,8 @@ describe('acceptSqlAiCompletion', () => {
|
||||
expect(canRecordShortcutForAction('acceptSqlAiCompletion', 'Ctrl+Right')).toBe(true);
|
||||
});
|
||||
|
||||
it('resolveShortcutBinding 对缺失配置回退默认 Right', () => {
|
||||
it('resolveShortcutBinding 对缺失配置回退默认 Tab', () => {
|
||||
const binding = resolveShortcutBinding({}, 'acceptSqlAiCompletion', 'windows');
|
||||
expect(binding).toEqual({ combo: 'Right', enabled: true });
|
||||
expect(binding).toEqual({ combo: 'Tab', enabled: true });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -312,8 +312,8 @@ export const DEFAULT_SHORTCUT_OPTIONS: ShortcutOptions = {
|
||||
windows: { combo: 'Alt+\\', enabled: true },
|
||||
},
|
||||
acceptSqlAiCompletion: {
|
||||
mac: { combo: 'Right', enabled: true },
|
||||
windows: { combo: 'Right', enabled: true },
|
||||
mac: { combo: 'Tab', enabled: true },
|
||||
windows: { combo: 'Tab', enabled: true },
|
||||
},
|
||||
toggleQueryResultsPanel: {
|
||||
mac: { combo: 'Meta+Shift+M', enabled: true },
|
||||
|
||||
Reference in New Issue
Block a user