summaryrefslogtreecommitdiff
path: root/extension/react-app
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-07-04 11:58:02 -0700
committerNate Sesti <sestinj@gmail.com>2023-07-04 11:58:02 -0700
commit142e2043b82fbf46af3841f9b07613ab8484dd65 (patch)
tree418ba409f34a01a7374e62287d9fe2c34886fd93 /extension/react-app
parent2192f332a7f40ad07dd039d512d68eb89ed3fb38 (diff)
downloadsncontinue-142e2043b82fbf46af3841f9b07613ab8484dd65.tar.gz
sncontinue-142e2043b82fbf46af3841f9b07613ab8484dd65.tar.bz2
sncontinue-142e2043b82fbf46af3841f9b07613ab8484dd65.zip
3.8 compatibility and deleting context all at once
Diffstat (limited to 'extension/react-app')
-rw-r--r--extension/react-app/src/hooks/ContinueGUIClientProtocol.ts2
-rw-r--r--extension/react-app/src/hooks/useContinueGUIProtocol.ts4
-rw-r--r--extension/react-app/src/tabs/gui.tsx2
3 files changed, 4 insertions, 4 deletions
diff --git a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
index 228e9a53..96ea7ab3 100644
--- a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
+++ b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
@@ -21,7 +21,7 @@ abstract class AbstractContinueGUIClientProtocol {
abstract deleteAtIndex(index: number): void;
- abstract deleteContextItemAtIndex(index: number): void;
+ abstract deleteContextAtIndices(indices: number[]): void;
}
export default AbstractContinueGUIClientProtocol;
diff --git a/extension/react-app/src/hooks/useContinueGUIProtocol.ts b/extension/react-app/src/hooks/useContinueGUIProtocol.ts
index a0c38c0f..e950387c 100644
--- a/extension/react-app/src/hooks/useContinueGUIProtocol.ts
+++ b/extension/react-app/src/hooks/useContinueGUIProtocol.ts
@@ -71,8 +71,8 @@ class ContinueGUIClientProtocol extends AbstractContinueGUIClientProtocol {
this.messenger.send("delete_at_index", { index });
}
- deleteContextItemAtIndex(index: number) {
- this.messenger.send("delete_context_item_at_index", { index });
+ deleteContextAtIndices(indices: number[]) {
+ this.messenger.send("delete_context_at_indices", { indices });
}
}
diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx
index 40256f86..0a9e48fb 100644
--- a/extension/react-app/src/tabs/gui.tsx
+++ b/extension/react-app/src/tabs/gui.tsx
@@ -187,7 +187,7 @@ function GUI(props: GUIProps) {
const deleteContextItem = useCallback(
(idx: number) => {
- client?.deleteContextItemAtIndex(idx);
+ client?.deleteContextAtIndices([idx]);
},
[client]
);