Go: fix context (#18118)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-08-11 19:19:29 +08:00
committed by GitHub
parent 8bd5768ebc
commit c75edbfbe8
36 changed files with 492 additions and 352 deletions

View File

@@ -64,12 +64,13 @@ func TestPhase3_6_ToolDSLLoading(t *testing.T) {
return &schema.Message{Role: schema.Assistant, Content: "ok"}, nil
})
ctx := t.Context()
c := NewAgentComponent(AgentParam{
ModelID: "stub",
MaxRounds: 1,
Tools: []string{"retrieval"}, // known tool
})
_, err := c.Invoke(context.Background(), nil, map[string]any{
_, err := c.Invoke(ctx, nil, map[string]any{
"user_prompt": "test",
})
if err != nil {