Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/opencode/src/cli/cmd/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const AVAILABLE_TOOLS = [
"todoread",
]

const AGENTS_DIR = "agents"

const AgentCreateCommand = cmd({
command: "create",
describe: "create a new agent",
Expand Down Expand Up @@ -75,7 +77,7 @@ const AgentCreateCommand = cmd({
// Determine scope/path
let targetPath: string
if (cliPath) {
targetPath = path.join(cliPath, "agent")
targetPath = path.join(cliPath, AGENTS_DIR)
} else {
let scope: "global" | "project" = "global"
if (project.vcs === "git") {
Expand All @@ -99,7 +101,7 @@ const AgentCreateCommand = cmd({
}
targetPath = path.join(
scope === "global" ? Global.Path.config : path.join(Instance.worktree, ".opencode"),
"agent",
AGENTS_DIR,
)
}

Expand Down
Loading