feat(state): add file‑tree and repository‑search state modules

Introduce `FileTreeState` for managing a navigable file hierarchy with Git decorations, filtering, and cursor/scroll handling.
Add `RepoSearchState` and related types to support asynchronous ripgrep‑backed repository searches, including result aggregation, pagination, and UI interaction.
This commit is contained in:
2025-10-12 20:18:25 +02:00
parent 55e6b0583d
commit 33ad3797a1
8 changed files with 5876 additions and 193 deletions

View File

@@ -21,6 +21,8 @@ pub enum InputMode {
Command,
SessionBrowser,
ThemeBrowser,
RepoSearch,
SymbolSearch,
}
impl fmt::Display for InputMode {
@@ -35,6 +37,8 @@ impl fmt::Display for InputMode {
InputMode::Command => "Command",
InputMode::SessionBrowser => "Sessions",
InputMode::ThemeBrowser => "Themes",
InputMode::RepoSearch => "Search",
InputMode::SymbolSearch => "Symbols",
};
f.write_str(label)
}
@@ -43,6 +47,7 @@ impl fmt::Display for InputMode {
/// Represents which panel is currently focused in the TUI layout.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum FocusedPanel {
Files,
Chat,
Thinking,
Input,