Skip to content

feat: Add AI content generation button to new word form#87

Open
toyoshi wants to merge 1 commit intomasterfrom
feature/ai-button-new-word
Open

feat: Add AI content generation button to new word form#87
toyoshi wants to merge 1 commit intomasterfrom
feature/ai-button-new-word

Conversation

@toyoshi
Copy link
Owner

@toyoshi toyoshi commented Aug 4, 2025

Summary

  • Added AI content generation button to the new word creation form
  • Previously only available for existing words, now works for both new and existing words
  • Users can now click the AI button on new word forms to generate content based on the title

Changes

  • Updated _form.html.slim to show AI button for both new and existing words
  • Added new ai_generate route and controller action for title-based generation
  • Implemented handleAiEditNew() JavaScript function to handle new word AI generation
  • Modified form logic to use different onclick handlers based on word persistence

Test plan

  • Navigate to new word page (/new)
  • Verify AI button appears next to "Content" label
  • Enter a title in the title field
  • Click the AI button and verify content is generated
  • Test that existing word edit forms still work correctly

🤖 Generated with Claude Code

- Add AI button to new word creation form
- Create new ai_generate route and controller action for new words
- Add handleAiEditNew JavaScript function to handle title-based AI generation
- Ensure AI button appears for both new and existing words

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant