Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ agentblame-chrome.zip
# Build artifacts
packages/chrome/agentblame-chrome-*.zip
Implementation.md

# OpenCode local plugin (installed by agentblame init)
.opencode/
2 changes: 1 addition & 1 deletion packages/chrome/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agentblame/chrome",
"version": "0.2.8",
"version": "0.2.9",
"description": "Agent Blame Chrome Extension - See AI attribution on GitHub PRs",
"private": true,
"scripts": {
Expand Down
33 changes: 26 additions & 7 deletions packages/chrome/src/content/analytics-overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -699,28 +699,47 @@ function formatModelName(model: string): string {
"claude-3-sonnet": "Claude 3 Sonnet",
"claude-3.5-sonnet": "Claude 3.5 Sonnet",
"claude-3-haiku": "Claude 3 Haiku",
"claude-sonnet-4": "Claude Sonnet 4",
"claude-opus-4": "Claude Opus 4",
"claude-opus-4-5": "Claude Opus 4.5",
"claude-sonnet-4-5": "Claude Sonnet 4.5",
"gpt-4": "GPT-4",
"gpt-4o": "GPT-4o",
"gpt-4-turbo": "GPT-4 Turbo",
"gpt-5": "GPT-5",
"gpt-5-turbo": "GPT-5 Turbo",
};

// Handle versioned models with date suffixes (e.g., "claude-opus-4-5-20251101")
// Strip the date suffix first, then check known models
const withoutDate = model.replace(/-\d{8}$/, "");
if (knownModels[withoutDate]) {
return knownModels[withoutDate];
}

// Check for exact match first
if (knownModels[model]) {
return knownModels[model];
}

// Handle versioned model names like "claude-opus-4-5-20251101"
// Extract the model family and version, strip the date suffix
const datePattern = /-\d{8}$/;
let cleaned = model.replace(datePattern, "");
let cleaned = model;

// Convert patterns like "4-5" to "4.5" for version numbers
// Strip date suffix (YYYYMMDD) - matches patterns like "-20251101" at the end
// Also handles cases where it might appear without a leading dash
cleaned = cleaned.replace(/-?\d{8}$/, "");

// Convert version patterns like "-4-5" to "-4.5" (major-minor versions)
// This handles claude-opus-4-5 -> claude-opus-4.5
cleaned = cleaned.replace(/-(\d+)-(\d+)$/, "-$1.$2");

// Title case and replace dashes with spaces
// Also handle version at end without trailing content: "model-4-5" -> "model 4.5"
cleaned = cleaned.replace(/-(\d+)\.(\d+)$/, " $1.$2");

// Title case and replace remaining dashes with spaces
return cleaned
.replace(/-/g, " ")
.replace(/\b\w/g, (c) => c.toUpperCase());
.replace(/\b\w/g, (c) => c.toUpperCase())
.trim();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/chrome/src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Agent Blame",
"version": "0.2.7",
"version": "0.2.9",
"description": "See AI-generated vs human-written code on GitHub PRs",
"icons": {
"16": "icons/icon16.png",
Expand Down
2 changes: 1 addition & 1 deletion packages/chrome/src/popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h1>Agent Blame</h1>

<footer>
<a href="https://github.com/mesa-dot-dev/agentblame" target="_blank">Documentation</a>
<span class="version">v0.2.6</span>
<span class="version">v0.2.9</span>
</footer>
</div>

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mesadev/agentblame",
"version": "0.2.7",
"version": "0.2.9",
"description": "CLI to track AI-generated vs human-written code",
"license": "Apache-2.0",
"repository": {
Expand Down