Public declaration syntax from harness-sdk/src/runtime/state.rs Original source SHA-256: 075f465fd98fae9563fd65ef9c7319c9f8f7dc6766c9d6966267769605eba77f Function bodies and constant values are omitted. This is not the complete implementation. Source line 39 #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum DropdownKind { /// `/` — slash command autocomplete. #[default] Slash, /// `@` — file-mention autocomplete (live workspace search, /// `./`, `../`, absolute paths). Mention, } Source line 48 pub struct AppState { /// Persistent state for the kit's `ThinkingAnimation`. The /// runtime calls /// [`harness_tui_kit::ThinkingAnimationState::advance`] each /// render frame while [`Self::is_thinking`] is true. pub thinking_state: ThinkingAnimationState, // ── Kit component states ── /// Chat timeline state. pub timeline_state: ChatTimelineState, /// Input bar state. pub input_state: InputBarState, /// App shell state. pub shell_state: AppShellState, /// Tabs state. pub tabs_state: TabsState, /// Approval queue state. pub approval_state: ApprovalQueueState, /// Log viewer state (for autonomy mode activity feed). pub log_viewer_state: LogViewerState, /// Command palette state. pub palette_state: CommandPaletteState, /// Whether the command palette is open. pub palette_open: bool, /// Slash dropdown state (inline autocomplete above input bar). pub dropdown_state: SlashDropdownState, /// Items for the dropdown (shared between slash commands and `@` /// file mentions). pub dropdown_items: Vec, /// Which trigger is currently driving the dropdown — `Slash` when /// the input begins with `/`, `Mention` when the input contains an /// `@` token at the end. Determines the substitution /// behaviour on `Enter`/`Tab` confirmation. pub dropdown_kind: DropdownKind, /// When `dropdown_kind == Mention`, the literal prefix (including /// the leading `@`) currently being completed. The confirmation /// path uses this to know which substring of the input to replace /// with the chosen path. pub mention_prefix: String, /// Error message to display (cleared after one render). pub error_flash: Option, /// Info message to display (cleared after one render). pub info_flash: Option, /// Ctrl+P settings palette state — visibility, current page, /// cursor, filter. pub settings_palette_state: SettingsPaletteState } Source line 184 #[must_use] pub fn new(app_name: impl Into) -> Self; Source line 224 pub fn set_settings_snapshot(&mut self, snapshot: SettingsSnapshot); Source line 230 #[must_use] pub fn settings_snapshot(&self) -> &SettingsSnapshot; Source line 241 #[must_use] pub fn live_welcome_config(&self) -> Option; Source line 286 pub fn set_welcome(&mut self, welcome: harness_tui_kit::WelcomeConfig); Source line 294 #[must_use] pub fn welcome(&self) -> Option<&harness_tui_kit::WelcomeConfig>; Source line 302 #[must_use] pub fn app_name(&self) -> &str; Source line 308 #[must_use] pub fn mode(&self) -> Mode; Source line 314 #[must_use] pub fn should_quit(&self) -> bool; Source line 320 #[must_use] pub fn active_agent_id(&self) -> Option<&str>; Source line 326 #[must_use] pub fn agents(&self) -> &HashMap; Source line 332 #[must_use] pub fn messages(&self) -> &[harness_tui_kit::ChatMessage]; Source line 338 #[must_use] pub fn is_streaming(&self) -> bool; Source line 348 #[must_use] pub fn is_thinking(&self) -> bool; Source line 354 #[must_use] pub fn approval_queue(&self) -> &[SdkApprovalRequest]; Source line 360 #[must_use] pub fn activity_log(&self) -> &[harness_tui_kit::LogEntry]; Source line 366 #[must_use] pub fn session(&self) -> &SessionInfo; Source line 372 #[must_use] pub fn elapsed(&self) -> Duration; Source line 379 pub fn set_quit(&mut self); Source line 393 pub fn set_streaming(&mut self, streaming: bool); Source line 419 pub fn set_thinking(&mut self, thinking: bool); Source line 431 pub fn tick_thinking(&mut self); Source line 447 pub fn push_streaming_delta(&mut self, delta: &str); Source line 470 #[must_use] pub fn has_active_markdown_stream(&self) -> bool; Source line 479 pub fn set_mode(&mut self, mode: Mode) -> Result<(), crate::SdkError>; Source line 503 pub fn set_active_agent(&mut self, agent_id: Option); Source line 508 pub fn set_max_messages(&mut self, max: usize); Source line 515 pub fn set_agents(&mut self, agents: Vec); Source line 529 pub fn update_agent(&mut self, agent: SdkAgentInfo); Source line 536 pub fn add_message(&mut self, msg: harness_tui_kit::ChatMessage); Source line 547 pub fn append_to_last_message(&mut self, text: &str); Source line 554 pub fn clear_messages(&mut self); Source line 562 pub fn truncate_messages_at(&mut self, idx: usize); Source line 572 pub fn add_approval(&mut self, request: SdkApprovalRequest); Source line 580 pub fn remove_approval(&mut self, request_id: &str); Source line 587 pub fn add_activity(&mut self, entry: harness_tui_kit::LogEntry); Source line 598 pub fn update_usage(&mut self, input_tokens: u64, output_tokens: u64, cost_cents: f64); Source line 605 pub fn tick(&mut self);