summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks_runtime.zig8
-rw-r--r--src/tui_app.zig4
2 files changed, 7 insertions, 5 deletions
diff --git a/src/luarocks_runtime.zig b/src/luarocks_runtime.zig
index f0438d4..f76a60e 100644
--- a/src/luarocks_runtime.zig
+++ b/src/luarocks_runtime.zig
@@ -292,17 +292,17 @@ const default_base_config =
\\[providers.openai]
\\style = "openai_chat"
\\base_url = "https://api.openai.com/v1"
- \\auth = "openai_api"
+ \\auth = "openai"
\\
- \\[auth.openai_api]
+ \\[auth.openai]
\\key = "${env:OPENAI_API_KEY}"
\\
\\[providers.anthropic]
\\style = "anthropic_messages"
\\base_url = "https://api.anthropic.com"
- \\auth = "anthropic_api"
+ \\auth = "anthropic"
\\
- \\[auth.anthropic_api]
+ \\[auth.anthropic]
\\key = "${env:ANTHROPIC_API_KEY}"
\\
\\# Pick the default model with `<provider>:<alias>`. The alias is
diff --git a/src/tui_app.zig b/src/tui_app.zig
index e14afb1..1182777 100644
--- a/src/tui_app.zig
+++ b/src/tui_app.zig
@@ -1777,7 +1777,9 @@ const TuiPresenter = struct {
};
fn presenter(self: *TuiPresenter) panto.Presenter {
- return .{ .ptr = self, .vtable = &vtable };
+ // The callbacks cast `ptr` back to `*App`, so erase the `*App`
+ // (not the `*TuiPresenter` wrapper) into the vtable pointer.
+ return .{ .ptr = self.app, .vtable = &vtable };
}
};