mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 20:31:37 -05:00
Add 'Always allow read-only' option
This commit is contained in:
@@ -233,6 +233,7 @@ export class ClaudeDev {
|
||||
private api: ApiHandler
|
||||
private maxRequestsPerTask: number
|
||||
private customInstructions?: string
|
||||
private alwaysAllowReadOnly: boolean
|
||||
private requestCount = 0
|
||||
apiConversationHistory: Anthropic.MessageParam[] = []
|
||||
claudeMessages: ClaudeMessage[] = []
|
||||
@@ -249,6 +250,7 @@ export class ClaudeDev {
|
||||
apiConfiguration: ApiConfiguration,
|
||||
maxRequestsPerTask?: number,
|
||||
customInstructions?: string,
|
||||
alwaysAllowReadOnly?: boolean,
|
||||
task?: string,
|
||||
images?: string[],
|
||||
historyItem?: HistoryItem
|
||||
@@ -257,6 +259,7 @@ export class ClaudeDev {
|
||||
this.api = buildApiHandler(apiConfiguration)
|
||||
this.maxRequestsPerTask = maxRequestsPerTask ?? DEFAULT_MAX_REQUESTS_PER_TASK
|
||||
this.customInstructions = customInstructions
|
||||
this.alwaysAllowReadOnly = alwaysAllowReadOnly ?? false
|
||||
|
||||
if (historyItem) {
|
||||
this.taskId = historyItem.id
|
||||
@@ -281,6 +284,10 @@ export class ClaudeDev {
|
||||
this.customInstructions = customInstructions
|
||||
}
|
||||
|
||||
updateAlwaysAllowReadOnly(alwaysAllowReadOnly: boolean | undefined) {
|
||||
this.alwaysAllowReadOnly = alwaysAllowReadOnly ?? false
|
||||
}
|
||||
|
||||
async handleWebviewAskResponse(askResponse: ClaudeAskResponse, text?: string, images?: string[]) {
|
||||
this.askResponse = askResponse
|
||||
this.askResponseText = text
|
||||
|
||||
Reference in New Issue
Block a user