Documentation
¶
Index ¶
- func ClickAction(button string) (string, bool)
- func DoubleClickAction(button string) (string, bool)
- func IsTool(tool fantasy.Tool) bool
- func NormalizeKeys(keys []string) (string, error)
- func ParseInput(input string) (*fantasyopenai.ComputerUseInput, error)
- func ResultProviderMetadata(response fantasy.ToolResponse) fantasy.ProviderMetadata
- func Tool() fantasy.Tool
- type DesktopAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClickAction ¶
ComputerUseClickAction maps an OpenAI computer-use click button to a Coder desktop action name.
func DoubleClickAction ¶
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 IsTool ¶
IsComputerUseTool reports whether tool is the OpenAI provider-defined computer-use tool.
func NormalizeKeys ¶
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.
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.