Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions .changeset/grumpy-pets-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"roo-cline": patch
---

Update the webview when changing settings via the API
9 changes: 1 addition & 8 deletions src/exports/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,9 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
return this.provider.getValues()
}

public getConfigurationValue<K extends keyof RooCodeSettings>(key: K) {
return this.provider.getValue(key)
}

public async setConfiguration(values: RooCodeSettings) {
await this.provider.setValues(values)
}

public async setConfigurationValue<K extends keyof RooCodeSettings>(key: K, value: RooCodeSettings[K]) {
await this.provider.setValue(key, value)
this.provider.postStateToWebview()
}

public isReady() {
Expand Down
14 changes: 0 additions & 14 deletions src/exports/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,12 @@ export interface RooCodeAPI extends EventEmitter<RooCodeEvents> {
*/
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<K extends keyof RooCodeSettings>(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<void>

/**
* Sets the value of a configuration key.
* @param key The key of the configuration value to set.
* @param value The value to set.
*/
setConfigurationValue<K extends keyof RooCodeSettings>(key: K, value: RooCodeSettings[K]): Promise<void>

/**
* Returns true if the API is ready to use.
*/
Expand Down
12 changes: 0 additions & 12 deletions src/exports/roo-code.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,23 +457,11 @@ interface RooCodeAPI extends EventEmitter<RooCodeEvents> {
* @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<K extends keyof RooCodeSettings>(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<void>
/**
* Sets the value of a configuration key.
* @param key The key of the configuration value to set.
* @param value The value to set.
*/
setConfigurationValue<K extends keyof RooCodeSettings>(key: K, value: RooCodeSettings[K]): Promise<void>
/**
* Returns true if the API is ready to use.
*/
Expand Down