mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: make configuration parameter optional for backward compatibility
This commit is contained in:
parent
f708a49a05
commit
30a60bf8d4
2 changed files with 9 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ export interface McpApi {
|
|||
export interface RooCodeAPI extends EventEmitter<RooCodeEvents>, McpApi {
|
||||
// Task Management
|
||||
startNewTask(options: {
|
||||
configuration: RooCodeSettings
|
||||
configuration?: RooCodeSettings
|
||||
text?: string
|
||||
images?: string[]
|
||||
newTab?: boolean
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
|
|||
images,
|
||||
newTab,
|
||||
}: {
|
||||
configuration: RooCodeSettings
|
||||
configuration?: RooCodeSettings
|
||||
text?: string
|
||||
images?: string[]
|
||||
newTab?: boolean
|
||||
|
|
@ -154,7 +154,13 @@ export class API extends EventEmitter<RooCodeEvents> implements RooCodeAPI {
|
|||
consecutiveMistakeLimit: Number.MAX_SAFE_INTEGER,
|
||||
}
|
||||
|
||||
const task = await provider.createTask(text, images, undefined, options, configuration)
|
||||
const task = await provider.createTask(
|
||||
text,
|
||||
images,
|
||||
undefined,
|
||||
options,
|
||||
configuration || this.getConfiguration(),
|
||||
)
|
||||
|
||||
if (!task) {
|
||||
throw new Error("Failed to create task due to policy restrictions")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue