MCPcopy Create free account
hub / github.com/coder/agentapi / ACPConversation

Struct ACPConversation

x/acpio/acp_conversation.go:29–43  ·  view source on GitHub ↗

ACPConversation tracks conversations with ACP-based agents. Unlike PTY-based Conversation, ACP has blocking writes where the response is complete when Write() returns.

Source from the content-addressed store, hash-verified

27// Unlike PTY-based Conversation, ACP has blocking writes where the
28// response is complete when Write() returns.
29type ACPConversation struct {
30 mu sync.Mutex
31 ctx context.Context
32 cancel context.CancelFunc
33 agentIO ChunkableAgentIO
34 messages []st.ConversationMessage
35 nextID int // monotonically increasing message ID
36 prompting bool // true while agent is processing
37 chunkReceived chan struct{} // signals that handleChunk has accumulated a chunk
38 streamingResponse strings.Builder
39 logger *slog.Logger
40 emitter st.Emitter
41 initialPrompt []st.MessagePart
42 clock quartz.Clock
43}
44
45// noopEmitter is a no-op implementation of Emitter for when no emitter is provided.
46type noopEmitter struct{}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected