diff --git a/.changeset/grumpy-pets-run.md b/.changeset/grumpy-pets-run.md new file mode 100644 index 0000000000..271f580fc6 --- /dev/null +++ b/.changeset/grumpy-pets-run.md @@ -0,0 +1,5 @@ +--- +"roo-cline": patch +--- + +Update the webview when changing settings via the API diff --git a/src/exports/api.ts b/src/exports/api.ts index 61dd34cc63..19d679b2ee 100644 --- a/src/exports/api.ts +++ b/src/exports/api.ts @@ -193,16 +193,9 @@ export class API extends EventEmitter implements RooCodeAPI { return this.sidebarProvider.getValues() } - public getConfigurationValue(key: K) { - return this.sidebarProvider.getValue(key) - } - public async setConfiguration(values: RooCodeSettings) { await this.sidebarProvider.setValues(values) - } - - public async setConfigurationValue(key: K, value: RooCodeSettings[K]) { - await this.sidebarProvider.setValue(key, value) + await this.sidebarProvider.postStateToWebview() } public isReady() { diff --git a/src/exports/interface.ts b/src/exports/interface.ts index af0277f541..9b2c619409 100644 --- a/src/exports/interface.ts +++ b/src/exports/interface.ts @@ -66,26 +66,12 @@ export interface RooCodeAPI extends EventEmitter { */ getConfiguration(): RooCodeSettings - /** - * Returns the value of a configuration key. - * @param key The key of the configuration value to return. - * @returns The value of the configuration key. - */ - getConfigurationValue(key: K): RooCodeSettings[K] - /** * Sets the configuration for the current task. * @param values An object containing key-value pairs to set. */ setConfiguration(values: RooCodeSettings): Promise - /** - * Sets the value of a configuration key. - * @param key The key of the configuration value to set. - * @param value The value to set. - */ - setConfigurationValue(key: K, value: RooCodeSettings[K]): Promise - /** * Returns true if the API is ready to use. */ diff --git a/src/exports/roo-code.d.ts b/src/exports/roo-code.d.ts index 3149a0b1b3..2db5b90768 100644 --- a/src/exports/roo-code.d.ts +++ b/src/exports/roo-code.d.ts @@ -566,23 +566,11 @@ interface RooCodeAPI extends EventEmitter { * @returns The current configuration. */ getConfiguration(): RooCodeSettings - /** - * Returns the value of a configuration key. - * @param key The key of the configuration value to return. - * @returns The value of the configuration key. - */ - getConfigurationValue(key: K): RooCodeSettings[K] /** * Sets the configuration for the current task. * @param values An object containing key-value pairs to set. */ setConfiguration(values: RooCodeSettings): Promise - /** - * Sets the value of a configuration key. - * @param key The key of the configuration value to set. - * @param value The value to set. - */ - setConfigurationValue(key: K, value: RooCodeSettings[K]): Promise /** * Returns true if the API is ready to use. */