summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--continuedev/src/continuedev/core/autopilot.py18
-rw-r--r--continuedev/src/continuedev/core/main.py2
-rw-r--r--continuedev/src/continuedev/steps/chat.py2
-rw-r--r--continuedev/src/continuedev/steps/core/core.py2
-rw-r--r--continuedev/src/continuedev/steps/custom_command.py7
-rw-r--r--extension/package-lock.json4
-rw-r--r--extension/package.json2
-rw-r--r--extension/react-app/src/components/ComboBox.tsx10
-rw-r--r--extension/react-app/src/components/ContinueButton.tsx12
-rw-r--r--extension/react-app/src/components/PillButton.tsx4
-rw-r--r--extension/react-app/src/components/UserInputContainer.tsx3
-rw-r--r--extension/react-app/src/index.css1
-rw-r--r--extension/react-app/src/tabs/gui.tsx10
-rw-r--r--extension/src/lang-server/codeLens.ts4
14 files changed, 45 insertions, 36 deletions
diff --git a/continuedev/src/continuedev/core/autopilot.py b/continuedev/src/continuedev/core/autopilot.py
index e59c6ed4..6e4326f0 100644
--- a/continuedev/src/continuedev/core/autopilot.py
+++ b/continuedev/src/continuedev/core/autopilot.py
@@ -151,15 +151,23 @@ class Autopilot(ContinueBaseModel):
self._highlighted_ranges[0].editing = True
async def handle_highlighted_code(self, range_in_files: List[RangeInFileWithContents]):
- if not self._adding_highlighted_code and len(self._highlighted_ranges) > 0:
- return
# If un-highlighting, then remove the range
- if len(self._highlighted_ranges) == 1 and len(range_in_files) == 1 and range_in_files[0].range.start == range_in_files[0].range.end:
+ if len(self._highlighted_ranges) == 1 and len(range_in_files) <= 1 and (len(range_in_files) == 0 or range_in_files[0].range.start == range_in_files[0].range.end):
self._highlighted_ranges = []
await self.update_subscribers()
return
+ # If not toggled to be adding context, only edit or add the first range
+ if not self._adding_highlighted_code and len(self._highlighted_ranges) > 0:
+ if len(range_in_files) == 0:
+ return
+ if range_in_files[0].range.overlaps_with(self._highlighted_ranges[0].range) and range_in_files[0].filepath == self._highlighted_ranges[0].range.filepath:
+ self._highlighted_ranges = [HighlightedRangeContext(
+ range=range_in_files[0].range, editing=True, pinned=False)]
+ await self.update_subscribers()
+ return
+
# Filter out rifs from ~/.continue/diffs folder
range_in_files = [
rif for rif in range_in_files if not os.path.dirname(rif.filepath) == os.path.expanduser("~/.continue/diffs")]
@@ -391,8 +399,8 @@ class Autopilot(ContinueBaseModel):
return
# Remove context unless pinned
- self._highlighted_ranges = [
- hr for hr in self._highlighted_ranges if hr.pinned]
+ # self._highlighted_ranges = [
+ # hr for hr in self._highlighted_ranges if hr.pinned]
# await self._request_halt()
# Just run the step that takes user input, and
diff --git a/continuedev/src/continuedev/core/main.py b/continuedev/src/continuedev/core/main.py
index 62cc4936..d8bacb1f 100644
--- a/continuedev/src/continuedev/core/main.py
+++ b/continuedev/src/continuedev/core/main.py
@@ -259,7 +259,7 @@ class Step(ContinueBaseModel):
if self.description is not None:
d["description"] = self.description
else:
- d["description"] = "`Step in progress...`"
+ d["description"] = "Step in progress..."
return d
@validator("name", pre=True, always=True)
diff --git a/continuedev/src/continuedev/steps/chat.py b/continuedev/src/continuedev/steps/chat.py
index 8f88244c..d310a498 100644
--- a/continuedev/src/continuedev/steps/chat.py
+++ b/continuedev/src/continuedev/steps/chat.py
@@ -20,7 +20,7 @@ openai.api_key = OPENAI_API_KEY
class SimpleChatStep(Step):
user_input: str
- name: str = "Chat"
+ name: str = "Generating Response..."
manage_own_chat_context: bool = True
description: str = ""
diff --git a/continuedev/src/continuedev/steps/core/core.py b/continuedev/src/continuedev/steps/core/core.py
index cbf0fe5e..5577c49a 100644
--- a/continuedev/src/continuedev/steps/core/core.py
+++ b/continuedev/src/continuedev/steps/core/core.py
@@ -302,7 +302,7 @@ class DefaultModelEditCodeStep(Step):
completion = "\n".join(lines)
full_prefix_lines = full_file_contents_lines[:rif.range.start.line]
- full_suffix_lines = full_file_contents_lines[rif.range.end.line + 1:]
+ full_suffix_lines = full_file_contents_lines[rif.range.end.line:]
new_file_contents = "\n".join(
full_prefix_lines) + "\n" + completion + "\n" + "\n".join(full_suffix_lines)
await sdk.ide.showDiff(rif.filepath, new_file_contents)
diff --git a/continuedev/src/continuedev/steps/custom_command.py b/continuedev/src/continuedev/steps/custom_command.py
index b84e7b35..9d675091 100644
--- a/continuedev/src/continuedev/steps/custom_command.py
+++ b/continuedev/src/continuedev/steps/custom_command.py
@@ -1,16 +1,17 @@
from ..core.main import Step
from ..core.sdk import ContinueSDK
-from ..steps.chat import ChatWithFunctions
+from ..steps.chat import ChatWithFunctions, SimpleChatStep
class CustomCommandStep(Step):
name: str
prompt: str
user_input: str
-
+ hide: bool = True
+
async def describe(self):
return self.prompt
async def run(self, sdk: ContinueSDK):
prompt_user_input = f"Task: {self.prompt}. Additional info: {self.user_input}"
- await sdk.run_step(ChatWithFunctions(user_input=prompt_user_input)) \ No newline at end of file
+ await sdk.run_step(SimpleChatStep(user_input=prompt_user_input))
diff --git a/extension/package-lock.json b/extension/package-lock.json
index b34d1c61..cb11c5a8 100644
--- a/extension/package-lock.json
+++ b/extension/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "continue",
- "version": "0.0.114",
+ "version": "0.0.115",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "continue",
- "version": "0.0.114",
+ "version": "0.0.115",
"license": "Apache-2.0",
"dependencies": {
"@electron/rebuild": "^3.2.10",
diff --git a/extension/package.json b/extension/package.json
index 4c972e86..bbc83e4a 100644
--- a/extension/package.json
+++ b/extension/package.json
@@ -14,7 +14,7 @@
"displayName": "Continue",
"pricing": "Free",
"description": "The open-source coding autopilot",
- "version": "0.0.114",
+ "version": "0.0.115",
"publisher": "Continue",
"engines": {
"vscode": "^1.67.0"
diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx
index af673b42..b825dc2a 100644
--- a/extension/react-app/src/components/ComboBox.tsx
+++ b/extension/react-app/src/components/ComboBox.tsx
@@ -22,7 +22,7 @@ import {
import { HighlightedRangeContext } from "../../../schema/FullState";
// #region styled components
-const mainInputFontSize = 16;
+const mainInputFontSize = 13;
const EmptyPillDiv = styled.div`
padding: 8px;
@@ -64,7 +64,6 @@ const MainTextInput = styled.textarea`
padding: 8px;
font-size: ${mainInputFontSize}px;
font-family: inherit;
- border: 1px solid transparent;
border-radius: ${defaultBorderRadius};
margin: 8px auto;
height: auto;
@@ -74,8 +73,7 @@ const MainTextInput = styled.textarea`
z-index: 1;
&:focus {
- outline: 1px solid #ff000066;
- border: 1px solid transparent;
+ outline: 1px solid ${lightGray};
}
`;
@@ -191,7 +189,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
return (
<>
<div className="px-2 flex gap-2 items-center flex-wrap mt-2">
- {highlightedCodeSections.length > 1 && (
+ {/* {highlightedCodeSections.length > 1 && (
<>
<HeaderButtonWithText
text="Clear Context"
@@ -204,7 +202,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => {
<Trash size="1.6em" />
</HeaderButtonWithText>
</>
- )}
+ )} */}
{highlightedCodeSections.map((section, idx) => (
<PillButton
editing={section.editing}
diff --git a/extension/react-app/src/components/ContinueButton.tsx b/extension/react-app/src/components/ContinueButton.tsx
index 462f2b46..72f6dcd2 100644
--- a/extension/react-app/src/components/ContinueButton.tsx
+++ b/extension/react-app/src/components/ContinueButton.tsx
@@ -10,20 +10,12 @@ let StyledButton = styled(Button)`
display: grid;
grid-template-columns: 30px 1fr;
align-items: center;
- background: linear-gradient(
- 95.23deg,
- #be1a55 14.44%,
- rgba(203, 27, 90, 0.4) 82.21%
- );
+ background: #be1b55;
&:hover {
transition-delay: 0.5s;
transition-property: "background";
- background: linear-gradient(
- 45deg,
- #be1a55 14.44%,
- rgba(203, 27, 90, 0.4) 82.21%
- );
+ opacity: 0.8;
}
`;
diff --git a/extension/react-app/src/components/PillButton.tsx b/extension/react-app/src/components/PillButton.tsx
index a384832e..31d98c0f 100644
--- a/extension/react-app/src/components/PillButton.tsx
+++ b/extension/react-app/src/components/PillButton.tsx
@@ -127,7 +127,9 @@ const PillButton = (props: PillButtonProps) => {
{props.title}
</Button>
<StyledTooltip id={`edit-${props.index}`}>
- {props.editing ? "Editing this range" : "Edit this range"}
+ {props.editing
+ ? "Editing this range (with rest of file as context)"
+ : "Edit this range"}
</StyledTooltip>
<StyledTooltip id={`delete-${props.index}`}>Delete</StyledTooltip>
</>
diff --git a/extension/react-app/src/components/UserInputContainer.tsx b/extension/react-app/src/components/UserInputContainer.tsx
index f51f0cb5..0ff3e74f 100644
--- a/extension/react-app/src/components/UserInputContainer.tsx
+++ b/extension/react-app/src/components/UserInputContainer.tsx
@@ -1,7 +1,7 @@
import React from "react";
import ReactMarkdown from "react-markdown";
import styled from "styled-components";
-import { buttonColor, secondaryDark } from ".";
+import { buttonColor, secondaryDark, vscBackground } from ".";
import HeaderButtonWithText from "./HeaderButtonWithText";
import { Play, XMark } from "@styled-icons/heroicons-outline";
import { RootStore } from "../redux/store";
@@ -22,6 +22,7 @@ const StyledDiv = styled.div`
font-size: 13px;
display: flex;
align-items: center;
+ border-bottom: 1px solid ${vscBackground};
`;
const UserInputContainer = (props: UserInputContainerProps) => {
diff --git a/extension/react-app/src/index.css b/extension/react-app/src/index.css
index 682551f8..6e33c89c 100644
--- a/extension/react-app/src/index.css
+++ b/extension/react-app/src/index.css
@@ -21,7 +21,6 @@ body,
body {
padding: 0;
color: white;
- font-family: "Mona Sans", "Arial", sans-serif;
padding: 0px;
margin: 0px;
height: 100%;
diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx
index ca369547..c8a42d9a 100644
--- a/extension/react-app/src/tabs/gui.tsx
+++ b/extension/react-app/src/tabs/gui.tsx
@@ -165,7 +165,15 @@ function GUI(props: GUIProps) {
const shouldScrollToBottom =
topGuiDivRef.current &&
topGuiDivRef.current?.offsetHeight - window.scrollY < 100;
- setWaitingForSteps(state.active);
+
+ const waitingForSteps =
+ state.active &&
+ state.history.current_index < state.history.timeline.length &&
+ state.history.timeline[
+ state.history.current_index
+ ].step.description?.trim() === "";
+
+ setWaitingForSteps(waitingForSteps);
setHistory(state.history);
setHighlightedRanges(state.highlighted_ranges);
setUserInputQueue(state.user_input_queue);
diff --git a/extension/src/lang-server/codeLens.ts b/extension/src/lang-server/codeLens.ts
index 381a0084..79126eaa 100644
--- a/extension/src/lang-server/codeLens.ts
+++ b/extension/src/lang-server/codeLens.ts
@@ -72,12 +72,12 @@ class DiffViewerCodeLensProvider implements vscode.CodeLensProvider {
const range = new vscode.Range(0, 0, 1, 0);
codeLenses.push(
new vscode.CodeLens(range, {
- title: "Accept ✅",
+ title: "Accept ✅ (⌘⇧↩)",
command: "continue.acceptDiff",
arguments: [document.uri.fsPath],
}),
new vscode.CodeLens(range, {
- title: "Reject ❌",
+ title: "Reject ❌ (⌘⇧⌫)",
command: "continue.rejectDiff",
arguments: [document.uri.fsPath],
})