@raidou/pi-notify 0.3.0 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raidou/pi-notify",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Desktop notification extension for the pi coding agent.",
5
5
  "keywords": [
6
6
  "pi-package",
package/src/idle.ts CHANGED
@@ -36,6 +36,10 @@ export class IdleNotifier {
36
36
  this.clearIdleTimer()
37
37
  })
38
38
 
39
+ this.pi.on('message_start', () => {
40
+ this.clearIdleTimer()
41
+ })
42
+
39
43
  this.pi.on('agent_settled', () => {
40
44
  if (this.jobTracker.hasActiveJobs) return
41
45
  this.startIdleTimer(notify)
package/src/tmux-title.ts CHANGED
@@ -29,8 +29,7 @@ export class TmuxTitleTracker {
29
29
  register(): void {
30
30
  this.pi.on('session_start', (_event, ctx) => {
31
31
  if (ctx.mode !== 'tui' || !this.enabled) return
32
- // Resolve pi's own window up front via its controlling tty, so mark/restore
33
- // keep targeting it even if the user switches windows during /new.
32
+ this.restore()
34
33
  const id = this.queryCurrentWindowId()
35
34
  if (id === undefined) return
36
35
  this.windowId = id
@@ -74,6 +73,7 @@ export class TmuxTitleTracker {
74
73
  }
75
74
 
76
75
  stop(): void {
76
+ this.restore()
77
77
  this.windowId = undefined
78
78
  this.originalTitle = undefined
79
79
  this.autoRename = undefined