computeruse

package
v2.39.1-notes-metadata-b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2026 License: AGPL-3.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClickAction

func ClickAction(button string) (string, bool)

ComputerUseClickAction maps an OpenAI computer-use click button to a Coder desktop action name.

func DoubleClickAction

func DoubleClickAction(button string) (string, bool)

DoubleClickAction maps an OpenAI computer-use double-click button to a Coder desktop action name. The desktop API currently supports only left-button double-clicks.

func NormalizeKeys

func NormalizeKeys(keys []string) (string, error)

NormalizeComputerUseKeys maps OpenAI keypress tokens to Coder desktop key action tokens.

func ParseInput

func ParseInput(input string) (*fantasyopenai.ComputerUseInput, error)

ParseInput parses an OpenAI computer-use tool call input.

func ResultProviderMetadata

func ResultProviderMetadata(response fantasy.ToolResponse) fantasy.ProviderMetadata

ComputerUseResultProviderMetadata returns metadata that should accompany an OpenAI computer-use screenshot result.

func Tool

func Tool() fantasy.Tool

ComputerUseTool returns the OpenAI provider-defined computer-use tool.

Types

type DesktopAction

type DesktopAction struct {
	Action                workspacesdk.DesktopAction
	WaitDurationMillis    int64
	ReleaseMouseOnFailure bool
	ReleaseKeysOnFailure  []string
}

ComputerUseDesktopAction is a Coder desktop operation requested by an OpenAI computer-use tool call.

func DesktopActions

func DesktopActions(
	parsed *fantasyopenai.ComputerUseInput,
	declaredWidth, declaredHeight int,
) ([]DesktopAction, error)

ComputerUseDesktopActions converts an OpenAI computer-use tool call into Coder desktop actions. A caller should execute the returned actions in order, wait for WaitDurationMillis entries, and then return a final screenshot.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL