| 89 | } |
| 90 | |
| 91 | pub struct AppContext { |
| 92 | pub theme: RwLock<Theme>, |
| 93 | pub theme_name: RwLock<String>, |
| 94 | pub router: RwLock<Router>, |
| 95 | pub keybind: RwLock<KeybindRegistry>, |
| 96 | pub session: RwLock<SessionContext>, |
| 97 | pub providers: RwLock<Vec<ProviderInfo>>, |
| 98 | pub mcp_servers: RwLock<Vec<McpServerStatus>>, |
| 99 | pub lsp_status: RwLock<Vec<LspStatus>>, |
| 100 | pub event_bus: EventBus, |
| 101 | pub current_agent: RwLock<String>, |
| 102 | pub current_model: RwLock<Option<String>>, |
| 103 | pub current_provider: RwLock<Option<String>>, |
| 104 | pub current_variant: RwLock<Option<String>>, |
| 105 | pub directory: RwLock<String>, |
| 106 | pub show_sidebar: RwLock<bool>, |
| 107 | pub show_header: RwLock<bool>, |
| 108 | pub show_scrollbar: RwLock<bool>, |
| 109 | pub tips_hidden: RwLock<bool>, |
| 110 | pub sidebar_mode: RwLock<SidebarMode>, |
| 111 | pub animations_enabled: RwLock<bool>, |
| 112 | pub pending_permissions: RwLock<usize>, |
| 113 | pub show_timestamps: RwLock<bool>, |
| 114 | pub show_thinking: RwLock<bool>, |
| 115 | pub show_tool_details: RwLock<bool>, |
| 116 | pub message_density: RwLock<MessageDensity>, |
| 117 | pub semantic_highlight: RwLock<bool>, |
| 118 | pub has_connected_provider: RwLock<bool>, |
| 119 | ui_kv: RwLock<UiKv>, |
| 120 | pub api_client: RwLock<Option<Arc<ApiClient>>>, |
| 121 | } |
| 122 | |
| 123 | impl AppContext { |
| 124 | pub fn new() -> Self { |
nothing calls this directly
no outgoing calls
no test coverage detected