Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Commit de8a10d

Browse files
authored
refactor: remove verbose info and debug logging statements (#1731)
1 parent 6ea81c9 commit de8a10d

38 files changed

Lines changed: 19 additions & 198 deletions

File tree

‎apps/code/src/main/db/service.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export class DatabaseService {
4141
this._sqlite.pragma("foreign_keys = ON");
4242
this._db = drizzle(this._sqlite, { schema, casing: "snake_case" });
4343
migrate(this._db, { migrationsFolder: MIGRATIONS_FOLDER });
44-
log.info("Database ready");
4544
} catch (error) {
4645
log.error("Database initialization failed", error);
4746
throw error;

‎apps/code/src/main/protocols/mcp-sandbox.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ const log = logger.scope("mcp-sandbox protocol");
2828
export function registerMcpSandboxProtocol(): void {
2929
const mainSession = session.fromPartition("persist:main");
3030

31-
log.info("Registering protocol handler on persist:main", {
32-
htmlLength: sandboxProxyHtml.length,
33-
});
34-
3531
mainSession.protocol.handle("mcp-sandbox", (request) => {
3632
log.debug("Serving proxy HTML", { url: request.url });
3733

‎apps/code/src/main/services/agent/service.ts‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,9 @@ export class AgentService extends TypedEventEmitter<AgentServiceEvents> {
427427
public hasActiveSessions(): boolean {
428428
for (const session of this.sessions.values()) {
429429
if (session.promptPending || session.inFlightMcpToolCalls.size > 0) {
430-
log.info("Active session found", { sessionId: session.taskRunId });
431430
return true;
432431
}
433432
}
434-
log.debug("No active sessions found");
435433
return false;
436434
}
437435

@@ -890,14 +888,6 @@ When creating pull requests, add the following footer at the end of the PR descr
890888
this.recordActivity(sessionId);
891889
this.sleepService.acquire(sessionId);
892890

893-
const promptJson = JSON.stringify(finalPrompt);
894-
log.info("Sending prompt to agent", {
895-
sessionId,
896-
blockCount: finalPrompt.length,
897-
blocks: promptJson.slice(0, 10000),
898-
totalSize: promptJson.length,
899-
});
900-
901891
try {
902892
const result = await session.clientSideConnection.prompt({
903893
sessionId: getAgentSessionId(session),
@@ -994,8 +984,6 @@ When creating pull requests, add the following footer at the end of the PR descr
994984
) {
995985
session.config.permissionMode = updatedModeOption.currentValue;
996986
}
997-
998-
log.info("Session config option updated", { sessionId, configId, value });
999987
} catch (err) {
1000988
log.error("Failed to set session config option", {
1001989
sessionId,

‎apps/code/src/main/services/auth-proxy/service.ts‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export class AuthProxyService {
3434
const addr = this.server?.address();
3535
if (typeof addr === "object" && addr) {
3636
this.port = addr.port;
37-
log.info("Auth proxy started", { port: this.port });
3837
resolve(this.getProxyUrl());
3938
} else {
4039
reject(new Error("Failed to get proxy address"));
@@ -118,12 +117,6 @@ export class AuthProxyService {
118117
return;
119118
}
120119

121-
log.debug("Proxying request", {
122-
method: req.method,
123-
incoming: req.url,
124-
target: targetUrl.toString(),
125-
});
126-
127120
const strippedAuthHeaders = new Set([
128121
"authorization",
129122
"x-api-key",
@@ -173,11 +166,6 @@ export class AuthProxyService {
173166
options,
174167
);
175168

176-
log.debug("Proxy response", {
177-
url,
178-
status: response.status,
179-
});
180-
181169
const responseHeaders: Record<string, string> = {};
182170
const stripHeaders = new Set([
183171
"transfer-encoding",

‎apps/code/src/main/services/connectivity/service.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export class ConnectivityService extends TypedEventEmitter<ConnectivityEvents> {
2525
@postConstruct()
2626
init(): void {
2727
this.isOnline = net.isOnline();
28-
log.info("Initial connectivity status", { isOnline: this.isOnline });
2928

3029
this.startPolling();
3130
}

‎apps/code/src/main/services/deep-link/service.ts‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ export class DeepLinkService {
2525
// Skip protocol registration in development to avoid hijacking deep links
2626
// from the production app. OAuth uses HTTP callback in dev mode anyway.
2727
if (process.defaultApp) {
28-
log.info(
29-
"Skipping protocol registration in development (using HTTP callback for OAuth)",
30-
);
3128
return;
3229
}
3330

@@ -38,17 +35,13 @@ export class DeepLinkService {
3835
}
3936

4037
this.protocolRegistered = true;
41-
log.info(
42-
`Registered '${PROTOCOL}' and legacy [${LEGACY_PROTOCOLS.join(", ")}] protocol handlers`,
43-
);
4438
}
4539

4640
public registerHandler(key: string, handler: DeepLinkHandler): void {
4741
if (this.handlers.has(key)) {
4842
log.warn(`Overwriting existing handler for key: ${key}`);
4943
}
5044
this.handlers.set(key, handler);
51-
log.info(`Registered deep link handler for key: ${key}`);
5245
}
5346

5447
public unregisterHandler(key: string): void {

‎apps/code/src/main/services/mcp-apps/service.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ export class McpAppsService extends TypedEventEmitter<McpAppsServiceEvents> {
154154
throw new Error(`No server config for: ${serverName}`);
155155
}
156156

157-
log.info("Creating lazy MCP connection", { serverName, url: config.url });
158157
const connectionPromise = this.createConnection(config);
159158
this.pendingConnections.set(serverName, connectionPromise);
160159

‎apps/code/src/main/services/mcp-proxy/service.ts‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -201,24 +201,12 @@ export class McpProxyService {
201201
status: response.status,
202202
body: bodyText.slice(0, 2000),
203203
});
204-
} else {
205-
log.debug("MCP proxy response", {
206-
id,
207-
url,
208-
status: response.status,
209-
});
210204
}
211205

212206
this.writeBufferedResponse(response, buf, res);
213207
return;
214208
}
215209

216-
log.debug("MCP proxy response", {
217-
id,
218-
url,
219-
status: response.status,
220-
streaming: true,
221-
});
222210
this.writeStreamingResponse(response, res);
223211
} catch (err) {
224212
log.error("MCP proxy forward error", { id, url, err });

‎apps/code/src/main/services/notification/service.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export class NotificationService {
1919
@postConstruct()
2020
init(): void {
2121
app.on("browser-window-focus", () => this.clearDockBadge());
22-
log.info("Notification service initialized");
2322
}
2423

2524
send(title: string, body: string, silent: boolean, taskId?: string): void {
@@ -47,7 +46,6 @@ export class NotificationService {
4746
});
4847

4948
notification.show();
50-
log.info("Notification sent", { title, body, silent, taskId });
5149
}
5250

5351
showDockBadge(): void {
@@ -59,7 +57,6 @@ export class NotificationService {
5957
} else if (process.platform === "win32") {
6058
getMainWindow()?.flashFrame(true);
6159
}
62-
log.info("Dock badge shown");
6360
}
6461

6562
bounceDock(): void {
@@ -80,6 +77,5 @@ export class NotificationService {
8077
} else if (process.platform === "win32") {
8178
getMainWindow()?.flashFrame(false);
8279
}
83-
log.info("Dock badge cleared");
8480
}
8581
}

‎apps/code/src/main/services/oauth/service.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export class OAuthService {
5656
this.deepLinkService.registerHandler("callback", (_path, searchParams) =>
5757
this.handleOAuthCallback(searchParams),
5858
);
59-
log.info("Registered OAuth callback handler for deep links");
6059
}
6160

6261
private handleOAuthCallback(searchParams: URLSearchParams): boolean {

0 commit comments

Comments
 (0)