Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Checks every pull request and every push to main: formatting, a build for each desktop OS, the
# build's `test` step if it has one, and (never failing the run) a build against fizzy main.
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
uses: fizzyedit/plugin-build-action/.github/workflows/check.yml@v7
with:
zig-version: "0.16.0"
# secrets:
# build_env: ${{ secrets.MY_BUILD_ENV }} # as in release.yml, if the build needs one
16 changes: 10 additions & 6 deletions src/AcpClient.zig
Original file line number Diff line number Diff line change
Expand Up @@ -838,12 +838,16 @@ fn askPermission(s: *Session, id: json.Value, params: json.Value) void {
};
const title = str(field(callv, "title")) orelse "use a tool";
const m = turnMessage(s) orelse return rid.deinit(s.gpa);
const r = call("chat.ask", api.Ask{ .chat = s.chat, .message = m, .question = .{
// On its tool's line the call says what; on its own the question does.
.text = if (tid != null) "" else std.fmt.allocPrint(arena, "The agent asks to {s}.", .{readable(arena, title)}) catch "",
.options = options.items,
.tool = tid,
} }) orelse return rid.deinit(s.gpa);
const r = call("chat.ask", api.Ask{
.chat = s.chat,
.message = m,
.question = .{
// On its tool's line the call says what; on its own the question does.
.text = if (tid != null) "" else std.fmt.allocPrint(arena, "The agent asks to {s}.", .{readable(arena, title)}) catch "",
.options = options.items,
.tool = tid,
},
}) orelse return rid.deinit(s.gpa);
const asked = api.parse(api.Asked, arena, r) catch return rid.deinit(s.gpa);
s.requests.put(s.gpa, asked.question, rid) catch rid.deinit(s.gpa);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Explorer.zig
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub fn newPath(host: *sdk.Host, client: []const u8, folder: []const u8) ![]u8 {
var n: u32 = 0;
const path = while (true) : (n += 1) {
const name = try std.fmt.bufPrint(&name_buf, "{d:0>4}-{d:0>2}-{d:0>2}-{d:0>2}{d:0>2}{d:0>2}{s}.chat", .{
ymd.year, md.month.numeric(), md.day_index + 1, t.getHoursIntoDay(), t.getMinutesIntoHour(), t.getSecondsIntoMinute(),
ymd.year, md.month.numeric(), md.day_index + 1, t.getHoursIntoDay(), t.getMinutesIntoHour(), t.getSecondsIntoMinute(),
if (n == 0) "" else try std.fmt.bufPrint(name_buf[48..], "-{d}", .{n}),
});
const p = try std.fs.path.join(gpa, &.{ client_dir, name });
Expand Down
Loading