From d59fde5c9572aece39a00b4f9199e68a33235a59 Mon Sep 17 00:00:00 2001 From: Kacper Date: Wed, 10 Dec 2025 15:03:02 +0100 Subject: [PATCH] feat(ui): add keyboard shortcuts for AI profiles navigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add M shortcut to navigate to AI Profiles from sidebar - Add N shortcut to create new profile in profiles view - Display keyboard shortcut indicators in UI 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4 --- .automaker/feature_list.json | 15 ++++++++++- app/src/components/layout/sidebar.tsx | 1 + app/src/components/views/profiles-view.tsx | 29 ++++++++++++++++++++-- app/src/hooks/use-keyboard-shortcuts.ts | 2 ++ 4 files changed, 44 insertions(+), 3 deletions(-) diff --git a/.automaker/feature_list.json b/.automaker/feature_list.json index 0a02582b..2de9f84c 100644 --- a/.automaker/feature_list.json +++ b/.automaker/feature_list.json @@ -330,5 +330,18 @@ "skipTests": true, "model": "sonnet", "thinkingLevel": "medium" + }, + { + "id": "feature-1765375218276-4sgru3lca", + "category": "Other", + "description": "I want you to add a shortcuts to ai profies in siedbar to be M and insite that view the new profile should be also shortuct to open to crate a new profile by shortcat N", + "steps": [], + "status": "verified", + "startedAt": "2025-12-10T14:00:32.639Z", + "imagePaths": [], + "skipTests": true, + "summary": "Added keyboard shortcuts for AI Profiles:\n- Press M to navigate to AI Profiles view from sidebar\n- Press N in profiles view to create new profile\n- Visual shortcut indicators added to UI\nModified: use-keyboard-shortcuts.ts (added profiles:M and addProfile:N shortcuts), sidebar.tsx (added shortcut to profiles nav item), profiles-view.tsx (imported keyboard shortcut hooks, implemented N shortcut handler, added visual indicator to New Profile button)", + "model": "haiku", + "thinkingLevel": "none" } -] +] \ No newline at end of file diff --git a/app/src/components/layout/sidebar.tsx b/app/src/components/layout/sidebar.tsx index fc726607..b6a797d1 100644 --- a/app/src/components/layout/sidebar.tsx +++ b/app/src/components/layout/sidebar.tsx @@ -489,6 +489,7 @@ export function Sidebar() { id: "profiles", label: "AI Profiles", icon: UserCircle, + shortcut: NAV_SHORTCUTS.profiles, }, ], }, diff --git a/app/src/components/views/profiles-view.tsx b/app/src/components/views/profiles-view.tsx index edcbfc14..f7dd35d4 100644 --- a/app/src/components/views/profiles-view.tsx +++ b/app/src/components/views/profiles-view.tsx @@ -1,12 +1,17 @@ "use client"; -import { useState, useMemo, useCallback } from "react"; +import { useState, useMemo, useCallback, useEffect } from "react"; import { useAppStore, AIProfile, AgentModel, ThinkingLevel, ModelProvider } from "@/store/app-store"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Textarea } from "@/components/ui/textarea"; import { cn, modelSupportsThinking } from "@/lib/utils"; +import { + useKeyboardShortcuts, + ACTION_SHORTCUTS, + KeyboardShortcut, +} from "@/hooks/use-keyboard-shortcuts"; import { Dialog, DialogContent, @@ -501,6 +506,23 @@ export function ProfilesView() { }); }; + // Build keyboard shortcuts for profiles view + const profilesShortcuts: KeyboardShortcut[] = useMemo(() => { + const shortcuts: KeyboardShortcut[] = []; + + // Add profile shortcut - when in profiles view + shortcuts.push({ + key: ACTION_SHORTCUTS.addProfile, + action: () => setShowAddDialog(true), + description: "Create new profile", + }); + + return shortcuts; + }, []); + + // Register keyboard shortcuts for profiles view + useKeyboardShortcuts(profilesShortcuts); + return (
- diff --git a/app/src/hooks/use-keyboard-shortcuts.ts b/app/src/hooks/use-keyboard-shortcuts.ts index 34ebe104..2c45b80f 100644 --- a/app/src/hooks/use-keyboard-shortcuts.ts +++ b/app/src/hooks/use-keyboard-shortcuts.ts @@ -106,6 +106,7 @@ export const NAV_SHORTCUTS: Record = { context: "C", // C for Context tools: "T", // T for Tools settings: "S", // S for Settings + profiles: "M", // M for Models/profiles }; /** @@ -127,4 +128,5 @@ export const ACTION_SHORTCUTS: Record = { projectPicker: "P", // P for Project picker cyclePrevProject: "Q", // Q for previous project (cycle back through MRU) cycleNextProject: "E", // E for next project (cycle forward through MRU) + addProfile: "N", // N for New profile (when in profiles view) };