Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/exports/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -246,8 +253,10 @@ export class API extends EventEmitter<RooCodeEvents> 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) {
Expand All @@ -266,10 +275,6 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
return this.sidebarProvider.getProviderProfileEntry(name)
}

public async getProfile(name: string): Promise<ProviderSettings | undefined> {
return this.sidebarProvider.providerSettingsManager.getProfile({ name })
}

public async createProfile(name: string, profile?: ProviderSettings, activate: boolean = true) {
const entry = this.getProfileEntry(name)

Expand Down
7 changes: 0 additions & 7 deletions src/exports/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ export interface RooCodeAPI extends EventEmitter<RooCodeEvents> {
*/
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<ProviderSettings | undefined>

/**
* Creates a new API configuration profile
* @param name The name of the profile
Expand Down
6 changes: 0 additions & 6 deletions src/exports/roo-code.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,12 +638,6 @@ interface RooCodeAPI extends EventEmitter<RooCodeEvents> {
* @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<ProviderSettings | undefined>
/**
* Creates a new API configuration profile
* @param name The name of the profile
Expand Down