-
Notifications
You must be signed in to change notification settings - Fork 1
Add centralized agent path configuration and simplify path handling #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
pkg/codingcontext/agent_paths.go
Outdated
| // AgentsPaths maps each agent to its specific search paths. | ||
| // Empty string agent ("") represents the generic .agents directory structure. | ||
| // If a path is empty, it is not defined for that agent. | ||
| var AgentsPaths = map[Agent]AgentPaths{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this variable private. @copilot
Introduce a new AgentsPaths type so we can have Agents.RulesPaths().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 951d954. The variable is now private (agentsPaths) and AgentsPaths is a type with methods like RulesPaths(). Access via agent.Paths().RulesPaths().
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
alexec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot modify the existing code to use these changes.
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Done in 64500a5. Refactored |
alexec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot It seems that different paths for home and project/remote is complex. Instead use the same set of paths for all three options.
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Done in 8788f5a. Removed the |
|
@copilot Rebase |
Completed successfully at commit 534d062. Rebased onto main (e74668b), resolved conflicts in |
|
@copilot Rather than rebase, merge master. |
…into copilot/add-agent-paths-struct # Conflicts: # pkg/codingcontext/paths.go
Head branch was pushed to by a user without write access
alexec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot AgentsPaths should be private and it should be a map[Agent]agentPathConfig
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Head branch was pushed to by a user without write access
pkg/codingcontext/agent_paths.go
Outdated
| // agentPathsConfig describes the search paths for a specific agent. | ||
| // This is the internal configuration structure used by the agentsPaths map. | ||
| type agentPathsConfig struct { | ||
| RulesPaths []string // Paths to search for rule files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Fields can be private
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in a5943c7. All fields in agentPathsConfig are now private (lowercase): rulesPaths, skillsPath, commandsPath, tasksPath.
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Plan: Add AgentPaths Configuration
agentPathsConfigstruct type with fieldsagent_paths.gowith configurationSummary
Successfully created a centralized agent path configuration system with a fully encapsulated design.
Final Design:
agentPathsConfig(private struct) - Internal configuration structure with private fields:rulesPaths []string- Paths to search for rule filesskillsPath string- Path to search for skill directoriescommandsPath string- Path to search for command filestasksPath string- Path to search for task filesagentsPaths(private variable) -map[Agent]agentPathsConfigmapping each agent to its path configurationagentsPaths[agent].rulesPathsKey Changes:
paths.goto use lowercase field namesagent_paths_test.goto use lowercase field namesagentsPathsconfigurationhomeparameter fromrulePaths()- all directories use the same path configurationsAll tests pass and the code builds successfully.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.