feat: Dashboard Frontend – Echte API-Integration
- useDashboardData: Mock-Daten durch API-Calls ersetzt
- fetchStatus/Agents/Operations/ChatMessages/Queue via /api/dashboard/*
- sendChatMessage via POST /api/dashboard/chat/send
- Polling: Status 5s, Chat 3s, Agents/Queue 10s
- Agent Catalog mit static Fields + API-Daten
- ChatPanel direkt mit sendChatMessage verdrahtet
- Build: 0 errors, vue-tsc + vite ✅
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { ref, nextTick, watch } from 'vue'
|
||||
import { Bot, Send, LoaderCircle, Maximize2, X } from '@lucide/vue'
|
||||
import type { ChatMessage } from '../../composables/useDashboardData'
|
||||
import { useDashboardData } from '../../composables/useDashboardData'
|
||||
|
||||
const props = defineProps<{
|
||||
messages: ChatMessage[]
|
||||
@@ -9,9 +10,7 @@ const props = defineProps<{
|
||||
irisFocus: string
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
send: [text: string]
|
||||
}>()
|
||||
const { sendChatMessage } = useDashboardData()
|
||||
|
||||
const inputText = ref('')
|
||||
const chatListRef = ref<HTMLElement | null>(null)
|
||||
@@ -20,7 +19,7 @@ const chatModalOpen = ref(false)
|
||||
|
||||
function sendMessage(): void {
|
||||
if (!inputText.value.trim()) return
|
||||
emit('send', inputText.value)
|
||||
sendChatMessage(inputText.value)
|
||||
inputText.value = ''
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user