Build the vault-relative directory for an intent. Agent mode: `intents/ / / /` Manual mode: `intents/manual/ / /`
(&self, session_id: Option<&str>, turn_id: Option<u32>)
| 682 | /// Agent mode: `intents/<view>/<session>/<turn>/` |
| 683 | /// Manual mode: `intents/manual/<identity>/<N>/` |
| 684 | fn intent_dir_for(&self, session_id: Option<&str>, turn_id: Option<u32>) -> String { |
| 685 | let view = self.current_view(); |
| 686 | match (session_id, turn_id) { |
| 687 | (Some(sid), Some(tid)) => format!("intents/{}/{}/{}", view, sid, tid), |
| 688 | _ => { |
| 689 | // Manual usage — scope under the user's identity name |
| 690 | let identity = self.resolve_vault_identity(); |
| 691 | let manifest = self.vault_manifest().unwrap_or_default(); |
| 692 | format!( |
| 693 | "intents/manual/{}/{}", |
| 694 | identity.name, manifest.next_intent_id |
| 695 | ) |
| 696 | } |
| 697 | } |
| 698 | } |
| 699 | |
| 700 | /// Build the vault-relative path for an intent file. |
| 701 | fn intent_file_for(&self, session_id: Option<&str>, turn_id: Option<u32>) -> String { |
no test coverage detected