summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main.zig b/src/main.zig
index 247817a..995735f 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -45,9 +45,9 @@ test {
_ = command_compaction;
}
-const ContentBlockType = panto.provider.ContentBlockType;
-const MessageRole = panto.conversation.MessageRole;
-const Event = panto.stream.Event;
+const ContentBlockType = panto.ContentBlockType;
+const MessageRole = panto.MessageRole;
+const Event = panto.Event;
/// Display state for the pull-stream CLI renderer. Prints streaming deltas
/// to stdout; thinking blocks are dimmed with ANSI escape codes, text blocks
@@ -307,22 +307,22 @@ pub fn main(init: std.process.Init) !void {
// Resolve the optional compaction-model override into a ProviderConfig.
// On any resolution failure we log and fall back to no override (the
// active chat model is used for compaction).
- const compaction_provider_config: ?panto.config.ProviderConfig = blk: {
+ const compaction_provider_config: ?panto.ProviderConfig = blk: {
const ref = app_config.compaction_model_ref orelse break :blk null;
break :blk config_file.buildProviderConfig(&app_config, &models.defs, ref) catch |err| {
std.log.warn("compaction_model resolution failed ({t}); using active model", .{err});
break :blk null;
};
};
- const compaction_cfg: panto.config.CompactionConfig = .{
+ const compaction_cfg: panto.CompactionConfig = .{
.keep_verbatim = app_config.compaction_keep_verbatim orelse 20_000,
.model = compaction_provider_config,
};
// Process-global HTTP client: one connection pool for every provider /
// base_url the agent may switch to. Torn down at shutdown.
- panto.config.initHttp(alloc, io);
- defer panto.config.deinitHttp();
+ panto.init(alloc, io);
+ defer panto.deinit();
const banner_model_initial: []const u8 = switch (provider_config) {
inline else => |c| c.model,
@@ -333,7 +333,7 @@ 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.session_manager.FileSystemJSONLStore.init(alloc, io, session_dir, cwd);
+ var session_store_impl = try panto.FileSystemJSONLStore.init(alloc, io, session_dir, cwd);
defer session_store_impl.deinit();
const session_store = session_store_impl.store();
@@ -376,7 +376,7 @@ pub fn main(init: std.process.Init) !void {
// built but before the first turn, so in-place registration is visible.
// System-prompt seeding/reconciliation below runs *through* the agent
// so those entries persist.
- const active_config: panto.config.Config = .{
+ const active_config: panto.Config = .{
.provider = provider_config,
.compaction = compaction_cfg,
};
@@ -648,12 +648,12 @@ fn parseAgentFlags(alloc: std.mem.Allocator, args: std.process.Args) !AgentFlags
/// most recent. The returned `Session` owns its `info` (freed via the
/// agent's `deinit`, which adopts it).
fn openSession(
- store: panto.session_store.SessionStore,
+ store: panto.SessionStore,
flags: AgentFlags,
session_dir: []const u8,
stdout: *std.Io.Writer,
stdout_file: *std.Io.File.Writer,
-) !panto.session_store.Session {
+) !panto.Session {
switch (flags.resume_kind) {
.none => return store.create(),
.most_recent => {