Build the vault-relative directory for an intent. Agent mode: `intents/ / / /` Manual mode: `intents/manual/ / /`
(&self, session_id: Option<&str>, turn_id: Option<u32>)
| 636 | /// Agent mode: `intents/<view>/<session>/<turn>/` |
| 637 | /// Manual mode: `intents/manual/<identity>/<N>/` |
| 638 | fn intent_dir_for(&self, session_id: Option<&str>, turn_id: Option<u32>) -> String { |
| 639 | let view = self.current_view(); |
| 640 | match (session_id, turn_id) { |
| 641 | (Some(sid), Some(tid)) => format!("intents/{}/{}/{}", view, sid, tid), |
| 642 | _ => { |
| 643 | // Manual usage — scope under the user's identity name |
| 644 | let identity = self.resolve_vault_identity(); |
| 645 | let manifest = self.vault_manifest().unwrap_or_default(); |
| 646 | format!( |
| 647 | "intents/manual/{}/{}", |
| 648 | identity.name, manifest.next_intent_id |
| 649 | ) |
| 650 | } |
| 651 | } |
| 652 | } |
| 653 | |
| 654 | /// Build the vault-relative path for an intent file. |
| 655 | fn intent_file_for(&self, session_id: Option<&str>, turn_id: Option<u32>) -> String { |
no test coverage detected