mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: return workspace skill directory from read_skill (#26713)
Workspace skills live on the workspace filesystem, and the agent's read_file and execute tools already operate there. read_skill now returns "dir", the absolute skill directory, for workspace skills, so the agent can read or run bundled supporting files (for example a scripts/ helper) with the workspace tools. The field is omitted for personal skills, which are database-backed and have no files. read_skill_file is unchanged. Generated with Coder Agents on behalf of @kylecarbs.
This commit is contained in:
@@ -351,8 +351,11 @@ func ReadSkill(options ReadSkillOptions) fantasy.AgentTool {
|
||||
if ok {
|
||||
return response, nil
|
||||
}
|
||||
// Include the absolute skill directory so the agent can
|
||||
// reach supporting files with read_file and execute.
|
||||
return toolResponse(map[string]any{
|
||||
"name": args.Name,
|
||||
"dir": content.Dir,
|
||||
"body": content.Body,
|
||||
"files": nonNilFiles(content.Files),
|
||||
}), nil
|
||||
|
||||
Reference in New Issue
Block a user