summaryrefslogtreecommitdiff
path: root/extension/react-app/src/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'extension/react-app/src/hooks')
-rw-r--r--extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts4
-rw-r--r--extension/react-app/src/hooks/ContinueGUIClientProtocol.ts17
2 files changed, 15 insertions, 6 deletions
diff --git a/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts b/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts
index 9944f221..d71186d7 100644
--- a/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts
+++ b/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts
@@ -29,6 +29,8 @@ abstract class AbstractContinueGUIClientProtocol {
abstract showLogsAtIndex(index: number): void;
+ abstract showContextVirtualFile(): void;
+
abstract selectContextItem(id: string, query: string): void;
abstract loadSession(session_id?: string): void;
@@ -52,6 +54,8 @@ abstract class AbstractContinueGUIClientProtocol {
abstract selectContextGroup(id: string): void;
abstract deleteContextGroup(id: string): void;
+
+ abstract setCurrentSessionTitle(title: string): void;
}
export default AbstractContinueGUIClientProtocol;
diff --git a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
index fe1b654b..8205a629 100644
--- a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
+++ b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
@@ -23,12 +23,8 @@ class ContinueGUIClientProtocol extends AbstractContinueGUIClientProtocol {
? new VscodeMessenger(serverUrlWithSessionId)
: new WebsocketMessenger(serverUrlWithSessionId);
- this.messenger.onClose(() => {
- console.log("GUI -> IDE websocket closed");
- });
- this.messenger.onError((error) => {
- console.log("GUI -> IDE websocket error", error);
- });
+ this.messenger.onClose(() => {});
+ this.messenger.onError((error) => {});
this.messenger.onMessageType("reconnect_at_session", (data: any) => {
if (data.session_id) {
@@ -52,6 +48,7 @@ class ContinueGUIClientProtocol extends AbstractContinueGUIClientProtocol {
}
onReconnectAtSession(session_id: string): void {
+ console.log("Reconnecting at session: ", session_id);
this.connectMessenger(
`${this.serverUrlWithSessionId.split("?")[0]}?session_id=${session_id}`,
this.useVscodeMessagePassing
@@ -122,6 +119,10 @@ class ContinueGUIClientProtocol extends AbstractContinueGUIClientProtocol {
this.messenger?.send("show_logs_at_index", { index });
}
+ showContextVirtualFile(): void {
+ this.messenger?.send("show_context_virtual_file", {});
+ }
+
selectContextItem(id: string, query: string): void {
this.messenger?.send("select_context_item", { id, query });
}
@@ -163,6 +164,10 @@ class ContinueGUIClientProtocol extends AbstractContinueGUIClientProtocol {
deleteContextGroup(id: string): void {
this.messenger?.send("delete_context_group", { id });
}
+
+ setCurrentSessionTitle(title: string): void {
+ this.messenger?.send("set_current_session_title", { title });
+ }
}
export default ContinueGUIClientProtocol;