Fix the AI Writing Assistant
You've inherited an AI writing assistant with inline suggestions, but it's full of bugs. Debug and improve it.
Known Issues
Suggestions appear in the wrong position (offset from cursor)Tone adjustment feature changes text but doesn't preserve formattingGrammar check API calls fire on every keystroke (should be debounced)Undo doesn't work after accepting a suggestionThe suggestion popup doesn't dismiss when clicking outsideDark mode styles are broken (white text on white background)Requirements
Fix ALL the above bugsAdd proper debouncing (500ms) for grammar check API callsImplement undo/redo stack that works with AI suggestionsAdd loading indicator while waiting for AI responseWrite tests for the suggestion positioning logicBonus Points
Keyboard shortcuts (Tab to accept, Esc to dismiss)Suggestion animation (fade in/out)Multiple suggestion types with different icons