summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-13 12:00:35 -0700
committerNate Sesti <sestinj@gmail.com>2023-06-13 12:00:35 -0700
commitbd01bcb807ccdffecbf77faef9ec573e5e2da5f0 (patch)
treeabae61cb2ba9251f0124e604200029e3be7f4708
parent34f2234e8be2b922876d2fcd519e3c124b397fd2 (diff)
downloadsncontinue-bd01bcb807ccdffecbf77faef9ec573e5e2da5f0.tar.gz
sncontinue-bd01bcb807ccdffecbf77faef9ec573e5e2da5f0.tar.bz2
sncontinue-bd01bcb807ccdffecbf77faef9ec573e5e2da5f0.zip
env to .env to be caught by .gitignore
-rw-r--r--continuedev/src/continuedev/core/policy.py2
-rw-r--r--continuedev/src/continuedev/recipes/AddTransformRecipe/steps.py8
-rw-r--r--continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py10
-rw-r--r--continuedev/src/continuedev/recipes/DDtoBQRecipe/steps.py10
-rw-r--r--continuedev/src/continuedev/recipes/DeployPipelineAirflowRecipe/steps.py8
-rw-r--r--continuedev/src/continuedev/recipes/WritePytestsRecipe/main.py3
-rw-r--r--docs/docs/walkthroughs/create-a-recipe.md2
-rw-r--r--extension/react-app/src/components/ComboBox.tsx2
-rw-r--r--extension/react-app/src/components/StepContainer.tsx20
9 files changed, 35 insertions, 30 deletions
diff --git a/continuedev/src/continuedev/core/policy.py b/continuedev/src/continuedev/core/policy.py
index 51135f70..2b50307a 100644
--- a/continuedev/src/continuedev/core/policy.py
+++ b/continuedev/src/continuedev/core/policy.py
@@ -58,7 +58,7 @@ class DemoPolicy(Policy):
# AnswerQuestionChroma(question=user_input),
# EditFileChroma(request=user_input),
(SimpleChatStep(user_input=user_input),
- "Respond to the user with a chat message"),
+ "Respond to the user with a chat message. Can answer questions about code or anything else."),
], default_step=EditHighlightedCodeStep(user_input=user_input))
state = history.get_current()
diff --git a/continuedev/src/continuedev/recipes/AddTransformRecipe/steps.py b/continuedev/src/continuedev/recipes/AddTransformRecipe/steps.py
index f042424c..6a743fb5 100644
--- a/continuedev/src/continuedev/recipes/AddTransformRecipe/steps.py
+++ b/continuedev/src/continuedev/recipes/AddTransformRecipe/steps.py
@@ -24,15 +24,15 @@ class SetUpChessPipelineStep(Step):
# running commands to get started when creating a new dlt pipeline
await sdk.run([
- 'python3 -m venv env',
- 'source env/bin/activate',
+ 'python3 -m venv .env',
+ 'source .env/bin/activate',
'pip install dlt',
'dlt --non-interactive init chess duckdb',
'pip install -r requirements.txt',
'pip install pandas streamlit' # Needed for the pipeline show step later
], name="Set up Python environment", description=dedent(f"""\
- - Create a Python virtual environment: `python3 -m venv env`
- - Activate the virtual environment: `source env/bin/activate`
+ - Create a Python virtual environment: `python3 -m venv .env`
+ - Activate the virtual environment: `source .env/bin/activate`
- Install dlt: `pip install dlt`
- Create a new dlt pipeline called "chess" that loads data into a local DuckDB instance: `dlt init chess duckdb`
- Install the Python dependencies for the pipeline: `pip install -r requirements.txt`"""))
diff --git a/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py b/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py
index ea4607da..88e27d2a 100644
--- a/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py
+++ b/continuedev/src/continuedev/recipes/CreatePipelineRecipe/steps.py
@@ -35,15 +35,15 @@ class SetupPipelineStep(Step):
# running commands to get started when creating a new dlt pipeline
await sdk.run([
- 'python3 -m venv env',
- 'source env/bin/activate',
+ 'python3 -m venv .env',
+ 'source .env/bin/activate',
'pip install dlt',
f'dlt --non-interactive init {source_name} duckdb',
'pip install -r requirements.txt'
], description=dedent(f"""\
Running the following commands:
- - `python3 -m venv env`: Create a Python virtual environment
- - `source env/bin/activate`: Activate the virtual environment
+ - `python3 -m venv .env`: Create a Python virtual environment
+ - `source .env/bin/activate`: Activate the virtual environment
- `pip install dlt`: Install dlt
- `dlt init {source_name} duckdb`: Create a new dlt pipeline called {source_name} that loads data into a local DuckDB instance
- `pip install -r requirements.txt`: Install the Python dependencies for the pipeline"""), name="Setup Python environment")
@@ -156,7 +156,7 @@ class RunQueryStep(Step):
hide: bool = True
async def run(self, sdk: ContinueSDK):
- output = await sdk.run('env/bin/python3 query.py', name="Run test query", description="Running `env/bin/python3 query.py` to test that the data was loaded into DuckDB as expected", handle_error=False)
+ output = await sdk.run('.env/bin/python3 query.py', name="Run test query", description="Running `.env/bin/python3 query.py` to test that the data was loaded into DuckDB as expected", handle_error=False)
if "Traceback" in output or "SyntaxError" in output:
suggestion = sdk.models.gpt35.complete(dedent(f"""\
diff --git a/continuedev/src/continuedev/recipes/DDtoBQRecipe/steps.py b/continuedev/src/continuedev/recipes/DDtoBQRecipe/steps.py
index 5cf89ccf..4b8971c2 100644
--- a/continuedev/src/continuedev/recipes/DDtoBQRecipe/steps.py
+++ b/continuedev/src/continuedev/recipes/DDtoBQRecipe/steps.py
@@ -27,15 +27,15 @@ class SetUpChessPipelineStep(Step):
# running commands to get started when creating a new dlt pipeline
await sdk.run([
- 'python3 -m venv env',
- 'source env/bin/activate',
+ 'python3 -m venv .env',
+ 'source .env/bin/activate',
'pip install dlt',
'dlt --non-interactive init chess duckdb',
'pip install -r requirements.txt',
], name="Set up Python environment", description=dedent(f"""\
Running the following commands:
- - `python3 -m venv env`: Create a Python virtual environment
- - `source env/bin/activate`: Activate the virtual environment
+ - `python3 -m venv .env`: Create a Python virtual environment
+ - `source .env/bin/activate`: Activate the virtual environment
- `pip install dlt`: Install dlt
- `dlt init chess duckdb`: Create a new dlt pipeline called "chess" that loads data into a local DuckDB instance
- `pip install -r requirements.txt`: Install the Python dependencies for the pipeline"""))
@@ -75,7 +75,7 @@ class LoadDataStep(Step):
async def run(self, sdk: ContinueSDK):
# Run the pipeline again to load data to BigQuery
- output = await sdk.run('env/bin/python3 chess_pipeline.py', name="Load data to BigQuery", description="Running `env/bin/python3 chess_pipeline.py` to load data to Google BigQuery")
+ output = await sdk.run('.env/bin/python3 chess_pipeline.py', name="Load data to BigQuery", description="Running `.env/bin/python3 chess_pipeline.py` to load data to Google BigQuery")
if "Traceback" in output or "SyntaxError" in output:
with open(os.path.join(os.path.dirname(__file__), "dlt_duckdb_to_bigquery_docs.md"), "r") as f:
diff --git a/continuedev/src/continuedev/recipes/DeployPipelineAirflowRecipe/steps.py b/continuedev/src/continuedev/recipes/DeployPipelineAirflowRecipe/steps.py
index ee3275e7..c9749348 100644
--- a/continuedev/src/continuedev/recipes/DeployPipelineAirflowRecipe/steps.py
+++ b/continuedev/src/continuedev/recipes/DeployPipelineAirflowRecipe/steps.py
@@ -28,15 +28,15 @@ class SetupPipelineStep(Step):
async def run(self, sdk: ContinueSDK):
await sdk.run([
- 'python3 -m venv env',
- 'source env/bin/activate',
+ 'python3 -m venv .env',
+ 'source .env/bin/activate',
'pip install dlt',
f'dlt --non-interactive init {self.source_name} duckdb',
'pip install -r requirements.txt'
], description=dedent(f"""\
Running the following commands:
- - `python3 -m venv env`: Create a Python virtual environment
- - `source env/bin/activate`: Activate the virtual environment
+ - `python3 -m venv .env`: Create a Python virtual environment
+ - `source .env/bin/activate`: Activate the virtual environment
- `pip install dlt`: Install dlt
- `dlt init {self.source_name} duckdb`: Create a new dlt pipeline called {self.source_name} that loads data into a local DuckDB instance
- `pip install -r requirements.txt`: Install the Python dependencies for the pipeline"""), name="Setup Python environment")
diff --git a/continuedev/src/continuedev/recipes/WritePytestsRecipe/main.py b/continuedev/src/continuedev/recipes/WritePytestsRecipe/main.py
index a19caf8b..688f44c3 100644
--- a/continuedev/src/continuedev/recipes/WritePytestsRecipe/main.py
+++ b/continuedev/src/continuedev/recipes/WritePytestsRecipe/main.py
@@ -9,6 +9,9 @@ class WritePytestsRecipe(Step):
for_filepath: Union[str, None] = None
user_input: str = "Write unit tests for this file."
+ async def describe(self, models):
+ return f"Writing unit tests for {self.for_filepath}"
+
async def run(self, sdk: ContinueSDK):
if self.for_filepath is None:
self.for_filepath = (await sdk.ide.getOpenFiles())[0]
diff --git a/docs/docs/walkthroughs/create-a-recipe.md b/docs/docs/walkthroughs/create-a-recipe.md
index 3b80df8a..5d80d083 100644
--- a/docs/docs/walkthroughs/create-a-recipe.md
+++ b/docs/docs/walkthroughs/create-a-recipe.md
@@ -93,5 +93,5 @@ class SetUpVenvStep(Step):
if os == "Windows":
await sdk.run("python -m venv env; .\\env\\Scripts\\activate")
else:
- await sdk.run("python3 -m venv env && source env/bin/activate") # MacOS and Linux
+ await sdk.run("python3 -m venv .env && source .env/bin/activate") # MacOS and Linux
```
diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx
index 1b7c60e6..46d8c4d3 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="Ask anything:"
+ placeholder="Type an instruction or question."
{...getInputProps({
onKeyDown: (event) => {
if (event.key === "Enter" && (!isOpen || items.length === 0)) {
diff --git a/extension/react-app/src/components/StepContainer.tsx b/extension/react-app/src/components/StepContainer.tsx
index ca142b06..48f970d7 100644
--- a/extension/react-app/src/components/StepContainer.tsx
+++ b/extension/react-app/src/components/StepContainer.tsx
@@ -194,15 +194,17 @@ function StepContainer(props: StepContainerProps) {
<ReactMarkdown
key={1}
className="overflow-scroll"
- components={{
- pre: ({ node, ...props }) => {
- return (
- <CodeBlock
- children={props.children[0] as string}
- ></CodeBlock>
- );
- },
- }}
+ components={
+ {
+ // pre: ({ node, ...props }) => {
+ // return (
+ // <CodeBlock
+ // children={props.children[0] as string}
+ // ></CodeBlock>
+ // );
+ // },
+ }
+ }
>
{props.historyNode.step.description as any}
</ReactMarkdown>