diff --git a/src/exports/api.ts b/src/exports/api.ts index c357c73b04c..ca30c0f3fb5 100644 --- a/src/exports/api.ts +++ b/src/exports/api.ts @@ -6,7 +6,14 @@ import * as path from "path" import { getWorkspacePath } from "../utils/path" import { ClineProvider } from "../core/webview/ClineProvider" import { openClineInNewTab } from "../activate/registerCommands" -import { RooCodeSettings, RooCodeEvents, RooCodeEventName, ProviderSettings, ProviderSettingsEntry } from "../schemas" +import { + RooCodeSettings, + RooCodeEvents, + RooCodeEventName, + ProviderSettings, + ProviderSettingsEntry, + isSecretStateKey, +} from "../schemas" import { IpcOrigin, IpcMessageType, TaskCommandName, TaskEvent } from "../schemas/ipc" import { RooCodeAPI } from "./interface" @@ -246,8 +253,10 @@ export class API extends EventEmitter implements RooCodeAPI { // Global Settings Management - public getConfiguration() { - return this.sidebarProvider.getValues() + public getConfiguration(): RooCodeSettings { + return Object.fromEntries( + Object.entries(this.sidebarProvider.getValues()).filter(([key]) => !isSecretStateKey(key)), + ) } public async setConfiguration(values: RooCodeSettings) { @@ -266,10 +275,6 @@ export class API extends EventEmitter implements RooCodeAPI { return this.sidebarProvider.getProviderProfileEntry(name) } - public async getProfile(name: string): Promise { - return this.sidebarProvider.providerSettingsManager.getProfile({ name }) - } - public async createProfile(name: string, profile?: ProviderSettings, activate: boolean = true) { const entry = this.getProfileEntry(name) diff --git a/src/exports/interface.ts b/src/exports/interface.ts index fdb89a34d0a..eb30ea17733 100644 --- a/src/exports/interface.ts +++ b/src/exports/interface.ts @@ -120,13 +120,6 @@ export interface RooCodeAPI extends EventEmitter { */ getProfileEntry(name: string): ProviderSettingsEntry | undefined - /** - * Returns the profile for a given name - * @param name The name of the profile - * @returns The profile, or undefined if the profile does not exist - */ - getProfile(name: string): Promise - /** * Creates a new API configuration profile * @param name The name of the profile diff --git a/src/exports/roo-code.d.ts b/src/exports/roo-code.d.ts index 76625c7e7fd..4727a1af4df 100644 --- a/src/exports/roo-code.d.ts +++ b/src/exports/roo-code.d.ts @@ -638,12 +638,6 @@ interface RooCodeAPI extends EventEmitter { * @returns The profile entry, or undefined if the profile does not exist */ getProfileEntry(name: string): ProviderSettingsEntry | undefined - /** - * Returns the profile for a given name - * @param name The name of the profile - * @returns The profile, or undefined if the profile does not exist - */ - getProfile(name: string): Promise /** * Creates a new API configuration profile * @param name The name of the profile