mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 18:30:39 +09:00
Fix remaining OpenCode review comments
This commit is contained in:
parent
69c453b274
commit
f4f9d6fd3f
4 changed files with 99 additions and 70 deletions
|
|
@ -149,6 +149,8 @@ export function OnboardingWizard() {
|
|||
const {
|
||||
data: adapterModels,
|
||||
error: adapterModelsError,
|
||||
isLoading: adapterModelsLoading,
|
||||
isFetching: adapterModelsFetching,
|
||||
} = useQuery({
|
||||
queryKey:
|
||||
createdCompanyId
|
||||
|
|
@ -332,6 +334,10 @@ export function OnboardingWizard() {
|
|||
);
|
||||
return;
|
||||
}
|
||||
if (adapterModelsLoading || adapterModelsFetching) {
|
||||
setError("OpenCode models are still loading. Please wait and try again.");
|
||||
return;
|
||||
}
|
||||
const discoveredModels = adapterModels ?? [];
|
||||
if (!discoveredModels.some((entry) => entry.id === selectedModelId)) {
|
||||
setError(
|
||||
|
|
|
|||
|
|
@ -12,5 +12,5 @@ export function extractProviderIdWithFallback(modelId: string, fallback = "other
|
|||
export function extractModelName(modelId: string): string {
|
||||
const trimmed = modelId.trim();
|
||||
if (!trimmed.includes("/")) return trimmed;
|
||||
return trimmed.slice(trimmed.indexOf("/") + 1);
|
||||
return trimmed.slice(trimmed.indexOf("/") + 1).trim();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue