Files
agent-dashboard/internal/hook/stdin_test.go
T
laily 021fc3a828 feat: fix Cursor hook delivery and improve notify workflow
Route hook notifications through /dev/tty and client_tty so OSC reaches
Ghostty when Cursor captures stdout. Add afterAgentResponse hook, hook
logging, debounce, split test modes, and use directory name for titles.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-26 12:46:50 +08:00

25 lines
482 B
Go

package hook
import (
"bytes"
"testing"
"github.com/longbin/agent-notify/internal/config"
)
func TestRunCursorEmptyStdinDoesNotBlock(t *testing.T) {
cfg := config.Default()
err := RunCursor(bytes.NewReader(nil), cfg, "stop", nil)
if err != nil {
t.Fatal(err)
}
}
func TestRunCursorWithPayload(t *testing.T) {
cfg := config.Default()
err := RunCursor(bytes.NewReader([]byte(`{"workspace_roots":["/tmp/proj"]}`)), cfg, "stop", nil)
if err != nil {
t.Fatal(err)
}
}