Skip to content

Commit

Permalink
add shortcuts that work in the browser. fixes #16
Browse files Browse the repository at this point in the history
  • Loading branch information
iansinnott committed Dec 7, 2023
1 parent 07cd791 commit 37e44ea
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions src/lib/components/ActionsMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,34 @@
execute: currentChatThread.regenerateResponse,
},
{
when: () => !sys.isBrowser,
name: "Chat History",
icon: IconHistoryClock,
keyboard: {
shortcut: "meta+p",
},
keyboard: { shortcut: "meta+p" },
execute: () => ($threadMenu.open = !$threadMenu.open),
},
{
when: () => sys.isBrowser,
name: "Chat History",
icon: IconHistoryClock,
keyboard: { shortcut: "ctrl+p" },
execute: () => ($threadMenu.open = !$threadMenu.open),
},
{
when: () => !sys.isBrowser,
name: "New Chat",
icon: IconSparkle,
keyboard: {
shortcut: "meta+n", // @note Only works in the Tauri app. In a browser the browser takes precedence
},
keyboard: { shortcut: "meta+n" }, // NOTE Meta key with N only works in the Tauri app. In a browser this opens a new window
altFilterText: "thread",
execute: () => {
currentThread.reset();
},
execute: currentThread.reset,
},
{
when: () => sys.isBrowser,
name: "New Chat",
icon: IconSparkle,
keyboard: { shortcut: "ctrl+n" },
altFilterText: "thread",
execute: currentThread.reset,
},
{
name: "Archive Chat",
Expand Down

0 comments on commit 37e44ea

Please sign in to comment.