feat: enhance system prompt handling and input key actions

This commit is contained in:
asepharyana
2026-07-11 22:16:47 +07:00
parent 3dee2a1427
commit 1f182021fb
4 changed files with 23 additions and 3 deletions
+9
View File
@@ -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