fix(pending-question): silence log when no pending questions

Only log "Loaded X pending questions" when X > 0 to reduce noise
in CLI output. The message was appearing on every ccw command due to
module import chain, but is only meaningful for ccw view startup.
This commit is contained in:
catlog22
2026-02-22 19:36:55 +08:00
parent 367fb94718
commit 02a203c6b2

View File

@@ -77,8 +77,11 @@ function initialize(): void {
pendingQuestions.set(sq.id, pendingQ); pendingQuestions.set(sq.id, pendingQ);
} }
// Only log when there are actual pending questions (silent when 0)
if (pendingQuestions.size > 0) {
console.log(`[PendingQuestionService] Loaded ${pendingQuestions.size} pending questions from storage`); console.log(`[PendingQuestionService] Loaded ${pendingQuestions.size} pending questions from storage`);
} }
}
initialized = true; initialized = true;
} catch (error) { } catch (error) {