diff --git a/src/commands/doctor/shared/legacy-x-search-migrate.ts b/src/commands/doctor/shared/legacy-x-search-migrate.ts index 3ec25bd6719..7c7b447dd99 100644 --- a/src/commands/doctor/shared/legacy-x-search-migrate.ts +++ b/src/commands/doctor/shared/legacy-x-search-migrate.ts @@ -1,13 +1,11 @@ +import { isRecord } from "./legacy-config-record-shared.js"; + type JsonRecord = Record; const XAI_PLUGIN_ID = "xai"; const X_SEARCH_LEGACY_PATH = "tools.web.x_search"; const XAI_WEB_SEARCH_PLUGIN_KEY_PATH = `plugins.entries.${XAI_PLUGIN_ID}.config.webSearch.apiKey`; -function isRecord(value: unknown): value is JsonRecord { - return typeof value === "object" && value !== null && !Array.isArray(value); -} - function cloneRecord(value: T): T { if (!value) { return value;