summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--continuedev/src/continuedev/core/autopilot.py2
-rw-r--r--continuedev/src/continuedev/core/main.py1
-rw-r--r--extension/README.md17
-rw-r--r--extension/package.json4
-rw-r--r--extension/react-app/public/continue_arrow.pngbin1350 -> 0 bytes
-rw-r--r--extension/react-app/public/play_button.pngbin0 -> 1017 bytes
-rw-r--r--extension/react-app/src/components/StepContainer.tsx39
-rw-r--r--extension/react-app/src/tabs/gui.tsx39
8 files changed, 78 insertions, 24 deletions
diff --git a/continuedev/src/continuedev/core/autopilot.py b/continuedev/src/continuedev/core/autopilot.py
index ee249c0b..8b0eaca3 100644
--- a/continuedev/src/continuedev/core/autopilot.py
+++ b/continuedev/src/continuedev/core/autopilot.py
@@ -181,6 +181,7 @@ class Autopilot(ContinueBaseModel):
# i is now the index of the step that we want to show/rerun
self.history.timeline[i].observation = observation
+ self.history.timeline[i].active = False
await self.update_subscribers()
@@ -205,6 +206,7 @@ class Autopilot(ContinueBaseModel):
# Add observation to history, unless already attached error observation
if not caught_error:
self.history.timeline[index_of_history_node].observation = observation
+ self.history.timeline[index_of_history_node].active = False
await self.update_subscribers()
# Update its description
diff --git a/continuedev/src/continuedev/core/main.py b/continuedev/src/continuedev/core/main.py
index 0c7ec67f..efb91488 100644
--- a/continuedev/src/continuedev/core/main.py
+++ b/continuedev/src/continuedev/core/main.py
@@ -21,6 +21,7 @@ class HistoryNode(ContinueBaseModel):
observation: Union[Observation, None]
depth: int
deleted: bool = False
+ active: bool = True
def to_chat_messages(self) -> List[ChatMessage]:
if self.step.description is None:
diff --git a/extension/README.md b/extension/README.md
index 63200a85..b43203bb 100644
--- a/extension/README.md
+++ b/extension/README.md
@@ -2,21 +2,18 @@
**[Continue](https://continue.dev/docs/) is the open-source library for accelerating software development with language models**
-You can use Continue to use and create recipes that automate the most repetitive sequences of tasks in your workflows.
-
## Getting Started
-After install is complete, the Continue extension will automatically open. You can also open it by pressing `cmd+shift+p` on Mac / `ctrl+shift+p` on Windows and then selecting `Continue: Open Continue GUI`
-
-To test a few common recipes, open a blank python file and try the following:
+After install is complete, the Continue extension will automatically open. You can also open it by pressing `cmd+k` on Mac / `ctrl+k` on Windows and then selecting `Continue: Open Continue GUI`.
-- Ask "write a calculator class in python"
-- /comment to write comments for the class
-- /pytest to write Pytest unit tests in a separate file
-- Ask in natural language for a new method
+To learn how to use it, try to use Continue for the following after `calculator.py` opens:
+- "Write me a calculator class"
+- Ask for a new method (e.g. "exp", "mod", "sqrt")
+- Type /comment to write comments for the entire class
+- Ask about how the class works, how to write it in another language, etc.
Give Continue a star on GitHub [here](https://github.com/continuedev/continue)
## Feedback
-Have thoughts about Continue? Please [leave an issue](https://github.com/continuedev/continue/issues/new) or email us at hi@continue.dev :)
+Have thoughts about Continue? Please [leave an issue](https://github.com/continuedev/continue/issues/new) or email us at hi@continue.dev :) \ No newline at end of file
diff --git a/extension/package.json b/extension/package.json
index 036d13f0..63e52965 100644
--- a/extension/package.json
+++ b/extension/package.json
@@ -13,7 +13,7 @@
"license": "Apache-2.0",
"displayName": "Continue",
"pricing": "Free",
- "description": "Refine code 10x faster",
+ "description": "Accelerating software development with language models",
"version": "0.0.55",
"publisher": "Continue",
"engines": {
@@ -81,7 +81,7 @@
{
"id": "continue",
"title": "Continue ",
- "icon": "react-app/dist/continue_arrow.png"
+ "icon": "react-app/dist/play_button.png"
}
]
},
diff --git a/extension/react-app/public/continue_arrow.png b/extension/react-app/public/continue_arrow.png
deleted file mode 100644
index 3b16ddf9..00000000
--- a/extension/react-app/public/continue_arrow.png
+++ /dev/null
Binary files differ
diff --git a/extension/react-app/public/play_button.png b/extension/react-app/public/play_button.png
new file mode 100644
index 00000000..af379375
--- /dev/null
+++ b/extension/react-app/public/play_button.png
Binary files differ
diff --git a/extension/react-app/src/components/StepContainer.tsx b/extension/react-app/src/components/StepContainer.tsx
index 1eb1d1fd..74a1c4e8 100644
--- a/extension/react-app/src/components/StepContainer.tsx
+++ b/extension/react-app/src/components/StepContainer.tsx
@@ -49,9 +49,13 @@ const StepContainerDiv = styled.div<{ open: boolean }>`
/* padding: 8px; */
`;
-const HeaderDiv = styled.div<{ error: boolean }>`
+const HeaderDiv = styled.div<{ error: boolean; loading: boolean }>`
background-color: ${(props) =>
- props.error ? "#522" : vscBackgroundTransparent};
+ props.error
+ ? "#522"
+ : props.loading
+ ? vscBackgroundTransparent
+ : vscBackground};
display: grid;
grid-template-columns: 1fr auto auto;
grid-gap: 8px;
@@ -76,12 +80,22 @@ const StyledCode = styled.code`
color: lightgray;
`;
+const gradient = keyframes`
+ 0% {
+ background-position: 0px 0;
+ }
+ 100% {
+ background-position: 100em 0;
+ }
+`;
+
const GradientBorder = styled.div<{
borderWidth?: number;
borderRadius?: string;
borderColor?: string;
isFirst: boolean;
isLast: boolean;
+ loading: boolean;
}>`
border-radius: ${(props) => props.borderRadius || "0"};
padding-top: ${(props) =>
@@ -91,13 +105,18 @@ const GradientBorder = styled.div<{
background: ${(props) =>
props.borderColor
? props.borderColor
- : `linear-gradient(
+ : `repeating-linear-gradient(
101.79deg,
#12887a 0%,
- #87245c 37.64%,
- #e12637 65.98%,
- #ffb215 110.45%
+ #87245c 16%,
+ #e12637 33%,
+ #ffb215 55%,
+ #e12637 67%,
+ #87245c 85%,
+ #12887a 99%
)`};
+ animation: ${(props) => (props.loading ? gradient : "")} 6s linear infinite;
+ background-size: 200% 200%;
`;
function StepContainer(props: StepContainerProps) {
@@ -138,10 +157,15 @@ function StepContainer(props: StepContainerProps) {
>
<StepContainerDiv open={props.open}>
<GradientBorder
+ loading={props.historyNode.active as boolean | false}
isFirst={props.isFirst}
isLast={props.isLast}
borderColor={
- props.historyNode.observation?.error ? "#f00" : undefined
+ props.historyNode.observation?.error
+ ? "#f00"
+ : props.historyNode.active
+ ? undefined
+ : "white"
}
className="overflow-hidden cursor-pointer"
onClick={(e) => {
@@ -153,6 +177,7 @@ function StepContainer(props: StepContainerProps) {
}}
>
<HeaderDiv
+ loading={props.historyNode.active as boolean | false}
error={props.historyNode.observation?.error ? true : false}
>
<h4 className="m-2">
diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx
index 96e1d2a6..2431b134 100644
--- a/extension/react-app/src/tabs/gui.tsx
+++ b/extension/react-app/src/tabs/gui.tsx
@@ -54,6 +54,7 @@ function GUI(props: GUIProps) {
(state: RootStore) => state.config.vscMachineId
);
+ const [usingFastModel, setUsingFastModel] = useState(false);
const [waitingForSteps, setWaitingForSteps] = useState(false);
const [userInputQueue, setUserInputQueue] = useState<string[]>([]);
const [availableSlashCommands, setAvailableSlashCommands] = useState<
@@ -63,7 +64,7 @@ function GUI(props: GUIProps) {
const [showDataSharingInfo, setShowDataSharingInfo] = useState(false);
const [stepsOpen, setStepsOpen] = useState<boolean[]>([]);
const [history, setHistory] = useState<History | undefined>();
- // {
+ // {
// timeline: [
// {
// step: {
@@ -151,6 +152,7 @@ function GUI(props: GUIProps) {
// ],
// },
// {
+ // active: false,
// step: {
// name: "SolveTracebackStep",
// traceback: {
@@ -211,6 +213,20 @@ function GUI(props: GUIProps) {
}, [topGuiDivRef.current, scrollTimeout]);
useEffect(() => {
+ const listener = (e: any) => {
+ // Cmd + J to toggle fast model
+ if (e.key === "j" && e.metaKey) {
+ setUsingFastModel((prev) => !prev);
+ }
+ };
+ window.addEventListener("keydown", listener);
+
+ return () => {
+ window.removeEventListener("keydown", listener);
+ };
+ }, []);
+
+ useEffect(() => {
console.log("CLIENT ON STATE UPDATE: ", client, client?.onStateUpdate);
client?.onStateUpdate((state) => {
// Scroll only if user is at very bottom of the window.
@@ -270,8 +286,9 @@ function GUI(props: GUIProps) {
const onMainTextInput = () => {
if (mainTextInputRef.current) {
- if (!client) return;
let input = mainTextInputRef.current.value;
+ mainTextInputRef.current.value = "";
+ if (!client) return;
if (
history?.timeline.length &&
@@ -449,20 +466,32 @@ function GUI(props: GUIProps) {
onColor="#12887a"
checked={dataSwitchChecked}
/>
- <span style={{ cursor: "help", fontSize: "16px" }}>
+ <span style={{ cursor: "help", fontSize: "14px" }}>
Contribute Data
</span>
</div>
+ {/* <HeaderButtonWithText
+ onClick={() => {
+ setUsingFastModel((prev) => !prev);
+ }}
+ text={usingFastModel ? "gpt-3.5-turbo" : "gpt-4"}
+ >
+ <div
+ style={{ fontSize: "18px", marginLeft: "2px", marginRight: "2px" }}
+ >
+ {usingFastModel ? "⚡" : "🧠"}
+ </div>
+ </HeaderButtonWithText> */}
<HeaderButtonWithText
onClick={() => {
client?.sendClear();
}}
- text="Clear History"
+ text="Clear All"
>
<Trash size="1.6em" />
</HeaderButtonWithText>
<a href="https://continue.dev/docs" className="no-underline">
- <HeaderButtonWithText text="Continue Docs">
+ <HeaderButtonWithText text="Docs">
<BookOpen size="1.6em" />
</HeaderButtonWithText>
</a>