Skip to content

Commit 0d5a1c7

Browse files
bradleydwyerBradley Dwyer
andauthored
feat: add opencode agent support (#18)
## Summary - Add OpenCode to the known agents list with process name `opencode` and attribution email ## Test plan - [x] Lookup test added for `opencode` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Bradley Dwyer <bradleydwyer@block.xyz>
1 parent 61d117e commit 0d5a1c7

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/agent.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ pub const KNOWN_AGENTS: &[Agent] = &[
9797
email: "opencode <noreply@opencode.ai>",
9898
..Agent::default()
9999
},
100+
Agent {
101+
process_names: &["opencode"],
102+
env_vars: &[],
103+
email: "OpenCode <noreply@opencode.ai>",
104+
breadcrumb_dir: None,
105+
breadcrumb_ext: None,
106+
},
100107
];
101108

102109
impl Agent {

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ mod tests {
316316
assert!(Agent::find_by_name("/opt/homebrew/bin/amp").is_some());
317317
assert!(Agent::find_by_name("gemini").is_some());
318318
assert!(Agent::find_by_name("goose").is_some());
319+
assert!(Agent::find_by_name("opencode").is_some());
319320
assert!(Agent::find_by_name("unknown").is_none());
320321
}
321322

0 commit comments

Comments
 (0)