feat: add CLI Stream Viewer component for real-time output monitoring

- Implemented a new CLI Stream Viewer to display real-time output from CLI executions.
- Added state management for CLI executions, including handling of start, output, completion, and errors.
- Introduced UI rendering for stream tabs and content, with auto-scroll functionality.
- Integrated keyboard shortcuts for toggling the viewer and handling user interactions.

feat: create Issue Manager view for managing issues and execution queue

- Developed the Issue Manager view to manage issues, solutions, and execution queue.
- Implemented data loading functions for fetching issues and queue data from the API.
- Added filtering and rendering logic for issues and queue items, including drag-and-drop functionality.
- Created detail panel for viewing and editing issue details, including tasks and solutions.
This commit is contained in:
catlog22
2025-12-27 09:46:12 +08:00
parent cdf4833977
commit 0157e36344
23 changed files with 6843 additions and 1293 deletions

View File

@@ -0,0 +1,979 @@
/* ==========================================
ISSUE MANAGER STYLES
========================================== */
/* Issue Manager Container */
.issue-manager {
width: 100%;
}
.issue-manager.loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 300px;
color: hsl(var(--muted-foreground));
}
/* View Toggle (Issues/Queue) */
.issue-view-toggle {
display: inline-flex;
background: hsl(var(--muted));
border-radius: 0.5rem;
padding: 0.25rem;
gap: 0.25rem;
}
.issue-view-toggle button {
padding: 0.5rem 1rem;
border-radius: 0.375rem;
font-size: 0.875rem;
font-weight: 500;
color: hsl(var(--muted-foreground));
background: transparent;
border: none;
cursor: pointer;
transition: all 0.15s ease;
}
.issue-view-toggle button:hover {
color: hsl(var(--foreground));
}
.issue-view-toggle button.active {
background: hsl(var(--background));
color: hsl(var(--foreground));
box-shadow: 0 1px 2px hsl(var(--foreground) / 0.05);
}
/* Issues Grid */
.issues-section {
margin-bottom: 2rem;
width: 100%;
}
.issues-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 1rem;
width: 100%;
}
.issues-empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 160px;
}
/* Issue Card */
.issue-card {
position: relative;
transition: all 0.2s ease;
cursor: pointer;
}
.issue-card:hover {
border-color: hsl(var(--primary));
transform: translateY(-2px);
}
.issue-card-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 0.5rem;
}
.issue-card-id {
font-family: var(--font-mono);
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.issue-card-title {
font-weight: 600;
font-size: 0.9375rem;
line-height: 1.4;
margin-top: 0.25rem;
}
.issue-card-meta {
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 0.75rem;
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.issue-card-stats {
display: flex;
align-items: center;
gap: 1rem;
margin-top: 0.5rem;
}
.issue-card-stat {
display: flex;
align-items: center;
gap: 0.25rem;
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
/* Issue Status Badges */
.issue-status {
display: inline-flex;
align-items: center;
padding: 0.125rem 0.5rem;
border-radius: 9999px;
font-size: 0.6875rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.025em;
}
.issue-status.registered {
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
}
.issue-status.planned {
background: hsl(217 91% 60% / 0.15);
color: hsl(217 91% 60%);
}
.issue-status.queued {
background: hsl(262 83% 58% / 0.15);
color: hsl(262 83% 58%);
}
.issue-status.executing {
background: hsl(45 93% 47% / 0.15);
color: hsl(45 93% 47%);
}
.issue-status.completed {
background: hsl(var(--success) / 0.15);
color: hsl(var(--success));
}
.issue-status.failed {
background: hsl(var(--destructive) / 0.15);
color: hsl(var(--destructive));
}
/* Priority Badges */
.issue-priority {
display: inline-flex;
align-items: center;
padding: 0.125rem 0.375rem;
border-radius: 0.25rem;
font-size: 0.6875rem;
font-weight: 500;
}
.issue-priority.critical {
background: hsl(0 84% 60% / 0.15);
color: hsl(0 84% 60%);
}
.issue-priority.high {
background: hsl(25 95% 53% / 0.15);
color: hsl(25 95% 53%);
}
.issue-priority.medium {
background: hsl(45 93% 47% / 0.15);
color: hsl(45 93% 47%);
}
.issue-priority.low {
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
}
/* ==========================================
QUEUE VIEW STYLES
========================================== */
.queue-section {
width: 100%;
}
.queue-timeline {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.queue-empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 200px;
text-align: center;
}
/* Execution Group */
.queue-group {
border: 1px solid hsl(var(--border));
border-radius: 0.75rem;
overflow: hidden;
}
.queue-group-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.75rem 1rem;
background: hsl(var(--muted) / 0.5);
border-bottom: 1px solid hsl(var(--border));
}
.queue-group-title {
display: flex;
align-items: center;
gap: 0.5rem;
font-weight: 600;
font-size: 0.875rem;
}
.queue-group-badge {
display: inline-flex;
align-items: center;
padding: 0.125rem 0.5rem;
border-radius: 9999px;
font-size: 0.6875rem;
font-weight: 500;
}
.queue-group-badge.parallel {
background: hsl(142 71% 45% / 0.15);
color: hsl(142 71% 45%);
}
.queue-group-badge.sequential {
background: hsl(262 83% 58% / 0.15);
color: hsl(262 83% 58%);
}
.queue-group-count {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.queue-group-items {
padding: 0.75rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
min-height: 60px;
}
/* Parallel group items display horizontally */
.queue-group.parallel .queue-group-items {
flex-direction: row;
flex-wrap: wrap;
}
/* Queue Item */
.queue-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 1rem;
background: hsl(var(--background));
border: 1px solid hsl(var(--border));
border-radius: 0.5rem;
transition: all 0.15s ease;
}
.queue-item:hover {
border-color: hsl(var(--primary));
box-shadow: 0 2px 4px hsl(var(--foreground) / 0.05);
}
.queue-item[draggable="true"] {
cursor: grab;
}
.queue-item[draggable="true"]:active {
cursor: grabbing;
}
.queue-item-drag-handle {
display: flex;
align-items: center;
color: hsl(var(--muted-foreground));
cursor: grab;
}
.queue-item-drag-handle:active {
cursor: grabbing;
}
.queue-item-order {
font-family: var(--font-mono);
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
min-width: 2.5rem;
}
.queue-item-content {
flex: 1;
min-width: 0;
}
.queue-item-id {
font-family: var(--font-mono);
font-size: 0.6875rem;
color: hsl(var(--muted-foreground));
}
.queue-item-title {
font-size: 0.875rem;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.queue-item-issue {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.queue-item-priority {
font-family: var(--font-mono);
font-size: 0.6875rem;
padding: 0.125rem 0.375rem;
background: hsl(var(--muted));
border-radius: 0.25rem;
color: hsl(var(--muted-foreground));
}
/* Queue Item Status */
.queue-item-status {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.125rem 0.5rem;
border-radius: 9999px;
font-size: 0.6875rem;
font-weight: 500;
}
.queue-item-status.pending {
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
}
.queue-item-status.running {
background: hsl(217 91% 60% / 0.15);
color: hsl(217 91% 60%);
}
.queue-item-status.completed {
background: hsl(var(--success) / 0.15);
color: hsl(var(--success));
}
.queue-item-status.failed {
background: hsl(var(--destructive) / 0.15);
color: hsl(var(--destructive));
}
/* Drag and Drop States */
.queue-item.dragging {
opacity: 0.5;
border: 2px dashed hsl(var(--primary));
}
.queue-item.drag-over {
border-color: hsl(var(--primary));
background: hsl(var(--primary) / 0.05);
}
.queue-group-items.drag-over {
background: hsl(var(--primary) / 0.03);
}
/* Arrow connector between sequential items */
.queue-group.sequential .queue-item:not(:last-child)::after {
content: '';
display: block;
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 8px solid hsl(var(--muted-foreground) / 0.3);
position: absolute;
bottom: -12px;
left: 50%;
transform: translateX(-50%);
}
.queue-group.sequential .queue-item {
position: relative;
}
/* ==========================================
ISSUE DETAIL PANEL
========================================== */
.issue-detail-overlay {
position: fixed;
inset: 0;
background: hsl(var(--foreground) / 0.4);
z-index: 999;
animation: fadeIn 0.15s ease-out;
}
.issue-detail-panel {
position: fixed;
top: 0;
right: 0;
width: 560px;
max-width: 100%;
height: 100vh;
background: hsl(var(--background));
border-left: 1px solid hsl(var(--border));
z-index: 1000;
display: flex;
flex-direction: column;
animation: slideInPanel 0.2s ease-out;
}
@keyframes slideInPanel {
from {
opacity: 0;
transform: translateX(100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.issue-detail-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 1.25rem 1.5rem;
border-bottom: 1px solid hsl(var(--border));
}
.issue-detail-header-content {
flex: 1;
min-width: 0;
}
.issue-detail-id {
font-family: var(--font-mono);
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.issue-detail-title {
font-size: 1.125rem;
font-weight: 600;
margin-top: 0.25rem;
line-height: 1.4;
}
.issue-detail-title.editable {
cursor: text;
padding: 0.25rem 0.5rem;
margin: 0.25rem -0.5rem 0;
border-radius: 0.375rem;
border: 1px solid transparent;
}
.issue-detail-title.editable:hover {
background: hsl(var(--muted) / 0.5);
}
.issue-detail-title.editable:focus {
outline: none;
border-color: hsl(var(--primary));
background: hsl(var(--background));
}
.issue-detail-close {
display: flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
border-radius: 0.375rem;
border: none;
background: transparent;
cursor: pointer;
color: hsl(var(--muted-foreground));
transition: all 0.15s ease;
}
.issue-detail-close:hover {
background: hsl(var(--muted));
color: hsl(var(--foreground));
}
.issue-detail-body {
flex: 1;
overflow-y: auto;
padding: 1.5rem;
}
.issue-detail-section {
margin-bottom: 1.5rem;
}
.issue-detail-section-title {
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: hsl(var(--muted-foreground));
margin-bottom: 0.75rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.issue-detail-section-title button {
padding: 0.25rem;
border-radius: 0.25rem;
border: none;
background: transparent;
cursor: pointer;
color: hsl(var(--muted-foreground));
transition: all 0.15s ease;
}
.issue-detail-section-title button:hover {
background: hsl(var(--muted));
color: hsl(var(--foreground));
}
/* Context / Description */
.issue-detail-context {
font-size: 0.875rem;
line-height: 1.6;
color: hsl(var(--foreground));
white-space: pre-wrap;
}
.issue-detail-context.editable {
padding: 0.75rem;
background: hsl(var(--muted) / 0.3);
border-radius: 0.5rem;
border: 1px solid transparent;
cursor: text;
min-height: 100px;
}
.issue-detail-context.editable:hover {
border-color: hsl(var(--border));
}
.issue-detail-context.editable:focus {
outline: none;
border-color: hsl(var(--primary));
background: hsl(var(--background));
}
/* Solutions List */
.solution-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.solution-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 1rem;
background: hsl(var(--muted) / 0.3);
border: 1px solid hsl(var(--border));
border-radius: 0.5rem;
cursor: pointer;
transition: all 0.15s ease;
}
.solution-item:hover {
border-color: hsl(var(--primary));
}
.solution-item.bound {
border-color: hsl(var(--success));
background: hsl(var(--success) / 0.05);
}
.solution-item-icon {
display: flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
border-radius: 0.375rem;
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
}
.solution-item.bound .solution-item-icon {
background: hsl(var(--success) / 0.15);
color: hsl(var(--success));
}
.solution-item-content {
flex: 1;
min-width: 0;
}
.solution-item-name {
font-size: 0.875rem;
font-weight: 500;
}
.solution-item-meta {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
/* Task List */
.task-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.task-item {
padding: 0.75rem 1rem;
background: hsl(var(--muted) / 0.3);
border: 1px solid hsl(var(--border));
border-radius: 0.5rem;
transition: all 0.15s ease;
}
.task-item:hover {
border-color: hsl(var(--primary) / 0.5);
}
.task-item-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
}
.task-item-id {
font-family: var(--font-mono);
font-size: 0.6875rem;
color: hsl(var(--muted-foreground));
}
.task-item-title {
font-size: 0.875rem;
font-weight: 500;
margin-top: 0.25rem;
}
.task-item-scope {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
font-family: var(--font-mono);
}
.task-item-actions {
display: flex;
align-items: center;
gap: 0.5rem;
}
/* Task Action Badge (Create, Update, etc) */
.task-action-badge {
display: inline-flex;
align-items: center;
padding: 0.125rem 0.375rem;
border-radius: 0.25rem;
font-size: 0.6875rem;
font-weight: 500;
}
.task-action-badge.create {
background: hsl(142 71% 45% / 0.15);
color: hsl(142 71% 45%);
}
.task-action-badge.update {
background: hsl(217 91% 60% / 0.15);
color: hsl(217 91% 60%);
}
.task-action-badge.implement {
background: hsl(262 83% 58% / 0.15);
color: hsl(262 83% 58%);
}
.task-action-badge.configure {
background: hsl(45 93% 47% / 0.15);
color: hsl(45 93% 47%);
}
.task-action-badge.refactor {
background: hsl(25 95% 53% / 0.15);
color: hsl(25 95% 53%);
}
.task-action-badge.test {
background: hsl(199 89% 48% / 0.15);
color: hsl(199 89% 48%);
}
.task-action-badge.delete {
background: hsl(var(--destructive) / 0.15);
color: hsl(var(--destructive));
}
/* Task Status Dropdown */
.task-status-select {
font-size: 0.6875rem;
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
border: 1px solid hsl(var(--border));
background: hsl(var(--background));
cursor: pointer;
}
.task-status-select:focus {
outline: none;
border-color: hsl(var(--primary));
}
/* Modification Points */
.modification-points {
margin-top: 0.5rem;
padding-top: 0.5rem;
border-top: 1px solid hsl(var(--border) / 0.5);
}
.modification-point {
display: flex;
align-items: flex-start;
gap: 0.5rem;
font-size: 0.75rem;
padding: 0.25rem 0;
}
.modification-point-file {
font-family: var(--font-mono);
color: hsl(var(--primary));
}
.modification-point-change {
color: hsl(var(--muted-foreground));
}
/* Implementation Steps */
.implementation-steps {
margin-top: 0.5rem;
padding-left: 1rem;
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.implementation-steps li {
margin: 0.25rem 0;
}
/* Acceptance Criteria */
.acceptance-criteria {
margin-top: 0.5rem;
padding-left: 1rem;
font-size: 0.75rem;
}
.acceptance-criteria li {
margin: 0.25rem 0;
color: hsl(var(--success));
}
/* ==========================================
CONFLICTS SECTION
========================================== */
.conflicts-section {
margin-top: 1.5rem;
}
.conflict-item {
display: flex;
align-items: flex-start;
gap: 0.75rem;
padding: 0.75rem 1rem;
background: hsl(45 93% 47% / 0.1);
border: 1px solid hsl(45 93% 47% / 0.3);
border-radius: 0.5rem;
margin-bottom: 0.5rem;
}
.conflict-item.resolved {
background: hsl(var(--success) / 0.05);
border-color: hsl(var(--success) / 0.3);
}
.conflict-icon {
display: flex;
align-items: center;
justify-content: center;
width: 1.5rem;
height: 1.5rem;
border-radius: 9999px;
background: hsl(45 93% 47% / 0.2);
color: hsl(45 93% 47%);
}
.conflict-item.resolved .conflict-icon {
background: hsl(var(--success) / 0.2);
color: hsl(var(--success));
}
.conflict-content {
flex: 1;
min-width: 0;
}
.conflict-file {
font-family: var(--font-mono);
font-size: 0.8125rem;
font-weight: 500;
}
.conflict-tasks {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
margin-top: 0.25rem;
}
.conflict-resolution {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
margin-top: 0.25rem;
}
/* ==========================================
FILTER BAR
========================================== */
.issue-filter-bar {
display: flex;
align-items: center;
gap: 0.75rem;
flex-wrap: wrap;
}
.issue-filter-group {
display: flex;
align-items: center;
gap: 0.25rem;
}
.issue-filter-group label {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.issue-filter-select {
font-size: 0.8125rem;
padding: 0.375rem 0.75rem;
border-radius: 0.375rem;
border: 1px solid hsl(var(--border));
background: hsl(var(--background));
cursor: pointer;
}
.issue-filter-select:focus {
outline: none;
border-color: hsl(var(--primary));
}
/* ==========================================
RESPONSIVE ADJUSTMENTS
========================================== */
@media (max-width: 768px) {
.issues-grid {
grid-template-columns: 1fr;
}
.issue-detail-panel {
width: 100%;
}
.queue-group.parallel .queue-group-items {
flex-direction: column;
}
.issue-filter-bar {
flex-direction: column;
align-items: stretch;
}
}
@media (max-width: 480px) {
.issue-view-toggle {
width: 100%;
}
.issue-view-toggle button {
flex: 1;
text-align: center;
}
.queue-item {
flex-wrap: wrap;
}
.queue-item-content {
width: 100%;
}
}
/* ==========================================
ANIMATIONS
========================================== */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.animate-pulse {
animation: pulse 2s ease-in-out infinite;
}
/* Line clamp utility */
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* Badge styles */
.issue-card .badge,
.queue-item .badge {
font-size: 0.75rem;
font-weight: 500;
}

View File

@@ -0,0 +1,467 @@
/**
* CLI Stream Viewer Styles
* Right-side popup panel for viewing CLI streaming output
*/
/* ===== Overlay ===== */
.cli-stream-overlay {
position: fixed;
inset: 0;
background: rgb(0 0 0 / 0.3);
z-index: 1050;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
.cli-stream-overlay.open {
opacity: 1;
visibility: visible;
}
/* ===== Main Panel ===== */
.cli-stream-viewer {
position: fixed;
top: 60px;
right: 16px;
width: 650px;
max-width: calc(100vw - 32px);
max-height: calc(100vh - 80px);
background: hsl(var(--card));
border: 1px solid hsl(var(--border));
border-radius: 8px;
box-shadow: 0 8px 32px rgb(0 0 0 / 0.2);
z-index: 1100;
display: flex;
flex-direction: column;
transform: translateX(calc(100% + 20px));
opacity: 0;
visibility: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cli-stream-viewer.open {
transform: translateX(0);
opacity: 1;
visibility: visible;
}
/* ===== Header ===== */
.cli-stream-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
border-bottom: 1px solid hsl(var(--border));
background: hsl(var(--muted) / 0.3);
}
.cli-stream-title {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.875rem;
font-weight: 600;
color: hsl(var(--foreground));
}
.cli-stream-title svg,
.cli-stream-title i {
width: 18px;
height: 18px;
color: hsl(var(--primary));
}
.cli-stream-count-badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 20px;
height: 20px;
padding: 0 6px;
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
border-radius: 10px;
font-size: 0.6875rem;
font-weight: 600;
}
.cli-stream-count-badge.has-running {
background: hsl(var(--warning));
color: hsl(var(--warning-foreground, white));
}
.cli-stream-actions {
display: flex;
align-items: center;
gap: 8px;
}
.cli-stream-action-btn {
display: flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
background: transparent;
border: 1px solid hsl(var(--border));
border-radius: 4px;
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
cursor: pointer;
transition: all 0.15s;
}
.cli-stream-action-btn:hover {
background: hsl(var(--hover));
color: hsl(var(--foreground));
}
.cli-stream-close-btn {
display: flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
padding: 0;
background: transparent;
border: none;
border-radius: 4px;
font-size: 1.25rem;
color: hsl(var(--muted-foreground));
cursor: pointer;
transition: all 0.15s;
}
.cli-stream-close-btn:hover {
background: hsl(var(--destructive) / 0.1);
color: hsl(var(--destructive));
}
/* ===== Tab Bar ===== */
.cli-stream-tabs {
display: flex;
gap: 2px;
padding: 8px 12px;
border-bottom: 1px solid hsl(var(--border));
background: hsl(var(--muted) / 0.2);
overflow-x: auto;
scrollbar-width: thin;
}
.cli-stream-tabs::-webkit-scrollbar {
height: 4px;
}
.cli-stream-tabs::-webkit-scrollbar-thumb {
background: hsl(var(--border));
border-radius: 2px;
}
.cli-stream-tab {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
background: transparent;
border: 1px solid transparent;
border-radius: 6px;
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
cursor: pointer;
white-space: nowrap;
transition: all 0.15s;
}
.cli-stream-tab:hover {
background: hsl(var(--hover));
color: hsl(var(--foreground));
}
.cli-stream-tab.active {
background: hsl(var(--card));
border-color: hsl(var(--primary));
color: hsl(var(--foreground));
box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
}
.cli-stream-tab-status {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.cli-stream-tab-status.running {
background: hsl(var(--warning));
animation: streamStatusPulse 1.5s ease-in-out infinite;
}
.cli-stream-tab-status.completed {
background: hsl(var(--success));
}
.cli-stream-tab-status.error {
background: hsl(var(--destructive));
}
@keyframes streamStatusPulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.6; transform: scale(1.2); }
}
.cli-stream-tab-tool {
font-weight: 500;
text-transform: capitalize;
}
.cli-stream-tab-mode {
font-size: 0.625rem;
padding: 1px 4px;
background: hsl(var(--muted));
border-radius: 3px;
color: hsl(var(--muted-foreground));
}
.cli-stream-tab-close {
display: flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
margin-left: 4px;
background: transparent;
border: none;
border-radius: 50%;
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
cursor: pointer;
opacity: 0;
transition: all 0.15s;
}
.cli-stream-tab:hover .cli-stream-tab-close {
opacity: 1;
}
.cli-stream-tab-close:hover {
background: hsl(var(--destructive) / 0.2);
color: hsl(var(--destructive));
}
.cli-stream-tab-close.disabled {
cursor: not-allowed;
opacity: 0.3 !important;
}
/* ===== Empty State ===== */
.cli-stream-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 48px 24px;
color: hsl(var(--muted-foreground));
text-align: center;
}
.cli-stream-empty svg,
.cli-stream-empty i {
width: 48px;
height: 48px;
margin-bottom: 16px;
opacity: 0.5;
}
.cli-stream-empty-title {
font-size: 0.875rem;
font-weight: 500;
margin-bottom: 4px;
}
.cli-stream-empty-hint {
font-size: 0.75rem;
opacity: 0.7;
}
/* ===== Terminal Content ===== */
.cli-stream-content {
flex: 1;
min-height: 300px;
max-height: 500px;
overflow-y: auto;
padding: 12px 16px;
background: hsl(220 13% 8%);
font-family: var(--font-mono, 'Consolas', 'Monaco', 'Courier New', monospace);
font-size: 0.75rem;
line-height: 1.6;
scrollbar-width: thin;
}
.cli-stream-content::-webkit-scrollbar {
width: 8px;
}
.cli-stream-content::-webkit-scrollbar-track {
background: transparent;
}
.cli-stream-content::-webkit-scrollbar-thumb {
background: hsl(0 0% 40%);
border-radius: 4px;
}
.cli-stream-line {
white-space: pre-wrap;
word-break: break-all;
margin: 0;
padding: 0;
}
.cli-stream-line.stdout {
color: hsl(0 0% 85%);
}
.cli-stream-line.stderr {
color: hsl(8 75% 65%);
}
.cli-stream-line.system {
color: hsl(210 80% 65%);
font-style: italic;
}
.cli-stream-line.info {
color: hsl(200 80% 70%);
}
/* Auto-scroll indicator */
.cli-stream-scroll-btn {
position: sticky;
bottom: 8px;
left: 50%;
transform: translateX(-50%);
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 12px;
background: hsl(var(--primary));
color: white;
border: none;
border-radius: 12px;
font-size: 0.625rem;
cursor: pointer;
opacity: 0;
transition: opacity 0.2s;
}
.cli-stream-content.has-new-content .cli-stream-scroll-btn {
opacity: 1;
}
/* ===== Status Bar ===== */
.cli-stream-status {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 16px;
border-top: 1px solid hsl(var(--border));
background: hsl(var(--muted) / 0.3);
font-size: 0.6875rem;
color: hsl(var(--muted-foreground));
}
.cli-stream-status-info {
display: flex;
align-items: center;
gap: 12px;
}
.cli-stream-status-item {
display: flex;
align-items: center;
gap: 4px;
}
.cli-stream-status-item svg,
.cli-stream-status-item i {
width: 12px;
height: 12px;
}
.cli-stream-status-actions {
display: flex;
align-items: center;
gap: 8px;
}
.cli-stream-toggle-btn {
display: flex;
align-items: center;
gap: 4px;
padding: 2px 8px;
background: transparent;
border: 1px solid hsl(var(--border));
border-radius: 3px;
font-size: 0.625rem;
color: hsl(var(--muted-foreground));
cursor: pointer;
transition: all 0.15s;
}
.cli-stream-toggle-btn:hover {
background: hsl(var(--hover));
}
.cli-stream-toggle-btn.active {
background: hsl(var(--primary) / 0.1);
border-color: hsl(var(--primary));
color: hsl(var(--primary));
}
/* ===== Header Button & Badge ===== */
.cli-stream-btn {
position: relative;
}
.cli-stream-badge {
position: absolute;
top: -2px;
right: -2px;
min-width: 14px;
height: 14px;
padding: 0 4px;
background: hsl(var(--warning));
color: white;
border-radius: 7px;
font-size: 0.5625rem;
font-weight: 600;
display: none;
align-items: center;
justify-content: center;
}
.cli-stream-badge.has-running {
display: flex;
animation: streamBadgePulse 1.5s ease-in-out infinite;
}
@keyframes streamBadgePulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.15); }
}
/* ===== Responsive ===== */
@media (max-width: 768px) {
.cli-stream-viewer {
top: 56px;
right: 8px;
left: 8px;
width: auto;
max-height: calc(100vh - 72px);
}
.cli-stream-content {
min-height: 200px;
max-height: 350px;
}
}