@techdivision/opencode-time-tracking 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
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
+
5
12
  ## [0.6.0] - 2025-01-31
6
13
 
7
14
  ### Breaking Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techdivision/opencode-time-tracking",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Automatic time tracking plugin for OpenCode - tracks session duration and tool usage to CSV",
5
5
  "main": "src/Plugin.ts",
6
6
  "types": "src/Plugin.ts",
@@ -192,8 +192,13 @@ export function createEventHook(
192
192
  // Get agent name if available
193
193
  const agentString = session.agent?.name ?? null
194
194
 
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) {
197
202
  await client.tui.showToast({
198
203
  body: {
199
204
  message: `Time tracking skipped for ${agentString} (ignored agent)`,