mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 04:11:10 -05:00
Warnings and error handling
This commit is contained in:
@@ -13,7 +13,8 @@ export function checkExistKey(config: ApiConfiguration | undefined) {
|
|||||||
config.lmStudioModelId,
|
config.lmStudioModelId,
|
||||||
config.geminiApiKey,
|
config.geminiApiKey,
|
||||||
config.openAiNativeApiKey,
|
config.openAiNativeApiKey,
|
||||||
config.deepSeekApiKey
|
config.deepSeekApiKey,
|
||||||
|
config.vsCodeLmModelSelector,
|
||||||
].some((key) => key !== undefined)
|
].some((key) => key !== undefined)
|
||||||
: false;
|
: false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,9 +147,9 @@ const ApiOptions = ({ apiErrorMessage, modelIdErrorMessage }: ApiOptionsProps) =
|
|||||||
<VSCodeOption value="vertex">GCP Vertex AI</VSCodeOption>
|
<VSCodeOption value="vertex">GCP Vertex AI</VSCodeOption>
|
||||||
<VSCodeOption value="bedrock">AWS Bedrock</VSCodeOption>
|
<VSCodeOption value="bedrock">AWS Bedrock</VSCodeOption>
|
||||||
<VSCodeOption value="glama">Glama</VSCodeOption>
|
<VSCodeOption value="glama">Glama</VSCodeOption>
|
||||||
|
<VSCodeOption value="vscode-lm">VS Code LM API</VSCodeOption>
|
||||||
<VSCodeOption value="lmstudio">LM Studio</VSCodeOption>
|
<VSCodeOption value="lmstudio">LM Studio</VSCodeOption>
|
||||||
<VSCodeOption value="ollama">Ollama</VSCodeOption>
|
<VSCodeOption value="ollama">Ollama</VSCodeOption>
|
||||||
<VSCodeOption value="vscode-lm">VS Code LM API</VSCodeOption>
|
|
||||||
</VSCodeDropdown>
|
</VSCodeDropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -661,10 +661,20 @@ const ApiOptions = ({ apiErrorMessage, modelIdErrorMessage }: ApiOptionsProps) =
|
|||||||
marginTop: "5px",
|
marginTop: "5px",
|
||||||
color: "var(--vscode-descriptionForeground)",
|
color: "var(--vscode-descriptionForeground)",
|
||||||
}}>
|
}}>
|
||||||
No language models available.<br />
|
The VS Code Language Model API allows you to run models provided by other VS Code extensions (including but not limited to GitHub Copilot).
|
||||||
You can use any VS Code extension that provides language model capabilities.
|
The easiest way to get started is to install the Copilot and Copilot Chat extensions from the VS Code Marketplace.
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<p
|
||||||
|
style={{
|
||||||
|
fontSize: "12px",
|
||||||
|
marginTop: "5px",
|
||||||
|
color: "var(--vscode-errorForeground)",
|
||||||
|
fontWeight: 500,
|
||||||
|
}}>
|
||||||
|
Note: This is a very experimental integration and may not work as expected. Please report any issues to the Roo-Cline GitHub repository.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ export function validateApiConfiguration(apiConfiguration?: ApiConfiguration): s
|
|||||||
return "You must provide a valid model ID."
|
return "You must provide a valid model ID."
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
case "vscode-lm":
|
||||||
|
if (!apiConfiguration.vsCodeLmModelSelector) {
|
||||||
|
return "You must provide a valid model selector."
|
||||||
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return undefined
|
return undefined
|
||||||
|
|||||||
Reference in New Issue
Block a user