mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +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
73fe581868
commit
a6ed5ce0ea
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
|
||||
|
|
@ -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)
|
||||
await this.provider.postStateToWebview()
|
||||
}
|
||||
|
||||
public isReady() {
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
12
src/exports/roo-code.d.ts
vendored
12
src/exports/roo-code.d.ts
vendored
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue