opencode: fix opencode plugins and anthropic
This commit is contained in:
@@ -39,10 +39,13 @@ let
|
||||
writing.model = "openrouter/google/gemini-3-flash-preview";
|
||||
};
|
||||
};
|
||||
oh-my-opencode-pkg = inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.oh-my-opencode;
|
||||
|
||||
anthropic-user-agent-plugin = inputs.opencode-anthropic-user-agent-plugin;
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.oh-my-opencode
|
||||
oh-my-opencode-pkg
|
||||
pkgs.playwright-driver.browsers
|
||||
];
|
||||
|
||||
@@ -53,6 +56,13 @@ in
|
||||
|
||||
xdg.configFile."opencode/oh-my-opencode.json".text = builtins.toJSON ohMyOpencodeConfig;
|
||||
|
||||
# Plugins are placed directly in the plugins directory so opencode
|
||||
# auto-discovers them instead of downloading them from npm at runtime.
|
||||
xdg.configFile."opencode/plugins/oh-my-opencode.js".source =
|
||||
"${oh-my-opencode-pkg}/lib/oh-my-opencode/dist/index.js";
|
||||
xdg.configFile."opencode/plugins/opencode-anthropic-user-agent-plugin.js".source =
|
||||
"${anthropic-user-agent-plugin}/index.js";
|
||||
|
||||
xdg.configFile."opencode/skills/playwright.md".text =
|
||||
let
|
||||
browsers = pkgs.playwright-driver.browsers;
|
||||
@@ -166,11 +176,8 @@ in
|
||||
small_model = "openrouter/openai/gpt-oss-20b:free";
|
||||
|
||||
autoshare = false;
|
||||
# note: this updates opencode (and plugins like oh-my-opencode) at launch,
|
||||
# bypassing the version pinned in flake.lock
|
||||
autoupdate = true;
|
||||
autoupdate = false;
|
||||
agent = { };
|
||||
plugin = [ "oh-my-opencode" ];
|
||||
provider = {
|
||||
openrouter = {
|
||||
models = {
|
||||
|
||||
Reference in New Issue
Block a user