Skip to content

upstream port: refresh static header on model switch (#3667) #184

@mabry1985

Description

@mabry1985

Replace polling-based model detection with event-driven Config.onModelChange() listener. Eliminates the duplicate banner / static-region remount glitch when switching models with /model.

Upstream PR

Why

Today we poll getCurrentModel() on a 1s interval to detect model changes. Upstream switched to an onModelChange event listener — better pattern, no polling, fixes the visible header flicker on /model.

Scope / effort

Medium. ~15-line diff on the core side; the conflict surface is AppContainer.tsx which has diverged significantly in our fork (we added recap, verbose, background-agent hooks, etc). Need careful merge around effect-hook order and dependencies.

Prerequisites

None — independent of recap polish, but would benefit from being done after the recap wrapper (issue above) since both touch AppContainer.

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestupstream-portBackport from QwenLM/qwen-code upstream

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions