Skip to content

fix(llms): make debug logs removable by consumer bundles - #623

Open
FayezBast wants to merge 1 commit into
alibaba:mainfrom
FayezBast:fix/llms-console-drop
Open

fix(llms): make debug logs removable by consumer bundles#623
FayezBast wants to merge 1 commit into
alibaba:mainfrom
FayezBast:fix/llms-console-drop

Conversation

@FayezBast

@FayezBast FayezBast commented Jul 16, 2026

Copy link
Copy Markdown

What

Fixes a runtime failure in downstream bundles that remove console calls.

Replaces the bound console.debug logger in @page-agent/llms with a wrapper function, allowing minifiers to safely remove console calls without making the logger non-callable.

Adds a regression test that bundles the real source, removes console calls, executes the optimized bundle, and verifies that modelPatch still works.

Closes #621

Type

  • Bug fix

Testing

  • npm run ci passes
  • Tested in modern browsers

Requirements / 要求

  • I have read and follow the Code of Conduct and Contributing Guide . / 我已阅读并遵守行为准则。
  • This PR is NOT generated by a bot or AI agent acting autonomously. I have authored or meaningfully reviewed every change. / 此 PR 不是由 bot 或 AI 自主生成的,我已亲自编写或充分审查了每一处变更。

@CLAassistant

CLAassistant commented Jul 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Vitepress中生产构建开启 esbuild drop: ['console'] 时报 TypeError: debug is not a function

2 participants