@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 +7 -0
- package/package.json +1 -1
- package/src/hooks/EventHook.ts +7 -2
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
package/src/hooks/EventHook.ts
CHANGED
|
@@ -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
|
-
|
|
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)`,
|