Refactor IPC and DTO structures; remove unused code and streamline message handling

- Removed unused structs and methods from `response.rs`, `usage.rs`, and `client.rs`.
- Simplified `Connection` handling in `conn.rs` to only support Unix sockets.
- Updated `IpcServer` to exclusively use Unix sockets and removed TCP handling.
- Cleaned up `editlog.rs` by removing loading and recent entry methods.
- Refactored `memory.rs` to eliminate unused functions related to lesson promotion and retrospective creation.
- Enhanced `search.rs` to support multiple search providers and improved error handling.
- Updated chat view logic to simplify message display and improve user experience.
- Removed deprecated modules and constants from various files to streamline the codebase.
This commit is contained in:
asepharyana
2026-07-11 23:45:13 +07:00
parent 93d1bbb7c1
commit fcef85a327
51 changed files with 1431 additions and 1246 deletions
+2 -23
View File
@@ -19,11 +19,6 @@ impl DirCache {
let mut w = self.entries.write().await;
*w = paths;
}
pub async fn get(&self) -> Vec<PathBuf> {
let r = self.entries.read().await;
r.clone()
}
}
#[derive(Debug, Clone)]
@@ -53,10 +48,6 @@ impl ScrollState {
}
}
pub fn scroll_to_bottom(&mut self, total: usize) {
self.offset = total.saturating_sub(self.max_visible);
}
pub fn set_max_visible(&mut self, max: usize) {
self.max_visible = max;
}
@@ -202,26 +193,17 @@ impl InputState {
None => {}
}
}
pub fn clear(&mut self) {
self.buffer.clear();
self.cursor = 0;
self.history_idx = None;
}
}
#[derive(Debug, Clone)]
pub struct MiscState {
pub overlay: Overlay,
pub toasts: Vec<super::types::Toast>,
pub dirty: bool,
pub yolo_armed: bool,
pub security_armed: bool,
pub security_acknowledged: bool,
pub esc_press_count: u32,
pub last_staleness_sweep_ms: i64,
pub effort_level: usize,
pub editor: Option<crate::app::mode::editor::EditorState>,
pub thinking: bool,
}
impl MiscState {
@@ -229,14 +211,11 @@ impl MiscState {
MiscState {
overlay: Overlay::None,
toasts: Vec::new(),
dirty: true,
yolo_armed: false,
security_armed: false,
security_acknowledged: false,
esc_press_count: 0,
last_staleness_sweep_ms: 0,
effort_level: 1,
editor: None,
thinking: false,
}
}