Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,10 @@ impl Task {
}

pub fn prefix(&self) -> String {
format!("[{}]", self.display_name)
let max_width = 40;
let inner = format!("{} {}", self.display_name, self.args.join(" "));
let inner = inner.trim();
format!("[{}]", console::truncate_str(inner, max_width, "…"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant module path prefix on imported function

truncate_str is already directly imported on line 10 via use console::{Color, measure_text_width, truncate_str};, and the existing usage at line 1290 calls it without the module prefix. Using the full path console::truncate_str is inconsistent with both.

Suggested change
format!("[{}]", console::truncate_str(inner, max_width, "…"))
format!("[{}]", truncate_str(inner, max_width, "…"))

Fix in Claude Code

}

pub fn run(&self) -> &Vec<RunEntry> {
Expand Down
Loading