Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/web/src/components/chat/useThreadLifecycle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,15 @@ export function useThreadLifecycle(input: ThreadLifecycleInput) {
),
);
},
"thread.regenerateTitle": () => {
if (!readEnvironmentScope(environmentId, AuthOrchestrationOperateScope)) return false;
if (!activeThreadShell || !activeThreadRef || !serverConfigLoaded) return;
if (activeThreadShell.titleRegeneration != null) return;
void updateThreadMetadata({
environmentId: activeThreadRef.environmentId,
input: { threadId: activeThreadRef.threadId, regenerateTitle: true },
}).then(toastThreadActionFailure("Failed to regenerate thread title"));
},
} satisfies ChatShortcutCommands;
return {
shortcuts,
Expand Down
3 changes: 3 additions & 0 deletions docs/user/keybindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ a shortcut.
`thread.stop` interrupts the running turn in the focused thread. It has no default
shortcut; assign one in **Settings → Keybindings**.

`thread.regenerateTitle` generates a new title for the focused thread, like
**Regenerate title** in the thread menu. It has no default shortcut.

`thread.undo` (`mod+z` by default) reverses the actions shown in the notice at the
bottom of the sidebar, such as unpin, settle, snooze, archive, or discarding a
draft. Consecutive
Expand Down
1 change: 1 addition & 0 deletions packages/contracts/src/keybindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const THREAD_KEYBINDING_COMMANDS = [
"thread.copyReference",
"thread.settle",
"thread.pin",
"thread.regenerateTitle",
"thread.undo",
...THREAD_JUMP_KEYBINDING_COMMANDS,
] as const;
Expand Down
Loading