summaryrefslogtreecommitdiff
path: root/extension/react-app/src/hooks
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-09-01 18:31:33 -0700
committerNate Sesti <sestinj@gmail.com>2023-09-01 18:31:33 -0700
commit2f792f46026a6bb3c3580f2521b01ecb8c68117c (patch)
tree36cecf6d218bc166c0a8c1c78261b4feac7f01cd /extension/react-app/src/hooks
parent5c8b28b7fddf5b214de61102c768ef44d4087870 (diff)
downloadsncontinue-2f792f46026a6bb3c3580f2521b01ecb8c68117c.tar.gz
sncontinue-2f792f46026a6bb3c3580f2521b01ecb8c68117c.tar.bz2
sncontinue-2f792f46026a6bb3c3580f2521b01ecb8c68117c.zip
feat: :sparkles: improved model dropdown
Diffstat (limited to 'extension/react-app/src/hooks')
-rw-r--r--extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts2
-rw-r--r--extension/react-app/src/hooks/ContinueGUIClientProtocol.ts8
2 files changed, 7 insertions, 3 deletions
diff --git a/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts b/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts
index f8c11527..9944f221 100644
--- a/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts
+++ b/extension/react-app/src/hooks/AbstractContinueGUIClientProtocol.ts
@@ -41,7 +41,7 @@ abstract class AbstractContinueGUIClientProtocol {
abstract setTemperature(temperature: number): void;
- abstract setModelForRole(
+ abstract addModelForRole(
role: string,
model_class: string,
model: string
diff --git a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
index ce9b2a0a..fe1b654b 100644
--- a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
+++ b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts
@@ -141,8 +141,12 @@ class ContinueGUIClientProtocol extends AbstractContinueGUIClientProtocol {
this.messenger?.send("set_temperature", { temperature });
}
- setModelForRole(role: string, model_class: string, model: any): void {
- this.messenger?.send("set_model_for_role", { role, model, model_class });
+ addModelForRole(role: string, model_class: string, model: any): void {
+ this.messenger?.send("add_model_for_role", { role, model, model_class });
+ }
+
+ setModelForRoleFromIndex(role: string, index: number): void {
+ this.messenger?.send("set_model_for_role_from_index", { role, index });
}
saveContextGroup(title: string, contextItems: ContextItem[]): void {