HTML
HTML
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CheckIn AI - Your Intelligent Assistant</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?
family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--checkin-green: #10a37f;
--checkin-dark: #343541;
--checkin-light: #444654;
}
body {
font-family: 'Inter', sans-serif;
background-color: #ffffff;
color: #000000;
}
.sidebar {
background-color: #202123;
}
.chat-container {
height: calc(100vh - 140px);
}
.message-user {
background-color: #ffffff;
}
.message-assistant {
background-color: #f7f7f8;
}
.typing-indicator span {
display: inline-block;
width: 8px;
height: 8px;
background-color: var(--checkin-green);
border-radius: 50%;
margin: 0 2px;
animation: typingAnimation 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) {
animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes typingAnimation {
0%, 60%, 100% { transform: translateY(0); }
30% { transform: translateY(-5px); }
}
.model-selector:after {
content: "?";
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
color: #666;
pointer-events: none;
}
.markdown pre {
background-color: #f6f8fa;
border-radius: 6px;
padding: 16px;
margin: 1em 0;
overflow-x: auto;
}
.markdown code {
background-color: rgba(175,184,193,0.2);
border-radius: 6px;
padding: 0.2em 0.4em;
font-family: ui-monospace,SFMono-Regular,SF
Mono,Menlo,Consolas,Liberation Mono,monospace;
font-size: 85%;
}
.markdown ol {
list-style-type: decimal;
}
.markdown ul {
list-style-type: disc;
}
.markdown h1 {
font-size: 1.5em;
border-bottom: 1px solid #eaecef;
padding-bottom: 0.3em;
}
.markdown h2 {
font-size: 1.25em;
border-bottom: 1px solid #eaecef;
padding-bottom: 0.3em;
}
.markdown h3 {
font-size: 1.1em;
}
.markdown blockquote {
border-left: 4px solid var(--checkin-green);
padding-left: 1em;
margin: 1em 0;
color: #666;
}
.markdown table {
border-collapse: collapse;
width: 100%;
margin: 1em 0;
}
.markdown th {
background-color: #f2f2f2;
}
</style>
</head>
<body class="h-screen flex">
<!-- Sidebar -->
<div class="sidebar w-64 h-full text-white fixed hidden md:flex flex-col">
<div class="p-4">
<button id="new-chat" class="w-full border border-gray-600 rounded-md
py-2 px-3 flex items-center hover:bg-gray-700 transition-colors">
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-2"
fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-
width="2" d="M12 4v16m8-8H4" />
</svg>
New chat
</button>
</div>
<script>
// DOM Elements
const sidebarToggle = document.getElementById('sidebar-toggle');
const sidebar = document.querySelector('.sidebar');
const newChatBtn = document.getElementById('new-chat');
const messageInput = document.getElementById('message-input');
const sendButton = document.getElementById('send-button');
const chatMessages = document.getElementById('chat-messages');
// Sample responses (in a real app, these would come from an API)
const sampleResponses = {
"hello": "Hello! I'm CheckIn AI, your intelligent assistant. How can I
help you today?",
"explain quantum computing": "Quantum computing is a type of
computation that harnesses the collective properties of quantum states, such as
superposition, interference, and entanglement, to perform calculations. Unlike
classical computers that use bits (0s or 1s), quantum computers use quantum bits or
qubits which can exist in multiple states at once.<br><br>Key concepts:<br>1.
**Superposition**: Qubits can be in a state of 0, 1, or any quantum superposition
of these states<br>2. **Entanglement**: Qubits can be correlated with each other
such that the state of one qubit depends on the state of another<br>3. **Quantum
interference**: The ability to manipulate the probability amplitudes of quantum
states to reinforce correct computations and cancel out wrong ones",
"write a python script for web scraping": "Here's a basic Python script
using BeautifulSoup for web scraping:<br><br>