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.

325 lines
5.1 KiB
CSS

/* 基础样式 */
body {
background-color: #282c34;
color: white;
margin: 0;
padding: 0;
}
.chat-container {
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
}
#chat-box {
flex: 1;
overflow-y: auto;
padding: 10px;
border-bottom: 1px solid #444;
}
.user,
.ai {
align-self: flex-end;
color: #000000;
margin: 7px 3px;
padding: 7px;
border-radius: 10px;
font-size: 14px;
}
.user {
background-color: #717a76;
}
.ai {
background-color: #7a7575;
}
.context-area {
background-color: #3e4451;
padding: 10px;
border: 1px solid #61afef;
border-radius: 4px;
margin: 10px;
display: flex;
align-items: center;
justify-content: space-between;
}
#add-context-btn {
background-color: transparent;
border: none;
color: #61afef;
cursor: pointer;
font-size: 16px;
}
.context-options {
display: flex;
align-items: center;
}
.context-options span,
.context-options select,
.context-options label {
margin-right: 10px;
}
.keybinds {
font-size: 12px;
color: #abb2bf;
}
#chat-form {
display: flex;
padding: 3px 10px;
background-color: #282c34;
/* border-top: 1px solid #444; */
}
#user-input {
flex: 1;
padding: 10px;
border: none;
background-color: #3e4451;
color: white;
font-size: 14px;
outline: none;
}
#chat-form button {
padding: 10px;
background-color: #61afef;
color: white;
border: none;
cursor: pointer;
margin-left: 10px;
}
#loading {
text-align: center;
padding: 10px;
background-color: #3e4451;
color: white;
border: 1px solid #61afef;
border-radius: 4px;
margin: 10px;
}
.hidden {
display: none;
}
.context-container {
display: flex;
align-items: center;
margin: 10px 0;
gap: 10px; /* 元素间的间距 */
padding: 1px 10px;
}
.context-tab {
display: flex;
align-items: center;
padding: 6px 10px;
background-color: #e9e9e9;
border-radius: 4px;
font-size: 13px;
min-width: 0; /* 允许收缩 */
flex: 0 1 auto; /* 不要占据多余空间 */
color: #000000;
cursor: default;
}
.context-tab.hidden {
display: none;
}
.file-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-right: 10px;
}
.context-placeholder {
display: flex;
align-items: center;
padding: 6px 2px;
color: #666;
font-size: 13px;
min-width: 0;
}
.placeholder-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.context-placeholder.hidden {
display: none;
}
.close-btn {
background: none;
border: none;
font-size: 18px;
cursor: pointer;
color: #666;
padding: 0;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.close-btn:hover {
color: #ff0000;
background-color: rgba(0,0,0,0.1);
border-radius: 50%;
}
.select-context-btn {
width: 24px;
height: 24px;
padding: 0;
background-color: #007acc;
color: white;
border: none;
border-radius: 50%;
font-size: 16px;
font-weight: bold;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.select-context-btn:hover {
background-color: #005a9e;
}
/* 模态框样式 */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}
.modal.hidden {
display: none;
}
.modal-content {
background-color: #282c34;
border-radius: 8px;
width: 80%;
max-width: 600px;
max-height: 80vh;
display: flex;
flex-direction: column;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 20px;
border-bottom: 1px solid #444;
}
.modal-header h3 {
margin: 0;
color: white;
}
.close-modal {
font-size: 24px;
cursor: pointer;
color: #aaa;
}
.close-modal:hover {
color: white;
}
.modal-body {
flex: 1;
padding: 15px;
overflow: hidden;
display: flex;
flex-direction: column;
}
.file-search {
flex: 1;
margin-bottom: 15px;
}
.file-search input {
padding: 8px;
background-color: #3e4451;
border: 1px solid #444;
border-radius: 4px;
color: white;
}
.file-list {
flex: 1;
overflow-y: auto;
border: 1px solid #444;
border-radius: 4px;
background-color: #3e4451;
}
.file-item {
padding: 10px;
border-bottom: 1px solid #444;
cursor: pointer;
display: flex;
align-items: center;
}
.file-item:hover {
background-color: #4e5461;
}
.file-item:last-child {
border-bottom: none;
}
.file-icon {
margin-right: 10px;
width: 16px;
text-align: center;
}
.file-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.loading {
text-align: center;
padding: 20px;
color: #abb2bf;
}