fix(ai): Optimize AI context generation and fix linter errors#17
Conversation
- Optimize `Issue`, `PullRequest`, `IssueComment`, and `Repository` structs for AI context usage by stripping heavy metadata (URLs, NodeIDs).
- Fix all linter errors:
- Add Copyright headers.
- Replace `interface{}` with `any`.
- Add comments to exported methods.
- Fix receiver naming consistency (`IssueComment`).
- Add `t.Parallel()` to tests.
- Fix formatting (`gci`, `godot`).
- Verify with `script/lint.sh` (0 errors) and `go test` (100% pass).
Co-authored-by: merchantmoh-debug <241568449+merchantmoh-debug@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
7e674b1
into
feat/ai-context-optimization
This PR addresses the linter failures in
github/ai_context.goandgithub/ai_context_test.gowhile optimizing the struct payloads for AI agent usage.Changes:
Linter Compliance:
go-githubcopyright headers.map[string]interface{}tomap[string]any.ToAgentContextmethods.c->iforIssueComment).t.Parallel()to tests.gciandgodotformatting issues.Optimization:
ToAgentContextmethods now return a stripped-down version of the structs, reducing payload size by >60% (verified byTestOperationSiliconDiet).Verification:
script/lint.sh: PASS (0 errors)go test -v ./github/: PASSPR created automatically by Jules for task 3604352569403514246 started by @merchantmoh-debug