diff options
Diffstat (limited to 'src/compaction.zig')
| -rw-r--r-- | src/compaction.zig | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/compaction.zig b/src/compaction.zig index a1f6e89..4ec5732 100644 --- a/src/compaction.zig +++ b/src/compaction.zig @@ -8,7 +8,6 @@ const std = @import("std"); const panto = @import("panto"); const command = @import("command.zig"); -const session_persist = @import("session_persist.zig"); /// Install the `/compact` command into `registry`. pub fn register(registry: *command.Registry) !void { @@ -23,20 +22,13 @@ pub fn register(registry: *command.Registry) !void { fn run(args: []const u8, ctx: *command.Context) anyerror!void { const extra: ?[]const u8 = if (args.len > 0) args else null; - const res = ctx.agent.compact(ctx.conv, ctx.compaction_prompt, extra) catch |err| { + const res = ctx.agent.compactAndPersist(ctx.compaction_prompt, extra) catch |err| { try ctx.stdout.print("\n[compaction failed: {s}]\n> ", .{@errorName(err)}); try ctx.stdout_file.flush(); return; }; if (res.compacted) { - try session_persist.persistCompaction( - ctx.allocator, - ctx.session_mgr, - ctx.conv, - ctx.provider_name, - ctx.model_name, - ); try ctx.stdout.print( "\n[compacted: summarized {d} message(s), kept {d} recent turn(s)]\n> ", .{ res.summarized_messages, res.kept_turns }, |
