Commit Graph

4 Commits

Author SHA1 Message Date
Gregory Gauthier
426288b356 refactor(cmd): replace global vars with flags for agent mode params
Use command-line flags for edit instructions and scaffold descriptions
instead of global variables to improve modularity and avoid globals.
2026-03-04 14:09:04 +00:00
Gregory Gauthier
2809b55912 refactor(cmd): integrate agent mode with edit and scaffold commands
Refactor edit and scaffold commands to support invocation from chat --agent mode by using temporary global variables for passing instructions/descriptions. Add interactive prompts for normal usage, preview diffs, and confirmation before writing files. Update chat handler to set these variables and reset after execution.
2026-03-04 14:04:29 +00:00
Gregory Gauthier
0ef58cb5a4 fix(cmd): use Fprintf for efficiency and handle Chdir error in tests
All checks were successful
CI / Test (push) Successful in 25s
CI / Lint (push) Successful in 37s
CI / Build (push) Successful in 15s
- Replace WriteString + Sprintf with Fprintf in harvestContext for better performance.
- Wrap deferred Chdir in scaffold tests with error logging to avoid silent failures.
2026-03-03 15:50:30 +00:00
Gregory Gauthier
3ea26c403a feat(cmd): add scaffold command for AI-assisted file creation
All checks were successful
CI / Test (push) Successful in 39s
CI / Lint (push) Successful in 27s
CI / Build (push) Successful in 22s
Introduce a new `scaffold` command that uses Grok to generate new files based on a description.
Includes options for generating tests, dry runs, force overwrite, and language override.
Detects language from file extension and harvests project context for better generation.
2026-03-03 14:18:05 +00:00