From f48854157efed4275ecc23152a7e3027fec9105c Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 12 Jun 2023 21:30:49 -0700 Subject: slash commands dropdown! --- extension/react-app/src/hooks/useContinueGUIProtocol.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'extension/react-app/src/hooks/useContinueGUIProtocol.ts') 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", {}); } -- cgit v1.2.3-70-g09d2