Compare commits

...
Author SHA1 Message Date
Sarah Fortune 08aba8974c temp 2025-12-19 10:10:46 -08:00
14 changed files with 585 additions and 356 deletions
+54 -36
View File
@@ -1186,7 +1186,6 @@
"integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/code-frame": "^7.27.1",
"@babel/generator": "^7.28.3",
@@ -2649,7 +2648,6 @@
"node_modules/@grpc/grpc-js": {
"version": "1.9.15",
"license": "Apache-2.0",
"peer": true,
"dependencies": {
"@grpc/proto-loader": "^0.7.8",
"@types/node": ">=12.12.47"
@@ -3221,7 +3219,6 @@
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.22.0.tgz",
"integrity": "sha512-VUpl106XVTCpDmTBil2ehgJZjhyLY2QZikzF8NvTXtLRF1CvO5iEE2UNZdVIUer35vFOwMKYeUGbjJtvPWan3g==",
"license": "MIT",
"peer": true,
"dependencies": {
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1",
@@ -3283,7 +3280,6 @@
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz",
"integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==",
"license": "Apache-2.0",
"peer": true,
"engines": {
"node": ">=8.0.0"
}
@@ -4899,7 +4895,8 @@
"optional": true,
"os": [
"android"
]
],
"peer": true
},
"node_modules/@rollup/rollup-android-arm64": {
"version": "4.52.4",
@@ -4912,7 +4909,8 @@
"optional": true,
"os": [
"android"
]
],
"peer": true
},
"node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.52.4",
@@ -4925,7 +4923,8 @@
"optional": true,
"os": [
"darwin"
]
],
"peer": true
},
"node_modules/@rollup/rollup-darwin-x64": {
"version": "4.52.4",
@@ -4938,7 +4937,8 @@
"optional": true,
"os": [
"darwin"
]
],
"peer": true
},
"node_modules/@rollup/rollup-freebsd-arm64": {
"version": "4.52.4",
@@ -4951,7 +4951,8 @@
"optional": true,
"os": [
"freebsd"
]
],
"peer": true
},
"node_modules/@rollup/rollup-freebsd-x64": {
"version": "4.52.4",
@@ -4964,7 +4965,8 @@
"optional": true,
"os": [
"freebsd"
]
],
"peer": true
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.52.4",
@@ -4977,7 +4979,8 @@
"optional": true,
"os": [
"linux"
]
],
"peer": true
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.52.4",
@@ -4990,7 +4993,8 @@
"optional": true,
"os": [
"linux"
]
],
"peer": true
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.52.4",
@@ -5003,7 +5007,8 @@
"optional": true,
"os": [
"linux"
]
],
"peer": true
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.52.4",
@@ -5016,7 +5021,8 @@
"optional": true,
"os": [
"linux"
]
],
"peer": true
},
"node_modules/@rollup/rollup-linux-loong64-gnu": {
"version": "4.52.4",
@@ -5029,7 +5035,8 @@
"optional": true,
"os": [
"linux"
]
],
"peer": true
},
"node_modules/@rollup/rollup-linux-ppc64-gnu": {
"version": "4.52.4",
@@ -5042,7 +5049,8 @@
"optional": true,
"os": [
"linux"
]
],
"peer": true
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.52.4",
@@ -5055,7 +5063,8 @@
"optional": true,
"os": [
"linux"
]
],
"peer": true
},
"node_modules/@rollup/rollup-linux-riscv64-musl": {
"version": "4.52.4",
@@ -5068,7 +5077,8 @@
"optional": true,
"os": [
"linux"
]
],
"peer": true
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.52.4",
@@ -5081,7 +5091,8 @@
"optional": true,
"os": [
"linux"
]
],
"peer": true
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.52.4",
@@ -5094,7 +5105,8 @@
"optional": true,
"os": [
"linux"
]
],
"peer": true
},
"node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.52.4",
@@ -5107,7 +5119,8 @@
"optional": true,
"os": [
"linux"
]
],
"peer": true
},
"node_modules/@rollup/rollup-openharmony-arm64": {
"version": "4.52.4",
@@ -5120,7 +5133,8 @@
"optional": true,
"os": [
"openharmony"
]
],
"peer": true
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.52.4",
@@ -5133,7 +5147,8 @@
"optional": true,
"os": [
"win32"
]
],
"peer": true
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.52.4",
@@ -5146,7 +5161,8 @@
"optional": true,
"os": [
"win32"
]
],
"peer": true
},
"node_modules/@rollup/rollup-win32-x64-gnu": {
"version": "4.52.4",
@@ -5159,7 +5175,8 @@
"optional": true,
"os": [
"win32"
]
],
"peer": true
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.52.4",
@@ -5172,7 +5189,8 @@
"optional": true,
"os": [
"win32"
]
],
"peer": true
},
"node_modules/@sap-ai-sdk/ai-api": {
"version": "2.1.0",
@@ -6671,7 +6689,8 @@
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
"license": "MIT"
"license": "MIT",
"peer": true
},
"node_modules/@types/get-folder-size": {
"version": "3.0.4",
@@ -6696,7 +6715,6 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.21.tgz",
"integrity": "sha512-CsGG2P3I5y48RPMfprQGfy4JPRZ6csfC3ltBZSRItG3ngggmNY/qs2uZKp4p9VbrpqNNSMzUZNFZKzgOGnd/VA==",
"license": "MIT",
"peer": true,
"dependencies": {
"undici-types": "~6.21.0"
}
@@ -7394,7 +7412,6 @@
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"license": "MIT",
"peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -8161,7 +8178,6 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.8.3",
"caniuse-lite": "^1.0.30001741",
@@ -9365,8 +9381,7 @@
},
"node_modules/devtools-protocol": {
"version": "0.0.1342118",
"license": "BSD-3-Clause",
"peer": true
"license": "BSD-3-Clause"
},
"node_modules/diff": {
"version": "5.2.0",
@@ -12332,7 +12347,6 @@
"resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz",
"integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==",
"license": "MIT",
"peer": true,
"bin": {
"jiti": "lib/jiti-cli.mjs"
}
@@ -12561,7 +12575,6 @@
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.1.tgz",
"integrity": "sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==",
"license": "MPL-2.0",
"peer": true,
"dependencies": {
"detect-libc": "^2.0.3"
},
@@ -15442,6 +15455,7 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"nanoid": "^3.3.11",
"picocolors": "^1.1.1",
@@ -15462,6 +15476,7 @@
}
],
"license": "MIT",
"peer": true,
"bin": {
"nanoid": "bin/nanoid.cjs"
},
@@ -16129,6 +16144,7 @@
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.4.tgz",
"integrity": "sha512-CLEVl+MnPAiKh5pl4dEWSyMTpuflgNQiLGhMv8ezD5W/qP8AKvmYpCOKRRNOh7oRKnauBZ4SyeYkMS+1VSyKwQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"@types/estree": "1.0.8"
},
@@ -17565,6 +17581,7 @@
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
"integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"fdir": "^6.5.0",
"picomatch": "^4.0.3"
@@ -17581,6 +17598,7 @@
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=12.0.0"
},
@@ -17944,7 +17962,6 @@
"version": "5.5.3",
"dev": true,
"license": "Apache-2.0",
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -18204,6 +18221,7 @@
"resolved": "https://registry.npmjs.org/vite/-/vite-7.2.2.tgz",
"integrity": "sha512-BxAKBWmIbrDgrokdGZH1IgkIk/5mMHDreLDmCJ0qpyJaAteP8NvMhkwr/ZCQNqNH97bw/dANTE9PDzqwJghfMQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"esbuild": "^0.25.0",
"fdir": "^6.5.0",
@@ -18278,6 +18296,7 @@
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=12.0.0"
},
@@ -18973,7 +18992,6 @@
"node_modules/zod": {
"version": "3.25.76",
"license": "MIT",
"peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
+2 -2
View File
@@ -32,7 +32,7 @@ import { getLatestAnnouncementId } from "./utils/announcements"
*/
export async function initialize(context: vscode.ExtensionContext): Promise<WebviewProvider> {
try {
await StateManager.initialize(context)
await StateManager.initialize()
} catch (error) {
console.error("[Controller] CRITICAL: Failed to initialize StateManager - extension may not function properly:", error)
HostProvider.window.showMessage({
@@ -58,7 +58,7 @@ export async function initialize(context: vscode.ExtensionContext): Promise<Webv
await migrateWelcomeViewCompleted(context)
// Migrate workspace storage values back to global storage (reverting previous migration)
await migrateWorkspaceToGlobalStorage(context)
await migrateWorkspaceToGlobalStorage()
// Ensure taskHistory.json exists and migrate legacy state (runs once)
await migrateTaskHistoryToFile(context)
+11 -15
View File
@@ -13,7 +13,6 @@ import {
SettingsKey,
} from "@shared/storage/state-keys"
import chokidar, { FSWatcher } from "chokidar"
import type { ExtensionContext } from "vscode"
import { HostProvider } from "@/hosts/host-provider"
import { ShowMessageType } from "@/shared/proto/index.host"
import {
@@ -41,7 +40,6 @@ export class StateManager {
private remoteConfigCache: Partial<RemoteConfigFields> = {} as RemoteConfigFields
private secretsCache: Secrets = {} as Secrets
private workspaceStateCache: LocalState = {} as LocalState
private context: ExtensionContext
private isInitialized = false
// In-memory model info cache (not persisted to disk)
@@ -83,16 +81,14 @@ export class StateManager {
// Callback to sync external state changes with the UI client
onSyncExternalChange?: () => void | Promise<void>
private constructor(context: ExtensionContext) {
this.context = context
}
private constructor() {}
/**
* Initialize the cache by loading data from disk
*/
public static async initialize(context: ExtensionContext): Promise<StateManager> {
public static async initialize(): Promise<StateManager> {
if (!StateManager.instance) {
StateManager.instance = new StateManager(context)
StateManager.instance = new StateManager()
}
if (StateManager.instance.isInitialized) {
@@ -101,9 +97,9 @@ export class StateManager {
try {
// Load all extension state from disk
const globalState = await readGlobalStateFromDisk(StateManager.instance.context)
const secrets = await readSecretsFromDisk(StateManager.instance.context)
const workspaceState = await readWorkspaceStateFromDisk(StateManager.instance.context)
const globalState = await readGlobalStateFromDisk()
const secrets = await readSecretsFromDisk()
const workspaceState = await readWorkspaceStateFromDisk()
// Populate the cache with all extension state and secrets fields
// Use populate method to avoid triggering persistence during initialization
@@ -874,7 +870,7 @@ export class StateManager {
this.dispose()
// Reinitialize from disk
await StateManager.initialize(this.context)
await StateManager.initialize()
// If there's an active task, reload its settings
if (currentTaskId) {
@@ -990,7 +986,7 @@ export class StateManager {
// Route task history persistence to file, not VS Code globalState
return writeTaskHistoryToState(this.globalStateCache[key])
}
return this.context.globalState.update(key, this.globalStateCache[key])
return HostProvider.globalSettings.put(key, this.globalStateCache[key])
}),
)
} catch (error) {
@@ -1038,9 +1034,9 @@ export class StateManager {
Array.from(keys).map((key) => {
const value = this.secretsCache[key]
if (value) {
return this.context.secrets.store(key, value)
return HostProvider.secrets.put(key, value)
} else {
return this.context.secrets.delete(key)
return HostProvider.secrets.delete(key)
}
}),
)
@@ -1058,7 +1054,7 @@ export class StateManager {
await Promise.all(
Array.from(keys).map((key) => {
const value = this.workspaceStateCache[key]
return this.context.workspaceState.update(key, value)
return HostProvider.workspaceSettings.put(key, value)
}),
)
} catch (error) {
+18
View File
@@ -0,0 +1,18 @@
export interface SettingsStore {
get<T>(key: string): Promise<T | undefined>
put<T>(key: string, value: T): Promise<void>
keys(): readonly string[]
delete(key: string): Promise<void>
}
export interface SecretStore {
get(key: string): Promise<string | undefined>
put(key: string, value: string): Promise<void>
delete(key: string): Promise<void>
}
export interface Settings {
globalSettings: SettingsStore
workspaceSettings: SettingsStore
secrets: SecretStore
}
+1 -2
View File
@@ -1,10 +1,9 @@
import fs from "fs/promises"
import path from "path"
import * as vscode from "vscode"
import { HistoryItem } from "@/shared/HistoryItem"
import { ensureRulesDirectoryExists, readTaskHistoryFromState, writeTaskHistoryToState } from "./disk"
export async function migrateWorkspaceToGlobalStorage(context: vscode.ExtensionContext) {
export async function migrateWorkspaceToGlobalStorage() {
// Keys to migrate from workspace storage back to global storage
const keysToMigrate = [
// Core settings
+285 -240
View File
@@ -1,8 +1,8 @@
import { ANTHROPIC_MIN_THINKING_BUDGET, ApiProvider, fireworksDefaultModelId, type OcaModelInfo } from "@shared/api"
import { GlobalStateAndSettings, LocalState, SecretKey, Secrets } from "@shared/storage/state-keys"
import { ExtensionContext } from "vscode"
import { Controller } from "@/core/controller"
import { getHooksEnabledSafe } from "@/core/hooks/hooks-utils"
import { HostProvider } from "@/hosts/host-provider"
import { DEFAULT_AUTO_APPROVAL_SETTINGS } from "@/shared/AutoApprovalSettings"
import { DEFAULT_BROWSER_SETTINGS } from "@/shared/BrowserSettings"
import { ClineRulesToggles } from "@/shared/cline-rules"
@@ -11,7 +11,7 @@ import { DEFAULT_FOCUS_CHAIN_SETTINGS } from "@/shared/FocusChainSettings"
import { DEFAULT_MCP_DISPLAY_MODE } from "@/shared/McpDisplayMode"
import { OpenaiReasoningEffort } from "@/shared/storage/types"
import { readTaskHistoryFromState } from "../disk"
export async function readSecretsFromDisk(context: ExtensionContext): Promise<Secrets> {
export async function readSecretsFromDisk(): Promise<Secrets> {
const [
apiKey,
openRouterApiKey,
@@ -58,50 +58,50 @@ export async function readSecretsFromDisk(context: ExtensionContext): Promise<Se
mcpOAuthSecrets,
nousResearchApiKey,
] = await Promise.all([
context.secrets.get("apiKey") as Promise<Secrets["apiKey"]>,
context.secrets.get("openRouterApiKey") as Promise<Secrets["openRouterApiKey"]>,
context.secrets.get("clineAccountId") as Promise<Secrets["clineAccountId"]>,
context.secrets.get("cline:clineAccountId") as Promise<Secrets["cline:clineAccountId"]>,
context.secrets.get("awsAccessKey") as Promise<Secrets["awsAccessKey"]>,
context.secrets.get("awsSecretKey") as Promise<Secrets["awsSecretKey"]>,
context.secrets.get("awsSessionToken") as Promise<Secrets["awsSessionToken"]>,
context.secrets.get("awsBedrockApiKey") as Promise<Secrets["awsBedrockApiKey"]>,
context.secrets.get("openAiApiKey") as Promise<Secrets["openAiApiKey"]>,
context.secrets.get("geminiApiKey") as Promise<Secrets["geminiApiKey"]>,
context.secrets.get("openAiNativeApiKey") as Promise<Secrets["openAiNativeApiKey"]>,
context.secrets.get("deepSeekApiKey") as Promise<Secrets["deepSeekApiKey"]>,
context.secrets.get("requestyApiKey") as Promise<Secrets["requestyApiKey"]>,
context.secrets.get("togetherApiKey") as Promise<Secrets["togetherApiKey"]>,
context.secrets.get("qwenApiKey") as Promise<Secrets["qwenApiKey"]>,
context.secrets.get("doubaoApiKey") as Promise<Secrets["doubaoApiKey"]>,
context.secrets.get("mistralApiKey") as Promise<Secrets["mistralApiKey"]>,
context.secrets.get("fireworksApiKey") as Promise<Secrets["fireworksApiKey"]>,
context.secrets.get("liteLlmApiKey") as Promise<Secrets["liteLlmApiKey"]>,
context.secrets.get("remoteLiteLlmApiKey") as Promise<Secrets["remoteLiteLlmApiKey"]>,
context.secrets.get("asksageApiKey") as Promise<Secrets["asksageApiKey"]>,
context.secrets.get("xaiApiKey") as Promise<Secrets["xaiApiKey"]>,
context.secrets.get("sambanovaApiKey") as Promise<Secrets["sambanovaApiKey"]>,
context.secrets.get("cerebrasApiKey") as Promise<Secrets["cerebrasApiKey"]>,
context.secrets.get("groqApiKey") as Promise<Secrets["groqApiKey"]>,
context.secrets.get("moonshotApiKey") as Promise<Secrets["moonshotApiKey"]>,
context.secrets.get("nebiusApiKey") as Promise<Secrets["nebiusApiKey"]>,
context.secrets.get("huggingFaceApiKey") as Promise<Secrets["huggingFaceApiKey"]>,
context.secrets.get("sapAiCoreClientId") as Promise<Secrets["sapAiCoreClientId"]>,
context.secrets.get("sapAiCoreClientSecret") as Promise<Secrets["sapAiCoreClientSecret"]>,
context.secrets.get("huaweiCloudMaasApiKey") as Promise<Secrets["huaweiCloudMaasApiKey"]>,
context.secrets.get("basetenApiKey") as Promise<Secrets["basetenApiKey"]>,
context.secrets.get("zaiApiKey") as Promise<Secrets["zaiApiKey"]>,
context.secrets.get("ollamaApiKey") as Promise<Secrets["ollamaApiKey"]>,
context.secrets.get("vercelAiGatewayApiKey") as Promise<Secrets["vercelAiGatewayApiKey"]>,
context.secrets.get("difyApiKey") as Promise<Secrets["difyApiKey"]>,
context.secrets.get("authNonce") as Promise<Secrets["authNonce"]>,
context.secrets.get("ocaApiKey") as Promise<string | undefined>,
context.secrets.get("ocaRefreshToken") as Promise<string | undefined>,
context.secrets.get("minimaxApiKey") as Promise<Secrets["minimaxApiKey"]>,
context.secrets.get("hicapApiKey") as Promise<Secrets["hicapApiKey"]>,
context.secrets.get("aihubmixApiKey") as Promise<Secrets["aihubmixApiKey"]>,
context.secrets.get("mcpOAuthSecrets") as Promise<Secrets["mcpOAuthSecrets"]>,
context.secrets.get("nousResearchApiKey") as Promise<Secrets["nousResearchApiKey"]>,
HostProvider.secrets.get("apiKey") as Promise<Secrets["apiKey"]>,
HostProvider.secrets.get("openRouterApiKey") as Promise<Secrets["openRouterApiKey"]>,
HostProvider.secrets.get("clineAccountId") as Promise<Secrets["clineAccountId"]>,
HostProvider.secrets.get("cline:clineAccountId") as Promise<Secrets["cline:clineAccountId"]>,
HostProvider.secrets.get("awsAccessKey") as Promise<Secrets["awsAccessKey"]>,
HostProvider.secrets.get("awsSecretKey") as Promise<Secrets["awsSecretKey"]>,
HostProvider.secrets.get("awsSessionToken") as Promise<Secrets["awsSessionToken"]>,
HostProvider.secrets.get("awsBedrockApiKey") as Promise<Secrets["awsBedrockApiKey"]>,
HostProvider.secrets.get("openAiApiKey") as Promise<Secrets["openAiApiKey"]>,
HostProvider.secrets.get("geminiApiKey") as Promise<Secrets["geminiApiKey"]>,
HostProvider.secrets.get("openAiNativeApiKey") as Promise<Secrets["openAiNativeApiKey"]>,
HostProvider.secrets.get("deepSeekApiKey") as Promise<Secrets["deepSeekApiKey"]>,
HostProvider.secrets.get("requestyApiKey") as Promise<Secrets["requestyApiKey"]>,
HostProvider.secrets.get("togetherApiKey") as Promise<Secrets["togetherApiKey"]>,
HostProvider.secrets.get("qwenApiKey") as Promise<Secrets["qwenApiKey"]>,
HostProvider.secrets.get("doubaoApiKey") as Promise<Secrets["doubaoApiKey"]>,
HostProvider.secrets.get("mistralApiKey") as Promise<Secrets["mistralApiKey"]>,
HostProvider.secrets.get("fireworksApiKey") as Promise<Secrets["fireworksApiKey"]>,
HostProvider.secrets.get("liteLlmApiKey") as Promise<Secrets["liteLlmApiKey"]>,
HostProvider.secrets.get("remoteLiteLlmApiKey") as Promise<Secrets["remoteLiteLlmApiKey"]>,
HostProvider.secrets.get("asksageApiKey") as Promise<Secrets["asksageApiKey"]>,
HostProvider.secrets.get("xaiApiKey") as Promise<Secrets["xaiApiKey"]>,
HostProvider.secrets.get("sambanovaApiKey") as Promise<Secrets["sambanovaApiKey"]>,
HostProvider.secrets.get("cerebrasApiKey") as Promise<Secrets["cerebrasApiKey"]>,
HostProvider.secrets.get("groqApiKey") as Promise<Secrets["groqApiKey"]>,
HostProvider.secrets.get("moonshotApiKey") as Promise<Secrets["moonshotApiKey"]>,
HostProvider.secrets.get("nebiusApiKey") as Promise<Secrets["nebiusApiKey"]>,
HostProvider.secrets.get("huggingFaceApiKey") as Promise<Secrets["huggingFaceApiKey"]>,
HostProvider.secrets.get("sapAiCoreClientId") as Promise<Secrets["sapAiCoreClientId"]>,
HostProvider.secrets.get("sapAiCoreClientSecret") as Promise<Secrets["sapAiCoreClientSecret"]>,
HostProvider.secrets.get("huaweiCloudMaasApiKey") as Promise<Secrets["huaweiCloudMaasApiKey"]>,
HostProvider.secrets.get("basetenApiKey") as Promise<Secrets["basetenApiKey"]>,
HostProvider.secrets.get("zaiApiKey") as Promise<Secrets["zaiApiKey"]>,
HostProvider.secrets.get("ollamaApiKey") as Promise<Secrets["ollamaApiKey"]>,
HostProvider.secrets.get("vercelAiGatewayApiKey") as Promise<Secrets["vercelAiGatewayApiKey"]>,
HostProvider.secrets.get("difyApiKey") as Promise<Secrets["difyApiKey"]>,
HostProvider.secrets.get("authNonce") as Promise<Secrets["authNonce"]>,
HostProvider.secrets.get("ocaApiKey") as Promise<string | undefined>,
HostProvider.secrets.get("ocaRefreshToken") as Promise<string | undefined>,
HostProvider.secrets.get("minimaxApiKey") as Promise<Secrets["minimaxApiKey"]>,
HostProvider.secrets.get("hicapApiKey") as Promise<Secrets["hicapApiKey"]>,
HostProvider.secrets.get("aihubmixApiKey") as Promise<Secrets["aihubmixApiKey"]>,
HostProvider.secrets.get("mcpOAuthSecrets") as Promise<Secrets["mcpOAuthSecrets"]>,
HostProvider.secrets.get("nousResearchApiKey") as Promise<Secrets["nousResearchApiKey"]>,
])
return {
@@ -152,12 +152,12 @@ export async function readSecretsFromDisk(context: ExtensionContext): Promise<Se
}
}
export async function readWorkspaceStateFromDisk(context: ExtensionContext): Promise<LocalState> {
const localClineRulesToggles = context.workspaceState.get("localClineRulesToggles") as ClineRulesToggles | undefined
const localWindsurfRulesToggles = context.workspaceState.get("localWindsurfRulesToggles") as ClineRulesToggles | undefined
const localCursorRulesToggles = context.workspaceState.get("localCursorRulesToggles") as ClineRulesToggles | undefined
const localAgentsRulesToggles = context.workspaceState.get("localAgentsRulesToggles") as ClineRulesToggles | undefined
const localWorkflowToggles = context.workspaceState.get("workflowToggles") as ClineRulesToggles | undefined
export async function readWorkspaceStateFromDisk(): Promise<LocalState> {
const localClineRulesToggles = await HostProvider.workspaceSettings.get<ClineRulesToggles>("localClineRulesToggles")
const localWindsurfRulesToggles = await HostProvider.workspaceSettings.get<ClineRulesToggles>("localWindsurfRulesToggles")
const localCursorRulesToggles = await HostProvider.workspaceSettings.get<ClineRulesToggles>("localCursorRulesToggles")
const localAgentsRulesToggles = await HostProvider.workspaceSettings.get<ClineRulesToggles>("localAgentsRulesToggles")
const localWorkflowToggles = await HostProvider.workspaceSettings.get<ClineRulesToggles>("workflowToggles")
return {
localClineRulesToggles: localClineRulesToggles || {},
@@ -168,313 +168,361 @@ export async function readWorkspaceStateFromDisk(context: ExtensionContext): Pro
}
}
export async function readGlobalStateFromDisk(context: ExtensionContext): Promise<GlobalStateAndSettings> {
export async function readGlobalStateFromDisk(): Promise<GlobalStateAndSettings> {
try {
// Get all global state values
const strictPlanModeEnabled =
context.globalState.get<GlobalStateAndSettings["strictPlanModeEnabled"]>("strictPlanModeEnabled")
const yoloModeToggled = context.globalState.get<GlobalStateAndSettings["yoloModeToggled"]>("yoloModeToggled")
const useAutoCondense = context.globalState.get<GlobalStateAndSettings["useAutoCondense"]>("useAutoCondense")
HostProvider.globalSettings.get<GlobalStateAndSettings["strictPlanModeEnabled"]>("strictPlanModeEnabled")
const yoloModeToggled = HostProvider.globalSettings.get<GlobalStateAndSettings["yoloModeToggled"]>("yoloModeToggled")
const useAutoCondense = HostProvider.globalSettings.get<GlobalStateAndSettings["useAutoCondense"]>("useAutoCondense")
const clineWebToolsEnabled =
context.globalState.get<GlobalStateAndSettings["clineWebToolsEnabled"]>("clineWebToolsEnabled")
const isNewUser = context.globalState.get<GlobalStateAndSettings["isNewUser"]>("isNewUser")
HostProvider.globalSettings.get<GlobalStateAndSettings["clineWebToolsEnabled"]>("clineWebToolsEnabled")
const isNewUser = HostProvider.globalSettings.get<GlobalStateAndSettings["isNewUser"]>("isNewUser")
const welcomeViewCompleted =
context.globalState.get<GlobalStateAndSettings["welcomeViewCompleted"]>("welcomeViewCompleted")
const awsRegion = context.globalState.get<GlobalStateAndSettings["awsRegion"]>("awsRegion")
HostProvider.globalSettings.get<GlobalStateAndSettings["welcomeViewCompleted"]>("welcomeViewCompleted")
const awsRegion = HostProvider.globalSettings.get<GlobalStateAndSettings["awsRegion"]>("awsRegion")
const awsUseCrossRegionInference =
context.globalState.get<GlobalStateAndSettings["awsUseCrossRegionInference"]>("awsUseCrossRegionInference")
HostProvider.globalSettings.get<GlobalStateAndSettings["awsUseCrossRegionInference"]>("awsUseCrossRegionInference")
const awsUseGlobalInference =
context.globalState.get<GlobalStateAndSettings["awsUseGlobalInference"]>("awsUseGlobalInference")
HostProvider.globalSettings.get<GlobalStateAndSettings["awsUseGlobalInference"]>("awsUseGlobalInference")
const awsBedrockUsePromptCache =
context.globalState.get<GlobalStateAndSettings["awsBedrockUsePromptCache"]>("awsBedrockUsePromptCache")
const awsBedrockEndpoint = context.globalState.get<GlobalStateAndSettings["awsBedrockEndpoint"]>("awsBedrockEndpoint")
const awsProfile = context.globalState.get<GlobalStateAndSettings["awsProfile"]>("awsProfile")
const awsUseProfile = context.globalState.get<GlobalStateAndSettings["awsUseProfile"]>("awsUseProfile")
const awsAuthentication = context.globalState.get<GlobalStateAndSettings["awsAuthentication"]>("awsAuthentication")
const vertexProjectId = context.globalState.get<GlobalStateAndSettings["vertexProjectId"]>("vertexProjectId")
const vertexRegion = context.globalState.get<GlobalStateAndSettings["vertexRegion"]>("vertexRegion")
const openAiBaseUrl = context.globalState.get<GlobalStateAndSettings["openAiBaseUrl"]>("openAiBaseUrl")
const requestyBaseUrl = context.globalState.get<GlobalStateAndSettings["requestyBaseUrl"]>("requestyBaseUrl")
const openAiHeaders = context.globalState.get<GlobalStateAndSettings["openAiHeaders"]>("openAiHeaders")
const ollamaBaseUrl = context.globalState.get<GlobalStateAndSettings["ollamaBaseUrl"]>("ollamaBaseUrl")
HostProvider.globalSettings.get<GlobalStateAndSettings["awsBedrockUsePromptCache"]>("awsBedrockUsePromptCache")
const awsBedrockEndpoint =
HostProvider.globalSettings.get<GlobalStateAndSettings["awsBedrockEndpoint"]>("awsBedrockEndpoint")
const awsProfile = HostProvider.globalSettings.get<GlobalStateAndSettings["awsProfile"]>("awsProfile")
const awsUseProfile = HostProvider.globalSettings.get<GlobalStateAndSettings["awsUseProfile"]>("awsUseProfile")
const awsAuthentication =
HostProvider.globalSettings.get<GlobalStateAndSettings["awsAuthentication"]>("awsAuthentication")
const vertexProjectId = HostProvider.globalSettings.get<GlobalStateAndSettings["vertexProjectId"]>("vertexProjectId")
const vertexRegion = HostProvider.globalSettings.get<GlobalStateAndSettings["vertexRegion"]>("vertexRegion")
const openAiBaseUrl = HostProvider.globalSettings.get<GlobalStateAndSettings["openAiBaseUrl"]>("openAiBaseUrl")
const requestyBaseUrl = HostProvider.globalSettings.get<GlobalStateAndSettings["requestyBaseUrl"]>("requestyBaseUrl")
const openAiHeaders = HostProvider.globalSettings.get<GlobalStateAndSettings["openAiHeaders"]>("openAiHeaders")
const ollamaBaseUrl = HostProvider.globalSettings.get<GlobalStateAndSettings["ollamaBaseUrl"]>("ollamaBaseUrl")
const ollamaApiOptionsCtxNum =
context.globalState.get<GlobalStateAndSettings["ollamaApiOptionsCtxNum"]>("ollamaApiOptionsCtxNum")
const lmStudioBaseUrl = context.globalState.get<GlobalStateAndSettings["lmStudioBaseUrl"]>("lmStudioBaseUrl")
const lmStudioMaxTokens = context.globalState.get<GlobalStateAndSettings["lmStudioMaxTokens"]>("lmStudioMaxTokens")
const anthropicBaseUrl = context.globalState.get<GlobalStateAndSettings["anthropicBaseUrl"]>("anthropicBaseUrl")
const geminiBaseUrl = context.globalState.get<GlobalStateAndSettings["geminiBaseUrl"]>("geminiBaseUrl")
const azureApiVersion = context.globalState.get<GlobalStateAndSettings["azureApiVersion"]>("azureApiVersion")
HostProvider.globalSettings.get<GlobalStateAndSettings["ollamaApiOptionsCtxNum"]>("ollamaApiOptionsCtxNum")
const lmStudioBaseUrl = HostProvider.globalSettings.get<GlobalStateAndSettings["lmStudioBaseUrl"]>("lmStudioBaseUrl")
const lmStudioMaxTokens =
HostProvider.globalSettings.get<GlobalStateAndSettings["lmStudioMaxTokens"]>("lmStudioMaxTokens")
const anthropicBaseUrl = HostProvider.globalSettings.get<GlobalStateAndSettings["anthropicBaseUrl"]>("anthropicBaseUrl")
const geminiBaseUrl = HostProvider.globalSettings.get<GlobalStateAndSettings["geminiBaseUrl"]>("geminiBaseUrl")
const azureApiVersion = HostProvider.globalSettings.get<GlobalStateAndSettings["azureApiVersion"]>("azureApiVersion")
const openRouterProviderSorting =
context.globalState.get<GlobalStateAndSettings["openRouterProviderSorting"]>("openRouterProviderSorting")
HostProvider.globalSettings.get<GlobalStateAndSettings["openRouterProviderSorting"]>("openRouterProviderSorting")
const lastShownAnnouncementId =
context.globalState.get<GlobalStateAndSettings["lastShownAnnouncementId"]>("lastShownAnnouncementId")
HostProvider.globalSettings.get<GlobalStateAndSettings["lastShownAnnouncementId"]>("lastShownAnnouncementId")
const autoApprovalSettings =
context.globalState.get<GlobalStateAndSettings["autoApprovalSettings"]>("autoApprovalSettings")
const browserSettings = context.globalState.get<GlobalStateAndSettings["browserSettings"]>("browserSettings")
const liteLlmBaseUrl = context.globalState.get<GlobalStateAndSettings["liteLlmBaseUrl"]>("liteLlmBaseUrl")
HostProvider.globalSettings.get<GlobalStateAndSettings["autoApprovalSettings"]>("autoApprovalSettings")
const browserSettings = HostProvider.globalSettings.get<GlobalStateAndSettings["browserSettings"]>("browserSettings")
const liteLlmBaseUrl = HostProvider.globalSettings.get<GlobalStateAndSettings["liteLlmBaseUrl"]>("liteLlmBaseUrl")
const liteLlmUsePromptCache =
context.globalState.get<GlobalStateAndSettings["liteLlmUsePromptCache"]>("liteLlmUsePromptCache")
const fireworksModelMaxCompletionTokens = context.globalState.get<
HostProvider.globalSettings.get<GlobalStateAndSettings["liteLlmUsePromptCache"]>("liteLlmUsePromptCache")
const fireworksModelMaxCompletionTokens = HostProvider.globalSettings.get<
GlobalStateAndSettings["fireworksModelMaxCompletionTokens"]
>("fireworksModelMaxCompletionTokens")
const fireworksModelMaxTokens =
context.globalState.get<GlobalStateAndSettings["fireworksModelMaxTokens"]>("fireworksModelMaxTokens")
const userInfo = context.globalState.get<GlobalStateAndSettings["userInfo"]>("userInfo")
const qwenApiLine = context.globalState.get<GlobalStateAndSettings["qwenApiLine"]>("qwenApiLine")
const moonshotApiLine = context.globalState.get<GlobalStateAndSettings["moonshotApiLine"]>("moonshotApiLine")
const zaiApiLine = context.globalState.get<GlobalStateAndSettings["zaiApiLine"]>("zaiApiLine")
const minimaxApiLine = context.globalState.get<GlobalStateAndSettings["minimaxApiLine"]>("minimaxApiLine")
const telemetrySetting = context.globalState.get<GlobalStateAndSettings["telemetrySetting"]>("telemetrySetting")
const asksageApiUrl = context.globalState.get<GlobalStateAndSettings["asksageApiUrl"]>("asksageApiUrl")
HostProvider.globalSettings.get<GlobalStateAndSettings["fireworksModelMaxTokens"]>("fireworksModelMaxTokens")
const userInfo = HostProvider.globalSettings.get<GlobalStateAndSettings["userInfo"]>("userInfo")
const qwenApiLine = HostProvider.globalSettings.get<GlobalStateAndSettings["qwenApiLine"]>("qwenApiLine")
const moonshotApiLine = HostProvider.globalSettings.get<GlobalStateAndSettings["moonshotApiLine"]>("moonshotApiLine")
const zaiApiLine = HostProvider.globalSettings.get<GlobalStateAndSettings["zaiApiLine"]>("zaiApiLine")
const minimaxApiLine = HostProvider.globalSettings.get<GlobalStateAndSettings["minimaxApiLine"]>("minimaxApiLine")
const telemetrySetting = HostProvider.globalSettings.get<GlobalStateAndSettings["telemetrySetting"]>("telemetrySetting")
const asksageApiUrl = HostProvider.globalSettings.get<GlobalStateAndSettings["asksageApiUrl"]>("asksageApiUrl")
const planActSeparateModelsSettingRaw =
context.globalState.get<GlobalStateAndSettings["planActSeparateModelsSetting"]>("planActSeparateModelsSetting")
const favoritedModelIds = context.globalState.get<GlobalStateAndSettings["favoritedModelIds"]>("favoritedModelIds")
HostProvider.globalSettings.get<GlobalStateAndSettings["planActSeparateModelsSetting"]>(
"planActSeparateModelsSetting",
)
const favoritedModelIds =
HostProvider.globalSettings.get<GlobalStateAndSettings["favoritedModelIds"]>("favoritedModelIds")
const globalClineRulesToggles =
context.globalState.get<GlobalStateAndSettings["globalClineRulesToggles"]>("globalClineRulesToggles")
const requestTimeoutMs = context.globalState.get<GlobalStateAndSettings["requestTimeoutMs"]>("requestTimeoutMs")
HostProvider.globalSettings.get<GlobalStateAndSettings["globalClineRulesToggles"]>("globalClineRulesToggles")
const requestTimeoutMs = HostProvider.globalSettings.get<GlobalStateAndSettings["requestTimeoutMs"]>("requestTimeoutMs")
const shellIntegrationTimeout =
context.globalState.get<GlobalStateAndSettings["shellIntegrationTimeout"]>("shellIntegrationTimeout")
HostProvider.globalSettings.get<GlobalStateAndSettings["shellIntegrationTimeout"]>("shellIntegrationTimeout")
const enableCheckpointsSettingRaw =
context.globalState.get<GlobalStateAndSettings["enableCheckpointsSetting"]>("enableCheckpointsSetting")
HostProvider.globalSettings.get<GlobalStateAndSettings["enableCheckpointsSetting"]>("enableCheckpointsSetting")
const mcpMarketplaceEnabledRaw =
context.globalState.get<GlobalStateAndSettings["mcpMarketplaceEnabled"]>("mcpMarketplaceEnabled")
const mcpDisplayMode = context.globalState.get<GlobalStateAndSettings["mcpDisplayMode"]>("mcpDisplayMode")
HostProvider.globalSettings.get<GlobalStateAndSettings["mcpMarketplaceEnabled"]>("mcpMarketplaceEnabled")
const mcpDisplayMode = HostProvider.globalSettings.get<GlobalStateAndSettings["mcpDisplayMode"]>("mcpDisplayMode")
const mcpResponsesCollapsedRaw =
context.globalState.get<GlobalStateAndSettings["mcpResponsesCollapsed"]>("mcpResponsesCollapsed")
HostProvider.globalSettings.get<GlobalStateAndSettings["mcpResponsesCollapsed"]>("mcpResponsesCollapsed")
const globalWorkflowToggles =
context.globalState.get<GlobalStateAndSettings["globalWorkflowToggles"]>("globalWorkflowToggles")
HostProvider.globalSettings.get<GlobalStateAndSettings["globalWorkflowToggles"]>("globalWorkflowToggles")
const terminalReuseEnabled =
context.globalState.get<GlobalStateAndSettings["terminalReuseEnabled"]>("terminalReuseEnabled")
HostProvider.globalSettings.get<GlobalStateAndSettings["terminalReuseEnabled"]>("terminalReuseEnabled")
const vscodeTerminalExecutionMode =
context.globalState.get<GlobalStateAndSettings["vscodeTerminalExecutionMode"]>("vscodeTerminalExecutionMode")
HostProvider.globalSettings.get<GlobalStateAndSettings["vscodeTerminalExecutionMode"]>("vscodeTerminalExecutionMode")
const terminalOutputLineLimit =
context.globalState.get<GlobalStateAndSettings["terminalOutputLineLimit"]>("terminalOutputLineLimit")
HostProvider.globalSettings.get<GlobalStateAndSettings["terminalOutputLineLimit"]>("terminalOutputLineLimit")
const maxConsecutiveMistakes =
context.globalState.get<GlobalStateAndSettings["maxConsecutiveMistakes"]>("maxConsecutiveMistakes")
const subagentTerminalOutputLineLimit = context.globalState.get<
HostProvider.globalSettings.get<GlobalStateAndSettings["maxConsecutiveMistakes"]>("maxConsecutiveMistakes")
const subagentTerminalOutputLineLimit = HostProvider.globalSettings.get<
GlobalStateAndSettings["subagentTerminalOutputLineLimit"]
>("subagentTerminalOutputLineLimit")
const defaultTerminalProfile =
context.globalState.get<GlobalStateAndSettings["defaultTerminalProfile"]>("defaultTerminalProfile")
const sapAiCoreBaseUrl = context.globalState.get<GlobalStateAndSettings["sapAiCoreBaseUrl"]>("sapAiCoreBaseUrl")
const sapAiCoreTokenUrl = context.globalState.get<GlobalStateAndSettings["sapAiCoreTokenUrl"]>("sapAiCoreTokenUrl")
const sapAiResourceGroup = context.globalState.get<GlobalStateAndSettings["sapAiResourceGroup"]>("sapAiResourceGroup")
const claudeCodePath = context.globalState.get<GlobalStateAndSettings["claudeCodePath"]>("claudeCodePath")
const difyBaseUrl = context.globalState.get<GlobalStateAndSettings["difyBaseUrl"]>("difyBaseUrl")
const ocaBaseUrl = context.globalState.get("ocaBaseUrl") as string | undefined
const ocaMode = context.globalState.get("ocaMode") as string | undefined
HostProvider.globalSettings.get<GlobalStateAndSettings["defaultTerminalProfile"]>("defaultTerminalProfile")
const sapAiCoreBaseUrl = HostProvider.globalSettings.get<GlobalStateAndSettings["sapAiCoreBaseUrl"]>("sapAiCoreBaseUrl")
const sapAiCoreTokenUrl =
HostProvider.globalSettings.get<GlobalStateAndSettings["sapAiCoreTokenUrl"]>("sapAiCoreTokenUrl")
const sapAiResourceGroup =
HostProvider.globalSettings.get<GlobalStateAndSettings["sapAiResourceGroup"]>("sapAiResourceGroup")
const claudeCodePath = HostProvider.globalSettings.get<GlobalStateAndSettings["claudeCodePath"]>("claudeCodePath")
const difyBaseUrl = HostProvider.globalSettings.get<GlobalStateAndSettings["difyBaseUrl"]>("difyBaseUrl")
const ocaBaseUrl = HostProvider.globalSettings.get<string>("ocaBaseUrl")
const ocaMode = HostProvider.globalSettings.get<string>("ocaMode")
const openaiReasoningEffort =
context.globalState.get<GlobalStateAndSettings["openaiReasoningEffort"]>("openaiReasoningEffort")
const preferredLanguage = context.globalState.get<GlobalStateAndSettings["preferredLanguage"]>("preferredLanguage")
const focusChainSettings = context.globalState.get<GlobalStateAndSettings["focusChainSettings"]>("focusChainSettings")
const dictationSettings = context.globalState.get<GlobalStateAndSettings["dictationSettings"]>("dictationSettings") as
| DictationSettings
| undefined
HostProvider.globalSettings.get<GlobalStateAndSettings["openaiReasoningEffort"]>("openaiReasoningEffort")
const preferredLanguage =
HostProvider.globalSettings.get<GlobalStateAndSettings["preferredLanguage"]>("preferredLanguage")
const focusChainSettings =
HostProvider.globalSettings.get<GlobalStateAndSettings["focusChainSettings"]>("focusChainSettings")
const dictationSettings = HostProvider.globalSettings.get<DictationSettings>("dictationSettings")
const lastDismissedInfoBannerVersion =
context.globalState.get<GlobalStateAndSettings["lastDismissedInfoBannerVersion"]>("lastDismissedInfoBannerVersion")
const lastDismissedModelBannerVersion = context.globalState.get<
HostProvider.globalSettings.get<GlobalStateAndSettings["lastDismissedInfoBannerVersion"]>(
"lastDismissedInfoBannerVersion",
)
const lastDismissedModelBannerVersion = HostProvider.globalSettings.get<
GlobalStateAndSettings["lastDismissedModelBannerVersion"]
>("lastDismissedModelBannerVersion")
const lastDismissedCliBannerVersion =
context.globalState.get<GlobalStateAndSettings["lastDismissedCliBannerVersion"]>("lastDismissedCliBannerVersion")
const dismissedBanners = context.globalState.get<GlobalStateAndSettings["dismissedBanners"]>("dismissedBanners")
const qwenCodeOauthPath = context.globalState.get<GlobalStateAndSettings["qwenCodeOauthPath"]>("qwenCodeOauthPath")
const customPrompt = context.globalState.get<GlobalStateAndSettings["customPrompt"]>("customPrompt")
HostProvider.globalSettings.get<GlobalStateAndSettings["lastDismissedCliBannerVersion"]>(
"lastDismissedCliBannerVersion",
)
const dismissedBanners = HostProvider.globalSettings.get<GlobalStateAndSettings["dismissedBanners"]>("dismissedBanners")
const qwenCodeOauthPath =
HostProvider.globalSettings.get<GlobalStateAndSettings["qwenCodeOauthPath"]>("qwenCodeOauthPath")
const customPrompt = HostProvider.globalSettings.get<GlobalStateAndSettings["customPrompt"]>("customPrompt")
const autoCondenseThreshold =
context.globalState.get<GlobalStateAndSettings["autoCondenseThreshold"]>("autoCondenseThreshold") // number from 0 to 1
const hooksEnabled = context.globalState.get<GlobalStateAndSettings["hooksEnabled"]>("hooksEnabled")
HostProvider.globalSettings.get<GlobalStateAndSettings["autoCondenseThreshold"]>("autoCondenseThreshold") // number from 0 to 1
const hooksEnabled = HostProvider.globalSettings.get<GlobalStateAndSettings["hooksEnabled"]>("hooksEnabled")
const enableParallelToolCalling =
context.globalState.get<GlobalStateAndSettings["enableParallelToolCalling"]>("enableParallelToolCalling")
const hicapModelId = context.globalState.get<GlobalStateAndSettings["hicapModelId"]>("hicapModelId")
const aihubmixBaseUrl = context.globalState.get<GlobalStateAndSettings["aihubmixBaseUrl"]>("aihubmixBaseUrl")
const aihubmixAppCode = context.globalState.get<GlobalStateAndSettings["aihubmixAppCode"]>("aihubmixAppCode")
HostProvider.globalSettings.get<GlobalStateAndSettings["enableParallelToolCalling"]>("enableParallelToolCalling")
const hicapModelId = HostProvider.globalSettings.get<GlobalStateAndSettings["hicapModelId"]>("hicapModelId")
const aihubmixBaseUrl = HostProvider.globalSettings.get<GlobalStateAndSettings["aihubmixBaseUrl"]>("aihubmixBaseUrl")
const aihubmixAppCode = HostProvider.globalSettings.get<GlobalStateAndSettings["aihubmixAppCode"]>("aihubmixAppCode")
// OpenTelemetry configuration
const openTelemetryEnabled =
context.globalState.get<GlobalStateAndSettings["openTelemetryEnabled"]>("openTelemetryEnabled")
HostProvider.globalSettings.get<GlobalStateAndSettings["openTelemetryEnabled"]>("openTelemetryEnabled")
const openTelemetryMetricsExporter =
context.globalState.get<GlobalStateAndSettings["openTelemetryMetricsExporter"]>("openTelemetryMetricsExporter")
HostProvider.globalSettings.get<GlobalStateAndSettings["openTelemetryMetricsExporter"]>(
"openTelemetryMetricsExporter",
)
const openTelemetryLogsExporter =
context.globalState.get<GlobalStateAndSettings["openTelemetryLogsExporter"]>("openTelemetryLogsExporter")
HostProvider.globalSettings.get<GlobalStateAndSettings["openTelemetryLogsExporter"]>("openTelemetryLogsExporter")
const openTelemetryOtlpProtocol =
context.globalState.get<GlobalStateAndSettings["openTelemetryOtlpProtocol"]>("openTelemetryOtlpProtocol")
HostProvider.globalSettings.get<GlobalStateAndSettings["openTelemetryOtlpProtocol"]>("openTelemetryOtlpProtocol")
const openTelemetryOtlpEndpoint =
context.globalState.get<GlobalStateAndSettings["openTelemetryOtlpEndpoint"]>("openTelemetryOtlpEndpoint")
const openTelemetryOtlpMetricsProtocol = context.globalState.get<
HostProvider.globalSettings.get<GlobalStateAndSettings["openTelemetryOtlpEndpoint"]>("openTelemetryOtlpEndpoint")
const openTelemetryOtlpMetricsProtocol = HostProvider.globalSettings.get<
GlobalStateAndSettings["openTelemetryOtlpMetricsProtocol"]
>("openTelemetryOtlpMetricsProtocol")
const openTelemetryOtlpMetricsEndpoint = context.globalState.get<
const openTelemetryOtlpMetricsEndpoint = HostProvider.globalSettings.get<
GlobalStateAndSettings["openTelemetryOtlpMetricsEndpoint"]
>("openTelemetryOtlpMetricsEndpoint")
const openTelemetryOtlpLogsProtocol =
context.globalState.get<GlobalStateAndSettings["openTelemetryOtlpLogsProtocol"]>("openTelemetryOtlpLogsProtocol")
HostProvider.globalSettings.get<GlobalStateAndSettings["openTelemetryOtlpLogsProtocol"]>(
"openTelemetryOtlpLogsProtocol",
)
const openTelemetryOtlpLogsEndpoint =
context.globalState.get<GlobalStateAndSettings["openTelemetryOtlpLogsEndpoint"]>("openTelemetryOtlpLogsEndpoint")
const openTelemetryMetricExportInterval = context.globalState.get<
HostProvider.globalSettings.get<GlobalStateAndSettings["openTelemetryOtlpLogsEndpoint"]>(
"openTelemetryOtlpLogsEndpoint",
)
const openTelemetryMetricExportInterval = HostProvider.globalSettings.get<
GlobalStateAndSettings["openTelemetryMetricExportInterval"]
>("openTelemetryMetricExportInterval")
const openTelemetryOtlpInsecure =
context.globalState.get<GlobalStateAndSettings["openTelemetryOtlpInsecure"]>("openTelemetryOtlpInsecure")
HostProvider.globalSettings.get<GlobalStateAndSettings["openTelemetryOtlpInsecure"]>("openTelemetryOtlpInsecure")
const openTelemetryLogBatchSize =
context.globalState.get<GlobalStateAndSettings["openTelemetryLogBatchSize"]>("openTelemetryLogBatchSize")
HostProvider.globalSettings.get<GlobalStateAndSettings["openTelemetryLogBatchSize"]>("openTelemetryLogBatchSize")
const openTelemetryLogBatchTimeout =
context.globalState.get<GlobalStateAndSettings["openTelemetryLogBatchTimeout"]>("openTelemetryLogBatchTimeout")
HostProvider.globalSettings.get<GlobalStateAndSettings["openTelemetryLogBatchTimeout"]>(
"openTelemetryLogBatchTimeout",
)
const openTelemetryLogMaxQueueSize =
context.globalState.get<GlobalStateAndSettings["openTelemetryLogMaxQueueSize"]>("openTelemetryLogMaxQueueSize")
const subagentsEnabled = context.globalState.get<GlobalStateAndSettings["subagentsEnabled"]>("subagentsEnabled")
HostProvider.globalSettings.get<GlobalStateAndSettings["openTelemetryLogMaxQueueSize"]>(
"openTelemetryLogMaxQueueSize",
)
const subagentsEnabled = HostProvider.globalSettings.get<GlobalStateAndSettings["subagentsEnabled"]>("subagentsEnabled")
const backgroundEditEnabled =
context.globalState.get<GlobalStateAndSettings["backgroundEditEnabled"]>("backgroundEditEnabled")
HostProvider.globalSettings.get<GlobalStateAndSettings["backgroundEditEnabled"]>("backgroundEditEnabled")
// Get mode-related configurations
const mode = context.globalState.get<GlobalStateAndSettings["mode"]>("mode")
const mode = HostProvider.globalSettings.get<GlobalStateAndSettings["mode"]>("mode")
// Plan mode configurations
const planModeApiProvider = context.globalState.get<GlobalStateAndSettings["planModeApiProvider"]>("planModeApiProvider")
const planModeApiModelId = context.globalState.get<GlobalStateAndSettings["planModeApiModelId"]>("planModeApiModelId")
const planModeApiProvider =
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeApiProvider"]>("planModeApiProvider")
const planModeApiModelId =
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeApiModelId"]>("planModeApiModelId")
const planModeThinkingBudgetTokens =
context.globalState.get<GlobalStateAndSettings["planModeThinkingBudgetTokens"]>("planModeThinkingBudgetTokens")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeThinkingBudgetTokens"]>(
"planModeThinkingBudgetTokens",
)
const geminiPlanModeThinkingLevel =
context.globalState.get<GlobalStateAndSettings["geminiPlanModeThinkingLevel"]>("geminiPlanModeThinkingLevel")
HostProvider.globalSettings.get<GlobalStateAndSettings["geminiPlanModeThinkingLevel"]>("geminiPlanModeThinkingLevel")
const planModeReasoningEffort =
context.globalState.get<GlobalStateAndSettings["planModeReasoningEffort"]>("planModeReasoningEffort")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeReasoningEffort"]>("planModeReasoningEffort")
const planModeVsCodeLmModelSelector =
context.globalState.get<GlobalStateAndSettings["planModeVsCodeLmModelSelector"]>("planModeVsCodeLmModelSelector")
const planModeAwsBedrockCustomSelected = context.globalState.get<
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeVsCodeLmModelSelector"]>(
"planModeVsCodeLmModelSelector",
)
const planModeAwsBedrockCustomSelected = HostProvider.globalSettings.get<
GlobalStateAndSettings["planModeAwsBedrockCustomSelected"]
>("planModeAwsBedrockCustomSelected")
const planModeAwsBedrockCustomModelBaseId = context.globalState.get<
const planModeAwsBedrockCustomModelBaseId = HostProvider.globalSettings.get<
GlobalStateAndSettings["planModeAwsBedrockCustomModelBaseId"]
>("planModeAwsBedrockCustomModelBaseId")
const planModeOpenRouterModelId =
context.globalState.get<GlobalStateAndSettings["planModeOpenRouterModelId"]>("planModeOpenRouterModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeOpenRouterModelId"]>("planModeOpenRouterModelId")
const planModeOpenRouterModelInfo =
context.globalState.get<GlobalStateAndSettings["planModeOpenRouterModelInfo"]>("planModeOpenRouterModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeOpenRouterModelInfo"]>("planModeOpenRouterModelInfo")
const planModeOpenAiModelId =
context.globalState.get<GlobalStateAndSettings["planModeOpenAiModelId"]>("planModeOpenAiModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeOpenAiModelId"]>("planModeOpenAiModelId")
const planModeOpenAiModelInfo =
context.globalState.get<GlobalStateAndSettings["planModeOpenAiModelInfo"]>("planModeOpenAiModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeOpenAiModelInfo"]>("planModeOpenAiModelInfo")
const planModeOllamaModelId =
context.globalState.get<GlobalStateAndSettings["planModeOllamaModelId"]>("planModeOllamaModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeOllamaModelId"]>("planModeOllamaModelId")
const planModeLmStudioModelId =
context.globalState.get<GlobalStateAndSettings["planModeLmStudioModelId"]>("planModeLmStudioModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeLmStudioModelId"]>("planModeLmStudioModelId")
const planModeLiteLlmModelId =
context.globalState.get<GlobalStateAndSettings["planModeLiteLlmModelId"]>("planModeLiteLlmModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeLiteLlmModelId"]>("planModeLiteLlmModelId")
const planModeLiteLlmModelInfo =
context.globalState.get<GlobalStateAndSettings["planModeLiteLlmModelInfo"]>("planModeLiteLlmModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeLiteLlmModelInfo"]>("planModeLiteLlmModelInfo")
const planModeRequestyModelId =
context.globalState.get<GlobalStateAndSettings["planModeRequestyModelId"]>("planModeRequestyModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeRequestyModelId"]>("planModeRequestyModelId")
const planModeRequestyModelInfo =
context.globalState.get<GlobalStateAndSettings["planModeRequestyModelInfo"]>("planModeRequestyModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeRequestyModelInfo"]>("planModeRequestyModelInfo")
const planModeTogetherModelId =
context.globalState.get<GlobalStateAndSettings["planModeTogetherModelId"]>("planModeTogetherModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeTogetherModelId"]>("planModeTogetherModelId")
const planModeFireworksModelId =
context.globalState.get<GlobalStateAndSettings["planModeFireworksModelId"]>("planModeFireworksModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeFireworksModelId"]>("planModeFireworksModelId")
const planModeSapAiCoreModelId =
context.globalState.get<GlobalStateAndSettings["planModeSapAiCoreModelId"]>("planModeSapAiCoreModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeSapAiCoreModelId"]>("planModeSapAiCoreModelId")
const planModeSapAiCoreDeploymentId =
context.globalState.get<GlobalStateAndSettings["planModeSapAiCoreDeploymentId"]>("planModeSapAiCoreDeploymentId")
const planModeGroqModelId = context.globalState.get<GlobalStateAndSettings["planModeGroqModelId"]>("planModeGroqModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeSapAiCoreDeploymentId"]>(
"planModeSapAiCoreDeploymentId",
)
const planModeGroqModelId =
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeGroqModelId"]>("planModeGroqModelId")
const planModeGroqModelInfo =
context.globalState.get<GlobalStateAndSettings["planModeGroqModelInfo"]>("planModeGroqModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeGroqModelInfo"]>("planModeGroqModelInfo")
const planModeHuggingFaceModelId =
context.globalState.get<GlobalStateAndSettings["planModeHuggingFaceModelId"]>("planModeHuggingFaceModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeHuggingFaceModelId"]>("planModeHuggingFaceModelId")
const planModeHuggingFaceModelInfo =
context.globalState.get<GlobalStateAndSettings["planModeHuggingFaceModelInfo"]>("planModeHuggingFaceModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeHuggingFaceModelInfo"]>(
"planModeHuggingFaceModelInfo",
)
const planModeHuaweiCloudMaasModelId =
context.globalState.get<GlobalStateAndSettings["planModeHuaweiCloudMaasModelId"]>("planModeHuaweiCloudMaasModelId")
const planModeHuaweiCloudMaasModelInfo = context.globalState.get<
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeHuaweiCloudMaasModelId"]>(
"planModeHuaweiCloudMaasModelId",
)
const planModeHuaweiCloudMaasModelInfo = HostProvider.globalSettings.get<
GlobalStateAndSettings["planModeHuaweiCloudMaasModelInfo"]
>("planModeHuaweiCloudMaasModelInfo")
const planModeBasetenModelId =
context.globalState.get<GlobalStateAndSettings["planModeBasetenModelId"]>("planModeBasetenModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeBasetenModelId"]>("planModeBasetenModelId")
const planModeBasetenModelInfo =
context.globalState.get<GlobalStateAndSettings["planModeBasetenModelInfo"]>("planModeBasetenModelInfo")
const planModeOcaModelId = context.globalState.get("planModeOcaModelId") as string | undefined
const planModeOcaModelInfo = context.globalState.get("planModeOcaModelInfo") as OcaModelInfo | undefined
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeBasetenModelInfo"]>("planModeBasetenModelInfo")
const planModeOcaModelId = HostProvider.globalSettings.get<string>("planModeOcaModelId")
const planModeOcaModelInfo = HostProvider.globalSettings.get<OcaModelInfo>("planModeOcaModelInfo")
const planModeHicapModelId =
context.globalState.get<GlobalStateAndSettings["planModeHicapModelId"]>("planModeHicapModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeHicapModelId"]>("planModeHicapModelId")
const planModeHicapModelInfo =
context.globalState.get<GlobalStateAndSettings["planModeHicapModelInfo"]>("planModeHicapModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeHicapModelInfo"]>("planModeHicapModelInfo")
const planModeAihubmixModelId =
context.globalState.get<GlobalStateAndSettings["planModeAihubmixModelId"]>("planModeAihubmixModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeAihubmixModelId"]>("planModeAihubmixModelId")
const planModeAihubmixModelInfo =
context.globalState.get<GlobalStateAndSettings["planModeAihubmixModelInfo"]>("planModeAihubmixModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeAihubmixModelInfo"]>("planModeAihubmixModelInfo")
const planModeNousResearchModelId =
context.globalState.get<GlobalStateAndSettings["planModeNousResearchModelId"]>("planModeNousResearchModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["planModeNousResearchModelId"]>("planModeNousResearchModelId")
// Act mode configurations
const actModeApiProvider = context.globalState.get<GlobalStateAndSettings["actModeApiProvider"]>("actModeApiProvider")
const actModeApiModelId = context.globalState.get<GlobalStateAndSettings["actModeApiModelId"]>("actModeApiModelId")
const actModeApiProvider =
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeApiProvider"]>("actModeApiProvider")
const actModeApiModelId =
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeApiModelId"]>("actModeApiModelId")
const actModeThinkingBudgetTokens =
context.globalState.get<GlobalStateAndSettings["actModeThinkingBudgetTokens"]>("actModeThinkingBudgetTokens")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeThinkingBudgetTokens"]>("actModeThinkingBudgetTokens")
const geminiActModeThinkingLevel =
context.globalState.get<GlobalStateAndSettings["geminiActModeThinkingLevel"]>("geminiActModeThinkingLevel")
HostProvider.globalSettings.get<GlobalStateAndSettings["geminiActModeThinkingLevel"]>("geminiActModeThinkingLevel")
const actModeReasoningEffort =
context.globalState.get<GlobalStateAndSettings["actModeReasoningEffort"]>("actModeReasoningEffort")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeReasoningEffort"]>("actModeReasoningEffort")
const actModeVsCodeLmModelSelector =
context.globalState.get<GlobalStateAndSettings["actModeVsCodeLmModelSelector"]>("actModeVsCodeLmModelSelector")
const actModeAwsBedrockCustomSelected = context.globalState.get<
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeVsCodeLmModelSelector"]>(
"actModeVsCodeLmModelSelector",
)
const actModeAwsBedrockCustomSelected = HostProvider.globalSettings.get<
GlobalStateAndSettings["actModeAwsBedrockCustomSelected"]
>("actModeAwsBedrockCustomSelected")
const actModeAwsBedrockCustomModelBaseId = context.globalState.get<
const actModeAwsBedrockCustomModelBaseId = HostProvider.globalSettings.get<
GlobalStateAndSettings["actModeAwsBedrockCustomModelBaseId"]
>("actModeAwsBedrockCustomModelBaseId")
const actModeOpenRouterModelId =
context.globalState.get<GlobalStateAndSettings["actModeOpenRouterModelId"]>("actModeOpenRouterModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeOpenRouterModelId"]>("actModeOpenRouterModelId")
const actModeOpenRouterModelInfo =
context.globalState.get<GlobalStateAndSettings["actModeOpenRouterModelInfo"]>("actModeOpenRouterModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeOpenRouterModelInfo"]>("actModeOpenRouterModelInfo")
const actModeOpenAiModelId =
context.globalState.get<GlobalStateAndSettings["actModeOpenAiModelId"]>("actModeOpenAiModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeOpenAiModelId"]>("actModeOpenAiModelId")
const actModeOpenAiModelInfo =
context.globalState.get<GlobalStateAndSettings["actModeOpenAiModelInfo"]>("actModeOpenAiModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeOpenAiModelInfo"]>("actModeOpenAiModelInfo")
const actModeOllamaModelId =
context.globalState.get<GlobalStateAndSettings["actModeOllamaModelId"]>("actModeOllamaModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeOllamaModelId"]>("actModeOllamaModelId")
const actModeLmStudioModelId =
context.globalState.get<GlobalStateAndSettings["actModeLmStudioModelId"]>("actModeLmStudioModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeLmStudioModelId"]>("actModeLmStudioModelId")
const actModeLiteLlmModelId =
context.globalState.get<GlobalStateAndSettings["actModeLiteLlmModelId"]>("actModeLiteLlmModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeLiteLlmModelId"]>("actModeLiteLlmModelId")
const actModeLiteLlmModelInfo =
context.globalState.get<GlobalStateAndSettings["actModeLiteLlmModelInfo"]>("actModeLiteLlmModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeLiteLlmModelInfo"]>("actModeLiteLlmModelInfo")
const actModeRequestyModelId =
context.globalState.get<GlobalStateAndSettings["actModeRequestyModelId"]>("actModeRequestyModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeRequestyModelId"]>("actModeRequestyModelId")
const actModeRequestyModelInfo =
context.globalState.get<GlobalStateAndSettings["actModeRequestyModelInfo"]>("actModeRequestyModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeRequestyModelInfo"]>("actModeRequestyModelInfo")
const actModeTogetherModelId =
context.globalState.get<GlobalStateAndSettings["actModeTogetherModelId"]>("actModeTogetherModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeTogetherModelId"]>("actModeTogetherModelId")
const actModeFireworksModelId =
context.globalState.get<GlobalStateAndSettings["actModeFireworksModelId"]>("actModeFireworksModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeFireworksModelId"]>("actModeFireworksModelId")
const actModeSapAiCoreModelId =
context.globalState.get<GlobalStateAndSettings["actModeSapAiCoreModelId"]>("actModeSapAiCoreModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeSapAiCoreModelId"]>("actModeSapAiCoreModelId")
const actModeSapAiCoreDeploymentId =
context.globalState.get<GlobalStateAndSettings["actModeSapAiCoreDeploymentId"]>("actModeSapAiCoreDeploymentId")
const actModeGroqModelId = context.globalState.get<GlobalStateAndSettings["actModeGroqModelId"]>("actModeGroqModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeSapAiCoreDeploymentId"]>(
"actModeSapAiCoreDeploymentId",
)
const actModeGroqModelId =
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeGroqModelId"]>("actModeGroqModelId")
const actModeGroqModelInfo =
context.globalState.get<GlobalStateAndSettings["actModeGroqModelInfo"]>("actModeGroqModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeGroqModelInfo"]>("actModeGroqModelInfo")
const actModeHuggingFaceModelId =
context.globalState.get<GlobalStateAndSettings["actModeHuggingFaceModelId"]>("actModeHuggingFaceModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeHuggingFaceModelId"]>("actModeHuggingFaceModelId")
const actModeHuggingFaceModelInfo =
context.globalState.get<GlobalStateAndSettings["actModeHuggingFaceModelInfo"]>("actModeHuggingFaceModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeHuggingFaceModelInfo"]>("actModeHuggingFaceModelInfo")
const actModeHuaweiCloudMaasModelId =
context.globalState.get<GlobalStateAndSettings["actModeHuaweiCloudMaasModelId"]>("actModeHuaweiCloudMaasModelId")
const actModeHuaweiCloudMaasModelInfo = context.globalState.get<
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeHuaweiCloudMaasModelId"]>(
"actModeHuaweiCloudMaasModelId",
)
const actModeHuaweiCloudMaasModelInfo = HostProvider.globalSettings.get<
GlobalStateAndSettings["actModeHuaweiCloudMaasModelInfo"]
>("actModeHuaweiCloudMaasModelInfo")
const actModeBasetenModelId =
context.globalState.get<GlobalStateAndSettings["actModeBasetenModelId"]>("actModeBasetenModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeBasetenModelId"]>("actModeBasetenModelId")
const actModeBasetenModelInfo =
context.globalState.get<GlobalStateAndSettings["actModeBasetenModelInfo"]>("actModeBasetenModelInfo")
const actModeOcaModelId = context.globalState.get("actModeOcaModelId") as string | undefined
const actModeOcaModelInfo = context.globalState.get("actModeOcaModelInfo") as OcaModelInfo | undefined
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeBasetenModelInfo"]>("actModeBasetenModelInfo")
const actModeOcaModelId = HostProvider.globalSettings.get<string>("actModeOcaModelId")
const actModeOcaModelInfo = HostProvider.globalSettings.get<OcaModelInfo>("actModeOcaModelInfo")
const actModeNousResearchModelId =
context.globalState.get<GlobalStateAndSettings["actModeNousResearchModelId"]>("actModeNousResearchModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeNousResearchModelId"]>("actModeNousResearchModelId")
const sapAiCoreUseOrchestrationMode =
context.globalState.get<GlobalStateAndSettings["sapAiCoreUseOrchestrationMode"]>("sapAiCoreUseOrchestrationMode")
const actModeHicapModelId = context.globalState.get<GlobalStateAndSettings["actModeHicapModelId"]>("actModeHicapModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["sapAiCoreUseOrchestrationMode"]>(
"sapAiCoreUseOrchestrationMode",
)
const actModeHicapModelId =
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeHicapModelId"]>("actModeHicapModelId")
const actModeHicapModelInfo =
context.globalState.get<GlobalStateAndSettings["actModeHicapModelInfo"]>("actModeHicapModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeHicapModelInfo"]>("actModeHicapModelInfo")
const actModeAihubmixModelId =
context.globalState.get<GlobalStateAndSettings["actModeAihubmixModelId"]>("actModeAihubmixModelId")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeAihubmixModelId"]>("actModeAihubmixModelId")
const actModeAihubmixModelInfo =
context.globalState.get<GlobalStateAndSettings["actModeAihubmixModelInfo"]>("actModeAihubmixModelInfo")
HostProvider.globalSettings.get<GlobalStateAndSettings["actModeAihubmixModelInfo"]>("actModeAihubmixModelInfo")
let apiProvider: ApiProvider
if (planModeApiProvider) {
@@ -509,7 +557,7 @@ export async function readGlobalStateFromDisk(context: ExtensionContext): Promis
const taskHistory = await readTaskHistoryFromState()
// Multi-root workspace support
const workspaceRoots = context.globalState.get<GlobalStateAndSettings["workspaceRoots"]>("workspaceRoots")
const workspaceRoots = HostProvider.globalSettings.get<GlobalStateAndSettings["workspaceRoots"]>("workspaceRoots")
/**
* Get primary root index from global state.
* The primary root is the main workspace folder that Cline focuses on when dealing with
@@ -517,13 +565,14 @@ export async function readGlobalStateFromDisk(context: ExtensionContext): Promis
* and the primary root index indicates which folder (by its position in the array, 0-based)
* should be treated as the main/default working directory for operations.
*/
const primaryRootIndex = context.globalState.get<GlobalStateAndSettings["primaryRootIndex"]>("primaryRootIndex")
const multiRootEnabled = context.globalState.get<GlobalStateAndSettings["multiRootEnabled"]>("multiRootEnabled")
const primaryRootIndex = HostProvider.globalSettings.get<GlobalStateAndSettings["primaryRootIndex"]>("primaryRootIndex")
const multiRootEnabled = HostProvider.globalSettings.get<GlobalStateAndSettings["multiRootEnabled"]>("multiRootEnabled")
const nativeToolCallEnabled =
context.globalState.get<GlobalStateAndSettings["nativeToolCallEnabled"]>("nativeToolCallEnabled")
const remoteRulesToggles = context.globalState.get<GlobalStateAndSettings["remoteRulesToggles"]>("remoteRulesToggles")
HostProvider.globalSettings.get<GlobalStateAndSettings["nativeToolCallEnabled"]>("nativeToolCallEnabled")
const remoteRulesToggles =
HostProvider.globalSettings.get<GlobalStateAndSettings["remoteRulesToggles"]>("remoteRulesToggles")
const remoteWorkflowToggles =
context.globalState.get<GlobalStateAndSettings["remoteWorkflowToggles"]>("remoteWorkflowToggles")
HostProvider.globalSettings.get<GlobalStateAndSettings["remoteWorkflowToggles"]>("remoteWorkflowToggles")
return {
// api configuration fields
@@ -726,17 +775,13 @@ export async function readGlobalStateFromDisk(context: ExtensionContext): Promis
}
export async function resetWorkspaceState(controller: Controller) {
const context = controller.context
await Promise.all(context.workspaceState.keys().map((key) => controller.context.workspaceState.update(key, undefined)))
await Promise.all(HostProvider.workspaceSettings.keys().map((key) => HostProvider.workspaceSettings.delete(key)))
await controller.stateManager.reInitialize()
}
export async function resetGlobalState(controller: Controller) {
// TODO: Reset all workspace states?
const context = controller.context
await Promise.all(context.globalState.keys().map((key) => context.globalState.update(key, undefined)))
await Promise.all(HostProvider.globalSettings.keys().map((key) => HostProvider.globalSettings.delete(key)))
const secretKeys: SecretKey[] = [
"apiKey",
"openRouterApiKey",
@@ -779,6 +824,6 @@ export async function resetGlobalState(controller: Controller) {
"mcpOAuthSecrets",
"nousResearchApiKey",
]
await Promise.all(secretKeys.map((key) => context.secrets.delete(key)))
await Promise.all(secretKeys.map((key) => HostProvider.secrets.delete(key)))
await controller.stateManager.reInitialize()
}
+2
View File
@@ -39,6 +39,7 @@ import {
} from "./hosts/vscode/review/VscodeCommentReviewController"
import { VscodeTerminalManager } from "./hosts/vscode/terminal/VscodeTerminalManager"
import { VscodeDiffViewProvider } from "./hosts/vscode/VscodeDiffViewProvider"
import { VscodeSettingsStore } from "./hosts/vscode/VscodeSettingsStore"
import { VscodeWebviewProvider } from "./hosts/vscode/VscodeWebviewProvider"
import { ExtensionRegistryInfo } from "./registry"
import { AuthService } from "./services/auth/AuthService"
@@ -440,6 +441,7 @@ function setupHostProvider(context: ExtensionContext) {
const getCallbackUrl = async () => `${vscode.env.uriScheme || "vscode"}://${context.extension.id}`
HostProvider.initialize(
new VscodeSettingsStore(context),
createWebview,
createDiffView,
createCommentReview,
+73
View File
@@ -0,0 +1,73 @@
import * as fs from "fs/promises"
import path from "path"
import { Settings, SettingsStore } from "@/core/storage/settings"
/**
* VSCode-specific implementation of the Settings interface.
* Provides a wrapper around VSCode's underlying settings and secrets storage mechanisms:
* - WorkspaceSettings: Uses VSCode's workspace configuration API
* - GlobalSettings: Uses VSCode's global state (Memento) API
* - Secrets: Uses VSCode's secure secrets storage API
*/
export class ExternalSettingsStore implements Settings {
globalSettings!: SettingsStore
workspaceSettings!: SettingsStore
secrets!: SettingsStore
static async initialize(settingsDir: string, workspaceDir: string) {
const store = new ExternalSettingsStore()
store.globalSettings = await JsonKeyValueStore.initialize(path.join(settingsDir, "secrets.json"))
store.workspaceSettings = await JsonKeyValueStore.initialize(path.join(settingsDir, "globalState.json"))
store.secrets = await JsonKeyValueStore.initialize(path.join(workspaceDir, "workspaceState.json"))
return store
}
private constructor() {}
}
/** A simple key-value store for secrets backed by a JSON file. This is not secure, and it is not thread-safe. */
export class JsonKeyValueStore implements SettingsStore {
private data = new Map<string, any>()
private filePath: string
static initialize(filePath: string): Promise<JsonKeyValueStore> {
const store = new JsonKeyValueStore(filePath)
return store.load()
}
private constructor(filePath: string) {
this.filePath = filePath
}
get<T>(key: string): Promise<T | undefined> {
return Promise.resolve(this.data.get(key))
}
put<T>(key: string, value: T): Promise<void> {
this.data.set(key, value)
return this.save()
}
keys(): readonly string[] {
return Array.from(this.data.keys())
}
delete(key: string): Promise<void> {
this.data.delete(key)
return this.save()
}
private async load(): Promise<JsonKeyValueStore> {
try {
const data = JSON.parse(await fs.readFile(this.filePath, "utf-8"))
Object.entries(data).forEach(([k, v]) => {
this.data.set(k, v as string)
})
} catch (_error) {
// File doesn't exist or can't be read, start with empty data
}
return this
}
private async save(): Promise<void> {
// Use mode 0o600 to restrict file permissions to owner read/write only (fixes #7778)
await fs.writeFile(this.filePath, JSON.stringify(Object.fromEntries(this.data), null, 2), { mode: 0o600 })
}
}
+15
View File
@@ -1,3 +1,4 @@
import { Settings } from "@/core/storage/settings"
import { WebviewProvider } from "@/core/webview"
import { CommentReviewController } from "@/integrations/editor/CommentReviewController"
import { DiffViewProvider } from "@/integrations/editor/DiffViewProvider"
@@ -19,6 +20,7 @@ import { HostBridgeClientProvider } from "./host-provider-types"
export class HostProvider {
private static instance: HostProvider | null = null
settings: Settings
createWebviewProvider: WebviewProviderCreator
createDiffViewProvider: DiffViewProviderCreator
createCommentReviewController: CommentReviewControllerCreator
@@ -46,6 +48,7 @@ export class HostProvider {
// Private constructor to enforce singleton pattern
private constructor(
settings: Settings,
createWebviewProvider: WebviewProviderCreator,
createDiffViewProvider: DiffViewProviderCreator,
createCommentReviewController: CommentReviewControllerCreator,
@@ -57,6 +60,7 @@ export class HostProvider {
extensionFsPath: string,
globalStorageFsPath: string,
) {
this.settings = settings
this.createWebviewProvider = createWebviewProvider
this.createDiffViewProvider = createDiffViewProvider
this.createCommentReviewController = createCommentReviewController
@@ -70,6 +74,7 @@ export class HostProvider {
}
public static initialize(
settings: Settings,
webviewProviderCreator: WebviewProviderCreator,
diffViewProviderCreator: DiffViewProviderCreator,
commentReviewControllerCreator: CommentReviewControllerCreator,
@@ -85,6 +90,7 @@ export class HostProvider {
throw new Error("Host provider has already been initialized.")
}
HostProvider.instance = new HostProvider(
settings,
webviewProviderCreator,
diffViewProviderCreator,
commentReviewControllerCreator,
@@ -120,6 +126,15 @@ export class HostProvider {
public static reset(): void {
HostProvider.instance = null
}
public static get globalSettings() {
return HostProvider.get().settings.globalSettings
}
public static get secrets() {
return HostProvider.get().settings.secrets
}
public static get workspaceSettings() {
return HostProvider.get().settings.workspaceSettings
}
public static get workspace() {
return HostProvider.get().hostBridge.workspaceClient
+74
View File
@@ -0,0 +1,74 @@
import * as vscode from "vscode"
import { SecretStore, Settings, SettingsStore, SettingsStoreWithKeys } from "@/core/storage/settings"
/**
* VSCode-specific implementation of the Settings interface.
* Provides a wrapper around VSCode's underlying settings and secrets storage mechanisms:
* - WorkspaceSettings: Uses VSCode's workspace configuration API
* - GlobalSettings: Uses VSCode's global state (Memento) API
* - Secrets: Uses VSCode's secure secrets storage API
*/
export class VscodeSettingsStore implements Settings {
globalSettings: SettingsStoreWithKeys
workspaceSettings: SettingsStore
secrets: SecretStore
constructor(context: vscode.ExtensionContext) {
this.globalSettings = new GlobalSettings(context)
this.workspaceSettings = new WorkspaceSettings()
this.secrets = new Secrets(context)
}
}
class GlobalSettings implements SettingsStoreWithKeys {
globalState: vscode.Memento
constructor(context: vscode.ExtensionContext) {
this.globalState = context.globalState
}
get<T>(key: string): Promise<T | undefined> {
return Promise.resolve(this.globalState.get<T>(key))
}
put<T>(key: string, value: T): Promise<void> {
return Promise.resolve(this.globalState.update(key, value))
}
keys(): readonly string[] {
return this.globalState.keys()
}
delete(key: string): Promise<void> {
return Promise.resolve(this.globalState.update(key, undefined))
}
}
class WorkspaceSettings implements SettingsStore {
config: vscode.WorkspaceConfiguration
constructor() {
this.config = vscode.workspace.getConfiguration("cline")
}
get<T>(key: string): Promise<T | undefined> {
return Promise.resolve(this.config.get(key))
}
put<T>(key: string, value: T): Promise<void> {
return Promise.resolve(this.config.update(key, value))
}
delete(key: string): Promise<void> {
return Promise.resolve(this.config.update(key, undefined))
}
}
class Secrets implements SecretStore {
secrets: vscode.SecretStorage
constructor(context: vscode.ExtensionContext) {
this.secrets = context.secrets
}
get(key: string): Promise<string | undefined> {
return Promise.resolve(this.secrets.get(key))
}
put(key: string, value: string): Promise<void> {
return Promise.resolve(this.secrets.store(key, value))
}
delete(key: string): Promise<void> {
return Promise.resolve(this.secrets.delete(key))
}
}
+11 -9
View File
@@ -8,6 +8,7 @@ import { initialize, tearDown } from "@/common"
import { SqliteLockManager } from "@/core/locks/SqliteLockManager"
import { WebviewProvider } from "@/core/webview"
import { AuthHandler } from "@/hosts/external/AuthHandler"
import { ExternalSettingsStore } from "@/hosts/external/ExternalSettingsStore"
import { HostProvider } from "@/hosts/host-provider"
import { DiffViewProvider } from "@/integrations/editor/DiffViewProvider"
import { StandaloneTerminalManager } from "@/integrations/terminal"
@@ -15,7 +16,7 @@ import { HOSTBRIDGE_PORT, waitForHostBridgeReady } from "./hostbridge-client"
import { setLockManager } from "./lock-manager"
import { PROTOBUS_PORT, startProtobusService } from "./protobus-service"
import { log } from "./utils"
import { initializeContext } from "./vscode-context"
import { ClineDirs, initializeContext } from "./vscode-context"
let globalLockManager: SqliteLockManager | undefined
@@ -36,7 +37,7 @@ async function main() {
process.chdir(__dirname)
// Initialize context with optional custom directory from CLI
const { extensionContext, DATA_DIR, EXTENSION_DIR } = initializeContext(args.config)
const clineDirs = initializeContext(args.config)
// Configure ports - CLI args override everything
if (args.port) {
@@ -57,9 +58,9 @@ async function main() {
const hostAddress = await waitForHostBridgeReady()
// The host bridge should be available before creating the host provider because it depends on the host bridge.
setupHostProvider(extensionContext, EXTENSION_DIR, DATA_DIR)
setupHostProvider(clineDirs)
const webviewProvider = await initialize(extensionContext)
const webviewProvider = await initialize(clineDirs.context)
// Enable the localhost HTTP server that handles auth redirects.
AuthHandler.getInstance().setEnabled(true)
@@ -68,7 +69,7 @@ async function main() {
const protobusAddress = await startProtobusService(webviewProvider.controller)
// Initialize SQLite lock manager for instance registration
const dbPath = `${DATA_DIR}/locks.db`
const dbPath = `${clineDirs.SETTINGS_DIR}/locks.db`
globalLockManager = new SqliteLockManager({
dbPath,
instanceAddress: protobusAddress,
@@ -97,9 +98,9 @@ async function main() {
}
}
function setupHostProvider(extensionContext: any, extensionDir: string, dataDir: string) {
async function setupHostProvider(clineDirs: ClineDirs) {
const createWebview = (): WebviewProvider => {
return new ExternalWebviewProvider(extensionContext)
return new ExternalWebviewProvider(clineDirs.context)
}
const createDiffView = (): DiffViewProvider => {
return new ExternalDiffViewProvider()
@@ -113,6 +114,7 @@ function setupHostProvider(extensionContext: any, extensionDir: string, dataDir:
const getBinaryLocation = async (name: string): Promise<string> => path.join(process.cwd(), name)
HostProvider.initialize(
await ExternalSettingsStore.initialize(clineDirs.SETTINGS_DIR, clineDirs.WORKSPACE_STORAGE_DIR),
createWebview,
createDiffView,
createCommentReview,
@@ -121,8 +123,8 @@ function setupHostProvider(extensionContext: any, extensionDir: string, dataDir:
log,
getCallbackUrl,
getBinaryLocation,
extensionDir,
dataDir,
clineDirs.EXTENSION_DIR,
clineDirs.GLOBAL_STORAGE_DIR,
)
}
+24 -17
View File
@@ -11,20 +11,25 @@ import { EnvironmentVariableCollection, MementoStore, readJson, SecretStore } fr
log("Running standalone cline", ExtensionRegistryInfo.version)
log(`CLINE_ENVIRONMENT: ${process.env.CLINE_ENVIRONMENT}`)
// WE WILL HAVE TO MIGRATE THIS FROM DATA TO v1 LATER
const SETTINGS_SUBFOLDER = "data"
export type ClineDirs = {
SETTINGS_DIR: string
WORKSPACE_STORAGE_DIR: string
GLOBAL_STORAGE_DIR: string
EXTENSION_DIR: string
context: any
}
export function initializeContext(clineDir?: string) {
export function initializeContext(clineDir?: string): ClineDirs {
const CLINE_DIR = clineDir || process.env.CLINE_DIR || `${os.homedir()}/.cline`
const DATA_DIR = path.join(CLINE_DIR, SETTINGS_SUBFOLDER)
const INSTALL_DIR = process.env.INSTALL_DIR || __dirname
const WORKSPACE_STORAGE_DIR = process.env.WORKSPACE_STORAGE_DIR || path.join(DATA_DIR, "workspace")
const SETTINGS_DIR = path.join(CLINE_DIR, "data")
const WORKSPACE_STORAGE_DIR = process.env.WORKSPACE_STORAGE_DIR || path.join(SETTINGS_DIR, "workspace")
const GLOBAL_STORAGE_DIR = SETTINGS_DIR
const EXTENSION_DIR = path.join(process.env.INSTALL_DIR || __dirname, "extension")
mkdirSync(DATA_DIR, { recursive: true })
mkdirSync(SETTINGS_DIR, { recursive: true })
mkdirSync(WORKSPACE_STORAGE_DIR, { recursive: true })
log("Using settings dir:", DATA_DIR)
log("Using settings dir:", SETTINGS_DIR)
const EXTENSION_DIR = path.join(INSTALL_DIR, "extension")
const EXTENSION_MODE = process.env.IS_DEV === "true" ? ExtensionMode.Development : ExtensionMode.Production
const extension: Extension<void> = {
@@ -43,18 +48,18 @@ export function initializeContext(clineDir?: string) {
extensionMode: EXTENSION_MODE,
// Set up KV stores.
globalState: new MementoStore(path.join(DATA_DIR, "globalState.json")),
secrets: new SecretStore(path.join(DATA_DIR, "secrets.json")),
globalState: new MementoStore(path.join(SETTINGS_DIR, "globalState.json")),
secrets: new SecretStore(path.join(SETTINGS_DIR, "secrets.json")),
// Set up URIs.
storageUri: URI.file(WORKSPACE_STORAGE_DIR),
storagePath: WORKSPACE_STORAGE_DIR, // Deprecated, not used in cline.
globalStorageUri: URI.file(DATA_DIR),
globalStoragePath: DATA_DIR, // Deprecated, not used in cline.
globalStorageUri: URI.file(SETTINGS_DIR),
globalStoragePath: SETTINGS_DIR, // Deprecated, not used in cline.
// Logs are global per extension, not per workspace.
logUri: URI.file(DATA_DIR),
logPath: DATA_DIR, // Deprecated, not used in cline.
logUri: URI.file(SETTINGS_DIR),
logPath: SETTINGS_DIR, // Deprecated, not used in cline.
extensionUri: URI.file(EXTENSION_DIR),
extensionPath: EXTENSION_DIR, // Deprecated, not used in cline.
@@ -71,8 +76,10 @@ export function initializeContext(clineDir?: string) {
log("Finished loading vscode context...")
return {
extensionContext,
DATA_DIR,
context: extensionContext,
SETTINGS_DIR,
WORKSPACE_STORAGE_DIR,
GLOBAL_STORAGE_DIR,
EXTENSION_DIR,
}
}
+3
View File
@@ -1,3 +1,4 @@
import { Settings } from "@/core/storage/settings"
import {
CommentReviewControllerCreator,
DiffViewProviderCreator,
@@ -16,6 +17,7 @@ import { ITerminalManager } from "@/integrations/terminal/types"
* @param options Optional overrides for the default test configuration
*/
export function setVscodeHostProviderMock(options?: {
settings?: Settings
webviewProviderCreator?: WebviewProviderCreator
diffViewProviderCreator?: DiffViewProviderCreator
commentReviewControllerCreator?: CommentReviewControllerCreator
@@ -29,6 +31,7 @@ export function setVscodeHostProviderMock(options?: {
}) {
HostProvider.reset()
HostProvider.initialize(
options?.settings ?? ({} as Settings),
options?.webviewProviderCreator ?? ((() => {}) as WebviewProviderCreator),
options?.diffViewProviderCreator ?? ((() => {}) as DiffViewProviderCreator),
options?.commentReviewControllerCreator ?? ((() => {}) as CommentReviewControllerCreator),
+12 -35
View File
@@ -171,7 +171,6 @@
"integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/code-frame": "^7.27.1",
"@babel/generator": "^7.28.3",
@@ -570,7 +569,6 @@
}
],
"license": "MIT",
"peer": true,
"engines": {
"node": ">=18"
},
@@ -594,7 +592,6 @@
}
],
"license": "MIT",
"peer": true,
"engines": {
"node": ">=18"
}
@@ -604,7 +601,6 @@
"resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.2.2.tgz",
"integrity": "sha512-uNsoYd37AFmaCdXlg6EYD1KaPOaRWRByMCYzbKUX4+hhMfrxdVSelShywL4JVaAeM/eHUOSprYBQls+/neX3pw==",
"license": "MIT",
"peer": true,
"dependencies": {
"@emotion/memoize": "^0.8.1"
}
@@ -1126,7 +1122,6 @@
"resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.13.2.tgz",
"integrity": "sha512-jwtMmJa1BXXDCiDx1vC6SFN/+HfYG53UkfJa6qeN5ogvOunzbFDO3wISZy5n9xgYFUrEP6M7e8EG++riHNTv9w==",
"license": "Apache-2.0",
"peer": true,
"dependencies": {
"@firebase/component": "0.6.18",
"@firebase/logger": "0.4.4",
@@ -1193,7 +1188,6 @@
"resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.4.2.tgz",
"integrity": "sha512-LssbyKHlwLeiV8GBATyOyjmHcMpX/tFjzRUCS1jnwGAew1VsBB4fJowyS5Ud5LdFbYpJeS+IQoC+RQxpK7eH3Q==",
"license": "Apache-2.0",
"peer": true,
"dependencies": {
"@firebase/app": "0.13.2",
"@firebase/component": "0.6.18",
@@ -1209,8 +1203,7 @@
"version": "0.9.3",
"resolved": "https://registry.npmjs.org/@firebase/app-types/-/app-types-0.9.3.tgz",
"integrity": "sha512-kRVpIl4vVGJ4baogMDINbyrIOtOxqhkZQg4jTq3l8Lw6WSk0xfpEYzezFu+Kl4ve4fbPl79dvwRtaFqAC/ucCw==",
"license": "Apache-2.0",
"peer": true
"license": "Apache-2.0"
},
"node_modules/@firebase/auth-compat": {
"version": "0.5.28",
@@ -1661,7 +1654,6 @@
"integrity": "sha512-zGlBn/9Dnya5ta9bX/fgEoNC3Cp8s6h+uYPYaDieZsFOAdHP/ExzQ/eaDgxD3GOROdPkLKpvKY0iIzr9adle0w==",
"hasInstallScript": true,
"license": "Apache-2.0",
"peer": true,
"dependencies": {
"tslib": "^2.1.0"
},
@@ -2886,7 +2878,6 @@
"resolved": "https://registry.npmjs.org/@heroui/system/-/system-2.4.22.tgz",
"integrity": "sha512-+RVuAxjS2QWyLdYTPxv0IfMjhsxa1GKRSwvpii13bOGEQclwwfaNL2MvBbTt1Mzu/LHaX7kyj0THbZnlOplZOA==",
"license": "MIT",
"peer": true,
"dependencies": {
"@heroui/react-utils": "2.1.13",
"@heroui/system-rsc": "2.3.19",
@@ -2981,7 +2972,6 @@
"resolved": "https://registry.npmjs.org/@heroui/theme/-/theme-2.4.22.tgz",
"integrity": "sha512-naKFQBfp7YwhKGmh7rKCC5EBjV7kdozX21fyGHucDYa6GeFfIKVqXILgZ94HZlfp+LGJfV6U+BuKIflevf0Y+w==",
"license": "MIT",
"peer": true,
"dependencies": {
"@heroui/shared-utils": "2.1.11",
"clsx": "^1.2.1",
@@ -6881,7 +6871,8 @@
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
"integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==",
"dev": true,
"license": "MIT"
"license": "MIT",
"peer": true
},
"node_modules/@types/babel__core": {
"version": "7.20.5",
@@ -7353,7 +7344,6 @@
"integrity": "sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==",
"devOptional": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@types/prop-types": "*",
"csstype": "^3.0.2"
@@ -7365,7 +7355,6 @@
"integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==",
"devOptional": true,
"license": "MIT",
"peer": true,
"peerDependencies": {
"@types/react": "^18.0.0"
}
@@ -7838,7 +7827,6 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.8.3",
"caniuse-lite": "^1.0.30001741",
@@ -7992,7 +7980,6 @@
"resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-11.0.3.tgz",
"integrity": "sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==",
"license": "Apache-2.0",
"peer": true,
"dependencies": {
"@chevrotain/cst-dts-gen": "11.0.3",
"@chevrotain/gast": "11.0.3",
@@ -8327,7 +8314,6 @@
"resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.33.1.tgz",
"integrity": "sha512-iJc4TwyANnOGR1OmWhsS9ayRS3s+XQ185FmuHObThD+5AeJCakAAbWv8KimMTt08xCCLNgneQwFp+JRJOr9qGQ==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=0.10"
}
@@ -8728,7 +8714,6 @@
"resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz",
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
"license": "ISC",
"peer": true,
"engines": {
"node": ">=12"
}
@@ -9005,7 +8990,8 @@
"resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz",
"integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==",
"dev": true,
"license": "MIT"
"license": "MIT",
"peer": true
},
"node_modules/dompurify": {
"version": "3.2.7",
@@ -9086,7 +9072,6 @@
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"peer": true,
"bin": {
"esbuild": "bin/esbuild"
},
@@ -9395,7 +9380,6 @@
"resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.23.18.tgz",
"integrity": "sha512-HBVXBL5x3nk/0WrYM5G4VgjBey99ytVYET5AX17s/pcnlH90cyaxVUqgoN8cpF4+PqZRVOhwWsv28F+hxA9Tzg==",
"license": "MIT",
"peer": true,
"dependencies": {
"motion-dom": "^12.23.18",
"motion-utils": "^12.23.6",
@@ -10482,7 +10466,6 @@
"integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"cssstyle": "^4.2.1",
"data-urls": "^5.0.0",
@@ -10976,6 +10959,7 @@
"integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
"dev": true,
"license": "MIT",
"peer": true,
"bin": {
"lz-string": "bin/bin.js"
}
@@ -11906,6 +11890,7 @@
"integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"ansi-regex": "^5.0.1",
"ansi-styles": "^5.0.0",
@@ -11921,6 +11906,7 @@
"integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
"dev": true,
"license": "MIT",
"peer": true,
"engines": {
"node": ">=10"
},
@@ -11993,7 +11979,6 @@
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
"license": "MIT",
"peer": true,
"dependencies": {
"loose-envify": "^1.1.0"
},
@@ -12038,7 +12023,6 @@
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
"license": "MIT",
"peer": true,
"dependencies": {
"loose-envify": "^1.1.0",
"scheduler": "^0.23.2"
@@ -12052,7 +12036,8 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
"dev": true,
"license": "MIT"
"license": "MIT",
"peer": true
},
"node_modules/react-remark": {
"version": "2.1.0",
@@ -12574,7 +12559,6 @@
"integrity": "sha512-/vFSi3I+ya/D75UZh5GxLc/6UQ+KoKPEvL9autr1yGcaeWzXBQr1tTXmNDS4FImFCPwBAvVe7j9YzR8PQ5rfqw==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@types/estree": "1.0.8"
},
@@ -12920,7 +12904,6 @@
"integrity": "sha512-X8YSQMNuqV9DklQLZH6mLKpDn15Z5tuUUTAIYsiGqx5BwsjtXnv5K04fXgl3jqTZyUauzV/ii8KdT04NVLtMwQ==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@storybook/global": "^5.0.0",
"@testing-library/jest-dom": "^6.6.3",
@@ -13214,7 +13197,6 @@
"resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.3.1.tgz",
"integrity": "sha512-gBXpgUm/3rp1lMZZrM/w7D8GKqshif0zAymAhbCyIt8KMe+0v9DQ7cdYLR4FHH/cKpdTXb+A/tKKU3eolfsI+g==",
"license": "MIT",
"peer": true,
"funding": {
"type": "github",
"url": "https://github.com/sponsors/dcastil"
@@ -13243,8 +13225,7 @@
"version": "4.1.13",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.13.tgz",
"integrity": "sha512-i+zidfmTqtwquj4hMEwdjshYYgMbOrPzb9a0M3ZgNa0JMoZeFC6bxZvO8yr8ozS6ix2SDz0+mvryPeBs2TFE+w==",
"license": "MIT",
"peer": true
"license": "MIT"
},
"node_modules/tailwindcss-animate": {
"version": "1.0.7",
@@ -13559,8 +13540,7 @@
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"license": "0BSD",
"peer": true
"license": "0BSD"
},
"node_modules/typescript": {
"version": "5.9.2",
@@ -13568,7 +13548,6 @@
"integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
"dev": true,
"license": "Apache-2.0",
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -13981,7 +13960,6 @@
"integrity": "sha512-BxAKBWmIbrDgrokdGZH1IgkIk/5mMHDreLDmCJ0qpyJaAteP8NvMhkwr/ZCQNqNH97bw/dANTE9PDzqwJghfMQ==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"esbuild": "^0.25.0",
"fdir": "^6.5.0",
@@ -14109,7 +14087,6 @@
"integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@types/chai": "^5.2.2",
"@vitest/expect": "3.2.4",