plugin: a GitHub-tagged agent plugin is listed as an agent, not left out
TaggedRepos knew a package.json's magpie.middleware but not magpie.agent (cb406c84's new kind). An agent package has no main and no index.js, so it was looked for at index.js, not found, and dropped from Plugins › Discover. It is now kind "agent", its entry checked at magpie.agent, and the GUI's kindOf already shows it under Agents. Fixture: someone/agent-aider, the bytes of magpie-community's packages/aider package.json and aider.agent.js. Run: go test -tags nogui ./internal/plugin ./internal/gui ok; TestTaggedRepos fails on the old github.go (agent-aider missing); gofmt; GOOS=linux/windows go vet ./internal/plugin.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// Aider (aider.chat) keeps its settings in ~/.aider.conf.yml and reaches
|
||||
// any OpenAI-compatible endpoint through litellm's openai/ prefix, so
|
||||
// magpie's model goes in as openai/<provider>/<model>, beside magpie's
|
||||
// address and the key magpie keeps for Aider.
|
||||
export const agent = {
|
||||
id: "aider",
|
||||
name: "Aider",
|
||||
bin: "aider",
|
||||
config: "~/.aider.conf.yml",
|
||||
model: "model",
|
||||
prefix: "openai/",
|
||||
ua: ["aider", "litellm"],
|
||||
notice: "Aider reads its settings when it starts: restart it to use the new model.",
|
||||
}
|
||||
|
||||
export function connect({ gateway }) {
|
||||
return {
|
||||
"openai-api-base": gateway.v1,
|
||||
"openai-api-key": gateway.key,
|
||||
// magpie's model ids aren't in litellm's list, so aider would warn on each
|
||||
"show-model-warnings": false,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "@magpie-community/agent-aider",
|
||||
"version": "0.1.0",
|
||||
"description": "Aider (aider.chat) as a magpie agent: pick one of magpie's models for it on the Agents page",
|
||||
"type": "module",
|
||||
"files": ["aider.agent.js", "README.md"],
|
||||
"keywords": ["magpie", "magpie-agent", "aider", "llm-gateway"],
|
||||
"license": "MIT",
|
||||
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/aider" },
|
||||
"magpie": { "agent": "./aider.agent.js" }
|
||||
}
|
||||
Reference in New Issue
Block a user