Skip to main content

Module event_loop

Module event_loop 

Source

Re-exports§

pub use crate::modals::ModelPicker;
pub use crate::modals::SessionPicker;
pub use crate::modals::ProviderWizard;

Structs§

App
All the per-session UI state that flows through key/event handlers.
Buffer
Line-edit buffer for input composition. Byte-indexed cursor.
ClipboardCheckState
Memoised result of the most recent clipboard probe. The hash is a content fingerprint of the clipboard image’s raw RGBA bytes (or None when the clipboard holds no image). Letting build_status compare this against UiState::pending_image_hashes is what powers the “hide hint after I already pasted THIS image, but show it again if the user copies a different one” UX.
LoopCtx
Bag of handles passed into the loop.
McpReloadProgress
MenuState
Slash-command palette state. Active whenever buf starts with ‘/’.
NewIssueDraft
What the /issue wizard hands back to the event loop after the user finishes step 2. The event loop turns this into a POST /repos/.../issues API call and echoes the resulting issue URL into scrollback.

Enums§

ExitReason
Why the event loop exited. Callers (currently just atomcode-tuix::run) use this to decide whether to re-exec into the new binary after an in-place upgrade or just terminate normally.

Constants§

MAX_SESSION_NAME_LEN
Maximum length for a session name.

Functions§

display_tool_name
Convert a snake_case tool name to PascalCase for display. The agent protocol uses read_file, edit_file, web_fetch etc.; the UI shows ReadFile, EditFile, WebFetch — a CC-style convention that reads more cleanly at a glance.
display_tool_name_short
CC-style short tool name. Strips the redundant _file / _directory / _files suffixes (the noun is implicit from the arg) before PascalCase conversion. Generic — no per-tool match arms; works for any future tool that follows the <verb>_<noun> convention.
perform_session_rename
Rename a session after validation, persist it, and return old/new names.
run_loop
validate_session_name
Validates a session name and returns an error message if invalid. Returns None if the name is valid.