Keep hook context out of rollback trimming

This commit is contained in:
Abhinav Vedmala
2026-05-13 16:01:12 -07:00
parent 6218bef50e
commit b48f5f1f91
2 changed files with 0 additions and 2 deletions

View File

@@ -902,7 +902,6 @@ fn drop_last_n_user_turns_trims_context_updates_above_rolled_back_turn() {
user_input_text_msg("turn 1 user"),
assistant_msg("turn 1 assistant"),
developer_msg("Generated images are saved to /tmp as /tmp/image-1.png by default."),
developer_msg("<hook_context>ROLLED_BACK_HOOK_CONTEXT</hook_context>"),
developer_msg("<collaboration_mode>ROLLED_BACK_DEV_INSTRUCTIONS</collaboration_mode>"),
user_input_text_msg(
"<environment_context><cwd>PRETURN_CONTEXT_DIFF_CWD</cwd></environment_context>",

View File

@@ -30,7 +30,6 @@ const CONTEXTUAL_DEVELOPER_PREFIXES: &[&str] = &[
COLLABORATION_MODE_OPEN_TAG,
REALTIME_CONVERSATION_OPEN_TAG,
"<personality_spec>",
"<hook_context>",
];
pub(crate) fn is_contextual_user_message_content(message: &[ContentItem]) -> bool {