feat use tab on windows instead of shift+tab

This commit is contained in:
LaZzyMan 2026-02-02 19:48:07 +08:00
parent 7935482c3a
commit 3296785b23
16 changed files with 167 additions and 138 deletions

View file

@ -46,6 +46,18 @@ const mockCommands: readonly SlashCommand[] = [
];
describe('Help Component', () => {
it('should render platform-specific keyboard shortcuts', () => {
const { lastFrame } = render(<Help commands={mockCommands} />);
const output = lastFrame();
if (process.platform === 'win32') {
expect(output).toContain('Tab');
expect(output).not.toContain('Shift+Tab');
} else {
expect(output).toContain('Shift+Tab');
}
});
it('should not render hidden commands', () => {
const { lastFrame } = render(<Help commands={mockCommands} />);
const output = lastFrame();