Conversation
- 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)
Owner
Author
|
This pull request has been deployed to Vercel.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.