(t *testing.T)
| 4023 | } |
| 4024 | |
| 4025 | func TestElicitationHandler_NonInteractive(t *testing.T) { |
| 4026 | t.Parallel() |
| 4027 | |
| 4028 | prov := &mockProvider{id: "test/mock-model", stream: newStreamBuilder().AddContent("ok").AddStopWithUsage(1, 1).Build()} |
| 4029 | root := agent.New("root", "test", agent.WithModel(prov)) |
| 4030 | tm := team.New(team.WithAgents(root)) |
| 4031 | |
| 4032 | rt, err := NewLocalRuntime(t.Context(), tm, WithNonInteractive(true)) |
| 4033 | require.NoError(t, err) |
| 4034 | |
| 4035 | params := &mcp.ElicitParams{ |
| 4036 | Message: "Authorize OAuth?", |
| 4037 | } |
| 4038 | |
| 4039 | result, err := rt.elicitationHandler(t.Context(), params) |
| 4040 | |
| 4041 | require.NoError(t, err) |
| 4042 | assert.Equal(t, tools.ElicitationActionDecline, result.Action, "non-interactive runtime should decline elicitation") |
| 4043 | } |
| 4044 | |
| 4045 | func TestElicitationHandler_Interactive_NoChannel(t *testing.T) { |
| 4046 | t.Parallel() |
nothing calls this directly
no test coverage detected