diff options
Diffstat (limited to 'extension/react-app/src/hooks/useContinueGUIProtocol.ts')
-rw-r--r-- | extension/react-app/src/hooks/useContinueGUIProtocol.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/extension/react-app/src/hooks/useContinueGUIProtocol.ts b/extension/react-app/src/hooks/useContinueGUIProtocol.ts index f27895fb..59397742 100644 --- a/extension/react-app/src/hooks/useContinueGUIProtocol.ts +++ b/extension/react-app/src/hooks/useContinueGUIProtocol.ts @@ -45,9 +45,27 @@ 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", {}); + } + retryAtIndex(index: number) { this.messenger.send("retry_at_index", { index }); } + + deleteAtIndex(index: number) { + this.messenger.send("delete_at_index", { index }); + } } export default ContinueGUIClientProtocol; |