feat: Enhance CLI tools and history management

- Added CLI Manager and CLI History views to the navigation.
- Implemented rendering for CLI tools with detailed status and actions.
- Introduced a new CLI History view to display execution history with search and filter capabilities.
- Added hooks for managing and displaying available SKILLs in the Hook Manager.
- Created modals for Hook Wizards and Template View for better user interaction.
- Implemented semantic search dependency checks and installation functions in CodexLens.
- Updated dashboard layout to accommodate new features and improve user experience.
This commit is contained in:
catlog22
2025-12-12 16:26:49 +08:00
parent a393601ec5
commit dfa8dbc52a
13 changed files with 2081 additions and 2161 deletions

View File

@@ -3,6 +3,559 @@
* Unified font: system-ui for UI, monospace for code
* ======================================== */
/* ========================================
* Status Manager - Two Column Layout
* ======================================== */
.status-manager {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.status-two-column {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.5rem;
align-items: start;
}
@media (max-width: 1024px) {
.status-two-column {
grid-template-columns: 1fr;
}
}
/* Section Container */
.status-section {
background: hsl(var(--card));
border: 1px solid hsl(var(--border));
border-radius: 0.75rem;
overflow: hidden;
}
/* Section Header */
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.875rem 1rem;
border-bottom: 1px solid hsl(var(--border));
background: hsl(var(--muted) / 0.3);
}
.section-header-left {
display: flex;
align-items: center;
gap: 0.75rem;
}
.section-header h3 {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.875rem;
font-weight: 600;
color: hsl(var(--foreground));
margin: 0;
}
.section-header h3 i {
color: hsl(var(--muted-foreground));
}
.section-count {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.section-header-actions {
display: flex;
align-items: center;
gap: 0.25rem;
}
/* Tools List */
.tools-list {
padding: 0.5rem;
}
.tool-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.75rem;
border-radius: 0.5rem;
margin-bottom: 0.375rem;
transition: all 0.15s ease;
}
.tool-item:last-child {
margin-bottom: 0;
}
.tool-item:hover {
background: hsl(var(--hover));
}
.tool-item.available {
border-left: 3px solid hsl(var(--success));
}
.tool-item.unavailable {
border-left: 3px solid hsl(var(--muted-foreground) / 0.3);
opacity: 0.7;
}
.tool-item-left {
display: flex;
align-items: center;
gap: 0.75rem;
}
.tool-status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.tool-status-dot.status-available {
background: hsl(var(--success));
box-shadow: 0 0 6px hsl(var(--success) / 0.5);
}
.tool-status-dot.status-unavailable {
background: hsl(var(--muted-foreground) / 0.4);
}
.tool-item-info {
display: flex;
flex-direction: column;
gap: 0.125rem;
}
.tool-item-name {
font-size: 0.8125rem;
font-weight: 600;
color: hsl(var(--foreground));
display: flex;
align-items: center;
gap: 0.5rem;
}
.tool-item-desc {
font-size: 0.6875rem;
color: hsl(var(--muted-foreground));
}
.tool-default-badge {
font-size: 0.5625rem;
font-weight: 600;
padding: 0.125rem 0.375rem;
background: hsl(var(--primary));
color: hsl(var(--primary-foreground));
border-radius: 9999px;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.tool-type-badge {
font-size: 0.5625rem;
font-weight: 500;
padding: 0.125rem 0.375rem;
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
border-radius: 0.25rem;
}
.tool-type-badge.ai {
background: hsl(var(--primary) / 0.15);
color: hsl(var(--primary));
}
.tool-item-right {
display: flex;
align-items: center;
gap: 0.5rem;
}
.tool-status-text {
display: flex;
align-items: center;
gap: 0.25rem;
font-size: 0.6875rem;
font-weight: 500;
}
.tool-status-text.success {
color: hsl(var(--success));
}
.tool-status-text.muted {
color: hsl(var(--muted-foreground));
}
/* CCW List */
.ccw-list {
padding: 0.5rem;
}
.ccw-item {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 0.75rem;
border-radius: 0.5rem;
margin-bottom: 0.375rem;
border: 1px solid hsl(var(--border));
transition: all 0.15s ease;
}
.ccw-item:last-child {
margin-bottom: 0;
}
.ccw-item:hover {
background: hsl(var(--hover));
border-color: hsl(var(--primary) / 0.3);
}
.ccw-item-left {
display: flex;
align-items: flex-start;
gap: 0.75rem;
flex: 1;
min-width: 0;
}
.ccw-item-mode {
display: flex;
align-items: center;
justify-content: center;
width: 2.25rem;
height: 2.25rem;
border-radius: 0.5rem;
flex-shrink: 0;
}
.ccw-item-mode.global {
background: hsl(var(--primary) / 0.1);
color: hsl(var(--primary));
}
.ccw-item-mode.path {
background: hsl(var(--warning) / 0.1);
color: hsl(var(--warning));
}
.ccw-item-info {
flex: 1;
min-width: 0;
}
.ccw-item-header {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.25rem;
}
.ccw-item-name {
font-size: 0.8125rem;
font-weight: 600;
color: hsl(var(--foreground));
}
.ccw-item-path {
font-size: 0.6875rem;
color: hsl(var(--muted-foreground));
font-family: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
background: hsl(var(--muted) / 0.5);
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
margin-bottom: 0.375rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ccw-item-meta {
display: flex;
gap: 0.75rem;
font-size: 0.625rem;
color: hsl(var(--muted-foreground));
}
.ccw-item-meta span {
display: flex;
align-items: center;
gap: 0.25rem;
}
.ccw-item-actions {
display: flex;
align-items: center;
gap: 0.25rem;
opacity: 0;
transition: opacity 0.15s ease;
}
.ccw-item:hover .ccw-item-actions {
opacity: 1;
}
/* ========================================
* History View Styles
* ======================================== */
.history-view {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.history-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.75rem 0;
margin-bottom: 1rem;
border-bottom: 1px solid hsl(var(--border));
}
.history-header-left {
display: flex;
align-items: center;
gap: 0.75rem;
}
.history-count {
font-size: 0.8125rem;
color: hsl(var(--muted-foreground));
}
.history-header-right {
display: flex;
align-items: center;
gap: 0.5rem;
}
.history-search-wrapper {
position: relative;
display: flex;
align-items: center;
}
.history-search-wrapper i {
position: absolute;
left: 0.625rem;
color: hsl(var(--muted-foreground));
pointer-events: none;
}
.history-search-input {
padding: 0.5rem 0.75rem 0.5rem 2rem;
border: 1px solid hsl(var(--border));
border-radius: 0.5rem;
background: hsl(var(--background));
color: hsl(var(--foreground));
font-size: 0.8125rem;
width: 220px;
transition: all 0.2s ease;
}
.history-search-input:focus {
outline: none;
border-color: hsl(var(--primary));
box-shadow: 0 0 0 2px hsl(var(--primary) / 0.15);
width: 260px;
}
.history-search-input::placeholder {
color: hsl(var(--muted-foreground) / 0.7);
}
.history-filter-select {
padding: 0.5rem 0.75rem;
border: 1px solid hsl(var(--border));
border-radius: 0.5rem;
background: hsl(var(--background));
color: hsl(var(--foreground));
font-size: 0.8125rem;
cursor: pointer;
transition: all 0.2s ease;
}
.history-filter-select:hover {
border-color: hsl(var(--primary) / 0.5);
}
.history-filter-select:focus {
outline: none;
border-color: hsl(var(--primary));
}
/* History List */
.history-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.history-item {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 1rem;
background: hsl(var(--card));
border: 1px solid hsl(var(--border));
border-radius: 0.5rem;
cursor: pointer;
transition: all 0.15s ease;
}
.history-item:hover {
background: hsl(var(--hover));
border-color: hsl(var(--primary) / 0.3);
box-shadow: 0 2px 8px hsl(var(--foreground) / 0.05);
}
.history-item:hover .history-item-actions {
opacity: 1;
}
.history-item-main {
flex: 1;
min-width: 0;
}
.history-item-header {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.5rem;
flex-wrap: wrap;
}
.history-tool-tag {
font-size: 0.625rem;
font-weight: 600;
padding: 0.1875rem 0.5rem;
border-radius: 9999px;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.history-tool-tag.tool-gemini {
background: hsl(210 80% 55% / 0.12);
color: hsl(210 80% 45%);
}
.history-tool-tag.tool-qwen {
background: hsl(280 70% 55% / 0.12);
color: hsl(280 70% 45%);
}
.history-tool-tag.tool-codex {
background: hsl(142 71% 45% / 0.12);
color: hsl(142 71% 35%);
}
.history-mode-tag {
font-size: 0.625rem;
font-weight: 500;
padding: 0.1875rem 0.5rem;
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
border-radius: 0.25rem;
}
.history-status {
display: flex;
align-items: center;
gap: 0.25rem;
font-size: 0.625rem;
font-weight: 500;
padding: 0.1875rem 0.5rem;
border-radius: 9999px;
}
.history-status.success {
background: hsl(var(--success) / 0.12);
color: hsl(var(--success));
}
.history-status.warning {
background: hsl(var(--warning) / 0.12);
color: hsl(var(--warning));
}
.history-status.error {
background: hsl(var(--destructive) / 0.12);
color: hsl(var(--destructive));
}
.history-item-prompt {
font-size: 0.875rem;
font-weight: 450;
color: hsl(var(--foreground));
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
line-height: 1.5;
margin-bottom: 0.5rem;
}
.history-item-meta {
display: flex;
align-items: center;
gap: 1rem;
font-size: 0.6875rem;
color: hsl(var(--muted-foreground));
}
.history-item-meta span {
display: flex;
align-items: center;
gap: 0.25rem;
}
.history-item-actions {
display: flex;
align-items: center;
gap: 0.25rem;
opacity: 0;
transition: opacity 0.15s ease;
margin-left: 0.75rem;
}
/* History Empty State */
.history-empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 4rem 2rem;
text-align: center;
color: hsl(var(--muted-foreground));
}
.history-empty-state i {
opacity: 0.3;
margin-bottom: 1rem;
}
.history-empty-state h3 {
font-size: 1rem;
font-weight: 600;
color: hsl(var(--foreground));
margin-bottom: 0.5rem;
}
.history-empty-state p {
font-size: 0.8125rem;
}
/* ========================================
* Legacy Container Styles (kept for compatibility)
* ======================================== */
/* Container */
.cli-manager-container {
display: flex;
@@ -69,7 +622,7 @@
.cli-tools-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 0.5rem;
padding: 0.5rem 0.625rem;
}
@@ -174,6 +727,36 @@
font-weight: 500;
}
/* CLI Tool Description */
.cli-tool-desc {
font-size: 0.625rem;
color: hsl(var(--muted-foreground) / 0.8);
line-height: 1.3;
}
/* CLI Tool Actions */
.cli-tool-actions {
min-height: 1.75rem;
}
/* CodexLens specific styles */
.cli-tool-card.tool-codexlens.available {
border-color: hsl(35 90% 50% / 0.5);
}
.cli-tool-card.tool-codexlens.available:hover {
border-color: hsl(35 90% 50% / 0.7);
}
/* Semantic Search specific styles */
.cli-tool-card.tool-semantic.available {
border-color: hsl(260 80% 60% / 0.5);
}
.cli-tool-card.tool-semantic.available:hover {
border-color: hsl(260 80% 60% / 0.7);
}
/* Execute Panel */
.cli-execute-header {
display: flex;
@@ -662,9 +1245,44 @@
}
.btn-sm {
padding: 0.25rem 0.5rem;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.25rem;
padding: 0.375rem 0.625rem;
font-size: 0.75rem;
border-radius: 0.25rem;
font-weight: 500;
border-radius: 0.375rem;
border: 1px solid hsl(var(--border));
background: hsl(var(--background));
color: hsl(var(--foreground));
cursor: pointer;
transition: all 0.15s ease;
white-space: nowrap;
}
.btn-sm:hover {
background: hsl(var(--hover));
border-color: hsl(var(--primary) / 0.3);
}
.btn-sm.btn-primary {
background: hsl(var(--primary));
color: hsl(var(--primary-foreground));
border-color: hsl(var(--primary));
}
.btn-sm.btn-primary:hover {
opacity: 0.9;
}
.btn-sm.btn-outline {
background: transparent;
border-color: hsl(var(--border));
}
.btn-sm.btn-outline:hover {
background: hsl(var(--hover));
}
.btn-outline {