Files
erp-nutzfahrzeuge/.a0/current_status.md
T

1.5 KiB

Current Status

T07: KI-Copilot (Text + Sprache) + Systemsteuerung + Copilot UI

Status: COMPLETED

Backend

  • models/copilot.py — CopilotSession, CopilotChat models
  • schemas/copilot.py — ChatRequest, ChatResponse, ActionRequest, ActionResponse, ChatHistoryResponse, VoiceRequest, VoiceResponse
  • routers/copilot.py — POST /chat, POST /action, GET /history, POST /voice
  • services/copilot_service.py — chat, execute_action, get_history, get_sessions, transcribe_audio, voice_chat
  • utils/copilot_actions.py — 5 actions: search_vehicles, search_contacts, get_sale_overview, create_vehicle, create_contact
  • utils/copilot_prompt.py — System prompt with ERP context and action definitions
  • tests/test_copilot.py — 28 endpoint+unit tests
  • tests/test_copilot_coverage.py — 20 service-level coverage tests
  • main.py — copilot router registered

Frontend

  • lib/copilot.ts — API client functions
  • app/[locale]/ki-copilot/page.tsx — Copilot page
  • components/copilot/ChatInterface.tsx — Main chat interface
  • components/copilot/MessageList.tsx — Message list
  • components/copilot/ChatInput.tsx — Text input
  • components/copilot/VoiceInput.tsx — Voice input (Web Speech API)
  • components/copilot/ActionPreview.tsx — Action preview before execution
  • components/copilot/ChatHistory.tsx — Chat history sidebar
  • tests/copilot.test.tsx — 24 frontend tests

Test Results

  • Backend: 48 passed, 90% coverage (exceeds 80% requirement)
  • Frontend: 24 passed