You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keyboard shortcut to fork from the latest response
#34363
Forking a thread only works by mouse: hover a reply, then click "Fork from this response". Most other thread actions already have a command you can bind (thread.copyReference, thread.settle, thread.pin, thread.undo), but forking doesn't. Even rebinding is impossible, because keybindings.json only accepts commands from the built-in list.
The common case is forking from the reply you just read, which is the latest one in the thread.
Proposal
Add a thread.fork command that forks from the latest response in the active thread that can be forked. It does exactly what clicking the button on that reply does today: create a "<title> fork" thread and open it. If no reply in the thread can be forked, the shortcut does nothing.
Default key: mod+shift+y (currently unused) with when: "!terminalFocus", or left unbound if you'd rather people opt in.
Scope
Contracts: add "thread.fork" to THREAD_KEYBINDING_COMMANDS in packages/contracts/src/keybindings.ts, with the default rule next to the other thread.* rules.
Web: handle it in ChatView's shortcut commands map. Find the newest reply whose run can be forked, using the same canForkProjectedAssistantItem check the button uses, then call the existing onForkFromRun from useTimelineRewind. The fork path itself doesn't change.
Settings and docs: the command appears in the keybindings settings list, and docs/user/keybindings.md gets one row.
Mobile: left out, since it has no keyboard shortcuts.
The change is small. I can open a PR if the direction looks fine.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
Forking a thread only works by mouse: hover a reply, then click "Fork from this response". Most other thread actions already have a command you can bind (
thread.copyReference,thread.settle,thread.pin,thread.undo), but forking doesn't. Even rebinding is impossible, becausekeybindings.jsononly accepts commands from the built-in list.The common case is forking from the reply you just read, which is the latest one in the thread.
Proposal
Add a
thread.forkcommand that forks from the latest response in the active thread that can be forked. It does exactly what clicking the button on that reply does today: create a "<title> fork" thread and open it. If no reply in the thread can be forked, the shortcut does nothing.Default key:
mod+shift+y(currently unused) withwhen: "!terminalFocus", or left unbound if you'd rather people opt in.Scope
"thread.fork"toTHREAD_KEYBINDING_COMMANDSinpackages/contracts/src/keybindings.ts, with the default rule next to the otherthread.*rules.ChatView's shortcutcommandsmap. Find the newest reply whose run can be forked, using the samecanForkProjectedAssistantItemcheck the button uses, then call the existingonForkFromRunfromuseTimelineRewind. The fork path itself doesn't change.docs/user/keybindings.mdgets one row.The change is small. I can open a PR if the direction looks fine.
All reactions