Build a `ChangeHeader` for an agent turn. The message is built from the file changes and prompt context: - Good prompt: `"Fix the authentication bug in login.rs"` - Slash command or no prompt: `"Add src/main.rs, Cargo.toml"` The author is the agent identity.
(
options: &TurnRecordOptions<'_>,
status: &RepositoryStatus,
untracked_paths: &[String],
)
| 90 | /// |
| 91 | /// The author is the agent identity. |
| 92 | fn build_turn_header( |
| 93 | options: &TurnRecordOptions<'_>, |
| 94 | status: &RepositoryStatus, |
| 95 | untracked_paths: &[String], |
| 96 | ) -> ChangeHeader { |
| 97 | let message = build_turn_message(options, status, untracked_paths); |
| 98 | |
| 99 | let author = build_agent_author( |
| 100 | &options.session.agent_name, |
| 101 | &options.session.agent_display_name, |
| 102 | &options.session.session_id, |
| 103 | ); |
| 104 | |
| 105 | ChangeHeader::builder() |
| 106 | .message(message) |
| 107 | .author(author) |
| 108 | .build() |
| 109 | } |
| 110 | |
| 111 | // record_turn (the main entry point) |
| 112 |