Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): clear stale chat action shortcuts #15394

Mergedmaria-rcksmerged 1 commit intomain fromrefs/pull/15394/headmerged by maria-rcks View on GitHub

Showing 1 changed file with 61 additions and 11 deletions.

x
0 of 1 viewed, 1 left
61 additions and 11 deletionsapps/web/src/components/ChatView.tsxModified
View file
@@ -292,7 +292,10 @@
import { cn, randomUUID } from "~/lib/utils";
import { COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS } from "~/workspaceTitlebar";
import { stackedThreadToast, toastManager } from "./ui/toast";
-import { decodeProjectScriptKeybindingRule } from "~/lib/projectScriptKeybindings";
+import {
+ decodeProjectScriptKeybindingRule,
+ keybindingValueForCommand,
+} from "~/lib/projectScriptKeybindings";
import { type NewProjectScriptInput } from "./ProjectScriptsControl";
import {
buildProjectScript,
@@ -1532,6 +1535,9 @@
const upsertKeybinding = useAtomCommand(serverEnvironment.upsertKeybinding, {
reportFailure: false,
+ const removeKeybinding = useAtomCommand(serverEnvironment.removeKeybinding, {
+ reportFailure: false,
+ });
const openTerminal = useAtomCommand(terminalEnvironment.open, "terminal open");
const writeTerminal = useAtomCommand(terminalEnvironment.write, "terminal write");
const closeTerminalMutation = useAtomCommand(terminalEnvironment.close, "terminal close");
@@ -4827,20 +4833,64 @@
command: input.keybindingCommand,
- if (isElectron && keybindingRule) {
- return mapAtomCommandResult(