Skip to content

Develop to Main - #185

Merged
jpcmf merged 32 commits into
mainfrom
develop
May 8, 2026
Merged

Develop to Main#185
jpcmf merged 32 commits into
mainfrom
develop

Conversation

@jpcmf

@jpcmf jpcmf commented May 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

jpcmf added 30 commits May 8, 2026 11:18
- Finalize AI Writing Assistant feature with PR reference #184
- Fix malformed code in isSupported.ts that had duplicate function definitions
- Update API detection to check for correct methods: Rewriter.create() and Rewriter.availability()
- Implement correct Rewriter API pattern: create instance, check availability, then call rewrite()
- Remove all debug logging from components
- Add API documentation reference comments
- Build verification: compile successful, all TypeScript types correct
- Update spec with browser support (Chrome 137-148), hardware requirements, and origin trial token requirement
- Add production deployment notes about Google Generative AI Use Policy
- Add localhost testing instructions with Chrome flags
- Document that feature requires Origin Trial registration with token for production use
- Changed API detection to check for global 'Rewriter' object directly
- Updated to check for Rewriter.create() and Rewriter.availability() as globals
- Fixed useAIWriter hook to access globalThis.Rewriter instead of window.ai.rewriter
- Removed duplicate code that was causing compilation errors
- Added debug logging to diagnose API availability in browser
- Build: verified all changes compile successfully
- Added browser user agent logging
- Log all AI-related globals: ai, aiTextRewriter, Rewriter, Writer, Translator, etc.
- This will help identify why Rewriter is undefined and what APIs might be available
- Add fallback to Writer API since Rewriter is not yet available in Chrome 148
- Check for Rewriter API first (dedicated for rewriting)
- Fall back to Writer API if Rewriter unavailable
- Writer API uses write() method with context for improvement prompts
- Update detection to support both APIs
- Add debug logging to identify which API is used
- Tested: Writer API confirmed available and working in Chrome 148
- Removed old Rewriter-only implementation that was duplicated
- Keep only the new implementation with both Rewriter and Writer API support
- File had 188 lines, now 108 lines with no duplicates
…ortuguese language handling

- Support configurable sharedContext, tone, and improveContext for different use cases
- Allow passing options to useAIWriter() hook initialization or per-call via improveText()
- Update ImproveTextButton to accept aiOptions prop for context customization
- Improve Portuguese language prompts to ensure output is in pt-BR
- Add explicit instruction to return only improved text without explanations
- Remove debug console.log statements and add eslint-disable comments for remaining console.error
- Add comprehensive JSDoc examples for button component usage with custom contexts
Remove version tags from entries and add new AI Writing Assistant
feature to recent changes.
…cations

- Document how to use ImproveTextButton with custom aiOptions for different contexts
- Show examples for spot descriptions and user profiles
- Update component file path to reflect actual location in src/shared/components
- Clarify that tone selection is now available via aiOptions parameter
- Add TypeScript interface documentation for UseAIWriterOptions
…nalysis

- Document architecture, dual API strategy (Rewriter + Writer), and browser support
- Add configuration reference for UseAIWriterOptions with examples
- Include production deployment steps (origin trial registration)
- Add development testing instructions (Chrome flags)
- Document hardware requirements, language support, and known limitations
- Update table of contents and last updated date (May 8, 2026)
@jpcmf jpcmf self-assigned this May 8, 2026
@jpcmf

jpcmf commented May 8, 2026

Copy link
Copy Markdown
Owner Author

@jpcmf jpcmf added the deployed label May 8, 2026
@jpcmf
jpcmf merged commit f4f673d into main May 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant