fix: align compaction toggle with detector for proxy providers (#658)
* fix: align compaction toggle with detector for proxy providers (AIHubMix) The compaction detector uses provider-agnostic model ID lookup (getModelContextWindowSync) which finds context windows across all providers, while the UI toggle only used provider-specific lookup (getProviderModelContextWindowSync) which returns null for proxy providers like AIHubMix not in the registry. This caused auto-compression to trigger silently while the toggle was disabled (greyed out), preventing users from controlling it. Add the same provider-agnostic fallback to both contextWindowKnown and effectiveContextWindow so the UI is consistent with the detector. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add provider-agnostic context window fallback in task page Same inconsistency as InputBox — task page only used provider-specific lookup for context window, causing token percentage to not display for proxy providers like AIHubMix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: include modelRegistryVersion in useMemo deps for context window The useMemo for contextWindowKnown and effectiveContextWindow called getModelContextWindowSync/getProviderModelContextWindowSync but didn't depend on the registry version. After async registry refresh, these memos could return stale values even though a rerender was triggered. Capture useModelRegistryVersion() return value and add it to deps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Z
Zeng Xian committed
222d5068cbaf3e81947378cba72d131099f41e32
Parent: 699d36e