MCPcopy Index your code
hub / github.com/docker/docker-agent / TestSessionFromEventsWithSessionTitle

Function TestSessionFromEventsWithSessionTitle

pkg/evaluation/save_test.go:668–682  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

666}
667
668func TestSessionFromEventsWithSessionTitle(t *testing.T) {
669 t.Parallel()
670
671 events := []map[string]any{
672 {"type": "session_title", "title": "Auto-generated title"},
673 {"type": "agent_choice", "content": "Hello!"},
674 {"type": "stream_stopped"},
675 }
676
677 // Start with a default title
678 sess := SessionFromEvents(events, "default-title", []string{"hi"})
679
680 // Title should be updated from the event
681 assert.Equal(t, "Auto-generated title", sess.Title)
682}
683
684func TestInputIDPassthrough(t *testing.T) {
685 t.Parallel()

Callers

nothing calls this directly

Calls 1

SessionFromEventsFunction · 0.85

Tested by

no test coverage detected