From 165175be20d1d74a9c8821679e65e21f482928d1 Mon Sep 17 00:00:00 2001 From: "dayuan.jiang" Date: Mon, 12 Oct 2026 08:18:02 +0900 Subject: [PATCH] chore: update comments that mentioned the removed preset system and useObject --- lib/ai-providers.ts | 5 ++--- lib/diagram-validator.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/ai-providers.ts b/lib/ai-providers.ts index 0258b7f3..c436901c 100644 --- a/lib/ai-providers.ts +++ b/lib/ai-providers.ts @@ -984,8 +984,7 @@ export function getAIModel(clientOverrides?: ClientOverrides): ModelConfig { // Like other providers, a user's key never goes to the server's // base URL: without a URL of their own it goes to Ollama Cloud. // The server's key goes to OLLAMA_BASE_URL (or a server model's - // own variable), else to the SDK's local default: the desktop - // app's "Ollama (Local)" preset puts its key field there too. + // own variable), else to the SDK's local default. const baseURL = overrides?.baseUrl || (overrides?.apiKey @@ -1154,7 +1153,7 @@ export function usesServerCredentials( provider: ProviderName, overrides?: ClientOverrides, ): boolean { - // The desktop app's local server holds the user's own preset keys + // The desktop app's local server only has the user's own keys (its .env) if (process.env.NEXT_AI_DRAWIO_DESKTOP === "1") return false // Cleaned like getAIModel does: "/" means no base URL const baseUrl = normalizeBaseUrl(overrides?.baseUrl ?? "") diff --git a/lib/diagram-validator.ts b/lib/diagram-validator.ts index 5d3301b5..d50b7d55 100644 --- a/lib/diagram-validator.ts +++ b/lib/diagram-validator.ts @@ -1,6 +1,6 @@ /** * Types and utilities for VLM-based diagram validation. - * The actual validation is performed via useValidateDiagram hook using AI SDK's useObject. + * The validation itself runs in the useValidateDiagram hook (a JSON request to /api/validate-diagram). */ // Re-export types from the schema file (single source of truth)