summaryrefslogtreecommitdiff
path: root/continuedev
diff options
context:
space:
mode:
authorTy Dunn <ty@tydunn.com>2023-07-03 21:47:20 -0700
committerGitHub <noreply@github.com>2023-07-03 21:47:20 -0700
commit022cbb382bf5b0aa82216d73b4b59b85be0508c2 (patch)
treeccd737269c2d0ffd2c1a4fefe55f586406328d63 /continuedev
parentbbeea6ab78b14fa735962dbf4970be1230877097 (diff)
parentfac295e722f158f13502b45b749aee30b900c7a7 (diff)
downloadsncontinue-022cbb382bf5b0aa82216d73b4b59b85be0508c2.tar.gz
sncontinue-022cbb382bf5b0aa82216d73b4b59b85be0508c2.tar.bz2
sncontinue-022cbb382bf5b0aa82216d73b4b59b85be0508c2.zip
Merge pull request #180 from continuedev/slash-cmd
adding config slash command
Diffstat (limited to 'continuedev')
-rw-r--r--continuedev/src/continuedev/core/config.py5
-rw-r--r--continuedev/src/continuedev/libs/util/step_name_to_steps.py2
-rw-r--r--continuedev/src/continuedev/server/gui.py2
3 files changed, 8 insertions, 1 deletions
diff --git a/continuedev/src/continuedev/core/config.py b/continuedev/src/continuedev/core/config.py
index ed5d785a..2972e4d1 100644
--- a/continuedev/src/continuedev/core/config.py
+++ b/continuedev/src/continuedev/core/config.py
@@ -44,6 +44,11 @@ class ContinueConfig(BaseModel):
step_name="SimpleChatStep",
),
SlashCommand(
+ name="config",
+ description="Open the config file to create new and edit existing slash commands",
+ step_name="OpenConfigStep",
+ ),
+ SlashCommand(
name="comment",
description="Write comments for the current file or highlighted code",
step_name="CommentCodeStep",
diff --git a/continuedev/src/continuedev/libs/util/step_name_to_steps.py b/continuedev/src/continuedev/libs/util/step_name_to_steps.py
index f431f317..d329e110 100644
--- a/continuedev/src/continuedev/libs/util/step_name_to_steps.py
+++ b/continuedev/src/continuedev/libs/util/step_name_to_steps.py
@@ -12,6 +12,7 @@ from ...recipes.DDtoBQRecipe.main import DDtoBQRecipe
from ...recipes.DeployPipelineAirflowRecipe.main import DeployPipelineAirflowRecipe
from ...steps.on_traceback import DefaultOnTracebackStep
from ...steps.clear_history import ClearHistoryStep
+from ...steps.open_config import OpenConfigStep
# This mapping is used to convert from string in ContinueConfig json to corresponding Step class.
# Used for example in slash_commands and steps_on_startup
@@ -27,6 +28,7 @@ step_name_to_step_class = {
"DeployPipelineAirflowRecipe": DeployPipelineAirflowRecipe,
"DefaultOnTracebackStep": DefaultOnTracebackStep,
"ClearHistoryStep": ClearHistoryStep,
+ "OpenConfigStep": OpenConfigStep
}
diff --git a/continuedev/src/continuedev/server/gui.py b/continuedev/src/continuedev/server/gui.py
index 9a33fb6c..85458c09 100644
--- a/continuedev/src/continuedev/server/gui.py
+++ b/continuedev/src/continuedev/server/gui.py
@@ -148,7 +148,7 @@ async def websocket_endpoint(websocket: WebSocket, session: Session = Depends(we
# Update any history that may have happened before connection
await protocol.send_available_slash_commands()
- # await protocol.send_state_update() THIS WAS CAUSING A LOT OF ISSUES. Don't uncomment.
+ await protocol.send_state_update()
while AppStatus.should_exit is False:
message = await websocket.receive_text()