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:
@@ -53,8 +53,7 @@ fn apply_turn_event(state: &mut AppStateRest, event: zesdex_infrastructure::Turn
|
||||
rt.hive_mind_converged = true;
|
||||
}
|
||||
} else {
|
||||
state
|
||||
.push_transcript(ChatMessageDisplay::new(Role::System, message));
|
||||
state.push_transcript(ChatMessageDisplay::new(Role::System, message));
|
||||
}
|
||||
}
|
||||
zesdex_infrastructure::TurnEvent::AssistantMessage(msg) => {
|
||||
@@ -82,8 +81,7 @@ fn apply_turn_event(state: &mut AppStateRest, event: zesdex_infrastructure::Turn
|
||||
state.toast_error(msg);
|
||||
}
|
||||
zesdex_infrastructure::TurnEvent::StreamStart => {
|
||||
state
|
||||
.push_transcript(ChatMessageDisplay::new(Role::Assistant, String::new()));
|
||||
state.push_transcript(ChatMessageDisplay::new(Role::Assistant, String::new()));
|
||||
}
|
||||
zesdex_infrastructure::TurnEvent::StreamToken(text) => {
|
||||
state.append_to_last_transcript(&text, false);
|
||||
@@ -150,7 +148,9 @@ fn apply_workflow_update(
|
||||
state
|
||||
.workflow_engine
|
||||
.agents
|
||||
.push(crate::state::SimpleAgent::with_display(agent_id, agent_name));
|
||||
.push(crate::state::SimpleAgent::with_display(
|
||||
agent_id, agent_name,
|
||||
));
|
||||
}
|
||||
}
|
||||
zesdex_infrastructure::AgentStatus::Running => {
|
||||
@@ -160,8 +160,7 @@ fn apply_workflow_update(
|
||||
state.workflow_engine.agents[i].display_name = agent_name;
|
||||
state.workflow_engine.agents[i].started_at = Some(now);
|
||||
} else {
|
||||
let mut agent =
|
||||
crate::state::SimpleAgent::with_display(agent_id, agent_name);
|
||||
let mut agent = crate::state::SimpleAgent::with_display(agent_id, agent_name);
|
||||
agent.state = crate::state::AgentState::Running;
|
||||
agent.started_at = Some(now);
|
||||
state.workflow_engine.agents.push(agent);
|
||||
|
||||
@@ -122,8 +122,7 @@ pub fn apply_action(state: &mut AppStateRest, action: Action) {
|
||||
|
||||
// ── Input ──────────────────────────────────────────────────────
|
||||
Action::SubmitInput(text) => {
|
||||
state
|
||||
.push_transcript(ChatMessageDisplay::new(Role::User, text.clone()));
|
||||
state.push_transcript(ChatMessageDisplay::new(Role::User, text.clone()));
|
||||
state.input.submit();
|
||||
crate::turn::spawn_agent_turn(state, text);
|
||||
state.token_count_dirty = true;
|
||||
@@ -176,8 +175,7 @@ pub fn apply_action(state: &mut AppStateRest, action: Action) {
|
||||
state.mark_dirty();
|
||||
}
|
||||
Action::SystemNote { kind: _, message } => {
|
||||
state
|
||||
.push_transcript(ChatMessageDisplay::new(Role::System, message));
|
||||
state.push_transcript(ChatMessageDisplay::new(Role::System, message));
|
||||
}
|
||||
Action::ModelList => {
|
||||
state.misc.overlay = Overlay::ModelSelector;
|
||||
@@ -226,12 +224,7 @@ pub fn apply_action(state: &mut AppStateRest, action: Action) {
|
||||
state.mark_dirty();
|
||||
}
|
||||
Action::DiffScroll(amount) => {
|
||||
let max_scroll = state
|
||||
.misc
|
||||
.diff_content
|
||||
.lines()
|
||||
.count()
|
||||
.saturating_sub(1);
|
||||
let max_scroll = state.misc.diff_content.lines().count().saturating_sub(1);
|
||||
let new_scroll = (state.misc.diff_scroll as i32 + amount).max(0) as usize;
|
||||
state.misc.diff_scroll = new_scroll.min(max_scroll);
|
||||
state.mark_dirty();
|
||||
|
||||
Reference in New Issue
Block a user