summaryrefslogtreecommitdiff
path: root/src/subcommand.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/subcommand.zig')
-rw-r--r--src/subcommand.zig23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/subcommand.zig b/src/subcommand.zig
index 9fdcc4c..0c04ce8 100644
--- a/src/subcommand.zig
+++ b/src/subcommand.zig
@@ -22,7 +22,6 @@ const Io = std.Io;
const lua_bridge = @import("lua_bridge.zig");
const luarocks_runtime = @import("luarocks_runtime.zig");
-const self_exe = @import("self_exe.zig");
const session_paths = @import("session_paths.zig");
const config_file = @import("config_file.zig");
const auth_manager = @import("auth_manager.zig");
@@ -131,9 +130,9 @@ fn printHelp(io: Io) !void {
\\
\\Environment:
\\ OPENAI_API_KEY, ANTHROPIC_API_KEY Consumed by the default providers.
+ \\ PANTO_DEBUG Write std.log output to <data home>/debug/<session>.log.
\\ PANTO_SESSION_DIR Override the base sessions directory. Defaults to
\\ $XDG_DATA_HOME/panto/sessions or ~/.local/share/panto/sessions.
- \\ PANTO_HOME Override the runtime/rocks tree location.
\\
);
try stdout_file.flush();
@@ -142,7 +141,7 @@ fn printHelp(io: Io) !void {
pub const BootstrapOptions = struct {
/// Wipe the per-Lua-version tree before reinstalling everything.
/// Surfaced as `panto bootstrap --force`. Equivalent to deleting
- /// `$PANTO_HOME/rocks/lua-X.Y.Z/` by hand and then running
+ /// the data-home `rocks/lua-X.Y.Z/` tree by hand and then running
/// `panto bootstrap`.
force: bool = false,
};
@@ -155,7 +154,7 @@ extern "c" fn panto_lua_pmain(L: *c.lua_State, argc: c_int, argv: [*]?[*:0]u8) c
/// Drop into the embedded Lua standalone interpreter, with the
/// luarocks runtime bootstrap completed so `require("luarocks.*")`
-/// and rocks installed under `$PANTO_HOME` are visible.
+/// and rocks installed under the panto data home are visible.
///
/// argv is rewritten so the interpreter sees `lua [...args]` rather
/// than `panto lua [...args]` — matching upstream behavior. The first
@@ -1178,16 +1177,6 @@ fn authLogin(
}
// ---------------------------------------------------------------------------
-// `panto lua` argv plumbing — sketched against the older Args API for
-// reference (kept here so the design notes survive the implementation).
-// ---------------------------------------------------------------------------
-//
-// Because we own the `lua_State` end-to-end, the subcommand can also
-// expose extra panto-specific globals to user code (e.g. surface the
-// resolved $PANTO_HOME) without disturbing upstream `lua.c` behavior.
-// Step out of scope for the current makeover; add when needed.
-
-// ---------------------------------------------------------------------------
// Tests
// ---------------------------------------------------------------------------
@@ -1197,8 +1186,6 @@ const testing = std.testing;
// controllable from a unit test. The behavior is exercised by
// integration runs of the panto binary. We test the smaller pieces.
//
-// Suppress dead-code warnings for `self_exe` (it's used by main, not
-// by tests in this module).
test "providerModelsURL appends /models once" {
const url = try providerModelsURL(testing.allocator, "https://api.example.com/v1/");
defer testing.allocator.free(url);
@@ -1255,7 +1242,3 @@ test "parseProviderModelsFilter: keyed models object" {
test "parseProviderModelsFilter: unrecognized json returns null" {
try testing.expect((try parseProviderModelsFilter(testing.allocator, "{\"ok\":true}")) == null);
}
-
-test {
- _ = self_exe;
-}