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
-6
View File
@@ -16,9 +16,3 @@ pub fn cycle_effort(state: &mut AppStateRest) {
state.misc.effort_level = (current + 1) % EFFORT_LEVELS.len();
state.dirty = true;
}
pub fn set_effort(state: &mut AppStateRest, level: usize) {
let clamped = level.min(EFFORT_LEVELS.len() - 1);
state.misc.effort_level = clamped;
state.dirty = true;
}
-50
View File
@@ -1,32 +1,10 @@
use serde::{Deserialize, Serialize};
#[expect(dead_code)]
pub mod agents;
pub mod bash;
#[expect(dead_code)]
pub mod editor;
#[expect(dead_code)]
pub mod effort;
#[expect(dead_code)]
pub mod help;
#[expect(dead_code)]
pub mod key_input;
#[expect(dead_code)]
pub mod loading;
#[expect(dead_code)]
pub mod mcp;
#[expect(dead_code)]
pub mod onboard;
#[expect(dead_code)]
pub mod onboard_provider;
pub mod quit_confirm;
#[expect(dead_code)]
pub mod rewind;
pub mod security;
pub mod settings;
pub mod todo;
#[expect(dead_code)]
pub mod workflow;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum ModeKind {
@@ -48,31 +26,3 @@ pub enum ModeKind {
Rewind,
Loading,
}
impl ModeKind {
pub fn name(&self) -> &'static str {
match self {
ModeKind::Chat => "Chat",
ModeKind::Agents => "Agents",
ModeKind::Bash => "Bash",
ModeKind::Workflow => "Workflow",
ModeKind::Help => "Help",
ModeKind::Settings => "Settings",
ModeKind::QuitConfirm => "QuitConfirm",
ModeKind::Onboard => "Onboard",
ModeKind::OnboardProvider => "OnboardProvider",
ModeKind::KeyInput => "KeyInput",
ModeKind::Editor => "Editor",
ModeKind::Effort => "Effort",
ModeKind::Mcp => "MCP",
ModeKind::Security => "Security",
ModeKind::Todo => "Todo",
ModeKind::Rewind => "Rewind",
ModeKind::Loading => "Loading",
}
}
pub fn is_overlay(self) -> bool {
!matches!(self, ModeKind::Chat | ModeKind::Agents | ModeKind::Bash | ModeKind::Workflow)
}
}