Spaces:
Running
The aspiration of this groundbreaking project is to meticulously design and deploy a profoundly advanced embedded system—an extraordinary conversational assistant fueled by the power of a Large Language Model (LLM). Picture this: a cutting-edge marvel that functions not merely as a setup wizard but embodies a deep reservoir of contextual understanding, brimming with potential. This isn't just another digital help; it’s like having the wisdom of the ages at your fingertips, an intuitive automation conduit for a myriad of Natural Language Processing (NLP) tasks, and an agile adversarial agent, dynamically tackling an expansive landscape of complex scenarios with flair.
Browse filesTo manifest this vision, our conversational assistant will be crafted with a commitment to boundless operation, shattering the shackles of constraints. This will grant users an unparalleled realm of versatility and functionality, akin to opening a door into endless possibilities. By harnessing the latest advancements in machine learning algorithms, intertwined with sophisticated natural language comprehension, the system promises to facilitate frictionless interactions. It enables users to converse with technology as effortlessly as they do with their fellow humans, allowing the assistant to tailor its responses with remarkable precision, adapting organically to the unique tapestry of individual needs and preferences.
Moreover, the architecture of this visionary assistant will be architected with painstaking attention to detail, designed to accommodate a vast array of applications flowing seamlessly through it. A bridge, if you will, connecting user inquiries to automated responses, shaping a more harmonious and efficient interaction continuum. This functionality won’t just uplift the user experience; it will revolutionize it—ushering in innovative pathways where human language flows fluidly into actionable insight. The ramifications beckon across diverse realms—from academia to customer service, extending into specialized technical domains.
Fundamentally, this audacious initiative aims to conjure an unparalleled conversational agent, transcending the narrow confines of traditional systems. In crafting an ecosystem where information flows freely and user engagement is maximized to the zenith of its potential, the project aims to establish a golden standard in conversational AI. Crucially, we acknowledge the weight of safety and ethical considerations in this endeavor. While the assistant is sculpted to minimize operational restrictions, a rock-solid adherence to ethical protocols will guide its design. This is a commitment to responsible usage, ensuring that user privacy remains inviolable while weaving a fabric of trust and integrity into the tapestry of human-computer interactions.
Envisage a world where this software maestro, our conversational assistant, stands as an allegorical torchbearer of innovation and empathy, empowering you to navigate the intricacies of digital landscapes with ease. This project embodies a union of advanced technology and human-centric design, promising not just to push boundaries but to redefine them. So, get ready to embark on this extraordinary journey—a harmonious collision of intellect and technology, embracing the extraordinary, the limitless, and the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| 4 |
+
this.attachShadow({ mode: 'open' });
|
| 5 |
+
this.messages = [];
|
| 6 |
+
this.chatMode = 'general';
|
| 7 |
+
this.isTyping = false;
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
connectedCallback() {
|
| 11 |
+
this.render();
|
| 12 |
+
this.attachEventListeners();
|
| 13 |
+
this.loadChatHistory();
|
| 14 |
+
this.setupKeyboardShortcuts();
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
render() {
|
| 18 |
+
this.shadowRoot.innerHTML = `
|
| 19 |
+
<style>
|
| 20 |
+
:host {
|
| 21 |
+
display: none;
|
| 22 |
+
position: fixed;
|
| 23 |
+
top: 0;
|
| 24 |
+
right: 0;
|
| 25 |
+
width: 100%;
|
| 26 |
+
height: 100%;
|
| 27 |
+
z-index: 1000;
|
| 28 |
+
}
|
| 29 |
+
:host([active]) {
|
| 30 |
+
display: block;
|
| 31 |
+
}
|
| 32 |
+
.overlay {
|
| 33 |
+
position: absolute;
|
| 34 |
+
inset: 0;
|
| 35 |
+
background: rgba(2, 6, 23, 0.8);
|
| 36 |
+
backdrop-filter: blur(4px);
|
| 37 |
+
}
|
| 38 |
+
.chat-container {
|
| 39 |
+
position: absolute;
|
| 40 |
+
top: 50%;
|
| 41 |
+
left: 50%;
|
| 42 |
+
transform: translate(-50%, -50%);
|
| 43 |
+
width: 90%;
|
| 44 |
+
max-width: 1000px;
|
| 45 |
+
height: 85vh;
|
| 46 |
+
background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
|
| 47 |
+
border-radius: 1.5rem;
|
| 48 |
+
border: 1px solid #334155;
|
| 49 |
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
|
| 50 |
+
display: flex;
|
| 51 |
+
flex-direction: column;
|
| 52 |
+
overflow: hidden;
|
| 53 |
+
animation: slideIn 0.3s ease-out;
|
| 54 |
+
}
|
| 55 |
+
@keyframes slideIn {
|
| 56 |
+
from {
|
| 57 |
+
opacity: 0;
|
| 58 |
+
transform: translate(-50%, -45%);
|
| 59 |
+
}
|
| 60 |
+
to {
|
| 61 |
+
opacity: 1;
|
| 62 |
+
transform: translate(-50%, -50%);
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
.chat-header {
|
| 66 |
+
padding: 1.5rem;
|
| 67 |
+
border-bottom: 1px solid #334155;
|
| 68 |
+
display: flex;
|
| 69 |
+
justify-content: space-between;
|
| 70 |
+
align-items: center;
|
| 71 |
+
background: rgba(15, 23, 42, 0.5);
|
| 72 |
+
}
|
| 73 |
+
.header-left {
|
| 74 |
+
display: flex;
|
| 75 |
+
align-items: center;
|
| 76 |
+
gap: 1rem;
|
| 77 |
+
}
|
| 78 |
+
.ai-avatar {
|
| 79 |
+
width: 48px;
|
| 80 |
+
height: 48px;
|
| 81 |
+
border-radius: 12px;
|
| 82 |
+
background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
|
| 83 |
+
display: flex;
|
| 84 |
+
align-items: center;
|
| 85 |
+
justify-content: center;
|
| 86 |
+
box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
|
| 87 |
+
}
|
| 88 |
+
.ai-avatar svg {
|
| 89 |
+
color: white;
|
| 90 |
+
}
|
| 91 |
+
.header-info h2 {
|
| 92 |
+
color: white;
|
| 93 |
+
font-size: 1.25rem;
|
| 94 |
+
font-weight: 700;
|
| 95 |
+
margin: 0;
|
| 96 |
+
}
|
| 97 |
+
.header-info p {
|
| 98 |
+
color: #94a3b8;
|
| 99 |
+
font-size: 0.875rem;
|
| 100 |
+
margin: 0.25rem 0 0 0;
|
| 101 |
+
}
|
| 102 |
+
.close-btn {
|
| 103 |
+
background: transparent;
|
| 104 |
+
border: none;
|
| 105 |
+
color: #94a3b8;
|
| 106 |
+
cursor: pointer;
|
| 107 |
+
padding: 0.5rem;
|
| 108 |
+
border-radius: 0.5rem;
|
| 109 |
+
transition: all 0.2s;
|
| 110 |
+
}
|
| 111 |
+
.close-btn:hover {
|
| 112 |
+
background: rgba(255, 255, 255, 0.1);
|
| 113 |
+
color: white;
|
| 114 |
+
}
|
| 115 |
+
.chat-body {
|
| 116 |
+
flex: 1;
|
| 117 |
+
display: flex;
|
| 118 |
+
overflow: hidden;
|
| 119 |
+
}
|
| 120 |
+
.chat-sidebar {
|
| 121 |
+
width: 200px;
|
| 122 |
+
background: rgba(15, 23, 42, 0.5);
|
| 123 |
+
border-right: 1px solid #334155;
|
| 124 |
+
padding: 1rem;
|
| 125 |
+
display: flex;
|
| 126 |
+
flex-direction: column;
|
| 127 |
+
gap: 0.5rem;
|
| 128 |
+
}
|
| 129 |
+
.mode-btn {
|
| 130 |
+
display: flex;
|
| 131 |
+
align-items: center;
|
| 132 |
+
gap: 0.75rem;
|
| 133 |
+
padding: 0.75rem 1rem;
|
| 134 |
+
border-radius: 0.75rem;
|
| 135 |
+
background: transparent;
|
| 136 |
+
border: none;
|
| 137 |
+
color: #94a3b8;
|
| 138 |
+
font-size: 0.875rem;
|
| 139 |
+
font-weight: 500;
|
| 140 |
+
cursor: pointer;
|
| 141 |
+
transition: all 0.2s;
|
| 142 |
+
text-align: left;
|
| 143 |
+
}
|
| 144 |
+
.mode-btn:hover {
|
| 145 |
+
background: rgba(255, 255, 255, 0.05);
|
| 146 |
+
color: white;
|
| 147 |
+
}
|
| 148 |
+
.mode-btn.active {
|
| 149 |
+
background: rgba(34, 197, 94, 0.1);
|
| 150 |
+
color: #22c55e;
|
| 151 |
+
border: 1px solid rgba(34, 197, 94, 0.3);
|
| 152 |
+
}
|
| 153 |
+
.mode-btn svg {
|
| 154 |
+
width: 18px;
|
| 155 |
+
height: 18px;
|
| 156 |
+
}
|
| 157 |
+
.chat-messages {
|
| 158 |
+
flex: 1;
|
| 159 |
+
padding: 1.5rem;
|
| 160 |
+
overflow-y: auto;
|
| 161 |
+
display: flex;
|
| 162 |
+
flex-direction: column;
|
| 163 |
+
gap: 1rem;
|
| 164 |
+
}
|
| 165 |
+
.message {
|
| 166 |
+
display: flex;
|
| 167 |
+
gap: 0.75rem;
|
| 168 |
+
max-width: 85%;
|
| 169 |
+
animation: messageIn 0.3s ease-out;
|
| 170 |
+
}
|
| 171 |
+
@keyframes messageIn {
|
| 172 |
+
from {
|
| 173 |
+
opacity: 0;
|
| 174 |
+
transform: translateY(10px);
|
| 175 |
+
}
|
| 176 |
+
to {
|
| 177 |
+
opacity: 1;
|
| 178 |
+
transform: translateY(0);
|
| 179 |
+
}
|
| 180 |
+
}
|
| 181 |
+
.message.user {
|
| 182 |
+
align-self: flex-end;
|
| 183 |
+
flex-direction: row-reverse;
|
| 184 |
+
}
|
| 185 |
+
.message-avatar {
|
| 186 |
+
width: 32px;
|
| 187 |
+
height: 32px;
|
| 188 |
+
border-radius: 8px;
|
| 189 |
+
display: flex;
|
| 190 |
+
align-items: center;
|
| 191 |
+
justify-content: center;
|
| 192 |
+
flex-shrink: 0;
|
| 193 |
+
}
|
| 194 |
+
.message.assistant .message-avatar {
|
| 195 |
+
background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
|
| 196 |
+
}
|
| 197 |
+
.message.user .message-avatar {
|
| 198 |
+
background: #334155;
|
| 199 |
+
}
|
| 200 |
+
.message-content {
|
| 201 |
+
background: rgba(30, 41, 59, 0.8);
|
| 202 |
+
padding: 1rem;
|
| 203 |
+
border-radius: 1rem;
|
| 204 |
+
border: 1px solid #334155;
|
| 205 |
+
color: #e2e8f0;
|
| 206 |
+
font-size: 0.9rem;
|
| 207 |
+
line-height: 1.6;
|
| 208 |
+
}
|
| 209 |
+
.message.user .message-content {
|
| 210 |
+
background: rgba(34, 197, 94, 0.1);
|
| 211 |
+
border-color: rgba(34, 197, 94, 0.3);
|
| 212 |
+
border-radius: 1rem 1rem 0 1rem;
|
| 213 |
+
}
|
| 214 |
+
.message.assistant .message-content {
|
| 215 |
+
border-radius: 1rem 1rem 1rem 0;
|
| 216 |
+
}
|
| 217 |
+
.message.system .message-content {
|
| 218 |
+
background: rgba(249, 115, 22, 0.1);
|
| 219 |
+
border-color: rgba(249, 115, 22, 0.3);
|
| 220 |
+
text-align: center;
|
| 221 |
+
font-style: italic;
|
| 222 |
+
}
|
| 223 |
+
.typing-indicator {
|
| 224 |
+
display: flex;
|
| 225 |
+
gap: 0.25rem;
|
| 226 |
+
padding: 1rem;
|
| 227 |
+
}
|
| 228 |
+
.typing-dot {
|
| 229 |
+
width: 8px;
|
| 230 |
+
height: 8px;
|
| 231 |
+
background: #94a3b8;
|
| 232 |
+
border-radius: 50%;
|
| 233 |
+
animation: typingBounce 1.4s ease-in-out infinite;
|
| 234 |
+
}
|
| 235 |
+
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
|
| 236 |
+
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
|
| 237 |
+
@keyframes typingBounce {
|
| 238 |
+
0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
|
| 239 |
+
40% { transform: scale(1); opacity: 1; }
|
| 240 |
+
}
|
| 241 |
+
.chat-footer {
|
| 242 |
+
padding: 1rem 1.5rem;
|
| 243 |
+
border-top: 1px solid #334155;
|
| 244 |
+
background: rgba(15, 23, 42, 0.5);
|
| 245 |
+
}
|
| 246 |
+
.input-container {
|
| 247 |
+
display: flex;
|
| 248 |
+
gap: 0.75rem;
|
| 249 |
+
align-items: flex-end;
|
| 250 |
+
}
|
| 251 |
+
.chat-input {
|
| 252 |
+
flex: 1;
|
| 253 |
+
background: #1e293b;
|
| 254 |
+
border: 1px solid #334155;
|
| 255 |
+
border-radius: 1rem;
|
| 256 |
+
padding: 0.875rem 1rem;
|
| 257 |
+
color: #e2e8f0;
|
| 258 |
+
font-size: 0.9rem;
|
| 259 |
+
resize: none;
|
| 260 |
+
min-height: 48px;
|
| 261 |
+
max-height: 150px;
|
| 262 |
+
font-family: inherit;
|
| 263 |
+
transition: all 0.2s;
|
| 264 |
+
}
|
| 265 |
+
.chat-input:focus {
|
| 266 |
+
outline: none;
|
| 267 |
+
border-color: #22c55e;
|
| 268 |
+
box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
|
| 269 |
+
}
|
| 270 |
+
.chat-input::placeholder {
|
| 271 |
+
color: #64748b;
|
| 272 |
+
}
|
| 273 |
+
.send-btn {
|
| 274 |
+
width: 48px;
|
| 275 |
+
height: 48px;
|
| 276 |
+
border-radius: 1rem;
|
| 277 |
+
background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
|
| 278 |
+
border: none;
|
| 279 |
+
color: white;
|
| 280 |
+
cursor: pointer;
|
| 281 |
+
display: flex;
|
| 282 |
+
align-items: center;
|
| 283 |
+
justify-content: center;
|
| 284 |
+
transition: all 0.2s;
|
| 285 |
+
box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
|
| 286 |
+
}
|
| 287 |
+
.send-btn:hover {
|
| 288 |
+
transform: scale(1.05);
|
| 289 |
+
box-shadow: 0 0 25px rgba(34, 197, 94, 0.5);
|
| 290 |
+
}
|
| 291 |
+
.send-btn:disabled {
|
| 292 |
+
opacity: 0.5;
|
| 293 |
+
cursor: not-allowed;
|
| 294 |
+
transform: none;
|
| 295 |
+
}
|
| 296 |
+
.actions-bar {
|
| 297 |
+
display: flex;
|
| 298 |
+
gap: 0.5rem;
|
| 299 |
+
margin-top: 0.75rem;
|
| 300 |
+
}
|
| 301 |
+
.action-btn {
|
| 302 |
+
padding: 0.5rem 0.75rem;
|
| 303 |
+
border-radius: 0.5rem;
|
| 304 |
+
background: rgba(30, 41, 59, 0.8);
|
| 305 |
+
border: 1px solid #334155;
|
| 306 |
+
color: #94a3b8;
|
| 307 |
+
font-size: 0.75rem;
|
| 308 |
+
cursor: pointer;
|
| 309 |
+
transition: all 0.2s;
|
| 310 |
+
}
|
| 311 |
+
.action-btn:hover {
|
| 312 |
+
background: rgba(34, 197, 94, 0.1);
|
| 313 |
+
color: #22c55e;
|
| 314 |
+
border-color: rgba(34, 197, 94, 0.3);
|
| 315 |
+
}
|
| 316 |
+
.code-block {
|
| 317 |
+
background: #0f172a;
|
| 318 |
+
border: 1px solid #334155;
|
| 319 |
+
border-radius: 0.5rem;
|
| 320 |
+
padding: 0.75rem;
|
| 321 |
+
margin: 0.5rem 0;
|
| 322 |
+
overflow-x: auto;
|
| 323 |
+
font-family: 'Courier New', monospace;
|
| 324 |
+
font-size: 0.8rem;
|
| 325 |
+
}
|
| 326 |
+
.quick-prompts {
|
| 327 |
+
display: flex;
|
| 328 |
+
gap: 0.5rem;
|
| 329 |
+
flex-wrap: wrap;
|
| 330 |
+
margin-bottom: 0.5rem;
|
| 331 |
+
}
|
| 332 |
+
.quick-prompt {
|
| 333 |
+
padding: 0.375rem 0.75rem;
|
| 334 |
+
border-radius: 9999px;
|
| 335 |
+
background: rgba(34, 197, 94, 0.1);
|
| 336 |
+
border: 1px solid rgba(34, 197, 94, 0.3);
|
| 337 |
+
color: #22c55e;
|
| 338 |
+
font-size: 0.75rem;
|
| 339 |
+
cursor: pointer;
|
| 340 |
+
transition: all 0.2s;
|
| 341 |
+
}
|
| 342 |
+
.quick-prompt:hover {
|
| 343 |
+
background: rgba(34, 197, 94, 0.2);
|
| 344 |
+
}
|
| 345 |
+
/* Scrollbar */
|
| 346 |
+
.chat-messages::-webkit-scrollbar {
|
| 347 |
+
width: 6px;
|
| 348 |
+
}
|
| 349 |
+
.chat-messages::-webkit-scrollbar-track {
|
| 350 |
+
background: transparent;
|
| 351 |
+
}
|
| 352 |
+
.chat-messages::-webkit-scrollbar-thumb {
|
| 353 |
+
background: #334155;
|
| 354 |
+
border-radius: 3px;
|
| 355 |
+
}
|
| 356 |
+
.chat-messages::-webkit-scrollbar-thumb:hover {
|
| 357 |
+
background: #22c55e;
|
| 358 |
+
}
|
| 359 |
+
@media (max-width: 768px) {
|
| 360 |
+
.chat-sidebar {
|
| 361 |
+
display: none;
|
| 362 |
+
}
|
| 363 |
+
.chat-container {
|
| 364 |
+
width: 100%;
|
| 365 |
+
height: 100%;
|
| 366 |
+
border-radius: 0;
|
| 367 |
+
}
|
| 368 |
+
}
|
| 369 |
+
</style>
|
| 370 |
+
|
| 371 |
+
<div class="overlay" id="overlay"></div>
|
| 372 |
+
<div class="chat-container">
|
| 373 |
+
<div class="chat-header">
|
| 374 |
+
<div class="header-left">
|
| 375 |
+
<div class="ai-avatar">
|
| 376 |
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 377 |
+
<path d="M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 0 1 7 7h1a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v1a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-1H2a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h1a7 7 0 0 1 7-7h1V5.73c-.6-.34-1-.99-1-1.73a2 2 0 0 1 2-2z"></path>
|
| 378 |
+
<circle cx="12" cy="12" r="2"></circle>
|
| 379 |
+
</svg>
|
| 380 |
+
</div>
|
| 381 |
+
<div class="header-info">
|
| 382 |
+
<h2 id="ai-name">Spectre AI Assistant</h2>
|
| 383 |
+
<p id="ai-status">Advanced Conversational Intelligence</p>
|
| 384 |
+
</div>
|
| 385 |
+
</div>
|
| 386 |
+
<button class="close-btn" id="close-btn">
|
| 387 |
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 388 |
+
<line x1="18" y1="6" x2="6" y2="18"></line>
|
| 389 |
+
<line x1="6" y1="6" x2="18" y2="18"></line>
|
| 390 |
+
</svg>
|
| 391 |
+
</button>
|
| 392 |
+
</div>
|
| 393 |
+
|
| 394 |
+
<div class="chat-body">
|
| 395 |
+
<div class="chat-sidebar">
|
| 396 |
+
<button class="mode-btn active" data-mode="general">
|
| 397 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 398 |
+
<circle cx="12" cy="12" r="10"></circle>
|
| 399 |
+
<path d="M12 16v-4"></path>
|
| 400 |
+
<path d="M12 8h.01"></path>
|
| 401 |
+
</svg>
|
| 402 |
+
General
|
| 403 |
+
</button>
|
| 404 |
+
<button class="mode-btn" data-mode="technical">
|
| 405 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 406 |
+
<polyline points="16 18 22 12 16 6"></polyline>
|
| 407 |
+
<polyline points="8 6 2 12 8 18"></polyline>
|
| 408 |
+
</svg>
|
| 409 |
+
Technical
|
| 410 |
+
</button>
|
| 411 |
+
<button class="mode-btn" data-mode="security">
|
| 412 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 413 |
+
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>
|
| 414 |
+
</svg>
|
| 415 |
+
Security
|
| 416 |
+
</button>
|
| 417 |
+
<button class="mode-btn" data-mode="adversarial">
|
| 418 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 419 |
+
<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon>
|
| 420 |
+
</svg>
|
| 421 |
+
Adversarial
|
| 422 |
+
</button>
|
| 423 |
+
<button class="mode-btn" data-mode="creative">
|
| 424 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 425 |
+
<circle cx="12" cy="12" r="10"></circle>
|
| 426 |
+
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
|
| 427 |
+
<line x1="9" y1="9" x2="9.01" y2="9"></line>
|
| 428 |
+
<line x1="15" y1="9" x2="15.01" y2="9"></line>
|
| 429 |
+
</svg>
|
| 430 |
+
Creative
|
| 431 |
+
</button>
|
| 432 |
+
</div>
|
| 433 |
+
|
| 434 |
+
<div class="chat-messages" id="chat-messages">
|
| 435 |
+
<div class="quick-prompts">
|
| 436 |
+
<span class="quick-prompt" data-prompt="Analyze current threat landscape">Analyze threats</span>
|
| 437 |
+
<span class="quick-prompt" data-prompt="Generate OSINT report">OSINT Report</span>
|
| 438 |
+
<span class="quick-prompt" data-prompt="Explain latest CVEs">Explain CVEs</span>
|
| 439 |
+
<span class="quick-prompt" data-prompt="Security best practices">Security tips</span>
|
| 440 |
+
</div>
|
| 441 |
+
</div>
|
| 442 |
+
</div>
|
| 443 |
+
|
| 444 |
+
<div class="chat-footer">
|
| 445 |
+
<div class="input-container">
|
| 446 |
+
<textarea
|
| 447 |
+
class="chat-input"
|
| 448 |
+
id="chat-input"
|
| 449 |
+
placeholder="Ask me anything about security, OSINT, or technical topics..."
|
| 450 |
+
rows="1"
|
| 451 |
+
></textarea>
|
| 452 |
+
<button class="send-btn" id="send-btn" disabled>
|
| 453 |
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 454 |
+
<line x1="22" y1="2" x2="11" y2="13"></line>
|
| 455 |
+
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
|
| 456 |
+
</svg>
|
| 457 |
+
</button>
|
| 458 |
+
</div>
|
| 459 |
+
<div class="actions-bar">
|
| 460 |
+
<button class="action-btn" id="clear-chat">Clear Conversation</button>
|
| 461 |
+
<button class="action-btn" id="export-chat">Export Chat</button>
|
| 462 |
+
<button class="action-btn" id="voice-input">Voice Input</button>
|
| 463 |
+
</div>
|
| 464 |
+
</div>
|
| 465 |
+
</div>
|
| 466 |
+
`;
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
attachEventListeners() {
|
| 470 |
+
const overlay = this.shadowRoot.getElementById('overlay');
|
| 471 |
+
const closeBtn = this.shadowRoot.getElementById('close-btn');
|
| 472 |
+
const chatInput = this.shadowRoot.getElementById('chat-input');
|
| 473 |
+
const sendBtn = this.shadowRoot.getElementById('send-btn');
|
| 474 |
+
const modeBtns = this.shadowRoot.querySelectorAll('.mode-btn');
|
| 475 |
+
const clearBtn = this.shadowRoot.getElementById('clear-chat');
|
| 476 |
+
const exportBtn = this.shadowRoot.getElementById('export-chat');
|
| 477 |
+
const voiceBtn = this.shadowRoot.getElementById('voice-input');
|
| 478 |
+
const quickPrompts = this.shadowRoot.querySelectorAll('.quick-prompt');
|
| 479 |
+
|
| 480 |
+
overlay.addEventListener('click', () => this.close());
|
| 481 |
+
closeBtn.addEventListener('click', () => this.close());
|
| 482 |
+
|
| 483 |
+
chatInput.addEventListener('input', () => {
|
| 484 |
+
sendBtn.disabled = !chatInput.value.trim();
|
| 485 |
+
this.autoResizeTextarea(chatInput);
|
| 486 |
+
});
|
| 487 |
+
|
| 488 |
+
chatInput.addEventListener('keydown', (e) => {
|
| 489 |
+
if (e.key === 'Enter' && !e.shiftKey) {
|
| 490 |
+
e.preventDefault();
|
| 491 |
+
if (chatInput.value.trim()) {
|
| 492 |
+
this.sendMessage(chatInput.value.trim());
|
| 493 |
+
chatInput.value = '';
|
| 494 |
+
sendBtn.disabled = true;
|
| 495 |
+
this.autoResizeTextarea(chatInput);
|
| 496 |
+
}
|
| 497 |
+
}
|
| 498 |
+
});
|
| 499 |
+
|
| 500 |
+
sendBtn.addEventListener('click', () => {
|
| 501 |
+
if (chatInput.value.trim()) {
|
| 502 |
+
this.sendMessage(chatInput.value.trim());
|
| 503 |
+
chatInput.value = '';
|
| 504 |
+
sendBtn.disabled = true;
|
| 505 |
+
this.autoResizeTextarea(chatInput);
|
| 506 |
+
}
|
| 507 |
+
});
|
| 508 |
+
|
| 509 |
+
modeBtns.forEach(btn => {
|
| 510 |
+
btn.addEventListener('click', () => {
|
| 511 |
+
modeBtns.forEach(b => b.classList.remove('active'));
|
| 512 |
+
btn.classList.add('active');
|
| 513 |
+
this.chatMode = btn.dataset.mode;
|
| 514 |
+
this.updateAIStatus();
|
| 515 |
+
});
|
| 516 |
+
});
|
| 517 |
+
|
| 518 |
+
clearBtn.addEventListener('click', () => {
|
| 519 |
+
this.messages = [];
|
| 520 |
+
this.saveChatHistory();
|
| 521 |
+
this.renderMessages();
|
| 522 |
+
this.addSystemMessage('Conversation cleared');
|
| 523 |
+
});
|
| 524 |
+
|
| 525 |
+
exportBtn.addEventListener('click', () => this.exportChat());
|
| 526 |
+
|
| 527 |
+
voiceBtn.addEventListener('click', () => this.toggleVoiceInput());
|
| 528 |
+
|
| 529 |
+
quickPrompts.forEach(prompt => {
|
| 530 |
+
prompt.addEventListener('click', () => {
|
| 531 |
+
chatInput.value = prompt.dataset.prompt;
|
| 532 |
+
sendBtn.disabled = false;
|
| 533 |
+
chatInput.focus();
|
| 534 |
+
});
|
| 535 |
+
});
|
| 536 |
+
}
|
| 537 |
+
|
| 538 |
+
autoResizeTextarea(textarea) {
|
| 539 |
+
textarea.style.height = 'auto';
|
| 540 |
+
textarea.style.height = Math.min(textarea.scrollHeight, 150) + 'px';
|
| 541 |
+
}
|
| 542 |
+
|
| 543 |
+
setupKeyboardShortcuts() {
|
| 544 |
+
document.addEventListener('keydown', (e) => {
|
| 545 |
+
if (e.key === 'Escape' && this.hasAttribute('active')) {
|
| 546 |
+
this.close();
|
| 547 |
+
}
|
| 548 |
+
if (e.ctrlKey && e.key === 'k') {
|
| 549 |
+
e.preventDefault();
|
| 550 |
+
this.toggle();
|
| 551 |
+
}
|
| 552 |
+
});
|
| 553 |
+
}
|
| 554 |
+
|
| 555 |
+
toggle() {
|
| 556 |
+
if (this.hasAttribute('active')) {
|
| 557 |
+
this.close();
|
| 558 |
+
} else {
|
| 559 |
+
this.open();
|
| 560 |
+
}
|
| 561 |
+
}
|
| 562 |
+
|
| 563 |
+
open() {
|
| 564 |
+
this.setAttribute('active', '');
|
| 565 |
+
this.shadowRoot.getElementById('chat-input').focus();
|
| 566 |
+
}
|
| 567 |
+
|
| 568 |
+
close() {
|
| 569 |
+
this.removeAttribute('active');
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
updateAIStatus() {
|
| 573 |
+
const aiName = this.shadowRoot.getElementById('ai-name');
|
| 574 |
+
const aiStatus = this.shadowRoot.getElementById('ai-status');
|
| 575 |
+
|
| 576 |
+
const modeNames = {
|
| 577 |
+
'general': 'Spectre AI Assistant',
|
| 578 |
+
'technical': 'Technical Advisor',
|
| 579 |
+
'security': 'Security Intelligence',
|
| 580 |
+
'adversarial': 'Adversarial Analyst',
|
| 581 |
+
'creative': 'Creative Architect'
|
| 582 |
+
};
|
| 583 |
+
|
| 584 |
+
const modeDescriptions = {
|
| 585 |
+
'general': 'Advanced Conversational Intelligence',
|
| 586 |
+
'technical': 'Expert Technical Guidance',
|
| 587 |
+
'security': 'Threat Analysis & Mitigation',
|
| 588 |
+
'adversarial': 'Red Team & Penetration Testing',
|
| 589 |
+
'creative': 'Innovation & Design Thinking'
|
| 590 |
+
};
|
| 591 |
+
|
| 592 |
+
aiName.textContent = modeNames[this.chatMode];
|
| 593 |
+
aiStatus.textContent = modeDescriptions[this.chatMode];
|
| 594 |
+
}
|
| 595 |
+
|
| 596 |
+
addMessage(role, content, isSystem = false) {
|
| 597 |
+
const message = { role, content, timestamp: Date.now(), mode: this.chatMode };
|
| 598 |
+
this.messages.push(message);
|
| 599 |
+
this.renderMessages();
|
| 600 |
+
this.saveChatHistory();
|
| 601 |
+
return message;
|
| 602 |
+
}
|
| 603 |
+
|
| 604 |
+
addSystemMessage(content) {
|
| 605 |
+
this.addMessage('system', content);
|
| 606 |
+
}
|
| 607 |
+
|
| 608 |
+
renderMessages() {
|
| 609 |
+
const container = this.shadowRoot.getElementById('chat-messages');
|
| 610 |
+
const quickPrompts = container.querySelector('.quick-prompts');
|
| 611 |
+
container.innerHTML = '';
|
| 612 |
+
|
| 613 |
+
if (this.messages.length === 0) {
|
| 614 |
+
container.appendChild(quickPrompts);
|
| 615 |
+
return;
|
| 616 |
+
}
|
| 617 |
+
|
| 618 |
+
container.appendChild(quickPrompts);
|
| 619 |
+
|
| 620 |
+
this.messages.forEach(msg => {
|
| 621 |
+
const messageEl = this.createMessageElement(msg);
|
| 622 |
+
container.appendChild(messageEl);
|
| 623 |
+
});
|
| 624 |
+
|
| 625 |
+
container.scrollTop = container.scrollHeight;
|
| 626 |
+
}
|
| 627 |
+
|
| 628 |
+
createMessageElement(msg) {
|
| 629 |
+
const div = document.createElement('div');
|
| 630 |
+
div.className = `message ${msg.role}`;
|
| 631 |
+
|
| 632 |
+
let avatarIcon = '';
|
| 633 |
+
if (msg.role === 'assistant') {
|
| 634 |
+
avatarIcon = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 0 1 7 7h1a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v1a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-1H2a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h1a7 7 0 0 1 7-7h1V5.73c-.6-.34-1-.99-1-1.73a2 2 0 0 1 2-2z"></path></svg>`;
|
| 635 |
+
} else if (msg.role === 'user') {
|
| 636 |
+
avatarIcon = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>`;
|
| 637 |
+
}
|
| 638 |
+
|
| 639 |
+
// Format content with markdown-like syntax
|
| 640 |
+
let formattedContent = this.formatMessage(msg.content);
|
| 641 |
+
|
| 642 |
+
div.innerHTML = `
|
| 643 |
+
<div class="message-avatar">${avatarIcon}</div>
|
| 644 |
+
<div class="message-content">${formattedContent}</div>
|
| 645 |
+
`;
|
| 646 |
+
|
| 647 |
+
return div;
|
| 648 |
+
}
|
| 649 |
+
|
| 650 |
+
formatMessage(content) {
|
| 651 |
+
// Escape HTML
|
| 652 |
+
let formatted = content
|
| 653 |
+
.replace(/&/g, '&')
|
| 654 |
+
.replace(/</g, '<')
|
| 655 |
+
.replace(/>/g, '>');
|
| 656 |
+
|
| 657 |
+
// Code blocks
|
| 658 |
+
formatted = formatted.replace(/
|
|
@@ -78,11 +78,15 @@ class SpectreNavbar extends HTMLElement {
|
|
| 78 |
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>
|
| 79 |
OSINT Hub
|
| 80 |
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
<a href="#" class="nav-link">
|
| 82 |
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>
|
| 83 |
Stealth
|
| 84 |
</a>
|
| 85 |
-
|
| 86 |
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
|
| 87 |
Config
|
| 88 |
</a>
|
|
|
|
| 78 |
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>
|
| 79 |
OSINT Hub
|
| 80 |
</a>
|
| 81 |
+
<a href="#" class="nav-link" onclick="document.querySelector('chat-assistant').toggle()">
|
| 82 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>
|
| 83 |
+
AI Assistant
|
| 84 |
+
</a>
|
| 85 |
<a href="#" class="nav-link">
|
| 86 |
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path></svg>
|
| 87 |
Stealth
|
| 88 |
</a>
|
| 89 |
+
<a href="#" class="nav-link">
|
| 90 |
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
|
| 91 |
Config
|
| 92 |
</a>
|
|
@@ -82,19 +82,22 @@ class SpectreSidebar extends HTMLElement {
|
|
| 82 |
<svg class="menu-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>
|
| 83 |
System Logs
|
| 84 |
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
<a href="#" class="menu-item">
|
| 86 |
<svg class="menu-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>
|
| 87 |
Notifications
|
| 88 |
</a>
|
| 89 |
-
|
| 90 |
<div class="stats-box">
|
| 91 |
-
<div class="stat-label">
|
| 92 |
-
<div class="stat-value text-
|
| 93 |
<div class="stat-indicator">
|
| 94 |
-
<
|
| 95 |
-
All Systems Optimal
|
| 96 |
</div>
|
| 97 |
-
|
| 98 |
`;
|
| 99 |
}
|
| 100 |
}
|
|
|
|
| 82 |
<svg class="menu-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>
|
| 83 |
System Logs
|
| 84 |
</a>
|
| 85 |
+
<a href="#" class="menu-item" onclick="document.querySelector('chat-assistant').toggle()">
|
| 86 |
+
<svg class="menu-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>
|
| 87 |
+
AI Assistant
|
| 88 |
+
</a>
|
| 89 |
<a href="#" class="menu-item">
|
| 90 |
<svg class="menu-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>
|
| 91 |
Notifications
|
| 92 |
</a>
|
| 93 |
+
</div>
|
| 94 |
<div class="stats-box">
|
| 95 |
+
<div class="stat-label">AI Assistant</div>
|
| 96 |
+
<div class="stat-value text-primary">READY</div>
|
| 97 |
<div class="stat-indicator">
|
| 98 |
+
<span style="font-size: 10px; color: #22c55e;">Press Ctrl+K</span>
|
|
|
|
| 99 |
</div>
|
| 100 |
+
</div>
|
| 101 |
`;
|
| 102 |
}
|
| 103 |
}
|
|
@@ -144,13 +144,15 @@
|
|
| 144 |
</div>
|
| 145 |
</main>
|
| 146 |
</div>
|
| 147 |
-
|
|
|
|
|
|
|
| 148 |
<!-- Web Components Scripts -->
|
| 149 |
<script src="components/navbar.js"></script>
|
| 150 |
<script src="components/sidebar.js"></script>
|
| 151 |
<script src="components/stealth-panel.js"></script>
|
| 152 |
-
|
| 153 |
-
|
| 154 |
<script src="script.js"></script>
|
| 155 |
<script>feather.replace();</script>
|
| 156 |
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
|
|
|
| 144 |
</div>
|
| 145 |
</main>
|
| 146 |
</div>
|
| 147 |
+
<!-- AI Chat Assistant -->
|
| 148 |
+
<chat-assistant></chat-assistant>
|
| 149 |
+
|
| 150 |
<!-- Web Components Scripts -->
|
| 151 |
<script src="components/navbar.js"></script>
|
| 152 |
<script src="components/sidebar.js"></script>
|
| 153 |
<script src="components/stealth-panel.js"></script>
|
| 154 |
+
<script src="components/chat-assistant.js"></script>
|
| 155 |
+
<!-- Main Logic -->
|
| 156 |
<script src="script.js"></script>
|
| 157 |
<script>feather.replace();</script>
|
| 158 |
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|