| 38 | const MAX_EVENTS_PER_FRAME: usize = 256; |
| 39 | |
| 40 | pub struct App { |
| 41 | context: Arc<AppContext>, |
| 42 | state: AppState, |
| 43 | terminal: terminal::Tui, |
| 44 | event_rx: Receiver<Event>, |
| 45 | prompt: Prompt, |
| 46 | selection: Selection, |
| 47 | session_view: Option<SessionView>, |
| 48 | active_session_id: Option<String>, |
| 49 | command_palette: CommandPalette, |
| 50 | slash_popup: SlashCommandPopup, |
| 51 | leader_state: LeaderKeyState, |
| 52 | model_select: ModelSelectDialog, |
| 53 | agent_select: AgentSelectDialog, |
| 54 | alert_dialog: AlertDialog, |
| 55 | help_dialog: HelpDialog, |
| 56 | session_list_dialog: SessionListDialog, |
| 57 | session_rename_dialog: SessionRenameDialog, |
| 58 | session_export_dialog: SessionExportDialog, |
| 59 | prompt_stash_dialog: PromptStashDialog, |
| 60 | skill_list_dialog: SkillListDialog, |
| 61 | theme_list_dialog: ThemeListDialog, |
| 62 | status_dialog: StatusDialog, |
| 63 | mcp_dialog: McpDialog, |
| 64 | timeline_dialog: TimelineDialog, |
| 65 | fork_dialog: ForkDialog, |
| 66 | provider_dialog: ProviderDialog, |
| 67 | subagent_dialog: SubagentDialog, |
| 68 | tag_dialog: TagDialog, |
| 69 | permission_prompt: PermissionPrompt, |
| 70 | question_prompt: QuestionPrompt, |
| 71 | toast: Toast, |
| 72 | /// Snapshot of rendered screen lines for text selection copy. |
| 73 | screen_lines: Vec<String>, |
| 74 | available_models: HashSet<String>, |
| 75 | model_variants: HashMap<String, Vec<String>>, |
| 76 | model_variant_selection: HashMap<String, Option<String>>, |
| 77 | pending_initial_submit: bool, |
| 78 | pending_session_sync: Option<String>, |
| 79 | last_session_sync: Instant, |
| 80 | last_aux_sync: Instant, |
| 81 | event_caused_change: bool, |
| 82 | } |
| 83 | |
| 84 | impl App { |
| 85 | pub fn new() -> anyhow::Result<Self> { |
nothing calls this directly
no outgoing calls
no test coverage detected