diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-15 12:07:53 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-15 12:07:53 -0700 |
commit | 00ffcc779571ee876c478c680ea1590a455d0d70 (patch) | |
tree | 5cc13ff4eaed9e5ec0c9f31cf622439b878d447f | |
parent | cb518073b0e3711a946282864c150edff35db53a (diff) | |
parent | 22e24c457c1f6f088eb853c8d26d982374f4cefb (diff) | |
download | sncontinue-00ffcc779571ee876c478c680ea1590a455d0d70.tar.gz sncontinue-00ffcc779571ee876c478c680ea1590a455d0d70.tar.bz2 sncontinue-00ffcc779571ee876c478c680ea1590a455d0d70.zip |
Merge branch 'main' of https://github.com/continuedev/continue
-rw-r--r-- | continuedev/src/continuedev/core/config.py | 28 | ||||
-rw-r--r-- | continuedev/src/continuedev/core/policy.py | 8 | ||||
-rw-r--r-- | continuedev/src/continuedev/libs/util/step_name_to_steps.py | 18 | ||||
-rw-r--r-- | extension/package.json | 1 | ||||
-rw-r--r-- | extension/react-app/src/components/ComboBox.tsx | 2 | ||||
-rw-r--r-- | extension/src/README.md | 3 |
6 files changed, 14 insertions, 46 deletions
diff --git a/continuedev/src/continuedev/core/config.py b/continuedev/src/continuedev/core/config.py index 8ebdc145..a1c58399 100644 --- a/continuedev/src/continuedev/core/config.py +++ b/continuedev/src/continuedev/core/config.py @@ -27,26 +27,15 @@ class ContinueConfig(BaseModel): # description="Write pytest unit tests for the current file", # step_name="WritePytestsRecipe", # params=??) - - SlashCommand( - name="dlt", - description="Create a dlt pipeline", - step_name="CreatePipelineRecipe", - ), SlashCommand( - name="ddtobq", - description="Adjust a dlt pipeline to load data into BigQuery", - step_name="DDtoBQRecipe", + name="edit", + description="Edit code in the current file or the highlighted code", + step_name="EditHighlightedCodeStep", ), SlashCommand( - name="addtransform", - description="Add transforms to the chess.com API dlt pipeline.", - step_name="AddTransformRecipe", - ), - SlashCommand( - name="deployairflow", - description="Deploy a dlt pipeline to Airflow", - step_name="DeployPipelineAirflowRecipe", + name="explain", + description="Reply to instructions or a question with previous steps as context", + step_name="SimpleChatStep", ), SlashCommand( name="comment", @@ -54,11 +43,6 @@ class ContinueConfig(BaseModel): step_name="CommentCodeStep", ), SlashCommand( - name="pytest", - description="Write pytest unit tests for the current file", - step_name="WritePytestsRecipe", - ), - SlashCommand( name="feedback", description="Send feedback to improve Continue", step_name="FeedbackStep", diff --git a/continuedev/src/continuedev/core/policy.py b/continuedev/src/continuedev/core/policy.py index 9fcda882..255f598d 100644 --- a/continuedev/src/continuedev/core/policy.py +++ b/continuedev/src/continuedev/core/policy.py @@ -26,7 +26,7 @@ class DemoPolicy(Policy): # At the very start, run initial Steps spcecified in the config if history.get_current() is None: return ( - MessageStep(name="Welcome to Continue!", message="You can type a question or instructions for a file edit in the text box. If you highlight code, edits will be localized to the highlighted range. Otherwise, the currently open file is taken as context. If you type '/', you can see the list of available slash commands.") >> + MessageStep(name="Welcome to Continue!", message="Type '/' to see the list of available slash commands. If you highlight code, edits and explanations will be localized to the highlighted range. Otherwise, the currently open file is used. In both cases, the code is combined with the previous steps to construct the context.") >> # SetupContinueWorkspaceStep() >> # CreateCodebaseIndexChroma() >> StepsOnStartupStep()) @@ -45,12 +45,6 @@ class DemoPolicy(Policy): params["user_input"] = after_command return get_step_from_name(slash_command.step_name, params) - if "/ask" in user_input: - return AnswerQuestionChroma(question=" ".join(user_input.split(" ")[1:])) - elif "/edit" in user_input: - return EditFileChroma(request=" ".join(user_input.split(" ")[1:])) - elif "/step" in user_input: - return ContinueStepStep(prompt=" ".join(user_input.split(" ")[1:])) # return EditHighlightedCodeStep(user_input=user_input) return NLDecisionStep(user_input=user_input, steps=[ (EditHighlightedCodeStep(user_input=user_input), 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 fd1aab5b..4dd9c430 100644 --- a/continuedev/src/continuedev/libs/util/step_name_to_steps.py +++ b/continuedev/src/continuedev/libs/util/step_name_to_steps.py @@ -2,23 +2,15 @@ from typing import Dict from ...core.main import Step from ...steps.core.core import UserInputStep -from ...recipes.CreatePipelineRecipe.main import CreatePipelineRecipe -from ...recipes.DDtoBQRecipe.main import DDtoBQRecipe -from ...recipes.DeployPipelineAirflowRecipe.main import DeployPipelineAirflowRecipe -from ...recipes.DDtoBQRecipe.main import DDtoBQRecipe -from ...recipes.AddTransformRecipe.main import AddTransformRecipe -from ...recipes.WritePytestsRecipe.main import WritePytestsRecipe +from ...steps.main import EditHighlightedCodeStep +from ...steps.chat import SimpleChatStep from ...steps.comment_code import CommentCodeStep from ...steps.feedback import FeedbackStep step_name_to_step_class = { "UserInputStep": UserInputStep, - "CreatePipelineRecipe": CreatePipelineRecipe, - "DDtoBQRecipe": DDtoBQRecipe, - "DeployPipelineAirflowRecipe": DeployPipelineAirflowRecipe, - "AddTransformRecipe": AddTransformRecipe, - "DDtoBQRecipe": DDtoBQRecipe, - "WritePytestsRecipe": WritePytestsRecipe, + "EditHighlightedCodeStep": EditHighlightedCodeStep, + "SimpleChatStep": SimpleChatStep, "CommentCodeStep": CommentCodeStep, "FeedbackStep": FeedbackStep, } @@ -30,4 +22,4 @@ def get_step_from_name(step_name: str, params: Dict) -> Step: except: print( f"Incorrect parameters for step {step_name}. Parameters provided were: {params}") - raise + raise
\ No newline at end of file diff --git a/extension/package.json b/extension/package.json index 9ff7165c..4a0d9881 100644 --- a/extension/package.json +++ b/extension/package.json @@ -111,7 +111,6 @@ "clientgen": "rm -rf src/client/ && npx @openapitools/openapi-generator-cli generate -i ../schema/openapi.json -g typescript-fetch -o src/client/ --additional-properties=supportsES6=true,npmVersion=8.19.2,typescriptThreePlus=true", "typegen": "node scripts/typegen.js", "rebuild": "electron-rebuild -v 19.1.8 node-pty", - "compile": "tsc -p ./", "watch": "tsc -watch -p ./", "pretest": "npm run compile && npm run lint", "lint": "eslint src --ext ts", diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index 11d04974..ace0605e 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -105,7 +105,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { <div className="flex px-2" ref={divRef} hidden={!isOpen}> <MainTextInput disabled={props.disabled} - placeholder="Type instructions or a question. Highlighted code / the open file are used as context." + placeholder="Type '/' to see the list of available slash commands..." {...getInputProps({ onKeyDown: (event) => { if (event.key === "Enter" && (!isOpen || items.length === 0)) { diff --git a/extension/src/README.md b/extension/src/README.md index c46de79f..4969890f 100644 --- a/extension/src/README.md +++ b/extension/src/README.md @@ -20,9 +20,8 @@ 9. `cmd+shift+p` to look at developer console and select Continue commands -10. Every time you make changes to the code, you need to run `npm run compile` +10. Every time you make changes to the code, you need to run `npm run esbuild` unless you make changes inside of `react-app` and then you need to run `npm run build` from there -11. If you run into a "command not found" error, try running `npm run rebuild` and then `npm run compile` ## Alternative: Install from source |