chore: update interrupt message (#9925)

This commit is contained in:
jif-oai
2026-01-26 20:07:54 +01:00
committed by GitHub
parent e471ebc5d2
commit 09251387e0

View File

@@ -41,7 +41,7 @@ pub(crate) use undo::UndoTask;
pub(crate) use user_shell::UserShellCommandTask; pub(crate) use user_shell::UserShellCommandTask;
const GRACEFULL_INTERRUPTION_TIMEOUT_MS: u64 = 100; const GRACEFULL_INTERRUPTION_TIMEOUT_MS: u64 = 100;
const TURN_ABORTED_INTERRUPTED_GUIDANCE: &str = "The user interrupted the previous turn. Do not continue or repeat work from that turn unless the user explicitly asks. If any tools/commands were aborted, they may have partially executed; verify current state before retrying."; const TURN_ABORTED_INTERRUPTED_GUIDANCE: &str = "The user interrupted the previous turn on purpose. If any tools/commands were aborted, they may have partially executed; verify current state before retrying.";
/// Thin wrapper that exposes the parts of [`Session`] task runners need. /// Thin wrapper that exposes the parts of [`Session`] task runners need.
#[derive(Clone)] #[derive(Clone)]
@@ -253,7 +253,7 @@ impl Session {
role: "user".to_string(), role: "user".to_string(),
content: vec![ContentItem::InputText { content: vec![ContentItem::InputText {
text: format!( text: format!(
"{TURN_ABORTED_OPEN_TAG}\n <turn_id>{sub_id}</turn_id>\n <reason>interrupted</reason>\n <guidance>{TURN_ABORTED_INTERRUPTED_GUIDANCE}</guidance>\n</turn_aborted>" "{TURN_ABORTED_OPEN_TAG}\n{TURN_ABORTED_INTERRUPTED_GUIDANCE}\n</turn_aborted>"
), ),
}], }],
end_turn: None, end_turn: None,