Skip to content

Commit 3e64cb9

Browse files
committed
attempt to fix tests
1 parent 7080f00 commit 3e64cb9

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/core/prompts/sections/schedulable-rules.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,23 +135,25 @@ export class SchedulableRulesManager {
135135

136136
// Show the output panel for important messages
137137
if (level === "info" || level === "warn" || level === "error") {
138-
this.outputChannel.show(true)
138+
if (typeof this.outputChannel.show === "function") {
139+
this.outputChannel.show(true)
140+
}
139141
}
140142
}
141143

142144
// Also log to the regular logger for completeness
143145
switch (level) {
144146
case "debug":
145-
logger.debug(message)
147+
if (typeof logger.debug === "function") logger.debug(message)
146148
break
147149
case "info":
148-
logger.info(message)
150+
if (typeof logger.info === "function") logger.info(message)
149151
break
150152
case "warn":
151-
logger.warn(message)
153+
if (typeof logger.warn === "function") logger.warn(message)
152154
break
153155
case "error":
154-
logger.error(message)
156+
if (typeof logger.error === "function") logger.error(message)
155157
break
156158
}
157159
}

src/core/webview/ClineProvider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ export class ClineProvider implements vscode.WebviewViewProvider {
9797
this.schedulableRulesManager.setContext(this.context)
9898
this.schedulableRulesManager.setOutputChannel(this.outputChannel)
9999
this.outputChannel.appendLine("SchedulableRulesManager initialized with OutputChannel")
100-
this.outputChannel.show() // Show the output channel to make logs visible
100+
if (typeof this.outputChannel.show === "function") {
101+
this.outputChannel.show() // Show the output channel to make logs visible
102+
}
101103

102104
this.workspaceTracker = new WorkspaceTracker(this)
103105
this.configManager = new ConfigManager(this.context)

0 commit comments

Comments
 (0)