Initial project structure and core implementation - #10
Conversation
Add core GoPilot implementation, error handling, and provider abstraction. Introduce examples for CLI, HTTP, middleware, and offline usage. Remove legacy client and interface files, update README for new API and usage, and add CI/CD GitHub workflows and Makefile for development. Includes comprehensive tests and modular provider structure.
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
There was a problem hiding this comment.
Pull request overview
This PR represents a comprehensive refactoring and modernization of the GoPilot library, transforming it from a basic LLM function router into a feature-rich AI orchestration framework with multi-step planning, pipelines, workflows, and improved error handling.
Changes:
- Complete API redesign with context-aware function execution, new provider abstraction layer, and type-safe function wrappers
- Introduction of advanced orchestration capabilities including multi-step plans, declarative workflows, fluent pipeline API, and automatic output mapping
- Comprehensive project infrastructure including CI/CD workflows, Makefile for development tasks, extensive test coverage (~2,500 lines), and multiple runnable examples
Reviewed changes
Copilot reviewed 48 out of 50 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod, go.sum | Updated Go version and removed unnecessary dependencies |
| gopilot.go, function.go, registry.go | Core refactoring with context support and improved type safety |
| errors.go, errors_test.go | Comprehensive error types and test coverage |
| schema/, internal/prompt/, internal/mapper/ | New modular packages for schema generation, prompt building, and parameter mapping |
| provider/provider.go, provider/gemini/ | Provider abstraction with Gemini implementation |
| orchestrator.go, pipeline.go | Multi-step orchestration and declarative workflow support |
| options.go | Configuration options including logging, middleware, and retry |
| examples/* | Multiple working examples (CLI, HTTP, offline, pipeline, workflow, middleware) |
| .github/workflows/ | CI/CD automation for testing, linting, security scanning, and releases |
| Makefile, README.md | Development tooling and updated documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Wrap client.Close() in a function to log errors on close in the CLI example. In schema_test.go, clarify that unexported fields are intentionally ignored and add a reference to avoid linter warnings.
Add core GoPilot implementation, error handling, and provider abstraction. Introduce examples for CLI, HTTP, middleware, and offline usage. Remove legacy client and interface files, update README for new API and usage, and add CI/CD GitHub workflows and Makefile for development. Includes comprehensive tests and modular provider structure.