Commit Graph

10 Commits

Author SHA1 Message Date
southseact-3d
39136e863f implement wp testing 2026-02-08 19:27:26 +00:00
southseact-3d
1e0168b301 rem last build change 2026-02-08 17:38:43 +00:00
southseact-3d
c30d2ba715 Fix scroll-to-bottom in builder page
- Simplified scrollChatToBottom() with more reliable techniques
- Added scrollIntoView on last message as fallback
- Added additional scroll with direct scrollTop assignment after delay
- Added CSS optimizations for scrolling behavior (-webkit-overflow-scrolling, transform, will-change)
- Added more robust scroll attempts in renderMessages after DOM updates
2026-02-08 17:16:07 +00:00
southseact-3d
55bada9ee2 Fix scroll-to-bottom on page load/refresh in builder page
The scroll-to-bottom functionality wasn't working properly on page load because
messages take time to load and render. This fix adds:

- Enhanced scrollChatToBottom() with image load detection
- ResizeObserver to detect content height changes
- Multiple scroll attempts with increasing delays (up to 2s)
- Additional scroll calls in selectSessionById with proper delays
- Scroll calls at end of initBuilder initialization

This ensures the chat area properly scrolls to the bottom even when content
loads asynchronously or images take time to render.
2026-02-08 16:51:06 +00:00
southseact-3d
26c6f5f6c7 fix: Add pony-alpha model and fix model lookup for prefixed model IDs
- Add openrouter/pony-alpha model to models-api.json fixture
- Fix getModel() to lookup models with provider prefix (e.g., openrouter/pony-alpha)
  When user specifies openrouter/pony-alpha, the code now correctly looks for
  the full model ID including prefix in the provider's models object

This fixes the 'ModelNotFoundError' when using OpenRouter models that have
prefixed IDs in the database.
2026-02-08 16:21:21 +00:00
southseact-3d
50fda4000c fix: Improve text line separation in builder response
- Update regex to handle both periods and colons as sentence separators
- Properly separate sentences followed by uppercase letters with double newlines
- Fixes issue where OpenCode response text wasn't properly line-separated
2026-02-08 15:15:34 +00:00
southseact-3d
9ef54cf6ee feat: display OpenCode todos with status on builder page
- Capture todowrite tool events and store todos on messages
- Add API endpoint GET /api/sessions/:sessionId/todos
- Clear todos on message finish, undo, and redo
- Create renderStructuredTodos function with status icons
- Integrate todo display into message rendering
- Add CSS styling for todo items by status and priority
2026-02-08 14:00:29 +00:00
southseact-3d
0f631dc99a feat: implement prompt injection protection and OpenRouter paid API key support
- Add comprehensive prompt injection security module with 160+ attack pattern detection
- Implement security checks in message handling with proper blocking and user feedback
- Add OpenRouter paid API key support (OPENROUTER_PAID_API_KEY) for premium models
- Update model discovery and chat functions to use paid API key for premium models
- Add comprehensive test suite with 434 test cases (98.39% accuracy)
- Tests cover legitimate WordPress development queries, injection attacks, obfuscated attempts
- Improve builder loading indicators with text-based progress (building/planning)
- Replace spinning animations with 'Starting build/planning process' messages
2026-02-08 13:23:59 +00:00
cto-new[bot]
23d4c8d0e6 Refactor WordPress prompt system and add completion signal 2026-02-07 22:12:43 +00:00
southseact-3d
ed67b7741b Restore to commit 74e578279624c6045ca440a3459ebfa1f8d54191 2026-02-07 20:32:41 +00:00