mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
Update the webview when changing settings via the API (#2143)
* Update the webview when changing settings via the API * Update src/exports/api.ts Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
parent
60437fdb74
commit
3f8429646c
4 changed files with 6 additions and 34 deletions
5
.changeset/grumpy-pets-run.md
Normal file
5
.changeset/grumpy-pets-run.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"roo-cline": patch
|
||||
---
|
||||
|
||||
Update the webview when changing settings via the API
|
||||
|
|
@ -193,16 +193,9 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
|
|||
return this.sidebarProvider.getValues()
|
||||
}
|
||||
|
||||
public getConfigurationValue<K extends keyof RooCodeSettings>(key: K) {
|
||||
return this.sidebarProvider.getValue(key)
|
||||
}
|
||||
|
||||
public async setConfiguration(values: RooCodeSettings) {
|
||||
await this.sidebarProvider.setValues(values)
|
||||
}
|
||||
|
||||
public async setConfigurationValue<K extends keyof RooCodeSettings>(key: K, value: RooCodeSettings[K]) {
|
||||
await this.sidebarProvider.setValue(key, value)
|
||||
await this.sidebarProvider.postStateToWebview()
|
||||
}
|
||||
|
||||
public isReady() {
|
||||
|
|
|
|||
|
|
@ -66,26 +66,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.
|
||||
*/
|
||||
|
|
|
|||
12
src/exports/roo-code.d.ts
vendored
12
src/exports/roo-code.d.ts
vendored
|
|
@ -566,23 +566,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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue