Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
375 changes: 375 additions & 0 deletions Components/ChatMessageList.razor

Large diffs are not rendered by default.

298 changes: 298 additions & 0 deletions Components/ChatMessageList.razor.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,298 @@
.chat-message-list {
display: flex;
flex-direction: column;
gap: 0.4rem;
}

.chat-empty {
color: rgba(255,255,255,0.3);
text-align: center;
margin: auto;
font-size: 0.95rem;
}

/* === Compact mode (dashboard cards) === */
.chat-message-list.compact .chat-msg {
display: flex;
gap: 0.5rem;
font-size: 0.95rem;
line-height: 1.4;
}

.chat-message-list.compact .chat-msg-role {
font-weight: 600;
flex-shrink: 0;
font-size: 0.8rem;
padding: 0.1rem 0.3rem;
border-radius: 3px;
align-self: flex-start;
}

.chat-message-list.compact .chat-msg.user .chat-msg-role {
background: rgba(59, 130, 246, 0.3);
color: #93c5fd;
}

.chat-message-list.compact .chat-msg.assistant .chat-msg-role {
background: rgba(72, 187, 120, 0.3);
color: #86efac;
}

.chat-message-list.compact .chat-msg-text {
color: rgba(255,255,255,0.8);
word-break: break-word;
}

.chat-message-list.compact .chat-msg-text.thinking {
color: rgba(255,255,255,0.4);
font-style: italic;
}

/* === Full mode (chat page) === */
.chat-message-list.full .chat-msg {
display: flex;
gap: 0.75rem;
flex-shrink: 0;
max-width: 100%;
padding: 0.75rem 1rem;
}

.chat-message-list.full .chat-msg.user {
justify-content: flex-end;
}

.chat-message-list.full .chat-msg.user .chat-msg-content {
background: rgba(59, 130, 246, 0.2);
border: 1px solid rgba(59, 130, 246, 0.3);
border-radius: 12px 12px 0 12px;
padding: 0.75rem 1rem;
max-width: 80%;
}

.chat-message-list.full .chat-msg.assistant .chat-msg-content {
background: rgba(72, 187, 120, 0.1);
border: 1px solid rgba(72, 187, 120, 0.2);
border-radius: 12px 12px 12px 0;
padding: 0.75rem 1rem;
max-width: 80%;
}

.chat-message-list.full .chat-msg-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}

.chat-message-list.full .chat-msg.user .chat-msg-avatar {
order: 1;
background: rgba(59, 130, 246, 0.3);
}

.chat-message-list.full .chat-msg.assistant .chat-msg-avatar {
background: rgba(72, 187, 120, 0.3);
}

.chat-message-list.full .chat-msg-text {
color: white;
word-break: break-word;
line-height: 1.6;
}

.chat-message-list.full .chat-msg-text.thinking {
color: rgba(255,255,255,0.4);
font-style: italic;
}

.chat-message-list.full .chat-msg-time {
font-size: 0.75rem;
color: rgba(255,255,255,0.3);
margin-top: 0.25rem;
}

.chat-message-list.full .chat-msg.system {
justify-content: center;
}

.chat-message-list.full .system-text {
font-size: 0.85rem;
color: rgba(255,255,255,0.4);
font-style: italic;
text-align: center;
padding: 0.5rem;
}

/* Shared tool/reasoning styles for full mode */
::deep .reasoning-block {
flex-shrink: 0;
margin: 0.25rem 1rem;
border-left: 2px solid rgba(168, 85, 247, 0.3);
padding-left: 0.75rem;
}

::deep .reasoning-header {
background: none;
border: none;
color: rgba(168, 85, 247, 0.7);
font-size: 0.85rem;
cursor: pointer;
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.25rem 0;
width: 100%;
}

::deep .reasoning-content {
font-size: 0.85rem;
color: rgba(255,255,255,0.5);
white-space: pre-wrap;
line-height: 1.5;
padding: 0.25rem 0;
}

::deep .reasoning-content.preview {
max-height: 4.5em;
overflow: hidden;
}

::deep .tool-card {
flex-shrink: 0;
margin: 0.25rem 1rem;
border-radius: 8px;
padding: 0.5rem 0.75rem;
font-size: 0.85rem;
border: 1px solid rgba(255,255,255,0.1);
background: rgba(255,255,255,0.03);
}

::deep .tool-card.running { border-color: rgba(251, 191, 36, 0.3); }
::deep .tool-card.success { border-color: rgba(72, 187, 120, 0.3); }
::deep .tool-card.error { border-color: rgba(248, 113, 113, 0.3); }

