Skip to content

Lightpanda: the headless browser designed for AI and automation

prompt_assist: use explicit PathMatchIterator.init

Adrià Arrufat98134feb7aec
diff --git a/src/agent/prompt_assist.zig b/src/agent/prompt_assist.zig
index 2689cc3e3..feda72dc9 100644
--- a/src/agent/prompt_assist.zig
+++ b/src/agent/prompt_assist.zig
@@ -404,7 +404,7 @@ fn addPathCompletions(
prefix: []const u8,
buf: *[completion_buf_len:0]u8,
) void {
- var matches: PathMatchIterator = .init(body) orelse return;
+ var matches = PathMatchIterator.init(body) orelse return;
defer matches.deinit();
var name_buf: [completion_buf_len]u8 = undefined;
@@ -580,7 +580,7 @@ fn renderMetaHint(state: *State, meta: *const SlashCommand.MetaCommand, body: []
}
fn ghostPathFirstMatch(body: []const u8) [*c]const u8 {
- var matches: PathMatchIterator = .init(body) orelse return null;
+ var matches = PathMatchIterator.init(body) orelse return null;
defer matches.deinit();
const m = matches.next() orelse return null;
const suffix: []const u8 = if (m.is_dir) "/" else "";