feat: enhance system prompt handling and input key actions
This commit is contained in:
@@ -521,6 +521,15 @@ fn run_agent_turn(
|
||||
let mut msgs = messages.to_vec();
|
||||
let mut edits_this_turn = 0u32;
|
||||
|
||||
let system_text = format!(
|
||||
"{}\n\n{}",
|
||||
crate::resources::SYSTEM_PROMPT,
|
||||
crate::resources::SYSTEM_TOOLS,
|
||||
);
|
||||
if !msgs.iter().any(|m| matches!(m.role, crate::dto::chat::message::Role::System)) {
|
||||
msgs.insert(0, ChatMessage::system(system_text));
|
||||
}
|
||||
|
||||
for _step in 0..MAX_AGENT_STEPS {
|
||||
let response = tc
|
||||
.client
|
||||
|
||||
Reference in New Issue
Block a user