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

Function executeScreenshotAction

coderd/x/chatd/chattool/computeruse.go:424–435  ·  view source on GitHub ↗
(
	ctx context.Context,
	conn workspacesdk.AgentConn,
	declaredWidth, declaredHeight int,
)

Source from the content-addressed store, hash-verified

422}
423
424func executeScreenshotAction(
425 ctx context.Context,
426 conn workspacesdk.AgentConn,
427 declaredWidth, declaredHeight int,
428) (workspacesdk.DesktopActionResponse, error) {
429 screenshotAction := workspacesdk.DesktopAction{
430 Action: "screenshot",
431 ScaledWidth: &declaredWidth,
432 ScaledHeight: &declaredHeight,
433 }
434 return conn.ExecuteDesktopAction(ctx, screenshotAction)
435}
436
437func (t *computerUseTool) declaredActionDimensions() (declaredWidth, declaredHeight int) {
438 if t.declaredWidth <= 0 || t.declaredHeight <= 0 {

Callers 2

captureScreenshotMethod · 0.85

Calls 1

ExecuteDesktopActionMethod · 0.65

Tested by

no test coverage detected