← Back to PRs

#18841: fix(feishu): replace console.log with runtime log for typing indicator errors

by Clawborn open 2026-02-17 04:02 View on GitHub →
channel: zalo channel: feishu size: XS trusted-contributor
Typing indicators are non-critical, but errors should still be logged via the runtime logger (verbose only) rather than console.log, which bypasses log levels. Fix: Updated addTypingIndicator/removeTypingIndicator to accept runtime env and use it for logging. <!-- greptile_comment --> <h3>Greptile Summary</h3> Replaces `console.log`/`console.error` calls with runtime logger methods in the Feishu and Zalo extensions, ensuring error and debug output respects log-level configuration. - **Feishu `typing.ts`**: Error logging in `addTypingIndicator`/`removeTypingIndicator` catch blocks now uses `runtime?.log?.()` gated by `shouldLogVerbose()`, instead of unconditional `console.log`. Both functions accept a new optional `runtime?: RuntimeEnv` parameter. - **Feishu `reply-dispatcher.ts`**: Updated call sites for `addTypingIndicator`/`removeTypingIndicator` to pass the existing `params.runtime` through. - **Zalo `monitor.ts`**: Replaced `console.error` with `runtime.error?.()` for polling and image download errors, and replaced `console.log` with the existing `logVerbose()` helper for sticker/unsupported message logging. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge — it only changes logging mechanisms without altering any business logic. - The changes are straightforward console.log/console.error replacements with runtime logger calls, following patterns already established elsewhere in these extensions (e.g., Zalo's `logVerbose` helper). No logic changes, no new dependencies, no API surface changes. All call sites are updated and no stale console calls remain in the affected files. - No files require special attention. <sub>Last reviewed commit: 658392c</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs