(ctx context.Context, call fantasy.ToolCall)
| 161 | } |
| 162 | |
| 163 | func (t *computerUseTool) Run(ctx context.Context, call fantasy.ToolCall) (fantasy.ToolResponse, error) { |
| 164 | switch DefaultComputerUseProvider(t.provider) { |
| 165 | case ComputerUseProviderAnthropic: |
| 166 | return t.runAnthropicComputerUse(ctx, call) |
| 167 | case ComputerUseProviderOpenAI: |
| 168 | return t.runOpenAIComputerUse(ctx, call) |
| 169 | default: |
| 170 | return fantasy.NewTextErrorResponse(fmt.Sprintf( |
| 171 | "unsupported computer use provider %q, supported providers: %s", |
| 172 | t.provider, |
| 173 | strings.Join(SupportedComputerUseProviders(), ", "), |
| 174 | )), nil |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | func (t *computerUseTool) runAnthropicComputerUse( |
| 179 | ctx context.Context, |
nothing calls this directly
no test coverage detected