(
meta: &CodexMeta,
model: Option<&str>,
path: &Path,
offset: i64,
timestamp: Option<i64>,
goal_context: &CodexGoalContext,
metadata: &Value,
)
| 447 | } |
| 448 | |
| 449 | fn goal_context_message( |
| 450 | meta: &CodexMeta, |
| 451 | model: Option<&str>, |
| 452 | path: &Path, |
| 453 | offset: i64, |
| 454 | timestamp: Option<i64>, |
| 455 | goal_context: &CodexGoalContext, |
| 456 | metadata: &Value, |
| 457 | ) -> SessionMessageRecord { |
| 458 | SessionMessageRecord { |
| 459 | provider: PROVIDER.to_string(), |
| 460 | message_id: format!("{}:{offset}", meta.session_id), |
| 461 | session_id: meta.session_id.clone(), |
| 462 | role: "system".to_string(), |
| 463 | timestamp, |
| 464 | ordinal: offset, |
| 465 | text: goal_context.storage_text(), |
| 466 | kind: Some("goal_context".to_string()), |
| 467 | model: model.map(str::to_string), |
| 468 | tool_names: None, |
| 469 | source_path: Some(path.to_string_lossy().to_string()), |
| 470 | source_offset: Some(offset), |
| 471 | metadata_json: serde_json::to_string(&metadata).ok(), |
| 472 | } |
| 473 | } |
| 474 | |
| 475 | fn collect_response_item_text(value: &Value) -> String { |
| 476 | match value { |
no test coverage detected