feat: release 2.1.0 with optional Flash final AI review

Default Flash final review to off and persist the setting across the UI,
MCP, SDK and queued tasks. Keep execution separate from test verdicts.

Bundle UI fonts and licenses to remove Google Fonts from startup builds.
Align backend/frontend versions and document installation and upgrades.
This commit is contained in:
chenmingxuan committed 2026-10-23 12:36:56 +08:00
1 parent b584dae80a
commit 83bcfd54d5
52 files changed
+898 -33

No files matched your search

@@ -220,4 +220,37 @@ describe('持久化模型与功能设置', () => {
fixture.componentInstance.save();
http.expectNone('/api/system/capability-settings');
});
it('Flash 最终 AI 判定默认关闭,保存失败保留选择,成功后重新打开仍保留', async () => {
const fixture = TestBed.createComponent(CapabilitySettingsComponent);
const capabilities = { ...fixture.componentInstance.config };
fixture.detectChanges();
const root: HTMLElement = fixture.nativeElement;
const toggle = root.querySelector<HTMLInputElement>('[aria-label="Flash 最终 AI 判定与分析"]')!;
await Promise.resolve();
expect(toggle.disabled).toBeTrue();
http.expectOne('/api/system/capability-settings').flush(capabilities);
fixture.detectChanges(); await fixture.whenStable();
expect(toggle.checked).toBeFalse();
expect(root.textContent).toContain('不影响 Pro');
toggle.click(); fixture.detectChanges(); await fixture.whenStable();
root.querySelector<HTMLButtonElement>('button')!.click();
let request = http.expectOne('/api/system/capability-settings');
expect(request.request.body.flash_final_check_enabled).toBeTrue();
request.flush({}, {status:500,statusText:'Error'});
fixture.detectChanges();
expect(fixture.componentInstance.config.flash_final_check_enabled).toBeTrue();
expect(fixture.componentInstance.error()).toContain('保存失败');
root.querySelector<HTMLButtonElement>('button')!.click();
request = http.expectOne('/api/system/capability-settings');
const saved = request.request.body;
request.flush(saved);
fixture.destroy();
const reopened = TestBed.createComponent(CapabilitySettingsComponent);
reopened.detectChanges();
http.expectOne('/api/system/capability-settings').flush(saved);
reopened.detectChanges(); await reopened.whenStable();
expect(reopened.nativeElement.querySelector('[aria-label="Flash 最终 AI 判定与分析"]').checked).toBeTrue();
reopened.destroy();
});
});