Skip to content

Commit 835d9f8

Browse files
committed
style: fix formatting issues — remove extra blank lines, fix import ordering
1 parent dd74799 commit 835d9f8

File tree

9 files changed

+8
-10
lines changed

9 files changed

+8
-10
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ Thumbs.db
3434
# Backup files
3535
*.bak
3636
*.backup
37+
.cargo-home/
38+
.sccache/
39+
.rustup/

cortex-tui-framework/crates/cortex-tui-text/src/wrap.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,6 @@ fn is_word_break(grapheme: &str) -> bool {
382382
false
383383
}
384384

385-
386385
/// Iterator that yields wrapped lines.
387386
pub struct WrapIterator<'a> {
388387
remaining: &'a str,

src/cortex-engine/src/agent/delegate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ mod tests {
6565
use async_trait::async_trait;
6666
use tokio::sync::mpsc;
6767

68-
use super::*;
6968
use super::super::AgentEvent;
69+
use super::*;
7070

7171
/// No-op delegate that does nothing.
7272
pub struct NoOpDelegate;

src/cortex-tui/src/commands/executor/mcp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ impl CommandExecutor {
88
// Always open the interactive MCP panel - all management is centralized there
99
CommandResult::OpenModal(ModalType::McpManager)
1010
}
11-
1211
}

src/cortex-tui/src/modal/login.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl LoginModal {
224224
let url_max = (chunks[2].width as usize).saturating_sub(2);
225225
let url_display = if self.verification_url.len() > url_max {
226226
let trunc_len = (chunks[2].width as usize).saturating_sub(5);
227-
format!("{}...", &self.verification_url[..trunc_len])
227+
format!("{}...", &self.verification_url[..self.verification_url.floor_char_boundary(trunc_len)])
228228
} else {
229229
self.verification_url.clone()
230230
};
@@ -327,7 +327,7 @@ impl LoginModal {
327327
let err_max = (chunks[4].width as usize).saturating_sub(4);
328328
let error_display = if error.len() > err_max {
329329
let trunc = (chunks[4].width as usize).saturating_sub(7);
330-
format!("{}...", &error[..trunc])
330+
format!("{}...", &error[..error.floor_char_boundary(trunc)])
331331
} else {
332332
error.to_string()
333333
};

src/cortex-tui/src/modal/upgrade.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ impl UpgradeModal {
479479
let max_len = (chunks[2].width as usize).saturating_sub(4);
480480
let error_display = if error.len() > max_len {
481481
let trunc = max_len.saturating_sub(3);
482-
format!("{}...", &error[..trunc])
482+
format!("{}...", &error[..error.floor_char_boundary(trunc)])
483483
} else {
484484
error.to_string()
485485
};

src/cortex-tui/src/runner/event_loop/subagent.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,5 +511,4 @@ impl EventLoop {
511511

512512
self.running_tool_tasks.insert(tool_call_id, task);
513513
}
514-
515514
}

src/cortex-tui/src/views/minimal_session/layout.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,4 @@ impl LayoutManager {
3535
pub fn gap(&mut self, lines: u16) {
3636
self.next_y = (self.next_y + lines).min(self.max_y);
3737
}
38-
3938
}

src/cortex-tui/src/views/minimal_session/view.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ use crate::widgets::{HintContext, KeyHints, StatusIndicator};
1515

1616
use super::layout::LayoutManager;
1717
use super::rendering::{
18-
generate_message_lines, generate_welcome_lines,
19-
render_scroll_to_bottom_hint, render_scrollbar,
18+
generate_message_lines, generate_welcome_lines, render_scroll_to_bottom_hint, render_scrollbar,
2019
};
2120

2221
// Re-export for convenience

0 commit comments

Comments
 (0)