fix(panel): harden 2.33.0+ context window override injection and pending-restart status

- Inject backend pre-resolved MODEL_* fallback rules into syncHostContextWindows so
  context window overrides remain active even when window.__APP_CONFIG__.csrfToken is
  omitted, and extend request interception to cover StartCascade, URL inputs, Uint8Array
  JSON bodies, and application/connect+json 5-byte envelopes
- Trigger shortcut/launcher provisioning on modelContextWindows updates and surface the
  context-mode BridgeStatusNotice banner in App.js even when windowMountMode is 'sidebar'
- Show explicit '待重启生效' / 'Pending Restart' meta badge in SettingsOtherTab model
  dropdown and reveal ctxBridgeNotice immediately upon unlocking when CDP is inactive

Closes #27
This commit is contained in:
fish
2026-11-18 22:08:39 +09:00
parent 955dfeebb7
commit d665fb0c34
11 changed files with 293 additions and 37 deletions
@@ -274,8 +274,10 @@ export const SettingsOtherTab = defineComponent({
patchAttr(ctxRiskAcceptBtn, 'disabled', acceptingContextRisk);
const saved = latestSettings?.modelContextWindows || {};
const wbState = String(latestWindowBridge?.state || '').trim();
const isBridgeMissing = wbState === 'no_devtools_port' || wbState === 'cdp_unreachable';
ctxBridgeNotice.refs.update({
visible: unlocked && Object.keys(saved).length > 0,
visible: unlocked,
windowBridge: latestWindowBridge,
hostPlatform: latestHostPlatform,
});
@@ -323,6 +325,7 @@ export const SettingsOtherTab = defineComponent({
else if (value) {
const name = formatLimit(value);
if (!isAvailable(model, value)) meta = t('settings.oth.ctxUnavailable', { name });
else if (isBridgeMissing) meta = t('settings.oth.ctxPendingBridge', { name });
else if (/^\d+$/.test(value) && model.reportedLimitTokens && Number(value) !== model.reportedLimitTokens) {
meta = t('settings.oth.ctxConfiguredReported', {
name,