fix(agents): address cubic review findings on agent loader
- Case-insensitive .md extension stripping for agent name extraction - Resolve project agent_definitions paths relative to config dir (.opencode/) - Use getOpenCodeConfigDir() to respect OPENCODE_CONFIG_DIR/XDG_CONFIG_HOME - First-write-wins semantics for both inline and definition-file agents so project-level agents always take precedence over global-level
This commit is contained in:
committed by
YeonGyu-Kim
parent
3d0fb22cda
commit
42445f5130
@@ -28,7 +28,8 @@ export function parseMarkdownAgentFile(filePath: string, scope: AgentScope): Loa
|
||||
const content = readFileSync(filePath, "utf-8")
|
||||
const { data, body } = parseFrontmatter<AgentFrontmatter>(content)
|
||||
|
||||
const agentName = basename(filePath, ".md")
|
||||
const fileName = basename(filePath)
|
||||
const agentName = fileName.replace(/\.md$/i, "")
|
||||
const name = data.name || agentName
|
||||
const originalDescription = data.description || ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user