feat: add verse mode tab (📜 聖句) with SSE spiritual reading - #18
Conversation
- Add /api/verse endpoint: extracts dictionary words from verse text, streams words list then Claude Opus 4.6 spiritual reading via SSE - Add 📜 聖句 tab to UI: textarea input, horizontal word cards, streaming 相応的読解 output panel - Update switchTab() to handle three tabs (chat/dict/verse) https://claude.ai/code/session_01PRWj3E6TDjvzgmVqxEigak
There was a problem hiding this comment.
Code Review
This pull request introduces a new feature to analyze and stream spiritual readings of biblical verses based on Swedenborg's correspondence principles. It adds a /api/verse POST endpoint in the backend and a corresponding "Verse" tab in the frontend UI. The review feedback highlights a critical improvement opportunity in the frontend's API call: adding proper error handling for non-200 HTTP responses or empty response bodies to prevent the UI from hanging in a loading state.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Throw early on HTTP errors or empty response body so the catch block renders the error message and re-enables the button instead of hanging. https://claude.ai/code/session_01PRWj3E6TDjvzgmVqxEigak
Summary
/api/verseエンドポイント追加 — 聖句テキストから辞典語を抽出し、Claude Opus 4.6 が相応的読解をSSEストリーミング変更内容
app.pyVerseRequestモデル追加(verse_text: str)VERSE_SYSTEMプロンプト:字義→内意→価値変換の順、典拠引用、価値変換圧縮一行を指示stream_verse_response(): 辞典エントリとのワード照合 →{"type":"words"}SSEイベント → Claude読解テキストの{"type":"text"}ストリーミングPOST /api/verseエンドポイントstatic/index.html📜 聖句タブ追加switchTab()を3タブ対応に更新(TAB_NAMES配列で管理).word-card).verse-reading)readVerse()関数:SSE受信 → wordsイベントでカード描画 → textイベントでストリーミング表示Test plan
https://claude.ai/code/session_01PRWj3E6TDjvzgmVqxEigak
Generated by Claude Code