Lightpanda: the headless browser designed for AI and automation
repl: update isocline and polish hints
Adrià Arrufatc6b1649b93fe
diff --git a/build.zig.zon b/build.zig.zonindex 7ef59f06f..ddffeebca 100644--- a/build.zig.zon+++ b/build.zig.zon@@ -39,8 +39,8 @@.hash = "zenai-0.0.0-iOY_VDVqBAA3mH3_90Lg7Vz3JK8oD0gIhcete_M9c1UC",},.isocline = .{- .url = "git+https://github.com/arrufat/isocline?ref=lightpanda#212044e3d7da25d3411ac61adc68251d69ef9913",- .hash = "N-V-__8AADRdEwCAhik-QJeSdpa9D57BeO-ANGciaDCL2aCD",+ .url = "git+https://github.com/arrufat/isocline?ref=lightpanda#3048390cb233bc85db5ca2ae839f84f110d2d660",+ .hash = "N-V-__8AAHBgEwDbVzW6m9UTbXePeahYAD1IjOsLp-5-iD-D",},},.paths = .{""},diff --git a/src/agent/Agent.zig b/src/agent/Agent.zigindex 699048eeb..02c83bd8b 100644--- a/src/agent/Agent.zig+++ b/src/agent/Agent.zig@@ -650,8 +650,6 @@ fn runRepl(self: *Agent) void {},}}-- self.terminal.printInfo("Goodbye!", .{});}/// Handle a REPL-only meta slash command. These aren't tool slash commandsdiff --git a/src/agent/Terminal.zig b/src/agent/Terminal.zigindex a5c0e69a4..3d314b2a5 100644--- a/src/agent/Terminal.zig+++ b/src/agent/Terminal.zig@@ -113,8 +113,9 @@ pub fn attachCompleter(self: *Terminal) void {c.ic_set_default_completer(&completionCallback, self);c.ic_set_default_hinter(&hintsCallback, self);c.ic_set_mode_callback(&modeCallback, self);- c.ic_set_ctrl_d_hint("press Ctrl-D again to exit");+ c.ic_set_ctrl_d_hint(" press Ctrl-D again to exit");c.ic_set_esc_clear_hint(" esc again to clear");+ c.ic_set_mode_hint(" JS mode - esc to exit");c.ic_set_default_highlighter(&highlighterCallback, self);}@@ -160,6 +161,8 @@ pub fn init(allocator: std.mem.Allocator, history_paths: ?HistoryPaths, verbositc.ic_style_def(style_jsmode, "ansi-red bold");c.ic_style_def(style_keyword, "ansi-blue bold");c.ic_style_def(style_comment, "ansi-darkgray italic");+ // lighten the ghost/inline-hint color from isocline's default ansi-darkgray+ c.ic_style_def("ic-hint", "ansi-color=244");// `!` on an empty prompt toggles JS mode; state callback wired in attachCompleter.c.ic_set_prompt_mode("[" ++ style_jsmode ++ "]![/" ++ style_jsmode ++ "] ", '!');// Blank continuation marker so multiline input isn't prefixed with `>`.