feat(chat): added chat interface and connection to ollama (#10)
All checks were successful
CI / Format (push) Successful in 2s
CI / Clippy (push) Successful in 2m13s
CI / Security Audit (push) Successful in 1m37s
CI / Tests (push) Successful in 2m52s
CI / Deploy (push) Successful in 2s

Co-authored-by: Sharang Parnerkar <parnerkarsharang@gmail.com>
Reviewed-on: #10
This commit was merged in pull request #10.
This commit is contained in:
2026-02-20 19:40:25 +00:00
parent 4acb4558b7
commit 50237f5377
28 changed files with 3148 additions and 196 deletions

View File

@@ -215,6 +215,31 @@ h6 {
color: var(--accent);
}
.sidebar-legal {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
margin-top: 4px;
}
.legal-link {
font-size: 11px;
color: var(--text-dimmest);
text-decoration: none;
transition: color 0.15s ease;
}
.legal-link:hover {
color: var(--text-secondary);
}
.legal-sep {
font-size: 10px;
color: var(--text-dimmest);
opacity: 0.5;
}
.sidebar-version {
font-size: 11px;
color: var(--text-dimmest);
@@ -1884,6 +1909,44 @@ h6 {
color: var(--accent);
}
/* -- Chat Action Bar -- */
.chat-action-bar {
display: flex;
align-items: center;
gap: 4px;
padding: 4px 24px 0;
background-color: var(--bg-sidebar);
}
.chat-action-btn {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 4px 10px;
background: none;
border: 1px solid transparent;
border-radius: 6px;
color: var(--text-secondary);
font-size: 12px;
cursor: pointer;
transition: all 0.15s ease;
}
.chat-action-btn:hover:not(:disabled) {
color: var(--text-primary);
background-color: var(--bg-card);
border-color: var(--border-secondary);
}
.chat-action-btn:disabled {
opacity: 0.35;
cursor: not-allowed;
}
.chat-action-label {
font-family: 'Inter', sans-serif;
}
/* -- Chat Input Bar -- */
.chat-input-bar {
display: flex;
@@ -1918,6 +1981,289 @@ h6 {
padding: 10px 20px;
}
/* -- Chat Model Selector Bar -- */
.chat-model-bar {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 24px;
border-bottom: 1px solid var(--border-primary);
background-color: var(--bg-sidebar);
}
.chat-model-label {
font-size: 13px;
font-weight: 500;
color: var(--text-secondary);
}
.chat-model-select {
padding: 6px 12px;
background-color: var(--bg-card);
border: 1px solid var(--border-secondary);
border-radius: 6px;
color: var(--text-primary);
font-size: 13px;
font-family: 'Inter', sans-serif;
outline: none;
cursor: pointer;
min-width: 160px;
}
.chat-model-select:focus {
border-color: var(--accent);
}
/* -- Chat Namespace Headers -- */
.chat-namespace-header {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-faint);
padding: 12px 12px 4px;
}
/* -- Chat Session Item Layout -- */
.chat-session-item {
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
}
.chat-session-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
}
.chat-session-title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-session-actions {
display: none;
gap: 4px;
flex-shrink: 0;
}
.chat-session-item:hover .chat-session-actions {
display: flex;
}
.btn-icon-sm {
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
background: none;
border: none;
border-radius: 4px;
cursor: pointer;
color: var(--text-faint);
transition: all 0.15s ease;
padding: 0;
}
.btn-icon-sm:hover {
background-color: var(--bg-surface);
color: var(--text-primary);
}
.btn-icon-danger:hover {
color: #ef4444;
}
/* -- Inline Rename -- */
.chat-session-rename-input {
width: 100%;
padding: 8px 10px;
background-color: var(--bg-card);
border: 1px solid var(--accent);
border-radius: 6px;
color: var(--text-primary);
font-size: 13px;
font-family: 'Inter', sans-serif;
outline: none;
}
/* -- Chat Message List -- */
.chat-message-list {
flex: 1;
overflow-y: auto;
padding: 24px 32px;
display: flex;
flex-direction: column;
gap: 16px;
}
/* -- Chat Empty Hint -- */
.chat-empty-hint {
font-size: 13px;
color: var(--text-faint);
padding: 8px 12px;
}
/* -- Thinking Indicator -- */
.chat-bubble--thinking {
background-color: transparent;
border: none;
padding: 8px 0;
}
.chat-thinking {
display: flex;
align-items: center;
gap: 10px;
color: var(--text-faint);
font-size: 14px;
}
.chat-thinking-text {
opacity: 0.7;
}
.chat-thinking-dots {
display: flex;
gap: 4px;
}
.chat-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background-color: var(--accent);
animation: dot-pulse 1.4s ease-in-out infinite;
}
.chat-dot:nth-child(2) {
animation-delay: 0.2s;
}
.chat-dot:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes dot-pulse {
0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
40% { opacity: 1; transform: scale(1); }
}
/* -- Streaming Bubble -- */
.chat-bubble--streaming {
border: 1px solid var(--accent);
border-style: dashed;
}
.chat-streaming-cursor {
display: inline-block;
width: 8px;
height: 16px;
background-color: var(--accent);
margin-left: 2px;
animation: blink-cursor 1s steps(2) infinite;
vertical-align: text-bottom;
}
@keyframes blink-cursor {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
/* -- Chat Prose (Markdown in Assistant Bubbles) -- */
.chat-prose {
white-space: normal;
}
.chat-prose p {
margin: 0 0 12px;
}
.chat-prose p:last-child {
margin-bottom: 0;
}
.chat-prose pre {
background-color: rgba(0, 0, 0, 0.3);
border-radius: 8px;
padding: 12px 16px;
overflow-x: auto;
margin: 8px 0;
font-size: 13px;
line-height: 1.5;
}
.chat-prose code {
font-family: 'JetBrains Mono', 'Fira Code', monospace;
font-size: 13px;
}
.chat-prose :not(pre) > code {
background-color: rgba(145, 164, 210, 0.15);
padding: 2px 6px;
border-radius: 4px;
font-size: 12px;
}
.chat-prose ul,
.chat-prose ol {
padding-left: 20px;
margin: 8px 0;
}
.chat-prose li {
margin-bottom: 4px;
}
.chat-prose blockquote {
border-left: 3px solid var(--accent);
padding-left: 12px;
color: var(--text-secondary);
margin: 8px 0;
font-style: italic;
}
.chat-prose table {
width: 100%;
border-collapse: collapse;
margin: 8px 0;
font-size: 13px;
}
.chat-prose th,
.chat-prose td {
border: 1px solid var(--border-secondary);
padding: 8px;
text-align: left;
}
.chat-prose th {
background-color: rgba(145, 164, 210, 0.1);
font-weight: 600;
}
.chat-prose a {
color: var(--accent);
text-decoration: underline;
}
.chat-prose h1,
.chat-prose h2,
.chat-prose h3 {
font-family: 'Space Grotesk', sans-serif;
margin: 16px 0 8px;
color: var(--text-heading);
}
.chat-prose h1 { font-size: 20px; }
.chat-prose h2 { font-size: 17px; }
.chat-prose h3 { font-size: 15px; }
/* ===== Tools Page ===== */
.tools-page {
max-width: 1200px;