summaryrefslogtreecommitdiff
path: root/continuedev/src
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-02 13:44:33 -0400
committerNate Sesti <sestinj@gmail.com>2023-06-02 13:44:33 -0400
commita6a66f8a8b42eca861b05d6e7ccc0d0c2cfc8706 (patch)
tree4a1223bed2d52dbff9ae5e9fb110155e87778a50 /continuedev/src
parent2c141f3ac1436be9ed5b8cc15ba882c3d91279ac (diff)
downloadsncontinue-a6a66f8a8b42eca861b05d6e7ccc0d0c2cfc8706.tar.gz
sncontinue-a6a66f8a8b42eca861b05d6e7ccc0d0c2cfc8706.tar.bz2
sncontinue-a6a66f8a8b42eca861b05d6e7ccc0d0c2cfc8706.zip
policy + starcoder description fixes
Diffstat (limited to 'continuedev/src')
-rw-r--r--continuedev/src/continuedev/core/policy.py2
-rw-r--r--continuedev/src/continuedev/libs/steps/draft/dlt.py15
-rw-r--r--continuedev/src/continuedev/libs/steps/main.py2
3 files changed, 10 insertions, 9 deletions
diff --git a/continuedev/src/continuedev/core/policy.py b/continuedev/src/continuedev/core/policy.py
index 9f68515f..6e264bab 100644
--- a/continuedev/src/continuedev/core/policy.py
+++ b/continuedev/src/continuedev/core/policy.py
@@ -18,7 +18,7 @@ class DemoPolicy(Policy):
if history.get_current() is None:
return MessageStep(message="Welcome to Continue!") >> StepsOnStartupStep()
- observation = history.last_observation()
+ observation = history.get_current().observation
if observation is not None and isinstance(observation, UserInputObservation):
# This could be defined with ObservationTypePolicy. Ergonomics not right though.
if " test" in observation.user_input.lower():
diff --git a/continuedev/src/continuedev/libs/steps/draft/dlt.py b/continuedev/src/continuedev/libs/steps/draft/dlt.py
index f3417c9d..9cec5014 100644
--- a/continuedev/src/continuedev/libs/steps/draft/dlt.py
+++ b/continuedev/src/continuedev/libs/steps/draft/dlt.py
@@ -50,14 +50,7 @@ class SetupPipelineStep(Step):
class ValidatePipelineStep(Step):
-
- async def describe(self, models: Models):
- return dedent("""\
- This step will validate that your dlt pipeline is working as expected:
- - Test that the API call works
- - Load the data into a local DuckDB instance
- - Write a query to view the data
- """)
+ hide: bool = True
async def run(self, sdk: ContinueSDK):
source_name = sdk.history.last_observation().values["source_name"]
@@ -111,5 +104,11 @@ class CreatePipelineStep(Step):
- Write a query to view the data""")) >>
WaitForUserInputStep(prompt="What API do you want to load data from?") >>
SetupPipelineStep(api_description="WeatherAPI.com API") >>
+ MessageStep(message=dedent("""\
+ This step will validate that your dlt pipeline is working as expected:
+ - Test that the API call works
+ - Load the data into a local DuckDB instance
+ - Write a query to view the data
+ """)) >>
ValidatePipelineStep()
)
diff --git a/continuedev/src/continuedev/libs/steps/main.py b/continuedev/src/continuedev/libs/steps/main.py
index aefbe084..73ad3352 100644
--- a/continuedev/src/continuedev/libs/steps/main.py
+++ b/continuedev/src/continuedev/libs/steps/main.py
@@ -253,6 +253,8 @@ class StarCoderEditHighlightedCodeStep(Step):
if completion.endswith(eot_token):
completion = completion[:completion.rindex(eot_token)]
+ self._prompt_and_completion += prompt + completion
+
await sdk.ide.applyFileSystemEdit(
FileEdit(filepath=rif.filepath, range=rif.range, replacement=completion))
await sdk.ide.saveFile(rif.filepath)