From 387cd7056253ed494307975d3127dc6553e30007 Mon Sep 17 00:00:00 2001 From: Maxine Orlen Date: Mon, 25 May 2026 22:58:22 +0200 Subject: [PATCH 1/3] fix: check plugin only if opencode installed (#125) --- vscode-extension/src/pluginCheck.ts | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/vscode-extension/src/pluginCheck.ts b/vscode-extension/src/pluginCheck.ts index d82894f..dfd1836 100644 --- a/vscode-extension/src/pluginCheck.ts +++ b/vscode-extension/src/pluginCheck.ts @@ -2,10 +2,12 @@ import * as vscode from 'vscode'; import * as fs from 'fs'; import * as path from 'path'; import { homedir } from 'os'; +import { spawn } from 'child_process'; const PLUGIN_FILENAME = 'tracybot-oc.js'; const PLUGIN_URL = 'https://github.com/TracyTeam/tracybot/releases/latest/download/tracybot-oc.js'; const SKIP_CHECK_KEY = 'tracybot.skipPluginCheck'; +const SKIP_OPENCODE_MISSING_KEY = 'tracybot.skipOpencodeMissingCheck'; const Actions = { InstallGlobally: 'Install Globally', @@ -37,8 +39,37 @@ async function installPluginTo(dir: string): Promise { fs.writeFileSync(destPath, Buffer.from(await response.arrayBuffer())); } +async function findOpencode(): Promise { + try { + await new Promise((resolve, reject) => { + const proc = spawn('opencode', ['--version'], { stdio: 'ignore' }); + proc.on('close', code => (code === 0 ? resolve() : reject())); + proc.on('error', reject); + }); + return true; + } catch { + return false; + } +} + export async function checkOpencode(context: vscode.ExtensionContext): Promise { if (context.globalState.get(SKIP_CHECK_KEY)) { return; } + + const opencodeAvailable = await findOpencode(); + if (!opencodeAvailable) { + if (context.globalState.get(SKIP_OPENCODE_MISSING_KEY)) { return; } + + const action = await vscode.window.showInformationMessage( + 'Tracybot AI change tracing requires a supported agent. If you wish to trace AI changes, install one of the supported agents listed at https://github.com/TracyTeam/tracybot', + 'Don\'t Show Again' + ); + + if (action === 'Don\'t Show Again') { + await context.globalState.update(SKIP_OPENCODE_MISSING_KEY, true); + } + return; + } + if (fs.existsSync(getGlobalPluginPath())) { return; } const projectPath = getProjectPluginPath(); From f62b8d89ba6e33d6c1c894df65a8c736d5cbff82 Mon Sep 17 00:00:00 2001 From: Maxine Orlen Date: Mon, 25 May 2026 23:16:15 +0200 Subject: [PATCH 2/3] fix: link as a button (#125) --- vscode-extension/src/pluginCheck.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vscode-extension/src/pluginCheck.ts b/vscode-extension/src/pluginCheck.ts index dfd1836..4147df8 100644 --- a/vscode-extension/src/pluginCheck.ts +++ b/vscode-extension/src/pluginCheck.ts @@ -60,11 +60,14 @@ export async function checkOpencode(context: vscode.ExtensionContext): Promise(SKIP_OPENCODE_MISSING_KEY)) { return; } const action = await vscode.window.showInformationMessage( - 'Tracybot AI change tracing requires a supported agent. If you wish to trace AI changes, install one of the supported agents listed at https://github.com/TracyTeam/tracybot', + 'Tracybot AI change tracing requires a supported agent.', + 'View Supported Agents', 'Don\'t Show Again' ); - if (action === 'Don\'t Show Again') { + if (action === 'View Supported Agents') { + vscode.env.openExternal(vscode.Uri.parse('https://github.com/TracyTeam/tracybot')); + } else if (action === 'Don\'t Show Again') { await context.globalState.update(SKIP_OPENCODE_MISSING_KEY, true); } return; From 15864a321479bdfb75f5e8b857c29a94689f3518 Mon Sep 17 00:00:00 2001 From: Maxine Orlen Date: Mon, 25 May 2026 23:17:54 +0200 Subject: [PATCH 3/3] docs: list supported tools (#125) --- README.md | 23 +++++++++++++++++------ vscode-extension/src/pluginCheck.ts | 2 +- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c793185..d66275c 100644 --- a/README.md +++ b/README.md @@ -18,15 +18,16 @@ Tracybot is a tool that traces AI-generated code back to the prompts that create - **Audit Trail** - Review AI interactions to verify, debug, or understand code origins - **Team Sync** - Push traces to remote for team collaboration -## Architecture +## Supported Agents and Editors -Tracybot consists of three components that work together: +### Supported Agents +- **OpenCode CLI** — Install the [opencode-plugin](./opencode-plugin/README.md) to automatically record snapshots during AI interactions. +Requires OpenCode CLI to be installed - https://opencode.ai -- **[opencode-plugin](./opencode-plugin/README.md)** - Plugin for opencode CLI that records snapshots during AI interactions -- **[vscode-extension](./vscode-extension/README.md)** - VS Code extension to view AI blame information -- **[tracybot-tracking](./tracking/README.md)** - Git hooks and scripts for state tracking using hidden commits and synced git notes +### Supported Editors +- **VS Code** — Install the [vscode-extension](./vscode-extension/README.md) to view AI blame information. +Available on the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=TracyTeam.tracybot-extension). -More information, including the requirements that resulted in these architectural decisions, are on the [wiki](https://github.com/TracyTeam/tracybot/wiki/Architecture). ## Quick Start @@ -71,6 +72,16 @@ You can install it either: After OpenCode makes changes in an initialized repository, Tracybot records snapshots automatically. Click `AI Blame` in VS Code to inspect the prompt history behind the current file. +## Architecture + +Tracybot consists of three components that work together: + +- **[opencode-plugin](./opencode-plugin/README.md)** - Plugin for opencode CLI that records snapshots during AI interactions +- **[vscode-extension](./vscode-extension/README.md)** - VS Code extension to view AI blame information +- **[tracybot-tracking](./tracking/README.md)** - Git hooks and scripts for state tracking using hidden commits and synced git notes + +More information, including the requirements that resulted in these architectural decisions, are on the [wiki](https://github.com/TracyTeam/tracybot/wiki/Architecture). + ## Troubleshooting ### Common Issues diff --git a/vscode-extension/src/pluginCheck.ts b/vscode-extension/src/pluginCheck.ts index 4147df8..afb6fb2 100644 --- a/vscode-extension/src/pluginCheck.ts +++ b/vscode-extension/src/pluginCheck.ts @@ -66,7 +66,7 @@ export async function checkOpencode(context: vscode.ExtensionContext): Promise