Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

Merge PR #80: fix CLI steering input rendering while streaming (#45)

Rach Pradhan9b2599cb4002
diff --cc src/main.zig
index 14083d25,ea679871..728ba588
--- a/src/main.zig
+++ b/src/main.zig
@@@ -2703,11 -2670,9 +2703,12 @@@ var g_steer_buf: std.ArrayList(u8) = .e
const SteerEntry = struct { text: []const u8, force: bool };
var g_steer_queue: std.ArrayList(SteerEntry) = .empty; // completed lines
var g_steer_echoed = false; // "↳ steer ›" prefix shown for the current line
+ var g_steer_visible: std.atomic.Value(bool) = .init(false); // visible live steering row; pauses spinner redraws
var g_out: ?*Io.Writer = null; // stdout writer for steer echo (set in main)
+var g_gui_mu: Io.Mutex = .init; // serializes --json stdout across pool-thread subagent emits (guiEmit + Agent.emit)
- var g_force_interrupt = false; // Ctrl-F force caused the last interrupt
+ var g_force_interrupt = false; // Force-prompt path caused the last interrupt (Ctrl-F/double-enter).
+var g_5xx_body_buf: [600]u8 = undefined; // snippet of the last 5xx/429 error body
+var g_5xx_body_len: usize = 0; // 0 = no body captured
/// Pops the next queued steering prompt (FIFO), or null if none.
fn popSteer() ?SteerEntry {