Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
@import "tailwindcss";
/*
* The view inherits the host's light/dark appearance through `data-base` on
* `<html>`, which `appearance.js` maintains.
*
* The page does not use `dark:` variants: within one layer a plain class and
* its `dark:` counterpart have equal specificity, so whether the dark value wins
* would depend on emission order. Instead every surface reads a semantic token
* (`surface`, `ink`, `line`) whose value the theme block below redefines, so one
* class list is correct in both appearances by construction.
*/
@theme inline {
--color-surface: var(--oe-surface);
--color-surface-sunken: var(--oe-surface-sunken);
--color-ink: var(--oe-ink);
--color-ink-muted: var(--oe-ink-muted);
--color-ink-faint: var(--oe-ink-faint);
--color-line: var(--oe-line);
--color-accent: var(--oe-accent);
--color-accent-ink: var(--oe-accent-ink);
--color-ok: var(--oe-ok);
--color-warn: var(--oe-warn);
--color-danger: var(--oe-danger);
}
:root {
--oe-surface: #ffffff;
--oe-surface-sunken: #fafafa;
--oe-ink: #18181b;
--oe-ink-muted: #52525b;
--oe-ink-faint: #a1a1aa;
--oe-line: rgba(0, 0, 0, 0.1);
--oe-accent: #18181b;
--oe-accent-ink: #ffffff;
--oe-ok: #059669;
--oe-warn: #b45309;
--oe-danger: #dc2626;
}
:root[data-base="dark"] {
--oe-surface: rgba(255, 255, 255, 0.04);
--oe-surface-sunken: rgba(255, 255, 255, 0.06);
--oe-ink: #fafafa;
--oe-ink-muted: #d4d4d8;
--oe-ink-faint: #a1a1aa;
--oe-line: rgba(255, 255, 255, 0.1);
--oe-accent: #fafafa;
--oe-accent-ink: #18181b;
--oe-ok: #34d399;
--oe-warn: #fbbf24;
--oe-danger: #f87171;
}
/* Memory management shares the existing semantic palette and stays usable in narrow panels. */
.memory-panel { border: 1px solid var(--oe-line); border-radius: 12px; background: var(--oe-surface); padding: 16px; display: grid; gap: 12px; color: var(--oe-ink); font-size: 12px; }
.memory-panel h2, .memory-panel h3 { margin: 0; font-size: 14px; font-weight: 600; }
.memory-panel p { margin: 0; }
.memory-heading, .memory-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.memory-heading > div { flex: 1; min-width: 160px; }
.memory-hint { display: block; color: var(--oe-ink-muted); font-size: 12px; line-height: 1.5; }
.memory-label { display: block; font-weight: 500; }
.memory-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; }
.memory-toggle input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--oe-accent); cursor: pointer; }
.memory-options { border: 1px solid var(--oe-line); border-radius: 8px; margin: 0; padding: 8px 12px; }
.memory-options legend { padding: 0 4px; color: var(--oe-ink-muted); }
.memory-ai-options { display: grid; gap: 8px; }
.memory-panel button, .memory-panel select, .memory-panel textarea, .memory-panel input[type="search"] { font: inherit; color: var(--oe-ink); border: 1px solid var(--oe-line); border-radius: 8px; background: var(--oe-surface-sunken); padding: 8px 10px; }
.memory-panel button { min-height: 36px; cursor: pointer; background: transparent; }
.memory-panel button:hover:not(:disabled) { background: var(--oe-surface-sunken); }
.memory-panel :disabled { opacity: 0.5; cursor: not-allowed; }
.memory-panel :focus-visible { outline: 2px solid var(--oe-ink-muted); outline-offset: 2px; }
.memory-panel .memory-primary { background: var(--oe-accent); color: var(--oe-accent-ink); border-color: var(--oe-accent); }
.memory-panel .memory-primary:hover:not(:disabled) { background: var(--oe-accent); opacity: 0.85; }
.memory-field { display: grid; gap: 4px; }
.memory-field > span { font-weight: 500; }
.memory-field textarea, .memory-field input, .memory-field select { width: 100%; min-width: 0; box-sizing: border-box; }
.memory-field textarea { resize: vertical; min-height: 80px; }
.memory-panel form { display: grid; gap: 8px; }
.memory-actions > .memory-hint { margin-right: auto; }
.memory-context { overflow-wrap: anywhere; color: var(--oe-ink-muted); }
.memory-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.memory-entry { border: 1px solid var(--oe-line); border-radius: 8px; padding: 12px; display: grid; gap: 8px; }
.memory-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.memory-delete { display: grid; gap: 8px; border-top: 1px solid var(--oe-line); padding-top: 8px; }
.memory-panel .memory-danger, .memory-alert { color: var(--oe-danger); }
.memory-notice { overflow-wrap: anywhere; }
.memory-status { color: var(--oe-ink-muted); }
/* Two panes keep the list and the editor from competing for the same column.
Each pane scrolls on its own, so a long list cannot push the form away. */
.memory-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.memory-pane { display: grid; gap: 8px; min-width: 0; }
.memory-pane-list { max-height: 46vh; overflow-y: auto; padding-right: 4px; }
/* #root scrolls below the host's safe area, so this top is local to #root. */
.memory-pane-editor { position: sticky; top: 0; }
.memory-entry { grid-template-columns: minmax(0, 1fr); }
.memory-entry-open { display: grid; gap: 4px; text-align: left; min-height: 0; padding: 0; border: 0; background: transparent; }
.memory-entry-open .memory-title { font-weight: 600; }
.memory-entry-open .memory-content { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.memory-entry-active { border-color: var(--oe-accent); }
.memory-title { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.memory-proposals { display: grid; gap: 8px; }
.memory-proposal { border-left: 3px solid var(--oe-accent); }
/* A narrow panel is a real constraint: fall back to one column rather than
squeezing both panes until neither is usable. */
@media (max-width: 720px) {
.memory-split { grid-template-columns: minmax(0, 1fr); }
.memory-pane-list { max-height: none; }
.memory-pane-editor { position: static; }
}