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

Method AddSubSession

pkg/session/session.go:582–586  ·  view source on GitHub ↗

AddSubSession adds a sub-session to the session

(subSession *Session)

Source from the content-addressed store, hash-verified

580
581// AddSubSession adds a sub-session to the session
582func (s *Session) AddSubSession(subSession *Session) {
583 s.mu.Lock()
584 defer s.mu.Unlock()
585 s.Messages = append(s.Messages, NewSubSessionItem(subSession))
586}
587
588// AddError appends a recorded error to the session so it survives reload and
589// JSON export.

Callers

nothing calls this directly

Implementers 7

fakeSessionpkg/tools/lifecycle/supervisor_test.go
sessionClientpkg/tools/mcp/session_client.go
mockMCPClientpkg/tools/mcp/mcp_test.go
reconnectableMockClientpkg/tools/mcp/mcp_test.go
failingInitClientpkg/tools/mcp/reconnect_test.go
clientSessionpkg/tools/mcp/mcp.go
lspSessionpkg/tools/builtin/lsp/lsp_lifecycle.go

Calls 3

NewSubSessionItemFunction · 0.85
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected