@@ -28,7 +28,6 @@ const SPINNER = "⠀⠁⠂⠃⠄⠅⠆⠇⡀⡁⡂⡃⡄⡅⡆⡇⠈⠉⠊⠋⠌
2828 const SPINNER_MS = 120;
2929 const BODY_PREFIX = " │ ";
3030 const ERROR_PREFIX = " ! ";
31-const TOOL_BODY: styles.Style = .{ .dim = true };
3231
3332 const PendingCall = tool_view.PendingCall;
3433 const Picker = picker_mod.Picker;
@@ -205,23 +204,23 @@ const Tui = struct {
205204
206205 fn pushBanner(self: *Tui) void {
207206 self.scrollback.separator = true;
208- const model = self.opts.model;
209- const brand = styles.accent(self.s, "mini-coding-agent");
210- self.push(if (model) |m|
211- if (m.effort.len == 0)
212- std.fmt.allocPrint(self.s, "{s} · {s}/{s}", .{ brand, m.provider, m.id }) catch brand
213- else
214- std.fmt.allocPrint(self.s, "{s} · {s}/{s} · {s}", .{ brand, m.provider, m.id, m.effort }) catch brand
215- else
216- std.fmt.allocPrint(self.s, "{s} · no model configured", .{brand}) catch brand);
217- const loaded = self.opts.loaded;
207+ const a = self.s;
218208 var parts: std.ArrayList([]const u8) = .empty;
209+ parts.append(a, styles.accent(a, "mini-coding-agent")) catch {};
210+ if (self.opts.model) |m| {
211+ parts.append(a, std.fmt.allocPrint(a, "{s}/{s}", .{ m.provider, m.id }) catch m.id) catch {};
212+ if (m.effort.len > 0) parts.append(a, m.effort) catch {};
213+ } else {
214+ parts.append(a, "no model configured") catch {};
215+ }
216+ self.push(styles.join(a, parts.items));
217+ const loaded = self.opts.loaded;
218+ var resources: std.ArrayList([]const u8) = .empty;
219219 if (loaded.agent_files > 0)
220- parts.append(self.s, plural(self.s, loaded.agent_files, "agent file", "agent files")) catch {};
220+ resources.append(a, styles.comment(a, plural(a, loaded.agent_files, "agent file", "agent files"))) catch {};
221221 if (loaded.skills > 0)
222- parts.append(self.s, plural(self.s, loaded.skills, "skill", "skills")) catch {};
223- if (parts.items.len > 0)
224- self.push(styles.comment(self.s, std.mem.join(self.s, " · ", parts.items) catch "resources"));
222+ resources.append(a, styles.comment(a, plural(a, loaded.skills, "skill", "skills"))) catch {};
223+ if (resources.items.len > 0) self.push(styles.join(a, resources.items));
225224 self.scrollback.separator = true;
226225 }
227226
@@ -237,25 +236,29 @@ const Tui = struct {
237236 const used = self.ctx_used;
238237 const cache = self.ctx_cache;
239238 self.messages_mutex.unlock(platform.io);
240- const info = std.fmt.allocPrint(self.s, "{s} {s}", .{
239+ const info = std.fmt.allocPrint(self.s, "{s}{s}{s}", .{
241240 usage_mod.contextUsageLine(self.s, used, model),
241+ styles.sep(self.s),
242242 usage_mod.cacheLine(self.s, cache),
243243 }) catch "ctx";
244+ const sep = styles.sep(self.s);
244245 if (self.paused or self.phase == .pausing) {
245- return std.fmt.allocPrint(self.s, "{s} · {s}", .{ styles.comment(self.s, "paused - type steering, Enter to submit"), info }) catch info;
246+ return std.fmt.allocPrint(self.s, "{s}{s}{s}", .{ styles.comment(self.s, "paused - type steering, Enter to submit"), sep, info }) catch info;
246247 }
247248 if (self.active and self.pause_requested.load(.seq_cst)) {
248- return std.fmt.allocPrint(self.s, "{s} · {s}", .{ styles.comment(self.s, "pausing - waiting for the step boundary"), info }) catch info;
249+ return std.fmt.allocPrint(self.s, "{s}{s}{s}", .{ styles.comment(self.s, "pausing - waiting for the step boundary"), sep, info }) catch info;
249250 }
250251 if (self.retry) {
251- return std.fmt.allocPrint(self.s, "{s} · {s}", .{ styles.err(self.s, "failed - Enter to retry"), info }) catch info;
252+ return std.fmt.allocPrint(self.s, "{s}{s}{s}", .{ styles.err(self.s, "failed - Enter to retry"), sep, info }) catch info;
252253 }
253254 if (!self.active or self.phase == .idle) return info;
254255 const elapsed = @max(0, @divFloor(time.nowMs() - self.turn_start, 1000));
255- return std.fmt.allocPrint(self.s, "{s} {s} · {s} · {s}", .{
256+ return std.fmt.allocPrint(self.s, "{s} {s}{s}{s}{s}{s}", .{
256257 styles.accent(self.s, spinnerChar(self.frame)),
257258 self.stateLabel(),
259+ sep,
258260 styles.comment(self.s, std.fmt.allocPrint(self.s, "{d}s", .{elapsed}) catch ""),
261+ sep,
259262 info,
260263 }) catch info;
261264 }
@@ -301,11 +304,13 @@ const Tui = struct {
301304 out.appendSlice(a, if (role) |r| styles.styledWith(a, r, text) else styles.comment(a, text)) catch {};
302305 if (bytes > 0) {
303306 const n = usage_mod.formatTokens(a, (bytes + 3) / 4);
304- out.appendSlice(a, styles.comment(a, std.fmt.allocPrint(a, " · ~{s} tok", .{n}) catch "")) catch {};
307+ out.appendSlice(a, styles.sep(a)) catch {};
308+ out.appendSlice(a, styles.comment(a, std.fmt.allocPrint(a, "~{s} tok", .{n}) catch "")) catch {};
305309 }
306310 const queued = self.pending_calls.items.len -| @intFromBool(self.phase == .running_tool);
307311 if (queued > 0) {
308- out.appendSlice(a, styles.comment(a, std.fmt.allocPrint(a, " · {d} queued", .{queued}) catch "")) catch {};
312+ out.appendSlice(a, styles.sep(a)) catch {};
313+ out.appendSlice(a, styles.comment(a, std.fmt.allocPrint(a, "{d} queued", .{queued}) catch "")) catch {};
309314 }
310315 return out.items;
311316 }
@@ -521,7 +526,7 @@ const Tui = struct {
521526 const is_bash = std.mem.eql(u8, name, "bash");
522527 const bash_exit: ?[]const u8 = if (is_bash) tool_view.exitLine(self.s, shown) else null;
523528 const result = tool_view.resultLines(self.s, name, shown, self.cfg.max_diff_lines);
524- const rows = if (std.mem.eql(u8, name, "edit")) render.plainRows(self.s, result.lines, TOOL_BODY) else render.bodyRows(self.s, result.lines, width, TOOL_BODY);
529+ const rows = if (std.mem.eql(u8, name, "edit")) render.plainRows(self.s, result.lines, styles.roles.output) else render.bodyRows(self.s, result.lines, width, styles.roles.output);
525530 const mark_error = is_error and bash_exit == null;
526531 for (rows, 0..) |row, i| {
527532 const prefix = if (mark_error and i == rows.len - 1) styles.err(self.s, ERROR_PREFIX) else styles.comment(self.s, BODY_PREFIX);
@@ -533,7 +538,7 @@ const Tui = struct {
533538 for (diffs) |d| {
534539 self.push(tool_view.diffHead(self.s, name, d.path));
535540 const r = diff_view.diffBody(self.s, d, self.cfg.max_diff_lines);
536- for (render.plainRows(self.s, r.lines, TOOL_BODY)) |row| {
541+ for (render.plainRows(self.s, r.lines, styles.roles.output)) |row| {
537542 self.push(std.fmt.allocPrint(self.s, "{s}{s}", .{ styles.comment(self.s, BODY_PREFIX), row }) catch row);
538543 }
539544 if (tool_view.diffFooter(self.s, r)) |footer| self.push(footer);