Skip to content

Commit 5bc9724

Browse files
authored
Merge pull request #1129 from rumpl/acp-context
Use the context
2 parents 4b0bcef + 5132fc2 commit 5bc9724

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/acp/agent.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func (a *Agent) Cancel(_ context.Context, params acp.CancelNotification) error {
138138
}
139139

140140
// Prompt implements [acp.Agent]
141-
func (a *Agent) Prompt(_ context.Context, params acp.PromptRequest) (acp.PromptResponse, error) {
141+
func (a *Agent) Prompt(ctx context.Context, params acp.PromptRequest) (acp.PromptResponse, error) {
142142
sid := string(params.SessionId)
143143
slog.Debug("ACP Prompt called", "session_id", sid)
144144

@@ -161,7 +161,7 @@ func (a *Agent) Prompt(_ context.Context, params acp.PromptRequest) (acp.PromptR
161161
}
162162

163163
// Create a new context for this turn
164-
turnCtx, cancel := context.WithCancel(context.Background())
164+
turnCtx, cancel := context.WithCancel(ctx)
165165
a.mu.Lock()
166166
acpSess.cancel = cancel
167167
a.mu.Unlock()

0 commit comments

Comments
 (0)