Add files via upload

This commit is contained in:
公明
2026-03-14 00:49:25 +08:00
committed by GitHub
parent 226f9b79e2
commit 5e8fef0ad4
11 changed files with 1147 additions and 25 deletions
+241
View File
@@ -9092,6 +9092,247 @@ header {
min-width: 72px;
}
/* WebShell AI 助手 Tab:仅在此 pane 激活时显示;左右布局 = 左侧栏 + 右侧主区(与对话页一致) */
#webshell-pane-ai {
flex-direction: row;
flex: 1;
min-height: 0;
overflow: hidden;
}
/* 不设 display,避免覆盖 .webshell-pane 的 display:none(否则终端/文件管理页会露出 AI 面板)。左右布局由 #webshell-pane-ai 的 flex-direction:row 提供 */
.webshell-pane-ai-with-sidebar {
flex: 1;
min-height: 0;
overflow: hidden;
width: 100%;
}
.webshell-ai-sidebar {
flex-shrink: 0;
width: 280px;
min-width: 200px;
display: flex;
flex-direction: column;
border-right: 1px solid var(--border-color);
background: var(--bg-secondary);
}
.webshell-ai-new-btn {
margin: 10px 12px;
width: calc(100% - 24px);
}
.webshell-ai-conv-list {
flex: 1;
min-height: 0;
overflow-y: auto;
padding: 4px 0;
}
.webshell-ai-conv-item {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 12px;
cursor: pointer;
font-size: 0.9rem;
border-left: 3px solid transparent;
}
.webshell-ai-conv-item:hover {
background: var(--border-color);
}
.webshell-ai-conv-item.active {
background: var(--accent-light, rgba(59, 130, 246, 0.1));
border-left-color: var(--accent-color);
}
.webshell-ai-conv-item-title {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.webshell-ai-conv-item-date {
flex-shrink: 0;
font-size: 0.75rem;
color: var(--text-secondary);
}
.webshell-ai-conv-del {
flex-shrink: 0;
padding: 2px 6px;
opacity: 0.6;
}
.webshell-ai-conv-item:hover .webshell-ai-conv-del {
opacity: 1;
}
.webshell-ai-main {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
min-height: 0;
}
.webshell-ai-hint {
flex-shrink: 0;
padding: 10px 14px;
font-size: 0.9rem;
color: var(--text-secondary);
border-bottom: 1px solid var(--border-color);
}
.webshell-ai-toolbar {
flex-shrink: 0;
padding: 6px 14px 8px;
display: flex;
gap: 8px;
border-bottom: 1px solid var(--border-color);
}
.webshell-ai-progress {
font-size: 0.85rem;
color: var(--text-secondary);
padding: 6px 12px;
margin: 0 0 4px 0;
border-radius: 8px;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
align-self: flex-start;
}
.webshell-ai-timeline {
display: none;
flex-direction: column;
gap: 6px;
width: 100%;
margin-bottom: 8px;
padding: 8px 12px;
border-radius: 8px;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
}
.webshell-ai-timeline.has-items {
display: flex;
}
.webshell-ai-timeline-item {
font-size: 0.85rem;
color: var(--text-primary);
padding: 4px 0;
border-bottom: 1px solid var(--border-color);
}
.webshell-ai-timeline-item:last-child {
border-bottom: none;
}
.webshell-ai-timeline-title {
display: block;
font-weight: 500;
color: var(--text-secondary);
}
.webshell-ai-timeline-msg {
margin-top: 4px;
padding-left: 0;
font-size: 0.8rem;
color: var(--text-secondary);
white-space: pre-wrap;
word-break: break-word;
max-height: 120px;
overflow-y: auto;
}
.webshell-ai-old-conv {
width: 100%;
margin-bottom: 8px;
border: 1px solid var(--border-color);
border-radius: 10px;
background: var(--bg-secondary);
overflow: hidden;
}
.webshell-ai-old-conv-label {
display: block;
width: 100%;
padding: 8px 12px;
text-align: left;
font-size: 0.9rem;
color: var(--text-secondary);
background: transparent;
border: none;
cursor: pointer;
}
.webshell-ai-old-conv-label:hover {
background: var(--border-color);
color: var(--text-primary);
}
.webshell-ai-old-conv-body {
padding: 0 12px 12px;
display: flex;
flex-direction: column;
gap: 12px;
}
.webshell-ai-messages {
flex: 1;
min-height: 0;
overflow-y: auto;
padding: 12px 14px;
display: flex;
flex-direction: column;
gap: 12px;
}
.webshell-ai-msg {
padding: 10px 14px;
border-radius: 10px;
max-width: 90%;
white-space: pre-wrap;
word-break: break-word;
}
.webshell-ai-msg.user {
align-self: flex-end;
background: var(--accent-color);
color: #fff;
}
.webshell-ai-msg.assistant {
align-self: flex-start;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
}
.webshell-ai-input-row {
flex-shrink: 0;
display: flex;
gap: 10px;
padding: 8px 14px;
border-top: 1px solid var(--border-color);
align-items: center;
}
.webshell-ai-input {
flex: 1;
height: 36px;
min-height: 36px;
resize: none;
padding: 8px 12px;
border-radius: 10px;
border: 1px solid var(--border-color);
font-size: 0.95rem;
/* 更柔和的滚动条样式 */
scrollbar-width: thin;
scrollbar-color: rgba(15, 23, 42, 0.25) transparent;
}
.webshell-ai-input:focus {
outline: none;
border-color: var(--accent-color);
}
.webshell-ai-input::-webkit-scrollbar {
width: 6px;
}
.webshell-ai-input::-webkit-scrollbar-track {
background: transparent;
}
.webshell-ai-input::-webkit-scrollbar-thumb {
background: rgba(15, 23, 42, 0.25);
border-radius: 999px;
}
.webshell-ai-input::-webkit-scrollbar-thumb:hover {
background: rgba(15, 23, 42, 0.4);
}
.webshell-ai-input-row .btn-primary {
flex-shrink: 0;
height: 36px;
min-width: 72px;
padding: 0 16px;
display: flex;
align-items: center;
justify-content: center;
}
/* 仪表盘页面样式(最佳实践布局 + 视觉增强) */
.dashboard-page {
height: 100%;