diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-12 21:30:49 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-12 21:30:49 -0700 |
commit | f48854157efed4275ecc23152a7e3027fec9105c (patch) | |
tree | 9dfc45c8b420a5737ca1fb40d4c8253cfa092c58 /extension/react-app/src/hooks/useContinueGUIProtocol.ts | |
parent | ccbf9d5c66d5a255d1cfeaee6b07df92186baa61 (diff) | |
download | sncontinue-f48854157efed4275ecc23152a7e3027fec9105c.tar.gz sncontinue-f48854157efed4275ecc23152a7e3027fec9105c.tar.bz2 sncontinue-f48854157efed4275ecc23152a7e3027fec9105c.zip |
slash commands dropdown!
Diffstat (limited to 'extension/react-app/src/hooks/useContinueGUIProtocol.ts')
-rw-r--r-- | extension/react-app/src/hooks/useContinueGUIProtocol.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/extension/react-app/src/hooks/useContinueGUIProtocol.ts b/extension/react-app/src/hooks/useContinueGUIProtocol.ts index a8e28fc5..59397742 100644 --- a/extension/react-app/src/hooks/useContinueGUIProtocol.ts +++ b/extension/react-app/src/hooks/useContinueGUIProtocol.ts @@ -45,6 +45,16 @@ class ContinueGUIClientProtocol extends AbstractContinueGUIClientProtocol { }); } + onAvailableSlashCommands( + callback: (commands: { name: string; description: string }[]) => void + ) { + this.messenger.onMessageType("available_slash_commands", (data: any) => { + if (data.commands) { + callback(data.commands); + } + }); + } + sendClear() { this.messenger.send("clear_history", {}); } |