-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: Reorganize into Subpackages and Enhance Parameter Parsing #163
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
swedishborgie
commented
Dec 16, 2025
- Split codebase into logical subpackages (markdown, selectors, taskparams, taskparser, tokencount, mcp)
- Add comprehensive parameter parsing with support for quoted values, escape sequences (Unicode, hex, octal), and multiple values per key
- Change Params type from map[string]string to map[string][]string
- Move options to separate file
- Update documentation and tests
23f639b to
5939ba3
Compare
|
@swedishborgie the task params parser is done quite differently now. It uses the particple parser:
It should be possible to expand that parser. |
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.
Pull request overview
This PR performs a significant refactoring to reorganize the codebase into logical subpackages and enhance parameter parsing capabilities. The main changes include splitting functionality into markdown, selectors, taskparams, taskparser, tokencount, and mcp subpackages, and changing the Params type from map[string]string to map[string][]string to support multiple values per key.
Key changes:
- Comprehensive parameter parsing: Added support for quoted values (single/double quotes), escape sequences (Unicode, hex, octal), and multiple values per key with case-insensitive key handling
- Type system improvement: Changed
Paramsfrommap[string]stringtomap[string][]stringto enable collecting multiple values for duplicate keys - Code organization: Split monolithic package into focused subpackages for better maintainability
Reviewed changes
Copilot reviewed 36 out of 37 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/codingcontext/taskparams/taskparams.go | New comprehensive parameter parser with support for multiple values, quotes, and escape sequences |
| pkg/codingcontext/taskparams/parser.go | Internal parser implementation for handling complex parsing logic |
| pkg/codingcontext/taskparams/expander.go | Moved from main package with updated signature to return error |
| pkg/codingcontext/taskparams/taskparams_test.go | Extensive test coverage for new parsing features (677 lines) |
| pkg/codingcontext/tokencount/tokencount.go | Extracted token counting logic into separate subpackage |
| pkg/codingcontext/markdown/markdown.go | Consolidated markdown-related types and functions |
| pkg/codingcontext/mcp/mcp.go | Extracted MCP server configuration types |
| pkg/codingcontext/selectors/selectors.go | Moved selector logic to dedicated subpackage |
| pkg/codingcontext/options.go | Extracted option functions from context.go |
| pkg/codingcontext/context.go | Updated to use new subpackages and handle expansion errors |
| go.mod | Added testify dependency, updated Go version |
| go.sum | Updated dependencies (critical issue found) |
| docs/reference/cli.md | Documented new parameter parsing features |
- Split codebase into logical subpackages (markdown, selectors, taskparams, taskparser, tokencount, mcp) - Add comprehensive parameter parsing with support for quoted values, escape sequences (Unicode, hex, octal), and multiple values per key - Change Params type from map[string]string to map[string][]string - Move options to separate file - Update documentation and tests
5939ba3 to
3f41d82
Compare
|
Gotcha! I've gotten rid of the bepoke parser and integrated with participle, and I copied over all of the test cases. I also integrated the concept of positional arguments you had. |