show step details on toggle
This commit is contained in:
parent
b2fbe075b5
commit
fb4377a036
5 changed files with 21 additions and 7 deletions
|
|
@ -43,7 +43,12 @@ class ShellCommandsStep(Step):
|
|||
cwd: str | None = None
|
||||
name: str = "Run Shell Commands"
|
||||
|
||||
_err_text: str | None = None
|
||||
|
||||
async def describe(self, models: Models) -> Coroutine[str, None, None]:
|
||||
if self._err_text is not None:
|
||||
return f"Error when running shell commands:\n```\n{self._err_text}\n```"
|
||||
|
||||
cmds_str = "\n".join(self.cmds)
|
||||
return (await models.gpt35()).complete(f"{cmds_str}\n\nSummarize what was done in these shell commands, using markdown bullet points:")
|
||||
|
||||
|
|
@ -58,6 +63,7 @@ class ShellCommandsStep(Step):
|
|||
|
||||
# If it fails, return the error
|
||||
if err is not None and err != "":
|
||||
self._err_text = err
|
||||
return TextObservation(text=err)
|
||||
|
||||
return None
|
||||
|
|
|
|||
4
extension/package-lock.json
generated
4
extension/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.0.16",
|
||||
"version": "0.0.17",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.0.16",
|
||||
"version": "0.0.17",
|
||||
"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.16",
|
||||
"version": "0.0.17",
|
||||
"publisher": "Continue",
|
||||
"engines": {
|
||||
"vscode": "^1.74.0"
|
||||
|
|
|
|||
|
|
@ -114,8 +114,8 @@ function StepContainer(props: StepContainerProps) {
|
|||
hidden={props.historyNode.step.hide as any}
|
||||
>
|
||||
<GradientBorder
|
||||
className="m-2 overflow-hidden"
|
||||
// onClick={() => setOpen((prev) => !prev)}
|
||||
className="m-2 overflow-hidden cursor-pointer"
|
||||
onClick={() => setOpen((prev) => !prev)}
|
||||
>
|
||||
<StepContainerDiv open={open}>
|
||||
<HeaderDiv>
|
||||
|
|
@ -137,6 +137,14 @@ function StepContainer(props: StepContainerProps) {
|
|||
</HeaderButton> */}
|
||||
</HeaderDiv>
|
||||
|
||||
{open && (
|
||||
<pre>
|
||||
Step Details:
|
||||
<br />
|
||||
{JSON.stringify(props.historyNode.step, null, 2)}
|
||||
</pre>
|
||||
)}
|
||||
|
||||
<ReactMarkdown key={1} className="overflow-scroll">
|
||||
{props.historyNode.step.description as any}
|
||||
</ReactMarkdown>
|
||||
|
|
@ -181,7 +189,7 @@ function StepContainer(props: StepContainerProps) {
|
|||
</StepContainerDiv>
|
||||
</GradientBorder>
|
||||
|
||||
<OnHoverDiv hidden={!open}>
|
||||
{/* <OnHoverDiv hidden={!open}>
|
||||
<NaturalLanguageInput
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") {
|
||||
|
|
@ -195,7 +203,7 @@ function StepContainer(props: StepContainerProps) {
|
|||
}}
|
||||
></NaturalLanguageInput>
|
||||
<ContinueButton onClick={onTextInput}></ContinueButton>
|
||||
</OnHoverDiv>
|
||||
</OnHoverDiv> */}
|
||||
</MainDiv>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Reference in a new issue