Address PR feedback for OpenCode integration

This commit is contained in:
Konan69
2026-03-05 15:52:59 +01:00
parent 6a101e0da1
commit 69c453b274
12 changed files with 87 additions and 55 deletions

View File

@@ -58,6 +58,8 @@ export function NewAgentDialog() {
const {
data: adapterModels,
error: adapterModelsError,
isLoading: adapterModelsLoading,
isFetching: adapterModelsFetching,
} = useQuery({
queryKey:
selectedCompanyId
@@ -126,6 +128,10 @@ export function NewAgentDialog() {
);
return;
}
if (adapterModelsLoading || adapterModelsFetching) {
setFormError("OpenCode models are still loading. Please wait and try again.");
return;
}
const discovered = adapterModels ?? [];
if (!discovered.some((entry) => entry.id === selectedModel)) {
setFormError(