Файли
openidea/src/features/agents/McpServers.module.css
T
l0ng-ai fe69210ef0 fix(agents): clarify the MCP settings pages, their server form and import
- Rename the two MCP pages under Agents to IDE MCP Server (OpenIDEA's own
  server for outside clients) and External MCP Servers (servers coding
  agents use), and point the docs at Settings › Agents.
- Lay the Add/Configure MCP Server dialog out as a label column with
  padded, framed fields; the page's styles now use existing tokens, so
  text areas get a frame and text the right size and colour.
- Import is now Import from Project and reports how many servers it
  added from .mcp.json and .vscode/mcp.json, or that it found none.
2026-11-11 08:41:03 +08:00

263 рядки
4.2 KiB
CSS

.page {
display: flex;
flex-direction: column;
gap: 10px;
font-size: var(--fs-ui);
color: var(--fg-strong);
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.headerActions {
display: flex;
align-items: center;
gap: 8px;
}
.title {
margin: 0;
font-size: 16px;
font-weight: 600;
color: var(--fg-strong);
}
.lead {
margin: 0;
color: var(--fg-muted);
line-height: 1.45;
}
.link {
padding: 0;
border: none;
background: none;
color: var(--link);
font: inherit;
cursor: pointer;
}
.link:hover {
text-decoration: underline;
}
.search {
width: 100%;
}
.error {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 8px;
border-radius: var(--radius-control);
background: color-mix(in srgb, var(--danger) 12%, transparent);
color: var(--danger);
font-size: var(--fs-small);
}
.notice {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 8px;
border-radius: var(--radius-control);
background: var(--accent-soft);
color: var(--fg);
font-size: var(--fs-small);
}
.sections {
display: flex;
flex-direction: column;
border-top: 1px solid var(--border);
}
.section {
display: flex;
flex-direction: column;
border-bottom: 1px solid var(--border);
}
.sectionBar {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 32px;
padding: 2px 4px;
gap: 8px;
}
.sectionToggle {
display: flex;
align-items: center;
gap: 6px;
flex: 1;
min-width: 0;
padding: 4px 2px;
border: none;
background: none;
color: var(--fg-strong);
font: inherit;
font-weight: 600;
text-align: left;
cursor: pointer;
}
.sectionToggle:hover {
color: var(--fg-strong);
}
.chevron {
color: var(--fg-muted);
flex-shrink: 0;
}
.sectionTitle {
font-size: var(--fs-ui);
font-weight: 600;
}
.badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 18px;
height: 18px;
padding: 0 6px;
border-radius: 999px;
background: var(--bg-hover);
color: var(--fg-muted);
font-size: 11px;
font-weight: 600;
line-height: 1;
}
.sectionBody {
display: flex;
flex-direction: column;
padding: 2px 0 6px;
}
.emptySection {
padding: 6px 24px 8px;
color: var(--fg-muted);
font-size: var(--fs-small);
}
.row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 6px 8px 6px 22px;
border-radius: var(--radius-control);
}
.row:hover {
background: var(--bg-hover);
}
.rowMain {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
flex: 1;
}
.serverName {
font-weight: 600;
color: var(--fg-strong);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.subtitle {
color: var(--fg-muted);
font-size: var(--fs-small);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.rowActions {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
}
/* Server form: a label column, controls filling the rest. */
.form {
display: grid;
grid-template-columns: max-content minmax(0, 1fr);
align-items: start;
gap: 10px 12px;
padding: 12px 16px 4px;
}
.formWide {
grid-column: 1 / -1;
}
.formLabel {
line-height: var(--h-field, 28px);
color: var(--fg);
white-space: nowrap;
}
.formControl {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
}
.formDivider {
grid-column: 1 / -1;
margin: 2px 0;
border: 0;
border-top: 1px solid var(--border);
}
/* Multi-line field framed like Input. */
.textarea {
width: 100%;
min-height: 64px;
padding: 6px 8px;
appearance: none;
border: 0;
border-radius: var(--radius-control, 4px);
background: var(--bg-field, var(--bg-input));
box-shadow: inset 0 0 0 1px var(--border-button);
color: var(--fg-strong);
font-family: var(--font-mono);
font-size: var(--fs-ui);
line-height: 1.45;
resize: vertical;
outline: none;
transition: box-shadow var(--dur-fast) var(--ease);
}
.textarea::placeholder {
color: var(--fg-faint);
}
.textarea:focus {
box-shadow:
inset 0 0 0 1px var(--focus-ring),
0 0 0 1px var(--focus-ring);
}
.hint {
font-size: var(--fs-small);
color: var(--fg-muted);
line-height: 1.4;
}