Node id for a todo. Agent-provided IDs are only stable within their session, so qualify them with that session. Generated turn-local IDs are already fully qualified and pass through unchanged.
(session_id: &str, todo_id: &str)
| 52 | /// session, so qualify them with that session. Generated turn-local IDs are |
| 53 | /// already fully qualified and pass through unchanged. |
| 54 | pub(crate) fn todo_node_id(session_id: &str, todo_id: &str) -> String { |
| 55 | if todo_id.starts_with(&format!("session:{session_id}/")) { |
| 56 | todo_id.to_string() |
| 57 | } else { |
| 58 | format!("session:{session_id}/todo:{todo_id}") |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | fn legacy_todo_node_id(todo_id: &str) -> String { |
| 63 | if todo_id.starts_with("session:") { |
no outgoing calls
no test coverage detected