修复 CI 调试工作区测试
格式化 design runtime 调试命令 为 debug fixture 测试显式开启并清理 debug 环境变量
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user