summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.zig4
-rw-r--r--src/subcommand.zig2
-rw-r--r--src/system_prompt.zig2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/main.zig b/src/main.zig
index 06fd29e..693e88c 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -251,7 +251,9 @@ pub fn main(init: std.process.Init) !void {
// per-cwd `session_dir` (the CLI owns the cwd→dir grouping; the store
// is cwd-agnostic). Must outlive the agent, which appends through a
// `Session` handle minted/resolved below.
- var session_store_impl = try panto.FileSystemJSONLStore.init(alloc, io, session_dir, cwd);
+ const session_metadata = try std.fmt.allocPrint(alloc, "{{\"cwd\":{s}}}", .{try std.json.Stringify.valueAlloc(alloc, cwd, .{})});
+ defer alloc.free(session_metadata);
+ var session_store_impl = try panto.FileSystemJSONLStore.initWithMetadata(alloc, io, session_dir, session_metadata);
defer session_store_impl.deinit();
const session_store = session_store_impl.store();
diff --git a/src/subcommand.zig b/src/subcommand.zig
index f0fdfc9..21d2065 100644
--- a/src/subcommand.zig
+++ b/src/subcommand.zig
@@ -272,7 +272,7 @@ fn runSessionsSubcommand(
const session_dir = try session_paths.sessionDirForCwd(allocator, environ_map, cwd);
defer allocator.free(session_dir);
- var store_impl = try panto.FileSystemJSONLStore.init(allocator, io, session_dir, cwd);
+ var store_impl = try panto.FileSystemJSONLStore.init(allocator, io, session_dir);
defer store_impl.deinit();
const store = store_impl.store();
diff --git a/src/system_prompt.zig b/src/system_prompt.zig
index 9dce3e5..e2b2907 100644
--- a/src/system_prompt.zig
+++ b/src/system_prompt.zig
@@ -473,7 +473,7 @@ const TmpLayers = struct {
fn openTmpStore(arena: Allocator, root: []const u8) !panto.FileSystemJSONLStore {
const sessions = try std.fs.path.join(arena, &.{ root, "sessions" });
- return panto.FileSystemJSONLStore.init(testing.allocator, testing.io, sessions, "/cwd");
+ return panto.FileSystemJSONLStore.init(testing.allocator, testing.io, sessions);
}
/// Minimal agent harness for system-prompt tests: a throwaway provider