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 9794d89028..d37d0880eb 100644 --- a/src/exports/api.ts +++ b/src/exports/api.ts @@ -82,16 +82,9 @@ export class API extends EventEmitter implements RooCodeAPI { return this.provider.getValues() } - public getConfigurationValue(key: K) { - return this.provider.getValue(key) - } - public async setConfiguration(values: RooCodeSettings) { await this.provider.setValues(values) - } - - public async setConfigurationValue(key: K, value: RooCodeSettings[K]) { - await this.provider.setValue(key, value) + await this.provider.postStateToWebview() } public isReady() { diff --git a/src/exports/interface.ts b/src/exports/interface.ts index de1f7ea15c..33eb39aa4e 100644 --- a/src/exports/interface.ts +++ b/src/exports/interface.ts @@ -67,26 +67,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 2804ab47f0..dac6d1728e 100644 --- a/src/exports/roo-code.d.ts +++ b/src/exports/roo-code.d.ts @@ -457,23 +457,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. */