You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Make CDP extraction provider-aware for all providers
The CDP extraction code was hardcoded for Claude.ai selectors, causing it
to hang or fail when used as fallback for ChatGPT and other providers.
## Changes
### Provider-Specific Selector Discovery
- Now uses `PROVIDER_SELECTOR_CANDIDATES[provider]` instead of hardcoded Claude selectors
- Same selector patterns as Playwright code ensures consistency
- Logs which selector pattern matched for debugging
### Provider-Aware Message Extraction
- ChatGPT: Uses `[data-message-author-role]` attribute for role detection
- Claude: Uses `[data-testid="user-message"]` and `[data-is-streaming]`
- Gemini: Uses custom elements `user-query` and `response-container`
- Grok: Uses `[data-testid*="message"]` and role attributes
- Generic fallback for unknown structures
### Dynamic Title Generation
- Title fallback now uses provider name instead of hardcoded "Claude Conversation"
This ensures CDP mode works correctly as a fallback for any provider,
not just Claude.ai.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 commit comments