Spaces:
Configuration error
Configuration error
File size: 1,606 Bytes
3132285 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | class AIAssistant extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
.assistant-container {
background-color: #f8fafc;
border-radius: 0.5rem;
padding: 1rem;
margin-bottom: 1rem;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.assistant-header {
display: flex;
align-items: center;
margin-bottom: 0.5rem;
}
.assistant-avatar {
width: 2rem;
height: 2rem;
border-radius: 50%;
background-color: #6366f1;
display: flex;
align-items: center;
justify-content: center;
margin-right: 0.5rem;
color: white;
}
.assistant-name {
font-weight: 600;
color: #1e293b;
}
.assistant-status {
font-size: 0.75rem;
color: #64748b;
margin-left: auto;
}
.assistant-message {
font-size: 0.875rem;
color: #334155;
line-height: 1.5;
}
</style>
<div class="assistant-container">
<div class="assistant-header">
<div class="assistant-avatar">
<i data-feather="cpu"></i>
</div>
<span class="assistant-name">Rosalinda</span>
<span class="assistant-status">Online</span>
</div>
<div class="assistant-message">
<slot></slot>
</div>
</div>
`;
}
}
customElements.define('ai-assistant', AIAssistant); |