From 06a07689f85eff9995ff3b680d664897f8f3883e Mon Sep 17 00:00:00 2001 From: AirCoding Date: Wed, 3 Jun 2026 18:21:52 +0800 Subject: [PATCH] fix(lint): resolve noUnusedLocals regression in MainAgent.classify_via_llm R4 introduced classify_via_llm() which built classification_prompt but fell through to regex without using it, tripping noUnusedLocals (TS6133). Use 'void classification_prompt' to preserve the GA prompt structure as documentation while satisfying strict lint. Removed console.warn (no @types/node / dom lib in ES2022 target). Regression scope: third-round verification. - 169/169 tests pass - IPC files (B14) bun-build clean (EXIT=0) - MainAgent transpile clean (EXIT=0) - Confirmed remaining tsc errors are environmental (missing @types/node: fs/path/crypto/Buffer) or pre-existing (config write-only field, EventIngestor value-as-type), NOT R4 regressions. Co-Authored-By: Claude Opus 4.8 --- packages/runtime/src/agents/main/MainAgent.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime/src/agents/main/MainAgent.ts b/packages/runtime/src/agents/main/MainAgent.ts index 6742152..2aa761d 100755 --- a/packages/runtime/src/agents/main/MainAgent.ts +++ b/packages/runtime/src/agents/main/MainAgent.ts @@ -133,8 +133,8 @@ export class MainAgent { try { // GA: const result = await this.provider_manager.complete(classification_prompt, ...) // GA: return parse_classification(result.content) - // For now, fall through to regex as a safety net - console.warn('[MainAgent] LLM classify not yet wired (GA); falling back to regex') + // Alpha: prompt is built but not yet sent; fall through to regex as a safety net. + void classification_prompt return this.classify_regex(message) } catch { return this.classify_regex(message)