::deep .tool-header {
display: flex;
justify-content: space-between;
align-items: center;
}

::deep .tool-info { color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 0.35rem; }
::deep .tool-status { display: flex; align-items: center; gap: 0.35rem; color: rgba(255,255,255,0.5); }

::deep .tool-result-section {
margin-top: 0.5rem;
border-top: 1px solid rgba(255,255,255,0.05);
padding-top: 0.5rem;
}

::deep .tool-result-content {
font-size: 0.8rem;
color: rgba(255,255,255,0.5);
white-space: pre-wrap;
word-break: break-word;
max-height: 300px;
overflow-y: auto;
margin: 0;
}

::deep .tool-result-toggle {
background: none;
border: none;
color: rgba(59, 130, 246, 0.7);
font-size: 0.8rem;
cursor: pointer;
padding: 0;
}

::deep .tool-image-result img {
max-width: 100%;
max-height: 400px;
border-radius: 6px;
}

::deep .task-complete-card {
flex-shrink: 0;
display: flex;
align-items: center;
gap: 0.5rem;
margin: 0.25rem 1rem;
padding: 0.75rem 1rem;
background: rgba(72, 187, 120, 0.1);
border: 1px solid rgba(72, 187, 120, 0.3);
border-radius: 8px;
color: #86efac;
font-size: 0.95rem;
}

::deep .error-card {
flex-shrink: 0;
display: flex;
align-items: center;
gap: 0.5rem;
margin: 0.25rem 1rem;
padding: 0.5rem 0.75rem;
background: rgba(248, 113, 113, 0.1);
border: 1px solid rgba(248, 113, 113, 0.3);
border-radius: 8px;
color: #fca5a5;
font-size: 0.9rem;
}

::deep .markdown-body {
color: white;
}

::deep .markdown-body h1, ::deep .markdown-body h2, ::deep .markdown-body h3 {
margin: 0.5em 0 0.25em;
border: none;
color: white;
}

::deep .markdown-body code {
background: rgba(255,255,255,0.1);
padding: 0.15em 0.3em;
border-radius: 3px;
font-size: 0.9em;
}

::deep .markdown-body pre {
background: rgba(0,0,0,0.3);
padding: 0.75rem;
border-radius: 6px;
overflow-x: auto;
}

::deep .markdown-body pre code {
background: none;
padding: 0;
}

::deep .markdown-body a { color: #60a5fa; }
::deep .markdown-body blockquote {
border-left: 3px solid rgba(255,255,255,0.2);
margin: 0.5rem 0;
padding: 0 0.75rem;
color: rgba(255,255,255,0.6);
}

::deep .markdown-body ul, ::deep .markdown-body ol {
padding-left: 1.5rem;
margin: 0.25rem 0;
}

::deep .markdown-body table {
border-collapse: collapse;
width: 100%;
}

::deep .markdown-body th, ::deep .markdown-body td {
border: 1px solid rgba(255,255,255,0.15);
padding: 0.4rem 0.6rem;
text-align: left;
}

@keyframes spin { to { transform: rotate(360deg); } }
::deep .spin { animation: spin 1s linear infinite; }
7 changes: 7 additions & 0 deletions Components/Layout/SessionSidebar.razor
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,22 @@ else
}
else
{
var sessionIndex = 0;
@foreach (var session in sessions)
{
sessionIndex++;
var idx = sessionIndex;
var cssClass = session.Name == CopilotService.ActiveSessionName ? "active" :
completedSessions.Contains(session.Name) ? "completed" :
session.IsProcessing ? "busy" : "";
<div class="session-item @cssClass"
@onclick="() => SelectSession(session.Name)">
<div class="session-info">
<span class="session-name">
@if (idx <= 9)
{
<span class="shortcut-badge" title="⌘@idx">@idx</span>
}
@if (completedSessions.Contains(session.Name))
{
<span class="done-badge"><svg style="vertical-align:middle" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg></span>
Expand Down
15 changes: 15 additions & 0 deletions Components/Layout/SessionSidebar.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,21 @@
color: #fbbf24;
}

.shortcut-badge {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.2em;
height: 1.2em;
font-size: 0.7rem;
font-weight: 600;
background: rgba(255,255,255,0.12);
border: 1px solid rgba(255,255,255,0.2);
border-radius: 3px;
color: rgba(255,255,255,0.5);
flex-shrink: 0;
}

.session-meta {
font-size: 0.95rem;
color: rgba(255,255,255,0.5);
Expand Down
Loading