ci: add GitHub Actions workflows with semantic-release auto-versioning
chore: fix all 702 clippy warnings across codebase - auto-fix 475 via cargo clippy --fix - fix remaining 227 manually: uninlined_format_args, redundant_closure, match_same_arms, underscore_binding, format_push_string, items_after_statements, needless_pass_by_value, clone_on_copy, case_sensitive_extension, single_match/let-else, write_with_newline, and other clippy lints
This commit is contained in:
+5
-6
@@ -1,3 +1,4 @@
|
||||
#![allow(clippy::cast_possible_truncation, clippy::cast_sign_loss, clippy::cast_precision_loss, clippy::cast_possible_wrap)]
|
||||
//! Zesdex binary entry point.
|
||||
//!
|
||||
//! Parses `--daemon` / `--attach <id>` flags to select one of three
|
||||
@@ -106,7 +107,7 @@ fn run_single_process() -> Result<()> {
|
||||
let workspace_roots = vec![std::env::current_dir()?];
|
||||
let mut state = app::state::rest::AppStateRest::new(
|
||||
workspace_roots.clone(),
|
||||
session_dir,
|
||||
&session_dir,
|
||||
store.memory_dir,
|
||||
);
|
||||
state.sessions = model::session::Session::list(&store.base_dir);
|
||||
@@ -129,7 +130,7 @@ fn run_single_process() -> Result<()> {
|
||||
let _ = disable_raw_mode();
|
||||
|
||||
if let Err(e) = run_result {
|
||||
let _ = writeln!(restore_stdout, "error: {}", e);
|
||||
let _ = writeln!(restore_stdout, "error: {e}");
|
||||
let _ = restore_stdout.flush();
|
||||
}
|
||||
|
||||
@@ -262,7 +263,6 @@ fn apply_client_update(
|
||||
state.transcript_cache.messages = payload.messages.into_iter().map(|m| {
|
||||
app::state::rest::ChatMessageDisplay {
|
||||
role: match m.role.as_str() {
|
||||
"User" => crate::dto::chat::message::Role::User,
|
||||
"Assistant" => crate::dto::chat::message::Role::Assistant,
|
||||
"System" => crate::dto::chat::message::Role::System,
|
||||
"Tool" => crate::dto::chat::message::Role::Tool,
|
||||
@@ -300,7 +300,6 @@ fn apply_client_update(
|
||||
state.misc.toasts = payload.toasts.into_iter().map(|t| {
|
||||
Toast {
|
||||
kind: match t.kind.as_str() {
|
||||
"Info" => ToastKind::Info,
|
||||
"Success" => ToastKind::Success,
|
||||
"Warning" => ToastKind::Warning,
|
||||
"Error" => ToastKind::Error,
|
||||
@@ -350,7 +349,7 @@ fn run_daemon() -> Result<()> {
|
||||
let workspace_roots = vec![std::env::current_dir()?];
|
||||
let mut state = app::state::rest::AppStateRest::new(
|
||||
workspace_roots.clone(),
|
||||
session_dir,
|
||||
&session_dir,
|
||||
store.memory_dir,
|
||||
);
|
||||
state.sessions = model::session::Session::list(&store.base_dir);
|
||||
@@ -479,7 +478,7 @@ fn run_attach(session_id: &str) -> Result<()> {
|
||||
std::fs::create_dir_all(&session_dir)?;
|
||||
let mut client_state = app::state::rest::AppStateRest::new(
|
||||
workspace_roots,
|
||||
session_dir,
|
||||
&session_dir,
|
||||
store.memory_dir,
|
||||
);
|
||||
client_state.session_id = session_id.to_string();
|
||||
|
||||
Reference in New Issue
Block a user