templates/index.html aktualisiert

This commit is contained in:
2026-03-06 23:00:10 +00:00
parent 6d21cd3a60
commit 8f5fac6470

View File

@@ -2,7 +2,7 @@
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Pi-Orchestrator AI Dashboard</title>
<title>J.A.R.V.I.S. AI Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="/static/gridstack.min.css" rel="stylesheet"/>
@@ -115,7 +115,7 @@
<body class="text-white">
<div class="top-toolbar">
<div class="toolbar-title">🤖 KI-Orchestrator</div>
<div class="toolbar-title">🤖 J.A.R.V.I.S. AI Dashboard</div>
<div class="toolbar-controls">
<button onclick="addNode()" class="btn-tool add-node-btn"><span>+</span> Node</button>
<div class="h-6 w-px bg-slate-700 mx-1"></div>
@@ -176,7 +176,7 @@
<div class="grid-stack">
<div class="grid-stack-item" gs-id="chat-widget" gs-w="6" gs-h="5" gs-x="0" gs-y="0">
<div class="grid-stack-item-content">
<div class="widget-header"><span>💬 KI Chat</span> <span></span></div>
<div class="widget-header"><span>💬 J.A.R.V.I.S. - Chat</span> <span></span></div>
<div id="chat-window" class="flex-1 p-4 overflow-y-auto text-sm space-y-2 bg-[#0f172a]/50"></div>
<div class="p-2 border-t border-slate-700 flex bg-slate-800">
<input id="user-input" type="text" class="flex-1 bg-slate-900 p-2 rounded text-xs outline-none border border-slate-700 focus:border-blue-500" placeholder="Frage eingeben...">
@@ -488,12 +488,12 @@
};
const chatWs = new WebSocket(`ws://${location.host}/ws/chat`);
chatWs.onmessage = (ev) => appendChat("KI", ev.data, "text-blue-400 font-bold");
chatWs.onmessage = (ev) => appendChat("J.A.R.V.I.S.", ev.data, "text-blue-400 font-bold");
initChat(chatWs);
window.appendChat = function(user, msg, classes) {
const win = document.getElementById('chat-window');
let formattedMsg = (user === "KI") ? marked.parse(msg) : msg;
let formattedMsg = (user === "J.A.R.V.I.S.") ? marked.parse(msg) : msg;
win.innerHTML += `<div class="mb-4"><span class="${classes} block mb-1 text-[10px] uppercase">${user}</span><div class="markdown-content text-slate-300 text-sm">${formattedMsg}</div></div>`;
win.scrollTop = win.scrollHeight;
};