fix: styling

This commit is contained in:
David Kaya
2026-03-25 20:43:04 +01:00
parent 8d3c4f474e
commit cb7f216bc3
3 changed files with 103 additions and 10 deletions
+100
View File
@@ -0,0 +1,100 @@
import type {
RunTurnLspProfileConfig,
RunTurnMcpServerConfig,
RunTurnToolingConfig,
} from '@shared/contracts/sidecar';
import type {
LspProfileDefinition,
McpServerDefinition,
SessionToolingSelection,
WorkspaceToolingSettings,
} from '@shared/domain/tooling';
export function validateSessionToolingSelectionIds(
tooling: WorkspaceToolingSettings,
selection: SessionToolingSelection,
): void {
const knownMcpServerIds = new Set(tooling.mcpServers.map((server) => server.id));
const unknownMcpServerIds = selection.enabledMcpServerIds.filter((id) => !knownMcpServerIds.has(id));
if (unknownMcpServerIds.length > 0) {
throw new Error(`Unknown MCP server "${unknownMcpServerIds[0]}".`);
}
const knownLspProfileIds = new Set(tooling.lspProfiles.map((profile) => profile.id));
const unknownLspProfileIds = selection.enabledLspProfileIds.filter((id) => !knownLspProfileIds.has(id));
if (unknownLspProfileIds.length > 0) {
throw new Error(`Unknown LSP profile "${unknownLspProfileIds[0]}".`);
}
}
export function buildRunTurnToolingConfig(
tooling: WorkspaceToolingSettings,
selection: SessionToolingSelection,
): RunTurnToolingConfig | undefined {
const mcpServersById = new Map<string, McpServerDefinition>(
tooling.mcpServers.map((server) => [server.id, server]),
);
const lspProfilesById = new Map<string, LspProfileDefinition>(
tooling.lspProfiles.map((profile) => [profile.id, profile]),
);
const mcpServers = selection.enabledMcpServerIds.flatMap((id): RunTurnMcpServerConfig[] => {
const server = mcpServersById.get(id);
if (!server) {
return [];
}
if (server.transport === 'local') {
return [
{
id: server.id,
name: server.name,
transport: 'local',
tools: [...server.tools],
timeoutMs: server.timeoutMs,
command: server.command,
args: [...server.args],
cwd: server.cwd,
},
];
}
return [
{
id: server.id,
name: server.name,
transport: server.transport,
tools: [...server.tools],
timeoutMs: server.timeoutMs,
url: server.url,
},
];
});
const lspProfiles = selection.enabledLspProfileIds.flatMap((id): RunTurnLspProfileConfig[] => {
const profile = lspProfilesById.get(id);
if (!profile) {
return [];
}
return [
{
id: profile.id,
name: profile.name,
command: profile.command,
args: [...profile.args],
languageId: profile.languageId,
fileExtensions: [...profile.fileExtensions],
},
];
});
if (mcpServers.length === 0 && lspProfiles.length === 0) {
return undefined;
}
return {
mcpServers,
lspProfiles,
};
}
+1 -1
View File
@@ -528,7 +528,7 @@ export function Sidebar({
<div>
<span className="text-sm font-semibold text-zinc-100">eryx</span>
<span className="ml-1.5 rounded bg-zinc-800 px-1 py-0.5 text-[9px] font-medium text-zinc-500">
BETA
ALPHA
</span>
</div>
</div>
+2 -9
View File
@@ -10,8 +10,8 @@
--color-accent: #6366f1;
--color-accent-hover: #818cf8;
--color-accent-muted: rgba(99, 102, 241, 0.15);
--text-pill: 0.5rem;
--text-pill--line-height: 1;
--text-pill: 0.6875rem;
--text-pill--line-height: 1.2;
}
:root {
@@ -71,13 +71,6 @@ body {
min-height: 100vh;
}
button,
input,
select,
textarea {
font: inherit;
}
/* Scrollbar styling */
::-webkit-scrollbar {
width: 6px;