fix(prompt): respect autonomy level in channel prompts

This commit is contained in:
Alix-007
2026-03-19 16:54:51 +08:00
committed by Roman Tataurov
parent 0b3e58a89a
commit e256b39733
2 changed files with 123 additions and 16 deletions
+4 -2
View File
@@ -3571,13 +3571,14 @@ pub async fn run(
None
};
let native_tools = provider.supports_native_tools();
let mut system_prompt = crate::channels::build_system_prompt_with_mode(
let mut system_prompt = crate::channels::build_system_prompt_with_mode_and_autonomy(
&config.workspace_dir,
&model_name,
&tool_descs,
&skills,
Some(&config.identity),
bootstrap_max_chars,
Some(&config.autonomy),
native_tools,
config.skills.prompt_injection_mode,
config.autonomy.level,
@@ -4228,13 +4229,14 @@ pub async fn process_message(
None
};
let native_tools = provider.supports_native_tools();
let mut system_prompt = crate::channels::build_system_prompt_with_mode(
let mut system_prompt = crate::channels::build_system_prompt_with_mode_and_autonomy(
&config.workspace_dir,
&model_name,
&tool_descs,
&skills,
Some(&config.identity),
bootstrap_max_chars,
Some(&config.autonomy),
native_tools,
config.skills.prompt_injection_mode,
config.autonomy.level,