@@ -26,6 +26,7 @@ import { useComposerCommands } from "@/pages/session/use-composer-commands"
2626import { NEW_SESSION_CONTENT_WIDTH } from "@/pages/session/new-session-layout"
2727import { PromptWorkspaceSelector } from "@/components/prompt-workspace-selector"
2828import { useTitlebarRightMount } from "@/components/titlebar"
29+ import { useCommand } from "@/context/command"
2930import { useProviders } from "@/hooks/use-providers"
3031import { useSettingsDialog } from "@/components/settings-dialog"
3132import { Persist , persisted } from "@/utils/persist"
@@ -48,6 +49,7 @@ export default function NewSessionPage() {
4849 const comments = useComments ( )
4950 const language = useLanguage ( )
5051 const settings = useSettings ( )
52+ const command = useCommand ( )
5153 const providers = useProviders ( ( ) => sdk ( ) . directory )
5254 const openProviderSettings = useSettingsDialog ( "providers" )
5355 const route = useSessionKey ( )
@@ -68,6 +70,16 @@ export default function NewSessionPage() {
6870 onDone : ( ) => inputRef ?. focus ( ) ,
6971 } )
7072
73+ command . register ( "new-session" , ( ) => [
74+ {
75+ id : "input.focus" ,
76+ title : language . t ( "command.input.focus" ) ,
77+ category : language . t ( "command.category.view" ) ,
78+ keybind : "ctrl+l" ,
79+ onSelect : ( ) => inputRef ?. focus ( ) ,
80+ } ,
81+ ] )
82+
7183 const [ store , setStore ] = createStore < { worktree ?: string } > ( { } )
7284 const rightMount = useTitlebarRightMount ( )
7385
0 commit comments