MCPcopy Index your code
hub / github.com/coder/coder / Run

Method Run

coderd/x/chatd/chattool/computeruse.go:163–176  ·  view source on GitHub ↗
(ctx context.Context, call fantasy.ToolCall)

Source from the content-addressed store, hash-verified

161}
162
163func (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
178func (t *computerUseTool) runAnthropicComputerUse(
179 ctx context.Context,

Callers

nothing calls this directly

Calls 4

runOpenAIComputerUseMethod · 0.95

Tested by

no test coverage detected