style: auto-fix ESLint issues (curly braces and formatting)

- Add curly braces to all if/else/for/while statements
- Fix indentation and trailing spaces
- Auto-fixed 372 linting errors using eslint --fix
- Remaining issues are warnings only (non-null assertions, explicit any types)
This commit is contained in:
William Valentin
2026-02-11 10:30:24 -08:00
parent 0578a87d85
commit 6090508bad
99 changed files with 418 additions and 418 deletions
+5 -5
View File
@@ -83,8 +83,8 @@ export class SessionBridge {
/** Switch a connection to a different session (e.g. resuming an old session). */
switchSession(connectionId: string, sessionId: string): void {
const client = this.clients.get(connectionId);
if (!client) throw new Error(`Unknown connection: ${connectionId}`);
if (client.busy) throw new Error('Cannot switch session while agent is busy');
if (!client) {throw new Error(`Unknown connection: ${connectionId}`);}
if (client.busy) {throw new Error('Cannot switch session while agent is busy');}
const agent = this.getOrCreateAgent(sessionId);
client.sessionId = sessionId;
@@ -109,13 +109,13 @@ export class SessionBridge {
/** Mark a connection's agent as busy/idle. */
setBusy(connectionId: string, busy: boolean): void {
const client = this.clients.get(connectionId);
if (client) client.busy = busy;
if (client) {client.busy = busy;}
}
/** Set onToolUse callback for a connection's agent. */
setOnToolUse(connectionId: string, callback: ((event: ToolUseEvent) => void) | undefined): void {
const client = this.clients.get(connectionId);
if (client) client.agent.setOnToolUse(callback);
if (client) {client.agent.setOnToolUse(callback);}
}
/** List all active sessions with connection counts. */
@@ -159,7 +159,7 @@ export class SessionBridge {
const seen = new Set<string>();
for (const client of this.clients.values()) {
if (seen.has(client.sessionId)) continue;
if (seen.has(client.sessionId)) {continue;}
seen.add(client.sessionId);
const usage = client.agent.getUsage();