Replaces ad-hoc assessment flow with structured pipeline:
- Code-level payment verification (checks PAID ASSESSMENT order)
- Info completeness validation (age, nationality, education, work exp)
- Assessment expert invocation with result parsing
- Automatic persistence as UserArtifact (assessment_report type)
- 30-day dedup (existing report within 30 days returns cached)
- Frontend rendering for all status codes (completed, payment_required,
info_incomplete, already_assessed, error)
- System prompt updated to mandate new tool for paid assessments
- Post-assessment auto-generation of checklist + timeline
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 4 new tools (generate_document, manage_checklist, create_timeline,
query_user_artifacts) enabling the agent to create and manage persistent
user artifacts. Artifacts are saved to PostgreSQL and support dedup by
title, update-in-place, and cross-session querying. Frontend renders
rich UI cards for each artifact type.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. ClaudeModule missing ConversationORM in TypeOrmModule.forFeature —
ImmigrationToolsService now depends on ConversationORMRepository
(added in query_user_profile), but ClaudeModule only had TokenUsageORM.
Fix: add ConversationORM to ClaudeModule's TypeORM imports.
2. Historical messages show "支付创建失败" for payment QR codes —
toolCall.result is stored as JSON string in DB metadata JSONB.
Live streaming (useChat.ts) parses it correctly, but REST API
load (chatStore.ts → MessageBubble.tsx) does not.
Fix: normalize toolCall.result in ToolCallResult component —
JSON.parse if string, pass through if already object.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Alipay/WeChat adapters now return the source payment URL alongside the
QR base64. The generate_payment tool only returns paymentUrl (short text)
to Claude API — base64 qrCodeUrl is stripped to prevent AI from dumping
raw data:image into text responses. Frontend QRCodeSVG renders from
paymentUrl instead of base64.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix auto-scroll by adding missing dependencies (currentConversationId, isStreaming,
completedAgents). Completed agent badges now show for 2.5s then smoothly fade out
instead of accumulating, keeping the status area clean.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of showing agent status in a separate panel below the chat,
display it inline beneath the typing dots ("...") in the message flow.
The dots remain the primary waiting indicator; agent status appears
below as supplementary context during specialist agent invocations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ChatPage only set currentConversationId but never fetched messages from
the API, causing historical conversations to show the welcome screen.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enforce Claude API file size limits at upload time with user-friendly
error messages:
- Images: max 5MB (Claude API hard limit)
- PDF: max 25MB (32MB request limit minus headroom)
- Other documents: max 50MB (general upload limit)
Replaced duplicate ALLOWED_TYPES/MAX_FILE_SIZE in InputArea with shared
validateFile() from fileService, showing alert() on rejection.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SuperAdmin module for tenant management (CRUD, suspend/activate)
- Add tenant management REST API (/super-admin/tenants/*)
- Add user profile menu in ChatSidebar with dropdown
- Add ProfilePage and BindPhonePage for user account management
- Update init-db.sql with tenant_id columns for all 16 tables
- Add database seed script (scripts/seed.ts) with ts-node
- Integrate db:seed into deploy.sh rebuild command
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change flex container from items-end to items-center
- Use top-1/2 -translate-y-1/2 for send button vertical centering
- Adjust paperclip button padding for consistent sizing
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Set overflow-hidden by default on textarea
- Only show scrollbar when content exceeds max height (200px)
- Fix scrollbar appearing on empty input
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add clipboard paste handler for images and files (Ctrl+V / Cmd+V)
- Add drag-and-drop zone with visual feedback
- Update placeholder text to inform users about new features
- Improve file upload UX with drop overlay
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add MinIO object storage to docker-compose infrastructure
- Create file-service microservice for upload management with presigned URLs
- Add files table to database schema
- Update nginx and Kong for MinIO proxy routes
- Implement file upload UI in chat InputArea with drag-and-drop
- Add attachment preview in MessageBubble component
- Update conversation-service to handle multimodal messages
- Add Claude Vision API integration for image analysis
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Frontend:
- Add sidebarOpen state to chatStore with toggle functionality
- Make sidebar collapsible with smooth animation
- Add mobile-friendly drawer behavior with overlay
- Add toggle button for desktop view
- Implement delete conversation functionality with loading state
Backend:
- Add DELETE /conversations/:id endpoint
- Implement deleteConversation service method
- Delete messages before conversation (foreign key constraint)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>