diff options
author | Ty Dunn <ty@tydunn.com> | 2023-07-03 21:47:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-03 21:47:20 -0700 |
commit | 430f4e1b5ebd4f913ac2fe97227e2e7eaf8b008b (patch) | |
tree | 71ab571ea1d3f3c654105af509d54dedfd105d96 | |
parent | a70131416dbfa32f623f04c457f3b11baaa343e7 (diff) | |
parent | 68e6b9ee68b5bcdf2cddb10ef55b18e6c466c084 (diff) | |
download | sncontinue-430f4e1b5ebd4f913ac2fe97227e2e7eaf8b008b.tar.gz sncontinue-430f4e1b5ebd4f913ac2fe97227e2e7eaf8b008b.tar.bz2 sncontinue-430f4e1b5ebd4f913ac2fe97227e2e7eaf8b008b.zip |
Merge pull request #180 from continuedev/slash-cmd
adding config slash command
-rw-r--r-- | continuedev/src/continuedev/core/config.py | 5 | ||||
-rw-r--r-- | continuedev/src/continuedev/libs/util/step_name_to_steps.py | 2 | ||||
-rw-r--r-- | continuedev/src/continuedev/server/gui.py | 2 |
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() |