()
| 11 | use tempfile::tempdir; |
| 12 | |
| 13 | fn create_test_session_data() -> SessionData { |
| 14 | SessionData { |
| 15 | id: "test-session-1".to_string(), |
| 16 | config: SessionConfig { |
| 17 | name: "Test Session".to_string(), |
| 18 | workspace: "/tmp/workspace".to_string(), |
| 19 | system_prompt: Some("You are helpful.".to_string()), |
| 20 | max_context_length: 200000, |
| 21 | auto_compact: false, |
| 22 | auto_compact_threshold: DEFAULT_AUTO_COMPACT_THRESHOLD, |
| 23 | storage_type: crate::config::StorageBackend::File, |
| 24 | queue_config: None, |
| 25 | confirmation_policy: None, |
| 26 | permission_policy: None, |
| 27 | enforce_active_skill_tool_restrictions: false, |
| 28 | max_parallel_tasks: None, |
| 29 | auto_delegation: None, |
| 30 | parent_id: None, |
| 31 | security_config: None, |
| 32 | hook_engine: None, |
| 33 | planning_mode: PlanningMode::default(), |
| 34 | goal_tracking: false, |
| 35 | }, |
| 36 | state: SessionState::Active, |
| 37 | messages: vec![ |
| 38 | Message::user("Hello"), |
| 39 | Message { |
| 40 | role: "assistant".to_string(), |
| 41 | content: vec![crate::llm::ContentBlock::Text { |
| 42 | text: "Hi there!".to_string(), |
| 43 | }], |
| 44 | reasoning_content: None, |
| 45 | }, |
| 46 | ], |
| 47 | context_usage: ContextUsage { |
| 48 | used_tokens: 100, |
| 49 | max_tokens: 200000, |
| 50 | percent: 0.0005, |
| 51 | turns: 2, |
| 52 | }, |
| 53 | total_usage: TokenUsage { |
| 54 | prompt_tokens: 50, |
| 55 | completion_tokens: 50, |
| 56 | total_tokens: 100, |
| 57 | cache_read_tokens: None, |
| 58 | cache_write_tokens: None, |
| 59 | }, |
| 60 | tool_names: vec!["bash".to_string(), "read".to_string()], |
| 61 | thinking_enabled: false, |
| 62 | thinking_budget: None, |
| 63 | created_at: 1700000000, |
| 64 | updated_at: 1700000100, |
| 65 | llm_config: None, |
| 66 | tasks: vec![], |
| 67 | parent_id: None, |
| 68 | tenant_id: None, |
| 69 | principal: None, |
| 70 | agent_template_id: None, |
no outgoing calls
no test coverage detected