summaryrefslogtreecommitdiff
path: root/extension/react-app/src/hooks
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-07-05 23:49:37 -0700
committerNate Sesti <sestinj@gmail.com>2023-07-05 23:49:37 -0700
commit5c03dd4775845c559a1f6298f7577609ba907bb1 (patch)
treee3767487c3714191a9f67b6c6f8879fa08c75830 /extension/react-app/src/hooks
parentd259979ef89f17957396fc7300e1ecf54214ae84 (diff)
downloadsncontinue-5c03dd4775845c559a1f6298f7577609ba907bb1.tar.gz
sncontinue-5c03dd4775845c559a1f6298f7577609ba907bb1.tar.bz2
sncontinue-5c03dd4775845c559a1f6298f7577609ba907bb1.zip
ui overhaul
Diffstat (limited to 'extension/react-app/src/hooks')
-rw-r--r--extension/react-app/src/hooks/ContinueGUIClientProtocol.ts4
-rw-r--r--extension/react-app/src/hooks/useContinueGUIProtocol.ts8
2 files changed, 12 insertions, 0 deletions
diff --git a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
index f123bb2b..a179c2bf 100644
--- a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
+++ b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
@@ -23,6 +23,10 @@ abstract class AbstractContinueGUIClientProtocol {
abstract deleteContextAtIndices(indices: number[]): void;
+ abstract setEditingAtIndices(indices: number[]): void;
+
+ abstract setPinnedAtIndices(indices: number[]): void;
+
abstract toggleAddingHighlightedCode(): void;
}
diff --git a/extension/react-app/src/hooks/useContinueGUIProtocol.ts b/extension/react-app/src/hooks/useContinueGUIProtocol.ts
index 49f200ae..2060dd7f 100644
--- a/extension/react-app/src/hooks/useContinueGUIProtocol.ts
+++ b/extension/react-app/src/hooks/useContinueGUIProtocol.ts
@@ -75,6 +75,14 @@ class ContinueGUIClientProtocol extends AbstractContinueGUIClientProtocol {
this.messenger.send("delete_context_at_indices", { indices });
}
+ setEditingAtIndices(indices: number[]) {
+ this.messenger.send("set_editing_at_indices", { indices });
+ }
+
+ setPinnedAtIndices(indices: number[]) {
+ this.messenger.send("set_pinned_at_indices", { indices });
+ }
+
toggleAddingHighlightedCode(): void {
this.messenger.send("toggle_adding_highlighted_code", {});
}