summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--continuedev/src/continuedev/plugins/steps/on_traceback.py10
-rw-r--r--extension/react-app/src/components/UserInputContainer.tsx9
-rw-r--r--run.m1.spec2
-rw-r--r--run.spec2
4 files changed, 11 insertions, 12 deletions
diff --git a/continuedev/src/continuedev/plugins/steps/on_traceback.py b/continuedev/src/continuedev/plugins/steps/on_traceback.py
index 6b75d726..13d7aa38 100644
--- a/continuedev/src/continuedev/plugins/steps/on_traceback.py
+++ b/continuedev/src/continuedev/plugins/steps/on_traceback.py
@@ -55,17 +55,10 @@ class DefaultOnTracebackStep(Step):
await sdk.run_step(SolvePythonTracebackStep(output=self.output))
return
- tb = extract_traceback_str(self.output)
-
- tb_first_last_lines = (
- ("\n".join(tb.split("\n")[:3]) + "\n...\n" + "\n".join(tb.split("\n")[-3:]))
- if len(tb.split("\n")) > 6
- else tb
- )
+ tb = extract_traceback_str(self.output) or self.output[-8000:]
await sdk.run_step(
UserInputStep(
- description=f"""I got the following error, can you please help explain how to fix it?\n\n{tb_first_last_lines}""",
user_input=f"""I got the following error, can you please help explain how to fix it?\n\n{tb}""",
)
)
@@ -171,7 +164,6 @@ class SolvePythonTracebackStep(Step):
await sdk.run_step(
UserInputStep(
- description="Solving stack trace",
user_input=prompt,
)
)
diff --git a/extension/react-app/src/components/UserInputContainer.tsx b/extension/react-app/src/components/UserInputContainer.tsx
index fe85c431..228c3530 100644
--- a/extension/react-app/src/components/UserInputContainer.tsx
+++ b/extension/react-app/src/components/UserInputContainer.tsx
@@ -69,6 +69,13 @@ const TextArea = styled.textarea`
}
`;
+function stringWithEllipsis(str: string, maxLen: number) {
+ if (str.length > maxLen) {
+ return str.substring(0, maxLen - 3) + "...\n(Click to expand)";
+ }
+ return str;
+}
+
const UserInputContainer = (props: UserInputContainerProps) => {
const [isHovered, setIsHovered] = useState(false);
const [isEditing, setIsEditing] = useState(false);
@@ -144,7 +151,7 @@ const UserInputContainer = (props: UserInputContainerProps) => {
}}
className="mr-6 cursor-text w-full"
>
- {props.children}
+ {stringWithEllipsis(props.children, 600)}
</StyledPre>
)}
{/* <ReactMarkdown children={props.children} className="w-fit mr-10" /> */}
diff --git a/run.m1.spec b/run.m1.spec
index ad75856a..5f1cc850 100644
--- a/run.m1.spec
+++ b/run.m1.spec
@@ -13,7 +13,7 @@ a = Analysis(
('continuedev', 'continuedev'),
(certifi.where(), 'ca_bundle'),
] + copy_metadata('replicate'),
- hiddenimports=['anthropic', 'github', 'ripgrepy', 'bs4', 'redbaron', 'replicate'],
+ hiddenimports=['anthropic', 'github', 'ripgrepy', 'bs4', 'redbaron', 'python-lsp-server'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
diff --git a/run.spec b/run.spec
index 19181249..6e8831af 100644
--- a/run.spec
+++ b/run.spec
@@ -13,7 +13,7 @@ a = Analysis(
('continuedev', 'continuedev'),
(certifi.where(), 'ca_bundle')
],
- hiddenimports=['anthropic', 'github', 'ripgrepy', 'bs4', 'redbaron', 'python-lsp-server', 'replicate'] + copy_metadata('replicate'),
+ hiddenimports=['anthropic', 'github', 'ripgrepy', 'bs4', 'redbaron', 'python-lsp-server'] + copy_metadata('replicate'),
hookspath=[],
hooksconfig={},
runtime_hooks=[],