refactor: remove ws-only scene routing remnants
Keep the ws branch focused on websocket and Zhihu behavior by dropping staged scene-routing artifacts and restoring single-path skills dir semantics. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -50,13 +50,13 @@ fn loaded_skills_excludes_browser_script_tools_when_browser_surface_is_unavailab
|
||||
));
|
||||
fs::create_dir_all(&workspace_root).unwrap();
|
||||
let skill_root = temp_skill_root();
|
||||
write_browser_script_skill(&skill_root, "fault-details-report");
|
||||
write_browser_script_skill(&skill_root, "workspace-browser-skill");
|
||||
|
||||
let mut settings = SgClawSettings::from_legacy_deepseek_fields(
|
||||
"sk-test".to_string(),
|
||||
"https://api.deepseek.com".to_string(),
|
||||
"deepseek-chat".to_string(),
|
||||
vec![skill_root.clone()],
|
||||
Some(skill_root.clone()),
|
||||
)
|
||||
.unwrap();
|
||||
settings.runtime_profile = RuntimeProfile::GeneralAssistant;
|
||||
@@ -64,7 +64,7 @@ fn loaded_skills_excludes_browser_script_tools_when_browser_surface_is_unavailab
|
||||
let skills_dir = resolve_skills_dir_from_sgclaw_settings(&workspace_root, &settings);
|
||||
let engine = RuntimeEngine::new(RuntimeProfile::GeneralAssistant);
|
||||
|
||||
let loaded_skills = engine.loaded_skills(&config, &skills_dir);
|
||||
let loaded_skills = engine.loaded_skills(&config, std::slice::from_ref(&skills_dir));
|
||||
|
||||
assert!(loaded_skills.is_empty());
|
||||
}
|
||||
@@ -125,19 +125,16 @@ fn browser_attached_publish_prompt_requires_explicit_confirmation_before_clickin
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn browser_attached_95598_scene_prompt_requires_scene_tool_before_generic_browser_probing() {
|
||||
fn ws_cleanup_browser_profile_does_not_inject_95598_scene_contract() {
|
||||
let engine = RuntimeEngine::new(RuntimeProfile::BrowserAttached);
|
||||
|
||||
let instruction = engine.build_instruction(
|
||||
"请处理95598-repair-city-dispatch场景,查看抢修市指派单并汇总当前队列",
|
||||
"请处理95598抢修市指监测,查看抢修市指派单并汇总当前队列",
|
||||
Some("https://95598.example.invalid/dispatch"),
|
||||
Some("95598抢修市指监测"),
|
||||
true,
|
||||
);
|
||||
|
||||
assert!(instruction.contains("95598-repair-city-dispatch.collect_repair_orders"));
|
||||
assert!(instruction.contains("browser workflow, not a text-only task"));
|
||||
assert!(instruction.contains("generic browser probing only after"));
|
||||
assert!(!instruction.contains("collect_repair_orders"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -151,7 +148,7 @@ fn browser_attached_unrelated_task_does_not_receive_95598_scene_contract() {
|
||||
true,
|
||||
);
|
||||
|
||||
assert!(!instruction.contains("95598-repair-city-dispatch.collect_repair_orders"));
|
||||
assert!(!instruction.contains("collect_repair_orders"));
|
||||
assert!(!instruction.contains("browser workflow, not a text-only task"));
|
||||
assert!(!instruction.contains("generic browser probing only after"));
|
||||
}
|
||||
@@ -161,13 +158,13 @@ fn general_assistant_95598_scene_prompt_does_not_receive_browser_scene_contract(
|
||||
let engine = RuntimeEngine::new(RuntimeProfile::GeneralAssistant);
|
||||
|
||||
let instruction = engine.build_instruction(
|
||||
"请处理95598-repair-city-dispatch场景,查看抢修市指派单并汇总当前队列",
|
||||
"请处理95598抢修市指监测,查看抢修市指派单并汇总当前队列",
|
||||
Some("https://95598.example.invalid/dispatch"),
|
||||
Some("95598抢修市指监测"),
|
||||
false,
|
||||
);
|
||||
|
||||
assert!(!instruction.contains("95598-repair-city-dispatch.collect_repair_orders"));
|
||||
assert!(!instruction.contains("collect_repair_orders"));
|
||||
assert!(!instruction.contains("browser workflow, not a text-only task"));
|
||||
assert!(!instruction.contains("generic browser probing only after"));
|
||||
}
|
||||
@@ -178,7 +175,7 @@ fn legacy_settings_default_to_plan_first_superrpa_and_openxml_backends() {
|
||||
"sk-test".to_string(),
|
||||
"https://api.deepseek.com".to_string(),
|
||||
"deepseek-chat".to_string(),
|
||||
Vec::new(),
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user