summaryrefslogtreecommitdiff
path: root/extension/react-app/src/hooks/useContinueGUIProtocol.ts
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-12 21:30:49 -0700
committerNate Sesti <sestinj@gmail.com>2023-06-12 21:30:49 -0700
commitf48854157efed4275ecc23152a7e3027fec9105c (patch)
tree9dfc45c8b420a5737ca1fb40d4c8253cfa092c58 /extension/react-app/src/hooks/useContinueGUIProtocol.ts
parentccbf9d5c66d5a255d1cfeaee6b07df92186baa61 (diff)
downloadsncontinue-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.ts10
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", {});
}