Skip to content

Commit fe44d7d

Browse files
committed
refactor: consolidate debug output settings for Mistral API
1 parent 9fbafb0 commit fe44d7d

File tree

3 files changed

+27
-26
lines changed

3 files changed

+27
-26
lines changed

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,16 @@
270270
},
271271
"description": "Settings for VSCode Language Model API"
272272
},
273-
"roo-cline.enableMistralDebugOutput": {
274-
"type": "boolean",
275-
"default": false,
276-
"description": "Enable debug output channel for Mistral API interactions"
277-
},
278-
"roo-cline.enableApiStreamDebugOutput": {
279-
"type": "boolean",
280-
"default": false,
281-
"description": "Enable debug output for API streaming operations"
273+
"roo-cline.debug": {
274+
"type": "object",
275+
"description": "Debug settings for Roo Code",
276+
"properties": {
277+
"mistral": {
278+
"type": "boolean",
279+
"default": false,
280+
"description": "Enable debug output channel for Mistral API interactions"
281+
}
282+
}
282283
}
283284
}
284285
}

src/api/providers/mistral.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class MistralHandler implements ApiHandler {
2323
}
2424

2525
const config = vscode.workspace.getConfiguration("roo-cline")
26-
this.enableDebugOutput = config.get<boolean>("enableMistralDebugOutput", false)
26+
this.enableDebugOutput = config.get<boolean>("debug.mistral", false)
2727

2828
if (this.enableDebugOutput) {
2929
if (!MistralHandler.sharedOutputChannel) {

src/core/Cline.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ type UserContent = Array<
7676
export class Cline {
7777
private static readonly outputChannelName = "Roo Code Stream Output"
7878
private static sharedOutputChannel: vscode.OutputChannel | undefined
79-
private readonly enableStreamDebug: boolean
80-
private readonly outputChannel?: vscode.OutputChannel
79+
// private readonly enableStreamDebug: boolean
80+
// private readonly outputChannel?: vscode.OutputChannel
8181

8282
readonly taskId: string
8383
api: ApiHandler
@@ -135,15 +135,15 @@ export class Cline {
135135
historyItem?: HistoryItem | undefined,
136136
experiments?: Record<string, boolean>,
137137
) {
138-
const config = vscode.workspace.getConfiguration("roo-cline")
139-
this.enableStreamDebug = config.get<boolean>("enableApiStreamDebugOutput", false)
140-
141-
if (this.enableStreamDebug) {
142-
if (!Cline.sharedOutputChannel) {
143-
Cline.sharedOutputChannel = vscode.window.createOutputChannel(Cline.outputChannelName)
144-
}
145-
this.outputChannel = Cline.sharedOutputChannel
146-
}
138+
// const config = vscode.workspace.getConfiguration("roo-cline")
139+
// this.enableStreamDebug = config.get<boolean>("enableApiStreamDebugOutput", false)
140+
141+
// if (this.enableStreamDebug) {
142+
// if (!Cline.sharedOutputChannel) {
143+
// Cline.sharedOutputChannel = vscode.window.createOutputChannel(Cline.outputChannelName)
144+
// }
145+
// this.outputChannel = Cline.sharedOutputChannel
146+
// }
147147

148148
if (!task && !images && !historyItem) {
149149
throw new Error("Either historyItem or task/images must be provided")
@@ -175,11 +175,11 @@ export class Cline {
175175
}
176176
}
177177

178-
private logStreamDebug(message: string) {
179-
if (this.enableStreamDebug && this.outputChannel) {
180-
this.outputChannel.appendLine(`[Stream Debug] ${message}`)
181-
}
182-
}
178+
// private logStreamDebug(message: string) {
179+
// if (this.enableStreamDebug && this.outputChannel) {
180+
// this.outputChannel.appendLine(`[Stream Debug] ${message}`)
181+
// }
182+
// }
183183

184184
// Add method to update diffStrategy
185185
async updateDiffStrategy(experimentalDiffStrategy?: boolean) {

0 commit comments

Comments
 (0)