Skip to content

Conversation

@jrf0110
Copy link
Contributor

@jrf0110 jrf0110 commented Jan 19, 2026

Implement contribution tracking in EditFileTool to monitor AI-generated code changes. This includes tracking whether edits were accepted or rejected by the user and reporting the metadata to the Kilocode service.

  • Integrate trackContribution in EditFileTool.ts
  • Update kilocode/editFileTool.ts to align with tracking logic
  • Add changeset for versioning

Implement contribution tracking in EditFileTool to monitor AI-generated
code changes. This includes tracking whether edits were accepted or
rejected by the user and reporting the metadata to the Kilocode service.

- Integrate trackContribution in EditFileTool.ts
- Update kilocode/editFileTool.ts to align with tracking logic
- Add changeset for versioning
@changeset-bot
Copy link

changeset-bot bot commented Jan 19, 2026

🦋 Changeset detected

Latest commit: b89daa1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 19, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds AI Attribution line tracking to the EditFileTool by integrating the trackContribution service. The changes are well-structured:

  • src/core/tools/EditFileTool.ts: Adds import and call to trackContribution after user approval/rejection
  • src/core/tools/kilocode/editFileTool.ts: Removes unused imports and variables (sanitizeUnifiedDiff, unifiedPatchRaw, unifiedPatch), adds proper kilocode_change markers
  • .changeset/little-wombats-attack.md: New changeset for the patch

The implementation correctly:

  • Places tracking after the approval decision (fire-and-forget pattern)
  • Passes all required parameters (cwd, filePath, originalContent, newContent, status, taskId, organizationId, kilocodeToken)
  • Uses the existing state variable already in scope
  • Cleans up dead code that was computing but never using unifiedPatch
Files Reviewed (3 files)
  • .changeset/little-wombats-attack.md - New changeset file
  • src/core/tools/EditFileTool.ts - Added contribution tracking
  • src/core/tools/kilocode/editFileTool.ts - Cleaned up unused code, added markers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants