mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-21 21:01:06 -05:00
Remove max requests per task settings option
This commit is contained in:
@@ -22,7 +22,6 @@ type GlobalStateKey =
|
||||
| "awsRegion"
|
||||
| "vertexProjectId"
|
||||
| "vertexRegion"
|
||||
| "maxRequestsPerTask"
|
||||
| "lastShownAnnouncementId"
|
||||
| "customInstructions"
|
||||
| "alwaysAllowReadOnly"
|
||||
@@ -166,11 +165,10 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
|
||||
|
||||
async initClaudeDevWithTask(task?: string, images?: string[]) {
|
||||
await this.clearTask() // ensures that an exising task doesn't exist before starting a new one, although this shouldn't be possible since user must clear task before starting a new one
|
||||
const { maxRequestsPerTask, apiConfiguration, customInstructions, alwaysAllowReadOnly } = await this.getState()
|
||||
const { apiConfiguration, customInstructions, alwaysAllowReadOnly } = await this.getState()
|
||||
this.claudeDev = new ClaudeDev(
|
||||
this,
|
||||
apiConfiguration,
|
||||
maxRequestsPerTask,
|
||||
customInstructions,
|
||||
alwaysAllowReadOnly,
|
||||
task,
|
||||
@@ -180,11 +178,10 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
|
||||
|
||||
async initClaudeDevWithHistoryItem(historyItem: HistoryItem) {
|
||||
await this.clearTask()
|
||||
const { maxRequestsPerTask, apiConfiguration, customInstructions, alwaysAllowReadOnly } = await this.getState()
|
||||
const { apiConfiguration, customInstructions, alwaysAllowReadOnly } = await this.getState()
|
||||
this.claudeDev = new ClaudeDev(
|
||||
this,
|
||||
apiConfiguration,
|
||||
maxRequestsPerTask,
|
||||
customInstructions,
|
||||
alwaysAllowReadOnly,
|
||||
undefined,
|
||||
@@ -329,18 +326,6 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
|
||||
}
|
||||
await this.postStateToWebview()
|
||||
break
|
||||
case "maxRequestsPerTask":
|
||||
let result: number | undefined = undefined
|
||||
if (message.text && message.text.trim()) {
|
||||
const num = Number(message.text)
|
||||
if (!isNaN(num)) {
|
||||
result = num
|
||||
}
|
||||
}
|
||||
await this.updateGlobalState("maxRequestsPerTask", result)
|
||||
this.claudeDev?.updateMaxRequestsPerTask(result)
|
||||
await this.postStateToWebview()
|
||||
break
|
||||
case "customInstructions":
|
||||
// User may be clearing the field
|
||||
await this.updateGlobalState("customInstructions", message.text || undefined)
|
||||
@@ -489,7 +474,6 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
|
||||
async getStateToPostToWebview() {
|
||||
const {
|
||||
apiConfiguration,
|
||||
maxRequestsPerTask,
|
||||
lastShownAnnouncementId,
|
||||
customInstructions,
|
||||
alwaysAllowReadOnly,
|
||||
@@ -498,7 +482,6 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
|
||||
return {
|
||||
version: this.context.extension?.packageJSON?.version ?? "",
|
||||
apiConfiguration,
|
||||
maxRequestsPerTask,
|
||||
customInstructions,
|
||||
alwaysAllowReadOnly,
|
||||
themeName: vscode.workspace.getConfiguration("workbench").get<string>("colorTheme"),
|
||||
@@ -606,7 +589,6 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
|
||||
awsRegion,
|
||||
vertexProjectId,
|
||||
vertexRegion,
|
||||
maxRequestsPerTask,
|
||||
lastShownAnnouncementId,
|
||||
customInstructions,
|
||||
alwaysAllowReadOnly,
|
||||
@@ -621,7 +603,6 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
|
||||
this.getGlobalState("awsRegion") as Promise<string | undefined>,
|
||||
this.getGlobalState("vertexProjectId") as Promise<string | undefined>,
|
||||
this.getGlobalState("vertexRegion") as Promise<string | undefined>,
|
||||
this.getGlobalState("maxRequestsPerTask") as Promise<number | undefined>,
|
||||
this.getGlobalState("lastShownAnnouncementId") as Promise<string | undefined>,
|
||||
this.getGlobalState("customInstructions") as Promise<string | undefined>,
|
||||
this.getGlobalState("alwaysAllowReadOnly") as Promise<boolean | undefined>,
|
||||
@@ -654,7 +635,6 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
|
||||
vertexProjectId,
|
||||
vertexRegion,
|
||||
},
|
||||
maxRequestsPerTask,
|
||||
lastShownAnnouncementId,
|
||||
customInstructions,
|
||||
alwaysAllowReadOnly: alwaysAllowReadOnly ?? false,
|
||||
|
||||
Reference in New Issue
Block a user