Skip to content

Commit 3d3d581

Browse files
committed
refactor: replace console.log with logger in abortStream
Following logging guidelines to use the logger from utils/logging instead of console.log for better debugging control in test environments.
1 parent b5422d2 commit 3d3d581

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/Cline.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import { McpHub } from "../services/mcp/McpHub"
6464
import crypto from "crypto"
6565
import { insertGroups } from "./diff/insert-groups"
6666
import { EXPERIMENT_IDS, experiments as Experiments } from "../shared/experiments"
67+
import { logger } from "../utils/logging"
6768

6869
const cwd =
6970
vscode.workspace.workspaceFolders?.map((folder) => folder.uri.fsPath).at(0) ?? path.join(os.homedir(), "Desktop") // may or may not exist but fs checking existence would immediately ask for permission which would be bad UX, need to come up with a better solution
@@ -2836,7 +2837,7 @@ export class Cline {
28362837
}
28372838

28382839
const abortStream = async (cancelReason: ClineApiReqCancelReason, streamingFailedMessage?: string) => {
2839-
console.log(`[Cline#abortStream] cancelReason = ${cancelReason}`)
2840+
logger.debug(`[Cline#abortStream] cancelReason = ${cancelReason}`)
28402841

28412842
if (this.diffViewProvider.isEditing) {
28422843
await this.diffViewProvider.revertChanges() // closes diff view

0 commit comments

Comments
 (0)