style: format seluruh workspace dengan cargo fmt

Menyeragamkan format kode sesuai rustfmt (126 file). Sebelumnya
lefthook pre-commit 'cargo fmt --check' akan gagal pada commit apa pun.
This commit is contained in:
asepharyana
2026-08-27 22:10:28 +07:00
parent 884b19ccb5
commit 7b0b53671f
127 changed files with 1271 additions and 1156 deletions
+9 -8
View File
@@ -4,13 +4,13 @@
use std::sync::atomic::Ordering;
use tracing::info;
use zesdex_domain::core::ChatMessage;
use zesdex_application::agent::turn_service::AgentTurnServiceImpl;
use zesdex_application::agent::AgentTurnService;
use zesdex_domain::agent::AgentTurnParams;
use zesdex_domain::core::ChatMessage;
use zesdex_infrastructure::llm::provider::LlmClient;
use zesdex_infrastructure::tools::executor::InfrastructureToolExecutor;
use zesdex_infrastructure::tools::{all_tools, tool_defs, ToolCtx};
use zesdex_application::agent::turn_service::AgentTurnServiceImpl;
use zesdex_application::agent::AgentTurnService;
use crate::state::AppStateRest;
@@ -113,7 +113,9 @@ pub fn spawn_agent_turn(state: &mut AppStateRest, text: String) {
// Clone credentials before moving into LlmClient.
let explore_api_key = api_key.clone();
let explore_model = model.clone();
let explore_base_url = api_base.clone().unwrap_or_else(|| "https://api.openai.com/v1".to_string());
let explore_base_url = api_base
.clone()
.unwrap_or_else(|| "https://api.openai.com/v1".to_string());
let client = std::sync::Arc::new(LlmClient::new(api_key, model, api_base));
@@ -126,8 +128,7 @@ pub fn spawn_agent_turn(state: &mut AppStateRest, text: String) {
// Clone ToolCtx for the explore service (before moving into executor).
let explore_ctx = tool_ctx.clone();
let tool_executor =
std::sync::Arc::new(InfrastructureToolExecutor::new(tool_ctx));
let tool_executor = std::sync::Arc::new(InfrastructureToolExecutor::new(tool_ctx));
let tools = all_tools();
let defs = tool_defs(&tools);
@@ -145,8 +146,8 @@ pub fn spawn_agent_turn(state: &mut AppStateRest, text: String) {
),
);
let turn_service = AgentTurnServiceImpl::new(client, tool_executor, defs)
.with_explore(explore_service);
let turn_service =
AgentTurnServiceImpl::new(client, tool_executor, defs).with_explore(explore_service);
tokio::spawn(async move {
let _ = turn_service.run_turn(params).await;