Files
lang-agent/frontend/src/styles.css
2026-03-13 13:57:00 +08:00

654 lines
9.9 KiB
CSS

:root {
color-scheme: light;
font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
line-height: 1.4;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
background: #f6f8fb;
color: #1c2430;
}
#root {
min-height: 100vh;
}
.app {
display: grid;
grid-template-columns: 280px 1fr;
min-height: 100vh;
}
.app.full-width {
grid-template-columns: 1fr;
}
.sidebar {
border-right: 1px solid #dbe2ea;
background: #ffffff;
padding: 16px;
}
.sidebar-header {
align-items: center;
display: flex;
justify-content: space-between;
margin-bottom: 12px;
}
.sidebar-header h2 {
font-size: 18px;
margin: 0;
}
button {
border: 1px solid #c9d4e2;
border-radius: 8px;
background: #fff;
cursor: pointer;
padding: 8px 10px;
}
button:disabled {
cursor: not-allowed;
opacity: 0.5;
}
.agent-list {
display: flex;
flex-direction: column;
gap: 8px;
}
.agent-item-row {
display: grid;
gap: 6px;
grid-template-columns: 1fr auto;
}
.agent-item {
align-items: flex-start;
display: flex;
flex-direction: column;
text-align: left;
width: 100%;
}
.agent-item-title {
align-items: center;
display: flex;
gap: 8px;
justify-content: space-between;
width: 100%;
}
.agent-status-pill {
border-radius: 999px;
font-size: 11px;
font-weight: 600;
padding: 2px 8px;
}
.agent-status-pill.running {
background: #dff7e7;
border: 1px solid #8cd3a1;
color: #1a6b35;
}
.agent-status-pill.stopped {
background: #f2f4f7;
border: 1px solid #d1d8e0;
color: #4a5565;
}
.agent-item.selected {
border-color: #4d7ef3;
background: #edf3ff;
}
.agent-item small {
color: #5f6f82;
}
.agent-chat-button {
align-self: stretch;
min-width: 64px;
}
.content {
padding: 20px;
}
.content-header {
align-items: center;
display: flex;
justify-content: space-between;
gap: 12px;
}
.content-header h1 {
font-size: 24px;
margin: 0;
}
.tabs {
display: flex;
gap: 8px;
}
.tab-button {
min-width: 120px;
}
.tab-button.active {
background: #edf3ff;
border-color: #4d7ef3;
color: #1a4fc5;
}
.header-actions {
display: flex;
gap: 8px;
}
.status {
background: #eaf2ff;
border: 1px solid #bdd3ff;
border-radius: 8px;
color: #163f87;
margin-top: 12px;
padding: 10px;
}
.launch-credentials {
background: #fff4df;
border: 1px solid #f0d5a8;
border-radius: 8px;
margin-top: 12px;
padding: 12px;
}
.launch-credentials h3 {
margin: 0 0 8px;
}
.launch-credentials > div {
align-items: center;
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 6px 0;
}
.launch-credentials code {
background: #fff;
border: 1px solid #f0d5a8;
border-radius: 4px;
padding: 2px 6px;
}
.empty-panel {
margin-top: 30px;
}
.tab-pane {
margin-top: 12px;
}
.form-grid {
display: grid;
gap: 14px;
grid-template-columns: repeat(2, minmax(250px, 1fr));
margin-top: 16px;
}
.form-grid label {
display: flex;
flex-direction: column;
font-size: 14px;
gap: 6px;
}
.form-grid input,
.form-grid select,
.form-grid textarea {
border: 1px solid #c9d4e2;
border-radius: 8px;
font-size: 14px;
padding: 8px;
}
.prompt-section,
.file-backend-config,
.run-info {
border: 1px solid #dbe2ea;
border-radius: 10px;
grid-column: 1 / -1;
padding: 12px;
}
.prompt-section h3,
.file-backend-config h3,
.run-info h3 {
margin-top: 0;
}
.run-info-header {
align-items: center;
display: flex;
justify-content: space-between;
gap: 8px;
}
.runtime-badge {
border-radius: 999px;
font-size: 12px;
font-weight: 600;
padding: 4px 10px;
}
.runtime-badge.running {
background: #dff7e7;
border: 1px solid #8cd3a1;
color: #1a6b35;
}
.runtime-badge.stopped {
background: #f2f4f7;
border: 1px solid #d1d8e0;
color: #4a5565;
}
.graph-arch-section {
border: 1px solid #dbe2ea;
border-radius: 10px;
grid-column: 1 / -1;
padding: 12px;
}
.graph-arch-section h3 {
margin-top: 0;
}
.graph-arch-image-container {
align-items: center;
display: flex;
justify-content: center;
overflow: auto;
}
.graph-arch-image {
border-radius: 8px;
border: 1px solid #dbe2ea;
max-width: 100%;
}
.run-card {
border: 1px solid #dbe2ea;
border-radius: 8px;
margin-top: 8px;
padding: 10px;
}
.run-card-columns {
display: grid;
gap: 12px;
grid-template-columns: minmax(280px, 1fr) minmax(420px, 1.3fr);
}
.run-card-left,
.run-card-right {
display: flex;
flex-direction: column;
gap: 6px;
}
.run-card-right {
border-left: 1px solid #dbe2ea;
min-width: 0;
padding-left: 12px;
}
.run-card-right code {
display: inline-block;
max-width: 100%;
overflow-x: auto;
vertical-align: middle;
white-space: nowrap;
}
.discussion-section {
background: #f7fbff;
border: 1px solid #d7e6f6;
border-radius: 10px;
padding: 12px;
}
.discussion-header {
align-items: center;
display: flex;
justify-content: space-between;
gap: 12px;
}
.discussion-header h3 {
margin: 0;
}
.discussion-layout {
display: grid;
gap: 12px;
grid-template-columns: minmax(260px, 320px) 1fr;
margin-top: 10px;
}
.discussion-list {
display: flex;
flex-direction: column;
gap: 8px;
max-height: 65vh;
overflow-y: auto;
}
.discussion-item {
align-items: flex-start;
display: flex;
flex-direction: column;
gap: 4px;
text-align: left;
width: 100%;
}
.discussion-item.selected {
background: #edf3ff;
border-color: #4d7ef3;
}
.discussion-item small {
color: #687788;
}
.discussion-thread {
border: 1px solid #d7e6f6;
border-radius: 10px;
display: flex;
flex-direction: column;
gap: 8px;
max-height: 65vh;
overflow-y: auto;
padding: 10px;
}
.discussion-message {
background: #fff;
border: 1px solid #dbe2ea;
border-radius: 8px;
padding: 8px;
}
.discussion-message.human {
border-left: 3px solid #4d7ef3;
}
.discussion-message.ai {
border-left: 3px solid #26a269;
}
.discussion-message.tool {
border-left: 3px solid #8e6bd8;
}
.discussion-message-meta {
align-items: baseline;
display: flex;
gap: 8px;
}
.discussion-message pre {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
margin: 8px 0 0;
overflow-x: auto;
white-space: pre;
}
.discussion-message-markdown > :first-child {
margin-top: 0;
}
.discussion-message-markdown > :last-child {
margin-bottom: 0;
}
.discussion-message-markdown code {
background: #f3f5f8;
border-radius: 4px;
padding: 1px 4px;
}
.discussion-message-markdown pre code {
background: transparent;
padding: 0;
}
.discussion-message-markdown a {
color: #1a4fc5;
text-decoration: underline;
}
.discussion-message-markdown p,
.discussion-message-markdown ul,
.discussion-message-markdown ol,
.discussion-message-markdown blockquote,
.discussion-message-markdown table {
margin: 8px 0;
}
.discussion-message-markdown blockquote {
border-left: 3px solid #d0d8e2;
color: #4f5f73;
margin-left: 0;
padding-left: 10px;
}
.mcp-config-section {
background: #f7fbff;
border: 1px solid #d7e6f6;
border-radius: 10px;
padding: 12px;
}
.mcp-config-header {
align-items: center;
display: flex;
justify-content: space-between;
gap: 12px;
}
.mcp-config-header h3 {
margin: 0;
}
.mcp-config-editor {
border: 1px solid #c9d4e2;
border-radius: 8px;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 13px;
margin-top: 8px;
padding: 10px;
resize: vertical;
width: 100%;
}
.mcp-entry-list {
display: grid;
gap: 12px;
margin-top: 10px;
}
.mcp-tools-error {
color: #a33434;
margin: 6px 0 0 0;
}
.mcp-tools-inline {
background: #f8fbff;
border: 1px solid #d7e6f6;
border-radius: 8px;
margin: 0 0 10px 0;
padding: 8px;
}
.mcp-entry-card {
background: #fff;
border: 1px solid #d7e6f6;
border-radius: 10px;
padding: 10px;
}
.mcp-entry-header {
align-items: center;
display: flex;
justify-content: space-between;
gap: 10px;
margin-bottom: 10px;
}
.mcp-entry-grid {
display: grid;
gap: 10px;
grid-template-columns: repeat(2, minmax(200px, 1fr));
}
.mcp-entry-grid label {
display: flex;
flex-direction: column;
font-size: 14px;
gap: 6px;
}
.mcp-entry-grid input,
.mcp-entry-grid select {
border: 1px solid #c9d4e2;
border-radius: 8px;
font-size: 14px;
padding: 8px;
}
.mcp-entry-wide {
grid-column: 1 / -1;
}
.empty {
color: #687788;
margin: 6px 0;
}
.chat-modal-overlay {
align-items: center;
background: rgba(16, 24, 40, 0.45);
display: flex;
inset: 0;
justify-content: center;
position: fixed;
z-index: 20;
}
.chat-modal {
background: #fff;
border: 1px solid #d7e6f6;
border-radius: 12px;
display: grid;
gap: 10px;
max-height: 86vh;
max-width: 820px;
padding: 12px;
width: min(92vw, 820px);
}
.chat-modal-header {
align-items: center;
border-bottom: 1px solid #dbe2ea;
display: flex;
justify-content: space-between;
padding-bottom: 8px;
}
.chat-modal-header small {
color: #687788;
display: block;
margin-top: 2px;
}
.chat-modal-messages {
background: #f8fbff;
border: 1px solid #d7e6f6;
border-radius: 10px;
display: flex;
flex-direction: column;
gap: 8px;
max-height: 56vh;
overflow-y: auto;
padding: 10px;
}
.chat-modal-message {
background: #fff;
border: 1px solid #dbe2ea;
border-radius: 8px;
padding: 8px;
}
.chat-modal-message.user {
border-left: 3px solid #4d7ef3;
}
.chat-modal-message.assistant {
border-left: 3px solid #26a269;
}
.chat-modal-message p {
margin: 6px 0 0 0;
white-space: pre-wrap;
}
.chat-modal-input {
display: grid;
gap: 8px;
grid-template-columns: 1fr auto;
align-items: start;
}
.chat-modal-input textarea {
border: 1px solid #c9d4e2;
border-radius: 8px;
font-size: 14px;
padding: 8px;
resize: vertical;
}
.chat-modal-actions {
display: flex;
gap: 8px;
height: 100%;
}
.chat-modal-actions button {
height: auto;
white-space: nowrap;
}
.chat-stop-button {
background-color: #dc3545;
color: white;
}
.chat-stop-button:hover {
background-color: #bb2d3b;
}