summaryrefslogtreecommitdiff
path: root/continuedev/src/continuedev/server
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-25 12:24:45 -0700
committerNate Sesti <sestinj@gmail.com>2023-06-25 12:24:45 -0700
commit54048d3e7bda9c39cc08888b37e0c7dc0716a713 (patch)
tree3ff7254f755e4b3b28a523d652b78dd1f61f868d /continuedev/src/continuedev/server
parent82ead52472d4e2a2e291aa5f17ea8522fc11f236 (diff)
parentad462728afc4e6a9e1402aff295010ced9cf2f7a (diff)
downloadsncontinue-54048d3e7bda9c39cc08888b37e0c7dc0716a713.tar.gz
sncontinue-54048d3e7bda9c39cc08888b37e0c7dc0716a713.tar.bz2
sncontinue-54048d3e7bda9c39cc08888b37e0c7dc0716a713.zip
Merge branch 'main' into function-calling
Diffstat (limited to 'continuedev/src/continuedev/server')
-rw-r--r--continuedev/src/continuedev/server/gui.py5
-rw-r--r--continuedev/src/continuedev/server/gui_protocol.py4
2 files changed, 9 insertions, 0 deletions
diff --git a/continuedev/src/continuedev/server/gui.py b/continuedev/src/continuedev/server/gui.py
index cf046734..cc6235e9 100644
--- a/continuedev/src/continuedev/server/gui.py
+++ b/continuedev/src/continuedev/server/gui.py
@@ -77,6 +77,8 @@ class GUIProtocolServer(AbstractGUIProtocolServer):
self.on_reverse_to_index(data["index"])
elif message_type == "retry_at_index":
self.on_retry_at_index(data["index"])
+ elif message_type == "change_default_model":
+ self.on_change_default_model(data["model"])
elif message_type == "clear_history":
self.on_clear_history()
elif message_type == "delete_at_index":
@@ -116,6 +118,9 @@ class GUIProtocolServer(AbstractGUIProtocolServer):
asyncio.create_task(
self.session.autopilot.retry_at_index(index))
+ def on_change_default_model(self, model: str):
+ asyncio.create_task(self.session.autopilot.change_default_model(model))
+
def on_clear_history(self):
asyncio.create_task(self.session.autopilot.clear_history())
diff --git a/continuedev/src/continuedev/server/gui_protocol.py b/continuedev/src/continuedev/server/gui_protocol.py
index d9506c6f..66839d9b 100644
--- a/continuedev/src/continuedev/server/gui_protocol.py
+++ b/continuedev/src/continuedev/server/gui_protocol.py
@@ -36,6 +36,10 @@ class AbstractGUIProtocolServer(ABC):
"""Called when the user requests a retry at a previous index"""
@abstractmethod
+ def on_change_default_model(self):
+ """Called when the user requests to change the default model"""
+
+ @abstractmethod
def on_clear_history(self):
"""Called when the user requests to clear the history"""