You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
461 lines
8.4 KiB
CSS
461 lines
8.4 KiB
CSS
/* 基础样式 */
|
|
body {
|
|
font-family: var(--vscode-font-family);
|
|
font-size: var(--vscode-font-size);
|
|
background-color: var(--vscode-editor-background);
|
|
color: var(--vscode-editor-foreground);
|
|
margin: 0;
|
|
padding: 0;
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* 聊天容器 */
|
|
.chat-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
padding: 10px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* 对话区域 */
|
|
#chat-box {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
margin-bottom: 10px;
|
|
padding: 10px;
|
|
border-radius: 4px;
|
|
background-color: var(--vscode-editor-background);
|
|
}
|
|
|
|
/* 消息样式 */
|
|
.message {
|
|
margin-bottom: 15px;
|
|
padding: 8px 12px;
|
|
border-radius: 4px;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.message.user {
|
|
background-color: var(--vscode-textBlockQuote-background);
|
|
align-self: flex-end;
|
|
margin-left: 20%;
|
|
}
|
|
|
|
.message.ai {
|
|
background-color: var(--vscode-editor-background);
|
|
border: 1px solid var(--vscode-editorWidget-border);
|
|
}
|
|
|
|
/* 代码块样式 */
|
|
pre {
|
|
background-color: var(--vscode-textCodeBlock-background);
|
|
padding: 10px;
|
|
border-radius: 4px;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
code {
|
|
font-family: var(--vscode-editor-font-family);
|
|
font-size: var(--vscode-editor-font-size);
|
|
}
|
|
|
|
/* 表单区域 */
|
|
#chat-form {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-top: auto;
|
|
padding: 10px 0;
|
|
}
|
|
|
|
#user-input {
|
|
flex: 1;
|
|
padding: 8px 12px;
|
|
border: 1px solid var(--vscode-dropdown-border);
|
|
border-radius: 4px;
|
|
background-color: var(--vscode-input-background);
|
|
color: var(--vscode-input-foreground);
|
|
font-family: var(--vscode-font-family);
|
|
font-size: var(--vscode-font-size);
|
|
}
|
|
|
|
#user-input:focus {
|
|
outline: none;
|
|
border-color: var(--vscode-focusBorder);
|
|
}
|
|
|
|
#chat-form button {
|
|
padding: 8px 16px;
|
|
background-color: var(--vscode-button-background);
|
|
color: var(--vscode-button-foreground);
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-family: var(--vscode-font-family);
|
|
font-size: var(--vscode-font-size);
|
|
}
|
|
|
|
#chat-form button:hover {
|
|
background-color: var(--vscode-button-hoverBackground);
|
|
}
|
|
|
|
/* 加载提示 */
|
|
#loading {
|
|
text-align: center;
|
|
padding: 10px;
|
|
color: var(--vscode-descriptionForeground);
|
|
}
|
|
|
|
#loading.hidden {
|
|
display: none;
|
|
}
|
|
|
|
/* 上下文容器 */
|
|
.context-container {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 10px;
|
|
gap: 5px;
|
|
}
|
|
|
|
.select-context-btn {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 50%;
|
|
background-color: #007acc;
|
|
color: white;
|
|
border: none;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 16px;
|
|
padding: 0;
|
|
}
|
|
|
|
.select-context-btn:hover {
|
|
background-color: #005a9e;
|
|
}
|
|
|
|
.context-placeholder {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
background-color: var(--vscode-badge-background);
|
|
color: var(--vscode-badge-foreground);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.context-tab {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
background-color: var(--vscode-tab-activeBackground);
|
|
color: var(--vscode-tab-activeForeground);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.context-tab.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.file-name {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.close-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--vscode-icon-foreground);
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
width: 16px;
|
|
height: 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0;
|
|
}
|
|
|
|
/* 文件浏览器模态框 */
|
|
.modal {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.modal.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: var(--vscode-editorWidget-background);
|
|
border: 1px solid var(--vscode-editorWidget-border);
|
|
border-radius: 4px;
|
|
width: 90%;
|
|
max-width: 500px;
|
|
max-height: 80vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 10px 15px;
|
|
border-bottom: 1px solid var(--vscode-editorWidget-border);
|
|
}
|
|
|
|
.modal-header h3 {
|
|
margin: 0;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.close-modal {
|
|
cursor: pointer;
|
|
font-size: 20px;
|
|
color: var(--vscode-icon-foreground);
|
|
}
|
|
|
|
.modal-body {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 15px;
|
|
}
|
|
|
|
.file-search {
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.file-search input {
|
|
width: 100%;
|
|
padding: 6px 10px;
|
|
border: 1px solid var(--vscode-dropdown-border);
|
|
border-radius: 4px;
|
|
background-color: var(--vscode-input-background);
|
|
color: var(--vscode-input-foreground);
|
|
font-family: var(--vscode-font-family);
|
|
font-size: var(--vscode-font-size);
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.file-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
}
|
|
|
|
.file-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 6px 10px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.file-item:hover {
|
|
background-color: var(--vscode-list-hoverBackground);
|
|
}
|
|
|
|
.file-icon {
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.loading {
|
|
text-align: center;
|
|
padding: 20px;
|
|
color: var(--vscode-descriptionForeground);
|
|
}
|
|
|
|
/* 差异模态框 */
|
|
.diff-modal-content {
|
|
width: 90%;
|
|
max-width: 900px;
|
|
}
|
|
|
|
.diff-content {
|
|
font-family: 'Courier New', monospace;
|
|
font-size: 14px;
|
|
line-height: 1.4;
|
|
background-color: var(--vscode-editor-background);
|
|
padding: 15px;
|
|
border-radius: 4px;
|
|
overflow-x: auto;
|
|
margin-bottom: 15px;
|
|
max-height: 60vh;
|
|
}
|
|
|
|
.diff-row {
|
|
display: flex;
|
|
}
|
|
|
|
.diff-line-number {
|
|
width: 40px;
|
|
text-align: right;
|
|
padding-right: 10px;
|
|
color: var(--vscode-descriptionForeground);
|
|
user-select: none;
|
|
}
|
|
|
|
.diff-line {
|
|
flex: 1;
|
|
white-space: pre;
|
|
}
|
|
|
|
.diff-added {
|
|
background-color: rgba(0, 255, 0, 0.1);
|
|
color: #4ec9b0;
|
|
}
|
|
|
|
.diff-removed {
|
|
background-color: rgba(255, 0, 0, 0.1);
|
|
color: #f48771;
|
|
}
|
|
|
|
.diff-unchanged {
|
|
color: var(--vscode-editor-foreground);
|
|
}
|
|
|
|
.diff-actions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 10px;
|
|
padding: 10px 0;
|
|
}
|
|
|
|
.diff-action-btn {
|
|
padding: 6px 12px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-family: var(--vscode-font-family);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.diff-action-btn.accept {
|
|
background-color: #007acc;
|
|
color: white;
|
|
}
|
|
|
|
.diff-action-btn.reject {
|
|
background-color: #d73a49;
|
|
color: white;
|
|
}
|
|
|
|
.diff-button {
|
|
margin-top: 10px;
|
|
padding: 5px 10px;
|
|
background-color: #007acc;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.diff-button:hover {
|
|
background-color: #005a9e;
|
|
}
|
|
|
|
.create-file-button {
|
|
margin-top: 10px;
|
|
margin-left: 10px;
|
|
padding: 5px 10px;
|
|
background-color: #4CAF50;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.create-file-button:hover {
|
|
background-color: #45a049;
|
|
}
|
|
|
|
/* 工作区容器 */
|
|
.workspace-container {
|
|
margin: 10px 0;
|
|
padding: 10px;
|
|
border: 1px solid var(--vscode-editorWidget-border);
|
|
border-radius: 4px;
|
|
background-color: var(--vscode-editor-background);
|
|
}
|
|
|
|
.workspace-container h3 {
|
|
margin: 0 0 10px 0;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.workspace-files {
|
|
max-height: 150px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.workspace-file-item {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 6px 10px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.workspace-file-item:hover {
|
|
background-color: var(--vscode-list-hoverBackground);
|
|
}
|
|
|
|
.workspace-file-item .file-icon {
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.workspace-file-item .file-name {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.workspace-file-item .file-status {
|
|
font-size: 11px;
|
|
padding: 2px 6px;
|
|
border-radius: 3px;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.file-status.status-pending {
|
|
background-color: #007acc;
|
|
color: white;
|
|
}
|
|
|
|
.file-status.status-accepted {
|
|
background-color: #28a745;
|
|
color: white;
|
|
}
|
|
|
|
.file-status.status-rejected {
|
|
background-color: #d73a49;
|
|
color: white;
|
|
}
|
|
|
|
.no-changes {
|
|
text-align: center;
|
|
padding: 10px;
|
|
color: var(--vscode-descriptionForeground);
|
|
font-size: 12px;
|
|
} |