mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +00:00
fix(subagent): use getAgentDir for user agents path (#1559)
This commit is contained in:
parent
96cf7425ca
commit
7390f830de
1 changed files with 2 additions and 3 deletions
|
|
@ -3,9 +3,8 @@
|
|||
*/
|
||||
|
||||
import * as fs from "node:fs";
|
||||
import * as os from "node:os";
|
||||
import * as path from "node:path";
|
||||
import { parseFrontmatter } from "@mariozechner/pi-coding-agent";
|
||||
import { getAgentDir, parseFrontmatter } from "@mariozechner/pi-coding-agent";
|
||||
|
||||
export type AgentScope = "user" | "project" | "both";
|
||||
|
||||
|
|
@ -96,7 +95,7 @@ function findNearestProjectAgentsDir(cwd: string): string | null {
|
|||
}
|
||||
|
||||
export function discoverAgents(cwd: string, scope: AgentScope): AgentDiscoveryResult {
|
||||
const userDir = path.join(os.homedir(), ".pi", "agent", "agents");
|
||||
const userDir = path.join(getAgentDir(), "agents");
|
||||
const projectAgentsDir = findNearestProjectAgentsDir(cwd);
|
||||
|
||||
const userAgents = scope === "project" ? [] : loadAgentsFromDir(userDir, "user");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue