Skip to content

Commit 9eb9f37

Browse files
committed
Merge branch 'develop'
2 parents 6746ff9 + 043616b commit 9eb9f37

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.6.1] - 2025-02-02
6+
7+
### Fixed
8+
9+
- Fix `ignored_agents` matching to accept agent names with or without `@` prefix
10+
- Both `"time-tracking"` and `"@time-tracking"` now work in configuration
11+
512
## [0.6.0] - 2025-01-31
613

714
### Breaking Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@techdivision/opencode-time-tracking",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "Automatic time tracking plugin for OpenCode - tracks session duration and tool usage to CSV",
55
"main": "src/Plugin.ts",
66
"types": "src/Plugin.ts",

src/hooks/EventHook.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,13 @@ export function createEventHook(
192192
// Get agent name if available
193193
const agentString = session.agent?.name ?? null
194194

195-
// Check if agent should be ignored
196-
if (agentString && config.ignored_agents?.includes(agentString)) {
195+
// Check if agent should be ignored (tolerant matching: with or without @ prefix)
196+
const normalizedAgent = agentString?.replace(/^@/, "")
197+
const isIgnoredAgent = config.ignored_agents?.some(
198+
(ignored) => ignored.replace(/^@/, "") === normalizedAgent
199+
)
200+
201+
if (agentString && isIgnoredAgent) {
197202
await client.tui.showToast({
198203
body: {
199204
message: `Time tracking skipped for ${agentString} (ignored agent)`,

0 commit comments

Comments
 (0)