File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 "log/slog"
88 "strings"
99 "sync"
10- "time"
1110
1211 acp "github.com/coder/acp-go-sdk"
1312 st "github.com/coder/agentapi/lib/screentracker"
@@ -16,9 +15,6 @@ import (
1615// Compile-time assertion that ACPAgentIO implements st.AgentIO
1716var _ st.AgentIO = (* ACPAgentIO )(nil )
1817
19- // DefaultPromptTimeout is the maximum time to wait for an agent response.
20- const DefaultPromptTimeout = 5 * time .Minute
21-
2218// ACPAgentIO implements screentracker.AgentIO using the ACP protocol
2319type ACPAgentIO struct {
2420 ctx context.Context
@@ -213,11 +209,8 @@ func (a *ACPAgentIO) Write(data []byte) (int, error) {
213209 a .logger .Debug ("Aborting write" , "error" , err )
214210 return 0 , err
215211 }
216- // Use a timeout to prevent hanging indefinitely
217- promptCtx , cancel := context .WithTimeout (a .ctx , DefaultPromptTimeout )
218- defer cancel ()
219212
220- resp , err := a .conn .Prompt (promptCtx , acp.PromptRequest {
213+ resp , err := a .conn .Prompt (a . ctx , acp.PromptRequest {
221214 SessionId : a .sessionID ,
222215 Prompt : []acp.ContentBlock {acp .TextBlock (text )},
223216 })
You can’t perform that action at this time.
0 commit comments