修复 CI 调试工作区测试
Project CI / Repository checks (pull_request) Successful in 2m42s
Project CI / Frontend tests (pull_request) Successful in 3m15s
Project CI / Backend tests (pull_request) Successful in 7m2s
Project CI / Native shell tests (pull_request) Successful in 19m28s

格式化 design runtime 调试命令

为 debug fixture 测试显式开启并清理 debug 环境变量
This commit is contained in:
2026-09-12 05:21:21 +00:00
parent 226cfbc8a1
commit 34616e1631
2 changed files with 6 additions and 1 deletions
@@ -870,7 +870,10 @@ pub(crate) fn debug_fast_forward_design_session(
target_phase: String,
) -> Result<DesignRuntimeMode, String> {
if !cfg!(debug_assertions)
|| std::env::var("GENARRATIVE_AGC_DESIGN_DEBUG").ok().as_deref() != Some("1")
|| std::env::var("GENARRATIVE_AGC_DESIGN_DEBUG")
.ok()
.as_deref()
!= Some("1")
{
return Err("策划 Agent 快速推进仅可用于 Debug 构建".to_string());
}
@@ -18,10 +18,12 @@ vi.mock('../src/components/ChatMarkdownMessage', () => ({
afterEach(() => {
cleanup();
vi.unstubAllEnvs();
delete window.__TAURI__;
});
it('prepares debug fixtures from the header and refreshes the phase and files without a manual refresh', async () => {
vi.stubEnv('VITE_GENARRATIVE_AGC_DESIGN_DEBUG', '1');
let prepared = false;
const invoke = vi.fn(async (command: string) => {
if (command === 'debug_fast_forward_design_session') {