Spaces:
Running
Running
footer en sağda şuanda aşağıda değil. Footerı direkt kaldır hatta chat sitesinde gerek yok. Site adı Nixaut Copilot ayrıca. Model seçme yeri de olsun - modeller "Max", "Turbo", "Lite" ve "Deep Research" olacak. Model seçme için özel dropdown kodla, hazır html dropdown tasarımı berbat
Browse files- components/header.js +2 -2
- index.html +53 -15
- script.js +91 -9
- style.css +30 -1
components/header.js
CHANGED
|
@@ -108,9 +108,9 @@ class CustomHeader extends HTMLElement {
|
|
| 108 |
</svg>
|
| 109 |
</div>
|
| 110 |
<div class="logo-text text-white">
|
| 111 |
-
|
| 112 |
</div>
|
| 113 |
-
|
| 114 |
|
| 115 |
<div class="nav-actions">
|
| 116 |
<button onclick="toggleTheme()" class="icon-btn" data-tooltip="Toggle theme">
|
|
|
|
| 108 |
</svg>
|
| 109 |
</div>
|
| 110 |
<div class="logo-text text-white">
|
| 111 |
+
Nixaut <span>Copilot</span>
|
| 112 |
</div>
|
| 113 |
+
</div>
|
| 114 |
|
| 115 |
<div class="nav-actions">
|
| 116 |
<button onclick="toggleTheme()" class="icon-btn" data-tooltip="Toggle theme">
|
index.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
-
|
| 8 |
<link rel="stylesheet" href="style.css">
|
| 9 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
|
@@ -150,9 +150,57 @@
|
|
| 150 |
</div>
|
| 151 |
</div>
|
| 152 |
</main>
|
| 153 |
-
|
| 154 |
<!-- Right Sidebar -->
|
| 155 |
<aside class="w-80 bg-zinc-900/50 backdrop-blur-xl border-l border-zinc-800 p-6 space-y-6">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
<!-- AI Status -->
|
| 157 |
<div class="bg-zinc-800/50 rounded-xl p-4 glow">
|
| 158 |
<h3 class="font-semibold text-white mb-3 flex items-center">
|
|
@@ -160,10 +208,6 @@
|
|
| 160 |
System Status
|
| 161 |
</h3>
|
| 162 |
<div class="space-y-2">
|
| 163 |
-
<div class="flex justify-between items-center">
|
| 164 |
-
<span class="text-sm text-zinc-400">Model</span>
|
| 165 |
-
<span class="text-sm text-white font-medium">GPT-4 Turbo</span>
|
| 166 |
-
</div>
|
| 167 |
<div class="flex justify-between items-center">
|
| 168 |
<span class="text-sm text-zinc-400">Response Time</span>
|
| 169 |
<span class="text-sm text-green-400 font-medium">~0.8s</span>
|
|
@@ -174,8 +218,7 @@
|
|
| 174 |
</div>
|
| 175 |
</div>
|
| 176 |
</div>
|
| 177 |
-
|
| 178 |
-
<!-- AI Capabilities -->
|
| 179 |
<div>
|
| 180 |
<h3 class="font-semibold text-white mb-3 flex items-center">
|
| 181 |
<i data-feather="zap" class="w-4 h-4 mr-2"></i>
|
|
@@ -233,14 +276,9 @@
|
|
| 233 |
</div>
|
| 234 |
</div>
|
| 235 |
</aside>
|
| 236 |
-
<div class="flex-1">
|
| 237 |
-
<!-- Footer -->
|
| 238 |
-
<custom-footer></custom-footer>
|
| 239 |
-
</div>
|
| 240 |
<script src="components/header.js"></script>
|
| 241 |
<script src="components/sidebar.js"></script>
|
| 242 |
-
|
| 243 |
-
<script src="script.js"></script>
|
| 244 |
<script>feather.replace();</script>
|
| 245 |
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 246 |
</body>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Nixaut Copilot - Advanced AI Assistant</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🤖</text></svg>">
|
| 8 |
<link rel="stylesheet" href="style.css">
|
| 9 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
|
|
|
| 150 |
</div>
|
| 151 |
</div>
|
| 152 |
</main>
|
|
|
|
| 153 |
<!-- Right Sidebar -->
|
| 154 |
<aside class="w-80 bg-zinc-900/50 backdrop-blur-xl border-l border-zinc-800 p-6 space-y-6">
|
| 155 |
+
<!-- Model Selection -->
|
| 156 |
+
<div class="bg-zinc-800/50 rounded-xl p-4 glow">
|
| 157 |
+
<h3 class="font-semibold text-white mb-3 flex items-center">
|
| 158 |
+
<i data-feather="cpu" class="w-4 h-4 mr-2"></i>
|
| 159 |
+
Model Selection
|
| 160 |
+
</h3>
|
| 161 |
+
<div id="modelDropdown" class="relative">
|
| 162 |
+
<button onclick="toggleModelDropdown()" class="w-full bg-zinc-900 border border-zinc-700 rounded-lg px-4 py-3 text-left text-white flex items-center justify-between hover:border-zinc-600 transition-all duration-200">
|
| 163 |
+
<span id="selectedModel" class="flex items-center">
|
| 164 |
+
<div class="w-2 h-2 bg-green-400 rounded-full mr-2"></div>
|
| 165 |
+
Max
|
| 166 |
+
</span>
|
| 167 |
+
<svg class="w-5 h-5 text-zinc-400 transition-transform" id="modelDropdownArrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 168 |
+
<path d="M6 9l6 6 6-6"/>
|
| 169 |
+
</svg>
|
| 170 |
+
</button>
|
| 171 |
+
<div id="modelDropdownMenu" class="hidden absolute top-full left-0 right-0 mt-2 bg-zinc-900 border border-zinc-700 rounded-lg shadow-xl z-50">
|
| 172 |
+
<div onclick="selectModel('Max')" class="px-4 py-3 text-white hover:bg-zinc-800 cursor-pointer transition-colors duration-150 flex items-center">
|
| 173 |
+
<div class="w-2 h-2 bg-green-400 rounded-full mr-2"></div>
|
| 174 |
+
<div class="flex-1">
|
| 175 |
+
<div class="font-medium">Max</div>
|
| 176 |
+
<div class="text-xs text-zinc-400">Most capable, best quality</div>
|
| 177 |
+
</div>
|
| 178 |
+
</div>
|
| 179 |
+
<div onclick="selectModel('Turbo')" class="px-4 py-3 text-white hover:bg-zinc-800 cursor-pointer transition-colors duration-150 flex items-center">
|
| 180 |
+
<div class="w-2 h-2 bg-blue-400 rounded-full mr-2"></div>
|
| 181 |
+
<div class="flex-1">
|
| 182 |
+
<div class="font-medium">Turbo</div>
|
| 183 |
+
<div class="text-xs text-zinc-400">Fast responses, good quality</div>
|
| 184 |
+
</div>
|
| 185 |
+
</div>
|
| 186 |
+
<div onclick="selectModel('Lite')" class="px-4 py-3 text-white hover:bg-zinc-800 cursor-pointer transition-colors duration-150 flex items-center">
|
| 187 |
+
<div class="w-2 h-2 bg-yellow-400 rounded-full mr-2"></div>
|
| 188 |
+
<div class="flex-1">
|
| 189 |
+
<div class="font-medium">Lite</div>
|
| 190 |
+
<div class="text-xs text-zinc-400">Quick tasks, minimal cost</div>
|
| 191 |
+
</div>
|
| 192 |
+
</div>
|
| 193 |
+
<div onclick="selectModel('Deep Research')" class="px-4 py-3 text-white hover:bg-zinc-800 cursor-pointer transition-colors duration-150 flex items-center border-t border-zinc-700">
|
| 194 |
+
<div class="w-2 h-2 bg-purple-400 rounded-full mr-2"></div>
|
| 195 |
+
<div class="flex-1">
|
| 196 |
+
<div class="font-medium">Deep Research</div>
|
| 197 |
+
<div class="text-xs text-zinc-400">Advanced analysis & insights</div>
|
| 198 |
+
</div>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
</div>
|
| 202 |
+
</div>
|
| 203 |
+
|
| 204 |
<!-- AI Status -->
|
| 205 |
<div class="bg-zinc-800/50 rounded-xl p-4 glow">
|
| 206 |
<h3 class="font-semibold text-white mb-3 flex items-center">
|
|
|
|
| 208 |
System Status
|
| 209 |
</h3>
|
| 210 |
<div class="space-y-2">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
<div class="flex justify-between items-center">
|
| 212 |
<span class="text-sm text-zinc-400">Response Time</span>
|
| 213 |
<span class="text-sm text-green-400 font-medium">~0.8s</span>
|
|
|
|
| 218 |
</div>
|
| 219 |
</div>
|
| 220 |
</div>
|
| 221 |
+
<!-- AI Capabilities -->
|
|
|
|
| 222 |
<div>
|
| 223 |
<h3 class="font-semibold text-white mb-3 flex items-center">
|
| 224 |
<i data-feather="zap" class="w-4 h-4 mr-2"></i>
|
|
|
|
| 276 |
</div>
|
| 277 |
</div>
|
| 278 |
</aside>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 279 |
<script src="components/header.js"></script>
|
| 280 |
<script src="components/sidebar.js"></script>
|
| 281 |
+
<script src="script.js"></script>
|
|
|
|
| 282 |
<script>feather.replace();</script>
|
| 283 |
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 284 |
</body>
|
script.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
// Global Variables
|
| 2 |
let chatHistory = [];
|
| 3 |
-
|
|
|
|
| 4 |
let isConnected = true;
|
| 5 |
|
| 6 |
// Initialize
|
|
@@ -127,19 +128,100 @@ function addMessage(content, sender) {
|
|
| 127 |
// Update token count
|
| 128 |
updateTokenCount();
|
| 129 |
}
|
| 130 |
-
|
| 131 |
function generateAIResponse(userMessage) {
|
| 132 |
-
const
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
|
|
|
|
| 140 |
return responses[Math.floor(Math.random() * responses.length)];
|
| 141 |
}
|
| 142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
function handleKeyPress(event) {
|
| 144 |
if (event.key === 'Enter' && !event.shiftKey) {
|
| 145 |
event.preventDefault();
|
|
|
|
| 1 |
// Global Variables
|
| 2 |
let chatHistory = [];
|
| 3 |
+
let currentModel = 'Max';
|
| 4 |
+
let isCompactMode = false;
|
| 5 |
let isConnected = true;
|
| 6 |
|
| 7 |
// Initialize
|
|
|
|
| 128 |
// Update token count
|
| 129 |
updateTokenCount();
|
| 130 |
}
|
|
|
|
| 131 |
function generateAIResponse(userMessage) {
|
| 132 |
+
const modelResponses = {
|
| 133 |
+
'Max': [
|
| 134 |
+
"I understand you're asking about: \"" + userMessage + "\". Let me help you with that. Based on my analysis, this involves several key components that we should consider carefully.",
|
| 135 |
+
"That's an interesting question! Here's my comprehensive take on it: " + userMessage + " deserves attention because it touches on important aspects of modern technology and its applications.",
|
| 136 |
+
"Great question! " + userMessage + " is a topic I can elaborate on in depth. From my perspective with the Max model, there are multiple approaches and nuances we should explore.",
|
| 137 |
+
"I appreciate you bringing this up. Regarding " + userMessage + ", I think we should explore the underlying principles and practical implications thoroughly.",
|
| 138 |
+
"This is a fascinating topic! " + userMessage + " connects to broader concepts in technology and innovation. Let me share detailed insights that might help."
|
| 139 |
+
],
|
| 140 |
+
'Turbo': [
|
| 141 |
+
"Quick analysis on: \"" + userMessage + "\" - Here's what I think: It involves key components worth looking at.",
|
| 142 |
+
"Regarding " + userMessage + " - That's an interesting point worth discussing. Let me break it down for you.",
|
| 143 |
+
"Got it! " + userMessage + " - I can help with that. Here are the main approaches to consider.",
|
| 144 |
+
"About " + userMessage + " - Let me give you a clear perspective on this topic.",
|
| 145 |
+
"Interesting question about " + userMessage + "! Here are some quick insights for you."
|
| 146 |
+
],
|
| 147 |
+
'Lite': [
|
| 148 |
+
"About: \"" + userMessage + "\" - Here's a brief overview for you.",
|
| 149 |
+
"Regarding " + userMessage + " - Here are the key points to consider.",
|
| 150 |
+
"Quick take on " + userMessage + " - Here's what you need to know.",
|
| 151 |
+
"Brief analysis: " + userMessage + " - Key insights below.",
|
| 152 |
+
"Quick reply about " + userMessage + " - Here are the essentials."
|
| 153 |
+
],
|
| 154 |
+
'Deep Research': [
|
| 155 |
+
"Let me conduct a deep analysis of: \"" + userMessage + "\". This query warrants comprehensive examination from multiple theoretical and practical frameworks. Based on extensive knowledge synthesis, we can identify several critical dimensions: historical context, current state-of-the-art approaches, potential future developments, and cross-disciplinary implications. The underlying mechanisms deserve careful scrutiny as they relate to broader patterns in technology evolution and cognitive science principles.",
|
| 156 |
+
"Your inquiry about " + userMessage + " represents a sophisticated topic that benefits from deep research methodology. Drawing upon interdisciplinary knowledge domains including computer science, cognitive psychology, and systems theory, I can provide a multifaceted analysis. This exploration should consider not only surface-level implications but also second and third-order effects on ecosystem dynamics, user behavior patterns, and long-term sustainability considerations.",
|
| 157 |
+
"Excellent research question regarding " + userMessage + ". To properly address this, we must examine it through multiple analytical lenses including technical feasibility, economic viability, social impact assessment, and ethical considerations. The complexity of this domain suggests we should also investigate precedent cases, failure modes, success patterns, and emerging trends that might influence future trajectories."
|
| 158 |
+
]
|
| 159 |
+
};
|
| 160 |
|
| 161 |
+
const responses = modelResponses[currentModel] || modelResponses['Max'];
|
| 162 |
return responses[Math.floor(Math.random() * responses.length)];
|
| 163 |
}
|
| 164 |
|
| 165 |
+
function toggleModelDropdown() {
|
| 166 |
+
const menu = document.getElementById('modelDropdownMenu');
|
| 167 |
+
const arrow = document.getElementById('modelDropdownArrow');
|
| 168 |
+
|
| 169 |
+
if (menu.classList.contains('hidden')) {
|
| 170 |
+
menu.classList.remove('hidden');
|
| 171 |
+
arrow.style.transform = 'rotate(180deg)';
|
| 172 |
+
} else {
|
| 173 |
+
menu.classList.add('hidden');
|
| 174 |
+
arrow.style.transform = 'rotate(0deg)';
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
function selectModel(model) {
|
| 179 |
+
currentModel = model;
|
| 180 |
+
const selected = document.getElementById('selectedModel');
|
| 181 |
+
const model = {
|
| 182 |
+
'Max': { color: 'green' },
|
| 183 |
+
'Turbo': { color: 'blue' },
|
| 184 |
+
'Lite': { color: 'yellow' },
|
| 185 |
+
'Deep Research': { color: 'purple' }
|
| 186 |
+
};
|
| 187 |
+
|
| 188 |
+
selected.innerHTML = `
|
| 189 |
+
<div class="w-2 h-2 bg-${modelConfig[model].color}-400 rounded-full mr-2"></div>
|
| 190 |
+
${model}
|
| 191 |
+
`;
|
| 192 |
+
|
| 193 |
+
// Close dropdown
|
| 194 |
+
document.getElementById('modelDropdownMenu').classList.add('hidden');
|
| 195 |
+
document.getElementById('modelDropdownArrow').style.transform = 'rotate(0deg)';
|
| 196 |
+
|
| 197 |
+
// Update response time based on model
|
| 198 |
+
updateModelStatus(model);
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
function updateModelStatus(model) {
|
| 202 |
+
const responseTimes = {
|
| 203 |
+
'Max': '~1.2s',
|
| 204 |
+
'Turbo': '~0.8s',
|
| 205 |
+
'Lite': '~0.5s',
|
| 206 |
+
'Deep Research': '~2.1s'
|
| 207 |
+
};
|
| 208 |
+
|
| 209 |
+
const responseElements = document.querySelectorAll('.text-green-400');
|
| 210 |
+
responseElements.forEach(el => {
|
| 211 |
+
if (el.textContent.includes('~')) {
|
| 212 |
+
el.textContent = responseTimes[model];
|
| 213 |
+
}
|
| 214 |
+
});
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
// Close dropdown when clicking outside
|
| 218 |
+
document.addEventListener('click', function(event) {
|
| 219 |
+
const dropdown = document.getElementById('modelDropdown');
|
| 220 |
+
if (!dropdown.contains(event.target)) {
|
| 221 |
+
document.getElementById('modelDropdownMenu').classList.add('hidden');
|
| 222 |
+
document.getElementById('modelDropdownArrow').style.transform = 'rotate(0deg)';
|
| 223 |
+
}
|
| 224 |
+
});
|
| 225 |
function handleKeyPress(event) {
|
| 226 |
if (event.key === 'Enter' && !event.shiftKey) {
|
| 227 |
event.preventDefault();
|
style.css
CHANGED
|
@@ -104,7 +104,6 @@ body {
|
|
| 104 |
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
| 105 |
transition-duration: 150ms;
|
| 106 |
}
|
| 107 |
-
|
| 108 |
/* Utility Classes */
|
| 109 |
.text-shadow {
|
| 110 |
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
@@ -115,6 +114,36 @@ body {
|
|
| 115 |
0 0 20px rgba(255, 255, 255, 0.05);
|
| 116 |
}
|
| 117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
/* Mobile Responsive */
|
| 119 |
@media (max-width: 768px) {
|
| 120 |
.sidebar-mobile {
|
|
|
|
| 104 |
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
| 105 |
transition-duration: 150ms;
|
| 106 |
}
|
|
|
|
| 107 |
/* Utility Classes */
|
| 108 |
.text-shadow {
|
| 109 |
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
|
|
| 114 |
0 0 20px rgba(255, 255, 255, 0.05);
|
| 115 |
}
|
| 116 |
|
| 117 |
+
/* Model Dropdown Styles */
|
| 118 |
+
#modelDropdownMenu {
|
| 119 |
+
max-height: 300px;
|
| 120 |
+
overflow-y: auto;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
#modelDropdownMenu::-webkit-scrollbar {
|
| 124 |
+
width: 4px;
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
#modelDropdownMenu::-webkit-scrollbar-track {
|
| 128 |
+
background: transparent;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
#modelDropdownMenu::-webkit-scrollbar-thumb {
|
| 132 |
+
background: #525252;
|
| 133 |
+
border-radius: 2px;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
.model-dot {
|
| 137 |
+
width: 8px;
|
| 138 |
+
height: 8px;
|
| 139 |
+
border-radius: 50%;
|
| 140 |
+
display: inline-block;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.model-dot.green { background: #4ade80; }
|
| 144 |
+
.model-dot.blue { background: #60a5fa; }
|
| 145 |
+
.model-dot.yellow { background: #facc15; }
|
| 146 |
+
.model-dot.purple { background: #c084fc; }
|
| 147 |
/* Mobile Responsive */
|
| 148 |
@media (max-width: 768px) {
|
| 149 |
.sidebar-mobile {
|