[Phase 6] feat(fe): 법률 RAG 챗봇 화면 연결 - #27
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughPhase 6 of the AI legal RAG frontend: a ChangesFrontend Legal Chat Integration
Sequence DiagramsequenceDiagram
actor User
participant Chatbot.vue
participant mapStore
participant http.js
participant SpringBoot as Spring Boot /api/v1/chat
User->>Chatbot.vue: types message, clicks send
Chatbot.vue->>mapStore: await sendChat(message)
mapStore->>mapStore: append user bubble, set isChatLoading
mapStore->>http.js: POST /api/v1/chat { message, sessionId }
http.js->>http.js: attach Bearer token from localStorage
http.js->>SpringBoot: POST /api/v1/chat
SpringBoot-->>http.js: { intent, message, sessionId, legalCards, properties }
http.js-->>mapStore: normalizeChatResponse(response.data)
mapStore->>mapStore: update chatSessionId, append bot bubble with legalCards
mapStore-->>Chatbot.vue: isChatLoading = false
Chatbot.vue->>Chatbot.vue: scrollToBottom()
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/src/api/http.js`:
- Around line 14-20: The `readAccessToken()` function directly accesses
`window.localStorage` without exception handling, which can throw a
SecurityError in restricted browser contexts (privacy modes, blocked cookies,
etc.) and break the request interceptor. Wrap the entire function body in a
try/catch block to gracefully handle these exceptions and return an empty string
as a fallback when storage access fails.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7c59d94a-7619-4eef-aa67-3010f9d3b0bc
📒 Files selected for processing (8)
frontend/package.jsonfrontend/src/api/chat-normalizer.jsfrontend/src/api/chat.jsfrontend/src/api/chat.test.mjsfrontend/src/api/http.jsfrontend/src/store/mapStore.jsfrontend/src/views/Chatbot.vuephases/ai-legal-rag/phase6-frontend-legal-chat.md
변경 내용
연결 이슈
closes #26
테스트
참고
Summary by CodeRabbit
New Features
Tests
testnpm script to run them.Chores