行き先相談エージェントが乗換の必要な駅も行き先として提案するようにする - #44
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (6)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour. 📝 WalkthroughWalkthrough駅検索の対象を、直通駅から乗り換えを含む鉄道到達可能な駅へ変更しました。候補なし時の再検索と確認要求を更新し、プロンプト、ツール、テスト、評価セットを整合させました。 Changes駅検索範囲の拡張
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Merge Risk: ⚪ Minimal · up to The agent now includes rail-reachable destinations requiring transfers and provides updated guidance when no candidates are found. No actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. うさぎは駅を検索する Comment |
概要
行き先相談エージェントが、乗り換えが必要な駅も行き先として提案できるようにします。
TrainLCD/StationAPI#1687 で、
stationsByNameにfromStationGroupIdを渡したときの結果が変わりました。乗り換えなしで行ける駅に加えて、乗り換えれば行ける鉄道駅も返ります。アプリ側でも TrainLCD/MobileApp#7018 で、行き先を選んだあとの経路をconnectedRoutesから取るようになりました。これで乗換経路を選んで走らせられます。チャットの提案カードも、経路検索と同じuseDestinationSelectionを通ります。一方で、エージェントのプロンプトとツール説明は「乗り換えなしで行ける駅だけを返す」という前提のままでした。モデルには、直通で行ける乗換駅を代わりに提案させる回避策も指示していました。このPRでは、これらの文言を今の検索仕様に合わせます。
変更内容
src/agent/prompt.tsbuildContextMessage)も同じ前提に直しました。src/agent/tools.ts: ツール説明と 0 件時のnoticeを直しました。引き直し先は「現在駅の路線・直通先の沿線」から「同じ地域の別の駅」に変えています。スコープの種類(StationSearchScope)と出し分けは変えていません。src/cli/typesafe-rerank-spike.ts: 検索の前提を説明するコメントを1行直しました。prompt.test.ts・tools.test.ts・handler.test.tsの該当部分を、新しい前提を固定する形に書き換えました。デプロイ
src/**を変えているので、devにマージすると dev 環境へ自動でデプロイされます(deploy_dev.yml)。dev の Worker はstationapi-stgにつながっていて、StationAPI#1687 はそこに反映済みです。本番の Worker は
stationapiにつながっています。StationAPI#1687 は StationAPI のmasterにまだ入っていません。このPRをmasterへ反映するのは、本番の StationAPI と MobileApp#7018 を含むアプリをリリースしてからにしてください。先に反映すると、モデルには実際と違う検索仕様を伝えることになります。確認に使ったコマンド
すべて通過しました(319 tests passed)。LLM に実際に問い合わせる確認(
wrangler dev)はしていません。バインディング・シークレット等の変更
vars、シークレット、Service Binding、KV、R2、Queue、Cron の変更はありません。依存パッケージの追加もありません。
🤖 Generated with Claude Code
Summary by CodeRabbit