Skip to content

Fix Grok input automation with main-world script#2

Open
inspiretelapps wants to merge 3 commits intocaiyongji:mainfrom
inspiretelapps:inspiretelapps/update-models-fix
Open

Fix Grok input automation with main-world script#2
inspiretelapps wants to merge 3 commits intocaiyongji:mainfrom
inspiretelapps:inspiretelapps/update-models-fix

Conversation

@inspiretelapps
Copy link
Copy Markdown

Summary

Grok requires main-world script execution to properly update React state. This PR adds a dedicated main-world script that handles contenteditable elements, clipboard paste simulation, and proper React event handling for reliable Grok input automation.

Changes

  • Add grok-main-world.ts with multiple fallback methods for input filling
  • Refactor Grok handling to use postMessage for main-world communication
  • Implement contenteditable element detection and clipboard paste simulation
  • Remove DeepSeek support

Test Plan

  • Verify Grok prompt filling and auto-send works correctly
  • Confirm ChatGPT, Claude, and Gemini still work as expected

🤖 Generated with Claude Code

inspiretelapps and others added 3 commits December 28, 2025 08:50
Grok requires main-world script execution to properly update React state. Replaced direct DOM manipulation with a dedicated main-world script (grok-main-world.ts) that handles contenteditable elements, clipboard paste simulation, and proper React event handling.

- Add grok-main-world.ts for reliable Grok input filling
- Remove DeepSeek support
- Refactor Grok handling in ai-provider-content.ts to use postMessage
- Add contenteditable element detection and multiple fallback methods
- Implement clipboard paste simulation for better React compatibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Remove .DS_Store from tracking and add to .gitignore
- Document recent changes: Grok fix, model chooser removal, styling updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant