-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(computer): add macOS support for computer tool #324
base: master
Are you sure you want to change the base?
Conversation
ErikBjare
commented
Dec 11, 2024
- Add native macOS implementations using osascript and screencapture
- Add platform detection and conditional execution
- Improve security with input sanitization
- Add comprehensive error handling
- Update documentation with macOS-specific details
- Add native macOS implementations using osascript and screencapture - Add platform detection and conditional execution - Improve security with input sanitization - Add comprehensive error handling - Update documentation with macOS-specific details
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #324 +/- ##
==========================================
- Coverage 72.79% 71.64% -1.16%
==========================================
Files 67 67
Lines 4933 5000 +67
==========================================
- Hits 3591 3582 -9
- Misses 1342 1418 +76
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Assistant: I'll capture the current screen using the native screenshot tool. | ||
{ToolUse("ipython", [], 'computer("screenshot")').to_output(tool_format)} | ||
System: Viewing image... | ||
|
||
User: Type "Hello, World!" into the active window | ||
Assistant: I'll type the text with realistic delays. | ||
Assistant: I'll type the text with realistic delays using the native input method. | ||
{ToolUse("ipython", [], 'computer("type", text="Hello, World!")').to_output(tool_format)} | ||
System: Typed text: Hello, World! | ||
|
||
User: Move the mouse to coordinates (100, 200) and click | ||
Assistant: I'll move the mouse and perform a left click. | ||
Assistant: I'll move the mouse and perform a left click using native mouse control. | ||
{ToolUse("ipython", [], 'computer("mouse_move", coordinate=(100, 200))').to_output(tool_format)} | ||
System: Moved mouse to 100,200 | ||
{ToolUse("ipython", [], 'computer("left_click")').to_output(tool_format)} | ||
System: Performed left_click | ||
|
||
User: Press Ctrl+C | ||
Assistant: I'll send the Control+C key sequence. | ||
Assistant: I'll send the Control+C key sequence using platform-appropriate key names. | ||
{ToolUse("ipython", [], 'computer("key", text="Control_L+c")').to_output(tool_format)} | ||
System: Sent key sequence: Control_L+c | ||
|
||
User: Get the current mouse position | ||
Assistant: I'll get the cursor position using the native method. | ||
{ToolUse("ipython", [], 'computer("cursor_position")').to_output(tool_format)} | ||
System: Cursor position: X=512,Y=384 | ||
|
||
User: Double-click at current position | ||
Assistant: I'll perform a double-click using the native method. | ||
{ToolUse("ipython", [], 'computer("double_click")').to_output(tool_format)} | ||
System: Performed double_click |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Silly repetitive "using the native method"
@Miyou Wanna give this a spin? |