add llm processing notification

This commit is contained in:
leonardotrapani
2026-01-31 21:03:24 +01:00
parent 692339f430
commit e2b5871d55
8 changed files with 61 additions and 3 deletions
+13
View File
@@ -190,6 +190,7 @@ func (d *Daemon) toggle() {
go d.notifier.Send(notify.MsgRecordingStarted)
go d.monitorPipelineErrors(p)
go d.monitorPipelineNotifications(p)
case pipeline.Recording:
d.stopPipeline()
@@ -240,3 +241,15 @@ func (d *Daemon) monitorPipelineErrors(p pipeline.Pipeline) {
}
}
}
func (d *Daemon) monitorPipelineNotifications(p pipeline.Pipeline) {
notifyCh := p.GetNotifyCh()
for {
select {
case mt := <-notifyCh:
d.notifier.Send(mt)
case <-d.ctx.Done():
return
}
}
}
+4
View File
@@ -9,6 +9,7 @@ import (
"testing"
"time"
"github.com/leonardotrapani/hyprvoice/internal/notify"
"github.com/leonardotrapani/hyprvoice/internal/pipeline"
)
@@ -480,3 +481,6 @@ func (m *MockPipeline) GetErrorCh() <-chan pipeline.PipelineError {
return make(chan pipeline.PipelineError)
}
func (m *MockPipeline) GetActionCh() chan<- pipeline.Action { return make(chan pipeline.Action) }
func (m *MockPipeline) GetNotifyCh() <-chan notify.MessageType {
return make(chan notify.MessageType)
}