Relocate ToolCall struct and HandleToolCall function from internal/agent/tools.go
to cmd/chat.go, renaming to handleToolCall for package-internal use. This eliminates
the import cycle between cmd and agent packages while preserving agent mode functionality.
Add support for Grok to call tools (edit, scaffold, testgen, lint, commit) via JSON in ```tool blocks.
Introduce HandleToolCall to parse and execute tool requests, integrating with existing commands.
Update system prompt and chat loop to handle tool calls and feed results back.
- Implement `grokkit changelog` command with flags for version, since, stdout, and commit reminder
- Add git helpers for latest/previous tags and formatted log since ref
- Include tests for message building and full changelog construction
- Add tests for shell completion generation in completion_test.go
- Add tests for root command execution and flags in root_test.go
- Expand config tests for temperature, timeout, and log level getters
- Add APIError unwrap test in errors_test.go
- Add WithContext tests in logger_test.go
- Stage test output artifact in .output.txt
- Add error checking for os.Setenv and io operations in test files
- Use anonymous functions in defer to ignore errors from os.Remove, os.Setenv, etc.
- Minor formatting and consistency fixes in tests and client code
- Introduce newGrokClient and gitRun vars to allow mocking in tests.
- Refactor commit, commitmsg, history, prdescribe, and review cmds into separate run funcs.
- Update docs, lint, and review to use newGrokClient.
- Add comprehensive unit tests in run_test.go covering happy paths, errors, and edge cases.
- Expand grok client tests with SSE server mocks for Stream* methods.
Add detailed GoDoc-style comments for the Client struct, NewClient function,
and various streaming methods to improve code readability and documentation.
Also include a comment for CleanCodeResponse and minor formatting adjustments.
Add unit tests to verify that Version is set and note that Commit and BuildDate may be empty in development builds.
Update .gitignore to ignore the .junie/ directory.
- Embed version info in binaries via ldflags
- Create multi-platform builds, archives, and checksums
- Add Gitea release creation and asset upload in CI
- Introduce GoReleaser config for standardized builds
- Add version command and install script for easy deployment
- Update README with pre-built installation instructions
Introduce new `grokkit lint` command for automatic language detection,
linting, and AI-suggested fixes. Supports 9 languages including Go, Python,
JavaScript, TypeScript, Rust, Ruby, Java, C/C++, and Shell.
- Add cmd/lint.go for command implementation
- Create internal/linter package with detection and execution logic
- Update README.md with usage examples and workflows
- Enhance docs/ARCHITECTURE.md and docs/TROUBLESHOOTING.md
- Add comprehensive tests for linter functionality
- Introduce tests for chat history file handling, loading/saving, and error cases in cmd/chat_test.go
- Add tests for removeLastModifiedComments in cmd/edit_helper_test.go
- Add comprehensive tests for CleanCodeResponse in internal/grok/cleancode_test.go
- Update Makefile to centralize build artifacts in build/ directory for coverage reports and binary
- Adjust .gitignore to ignore chat_history.json and remove obsolete coverage file entries
- Refactor logger package to use Go's slog for JSON-structured logs
- Add configurable log levels (debug, info, warn, error) via config and flags
- Integrate logging across commands, git operations, and API client with metrics like timing and sizes
- Update README with logging documentation and usage examples
- Add global --debug and --verbose flags
- Enhance tests for logger initialization, levels, and structured output
- Add Gitea CI workflow for testing, linting, and building
- Add release workflow for multi-platform builds and GitHub releases
- Implement persistent chat history with JSON storage
- Add shell completion generation for bash, zsh, fish, powershell
- Introduce custom error types and logging system
- Add interfaces for git and AI client for better testability
- Enhance config with temperature and timeout settings
- Add comprehensive unit tests for config, errors, git, grok, and logger
- Update README with installation, features, and development instructions
- Make model flag persistent across commands
- Add context timeouts to API requests
- Enhance error checking in all commands using git.Run
- Refactor git helper to return errors properly
- Fix README.md filename typo
- Update .gitignore with additional ignores
- Add fallback for config home dir
- Improve request handling in grok client
- Introduced Makefile with targets for testing (all, coverage, agent-specific), building, installing, cleaning, and help
- Added unit and integration tests for agent command, edit command, and CleanCodeResponse function
- Refactored CleanCodeResponse to use regex for robust markdown fence removal in agent and client modules
- Ensured tests cover code cleaning, plan generation placeholders, and file editing functionality
- Eliminate header comments with timestamps and ownership from all source files
- Update agent and edit commands to clean such comments and simplify response handling
- Add helper to remove last modified lines in edit command
- Minor formatting and import cleanups across codebase
Implemented automatic addition of "// Last modified: [timestamp]" headers across command and internal files for better tracking. Updated prompts in agent and edit commands to enforce header format. Added logic to prepend header if missing in generated content. Fixed minor issues like missing newlines at end of files.
- Remove unnecessary comments in agent.go for cleaner code
- Update system prompt to enforce exact header comment format
- Adjust progress logging format
- Fix CleanCodeResponse to properly strip markdown fences
- Update StreamSilent comment to include agent usage
Introduce new `agent` command that scans .go files in the project, generates an AI-driven plan for changes based on user instruction, and applies edits with previews and backups. Includes integration with Grok client for planning and content generation.
Update existing files with timestamp comments as part of the agent's editing demonstration. Add agentCmd to root command.
- Replace basic CLI chat with Bubble Tea-based TUI featuring viewport, textarea, colored history, and streaming replies.
- Add StreamSilent method to client for TUI integration without live printing.
- Introduce model flag for chat command.
- Update dependencies to include charmbracelet libraries.
- Strengthen system prompt to enforce pure content output
- Introduce CleanCodeResponse to strip markdown fences from Grok responses
- Display proposed file changes as a unified diff for better preview
- Clean up .gitignore and add ignores for logs/tmp files
- Delete built binary grokkit file
- Switch chat command from Bubble Tea TUI to basic CLI with bufio.
- Hardcode Grok model in commands, remove Viper config.
- Stream responses directly in client, remove channel-based streaming.
- Add safe previews/backups in edit, simplify prompts across tools.
- Update git helper and trim unused deps in go.mod.