🚸 display config errors
This commit is contained in:
parent
601a0961c4
commit
b7ff0bbcde
6 changed files with 25 additions and 13 deletions
|
|
@ -33,10 +33,10 @@ The easiest way to run Continue is to
|
|||
|
||||
If you'd like to use a pre-built binary, you can download manually from our S3 bucket. These are the download links for each OS:
|
||||
|
||||
- [MacOS (Intel)](https://continue-server-binaries.s3.us-west-1.amazonaws.com/mac/run)
|
||||
- [MacOS (Apple Silicon)](https://continue-server-binaries.s3.us-west-1.amazonaws.com/apple-silicon/run)
|
||||
- [Windows](https://continue-server-binaries.s3.us-west-1.amazonaws.com/windows/run.exe)
|
||||
- [Linux](https://continue-server-binaries.s3.us-west-1.amazonaws.com/linux/run)
|
||||
- [MacOS (Intel)](https://continue-server-binaries.s3.us-west-1.amazonaws.com/mac/continue_server)
|
||||
- [MacOS (Apple Silicon)](https://continue-server-binaries.s3.us-west-1.amazonaws.com/apple-silicon/continue_server)
|
||||
- [Windows](https://continue-server-binaries.s3.us-west-1.amazonaws.com/windows/continue_server.exe)
|
||||
- [Linux](https://continue-server-binaries.s3.us-west-1.amazonaws.com/linux/continue_server)
|
||||
|
||||
Once downloaded, start the binary by running `./continue_server` (MacOS/Linux) or `./continue_server.exe` (Windows) in the directory where you downloaded it. You should see that it begins listening on port 65432.
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class ConfigPyCodeLensProvider implements vscode.CodeLensProvider {
|
|||
}
|
||||
|
||||
const lineOfSystemMessage = lines.findIndex((line) =>
|
||||
line.replace(" ", "").includes("config=ContinueConfig(")
|
||||
line.includes("ContinueConfig(")
|
||||
);
|
||||
|
||||
if (lineOfSystemMessage >= 0) {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ interface HeaderButtonWithTextProps {
|
|||
className?: string;
|
||||
onKeyDown?: (e: any) => void;
|
||||
tabIndex?: number;
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
const HeaderButtonWithText = React.forwardRef<
|
||||
|
|
@ -39,6 +40,7 @@ const HeaderButtonWithText = React.forwardRef<
|
|||
onClick={props.onClick}
|
||||
onKeyDown={props.onKeyDown}
|
||||
className={props.className}
|
||||
style={props.style}
|
||||
ref={ref}
|
||||
tabIndex={props.tabIndex}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ function ListBoxOption({ option, idx }: { option: Option; idx: number }) {
|
|||
setHovered(false);
|
||||
}}
|
||||
>
|
||||
<div className="flex items-center justify-between gap-3 h-5">
|
||||
<div className="flex items-center justify-between gap-3 h-5 relative">
|
||||
<span>{option.title}</span>
|
||||
{idx > 0 && hovered && (
|
||||
<HeaderButtonWithText
|
||||
|
|
@ -166,6 +166,8 @@ function ListBoxOption({ option, idx }: { option: Option; idx: number }) {
|
|||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}}
|
||||
style={{ backgroundColor: secondaryDark }}
|
||||
className="absolute right-0 p-1"
|
||||
>
|
||||
<TrashIcon width="1.2em" height="1.2em" />
|
||||
</HeaderButtonWithText>
|
||||
|
|
|
|||
|
|
@ -239,7 +239,10 @@ class DefaultModelEditCodeStep(Step):
|
|||
)
|
||||
|
||||
# If using 3.5 and overflows, upgrade to 3.5.16k
|
||||
if model_to_use.model == "gpt-3.5-turbo":
|
||||
if (
|
||||
model_to_use.model == "gpt-3.5-turbo"
|
||||
and model_to_use.__class__.__name__ == "OpenAI"
|
||||
):
|
||||
if total_tokens > model_to_use.context_length:
|
||||
model_to_use = OpenAIFreeTrial(model="gpt-3.5-turbo-0613")
|
||||
await sdk.start_model(model_to_use)
|
||||
|
|
|
|||
|
|
@ -78,6 +78,14 @@ class Window:
|
|||
self.config.temperature,
|
||||
)
|
||||
|
||||
async def display_config_error(self):
|
||||
if self._error_loading_config is not None:
|
||||
await self.ide.setFileOpen(getConfigFilePath())
|
||||
await self.ide.showMessage(
|
||||
f"""We found an error while loading your config.py. For now, Continue is falling back to the default configuration. If you need help solving this error, please reach out to us on Discord by clicking the question mark button in the bottom right.\n\n{self._error_loading_config}"""
|
||||
)
|
||||
self._error_loading_config = None
|
||||
|
||||
async def load(
|
||||
self, config: Optional[ContinueConfig] = None, only_reloading: bool = False
|
||||
):
|
||||
|
|
@ -92,12 +100,7 @@ class Window:
|
|||
# HistoryNode(step=msg_step, observation=None, depth=0, active=False)
|
||||
# )
|
||||
|
||||
if self._error_loading_config is not None:
|
||||
await self.ide.setFileOpen(getConfigFilePath())
|
||||
await self.ide.showMessage(
|
||||
f"""We found an error while loading your config.py. For now, Continue is falling back to the default configuration. If you need help solving this error, please reach out to us on Discord by clicking the question mark button in the bottom right.\n\n{self._error_loading_config}"""
|
||||
)
|
||||
self._error_loading_config = None
|
||||
await self.display_config_error()
|
||||
|
||||
if not self.config.disable_indexing:
|
||||
|
||||
|
|
@ -142,6 +145,8 @@ class Window:
|
|||
if self.gui is not None:
|
||||
await self.gui.send_config_update()
|
||||
|
||||
await self.display_config_error()
|
||||
|
||||
self.ide.subscribeToFileSaved(onFileSavedCallback)
|
||||
|
||||
async def onDebugCallback(terminal_contents: str):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue