policy + starcoder description fixes
This commit is contained in:
parent
5e1216968b
commit
aea318b48d
7 changed files with 19 additions and 16 deletions
|
|
@ -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():
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
4
extension/package-lock.json
generated
4
extension/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.0.11",
|
||||
"version": "0.0.13",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.0.11",
|
||||
"version": "0.0.13",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@electron/rebuild": "^3.2.10",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"displayName": "Continue",
|
||||
"pricing": "Free",
|
||||
"description": "Refine code 10x faster",
|
||||
"version": "0.0.11",
|
||||
"version": "0.0.13",
|
||||
"publisher": "Continue",
|
||||
"engines": {
|
||||
"vscode": "^1.74.0"
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import useContinueGUIProtocol from "../hooks/useWebsocket";
|
|||
let TopGUIDiv = styled.div`
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
overflow: scroll;
|
||||
`;
|
||||
|
||||
let UserInputQueueItem = styled.div`
|
||||
|
|
@ -37,7 +38,7 @@ function GUI(props: GUIProps) {
|
|||
const [waitingForSteps, setWaitingForSteps] = useState(false);
|
||||
const [userInputQueue, setUserInputQueue] = useState<string[]>([]);
|
||||
const [history, setHistory] = useState<History | undefined>();
|
||||
// {
|
||||
// {
|
||||
// timeline: [
|
||||
// {
|
||||
// step: {
|
||||
|
|
@ -153,8 +154,7 @@ function GUI(props: GUIProps) {
|
|||
// },
|
||||
// ],
|
||||
// current_index: 0,
|
||||
// } as any
|
||||
// );
|
||||
// } as any);
|
||||
|
||||
const client = useContinueGUIProtocol();
|
||||
|
||||
|
|
@ -211,7 +211,9 @@ function GUI(props: GUIProps) {
|
|||
{typeof client === "undefined" && (
|
||||
<>
|
||||
<Loader></Loader>
|
||||
<p>Server disconnected</p>
|
||||
<p style={{ textAlign: "center" }}>
|
||||
Trying to reconnect with server...
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
{history?.timeline.map((node: HistoryNode, index: number) => {
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Reference in a new issue