Skip to content

Conversation

@svarlamov
Copy link

@svarlamov svarlamov commented Dec 9, 2025

Description

Add native integration with git-ai to help Continue CLI users track which lines of code were written by Continue CLI, along with the prompts used to generate them. The integration is only enabled if the user has git-ai installed on their machine already.

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Screen recording or screenshot

Example editing session in a git repo with Continue CLI (no apparent changes for the user):
Screenshot 2025-12-09 at 11 37 20 AM

But since we had git-ai installed on the system, after we commit, we can run git-ai show head to see what Git AI recorded:

➜  testing-git git:(master) git-ai diff head
diff --git a/index.ts b/index.ts
index f22de51..c31691d 100644
--- a/index.ts
+++ b/index.ts
@@ -21,3 +21,4 @@ console.log('hello world');
 console.log('hello world');
 console.log('hello world');
 console.log('hello world');
+console.log('hello world');  🤖continue-cli
➜  testing-git git:(master) git-ai show head
index.ts
  2f4c31f189c005f3 24
---
{
  "schema_version": "authorship/3.0.0",
  "git_ai_version": "development:1.0.23",
  "base_commit_sha": "80fb2b045d9e311b4e94ea5b5fa7bdaf921b95cf",
  "prompts": {
    "2f4c31f189c005f3": {
      "agent_id": {
        "tool": "continue-cli",
        "id": "14f0cff0-b11c-481a-b6f7-21b549140cb3",
        "model": "claude-sonnet-4-5"
      },
      "human_author": "Sasha Varlamov <sasha@sashavarlamov.com>",
      "messages": [
        {
          "type": "user",
          "text": "Add another hello world line to @index.ts"
        },
        {
          "type": "assistant",
          "text": "I'll read the file first to see its current contents, then add another hello world line."
        },
        {
          "type": "tool_use",
          "name": "Read",
          "input": {
            "filepath": "index.ts"
          }
        },
        {
          "type": "assistant",
          "text": "Now I'll add another hello world line to the file:"
        },
        {
          "type": "tool_use",
          "name": "MultiEdit",
          "input": {
            "edits": [
              {
                "new_string": "console.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');",
                "old_string": "console.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');\nconsole.log('hello world');"
              }
            ],
            "file_path": "index.ts"
          }
        },
        {
          "type": "assistant",
          "text": "Done! I've added another `console.log('hello world');` line to index.ts."
        }
      ],
      "total_additions": 1,
      "total_deletions": 0,
      "accepted_lines": 1,
      "overriden_lines": 0
    }
  }
}

Tests

  • Added extensions/cli/src/services/GitAiIntegrationService.test.ts unit tests to test the Git AI service
  • Added extensions/cli/src/tools/gitAiIntegration.test.ts integration tests to test the entire tool calling flow with the git AI service
  • Existing tests pass without changes

Summary by cubic

Integrates Continue CLI with git-ai to record which lines were generated by the CLI and the prompts that produced them. Works automatically when git-ai is installed, with no changes to the CLI workflow.

  • New Features
    • Added GitAiIntegrationService that checks git-ai availability and sends checkpoint events via stdin.
    • Emitted PreToolUse/PostToolUse around file edits (Edit, MultiEdit, Write) from executeToolCall.
    • Sends session_id, transcript_path, cwd, file_path, and model (when known); scoped to the repo cwd.
    • Soft-fails: no-ops when git-ai is missing or errors occur, and never blocks tool execution.

Written for commit f3668ad. Summary will update automatically on new commits.

@svarlamov svarlamov requested a review from a team as a code owner December 9, 2025 16:40
@svarlamov svarlamov requested review from RomneyDa and removed request for a team December 9, 2025 16:40
@continue
Copy link
Contributor

continue bot commented Dec 9, 2025

Keep this PR in a mergeable state →

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts

2 similar comments
@continue-development-app
Copy link

Keep this PR in a mergeable state →

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts

@continue-development-app
Copy link

Keep this PR in a mergeable state →

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Dec 9, 2025
@github-actions
Copy link

github-actions bot commented Dec 9, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@svarlamov
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@continue
Copy link
Contributor

continue bot commented Dec 9, 2025

✅ No documentation updates needed.

Analysis:

  • Git AI integration is transparent (auto-detects if git-ai is installed)
  • Removed artifact upload feature was never documented in user-facing docs
  • No user-facing behavior changes requiring documentation

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

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

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant