Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
181 changes: 93 additions & 88 deletions apps/ide/src/renderer/agentFirst/agentFirst.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/ide/src/renderer/agentFirst/agentWorkbench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { CustomEditorInput } from '../editor/customEditor.ts';
import type { EditorGroup } from '../editor/editorGroup.ts';
import type { NotificationCenter } from '../notifications.ts';
import type { Workbench } from '../workbench.ts';
import { el } from '../dom.ts';
import { closeIcon, el } from '../dom.ts';
import { createChatView, type ChatView, type ChatViewDeps } from './chatView.ts';
import { createSessionsView, type SessionsView } from './sessionsView.ts';
import { createInstructionsView, type InstructionsViewDeps } from './instructionsView.ts';
Expand Down Expand Up @@ -95,7 +95,7 @@ export function installAgentWorkbench(options: AgentWorkbenchOptions): AgentWork
const artPath = document.createElementNS('http://www.w3.org/2000/svg', 'path');
artPath.setAttribute('d', DOCK_ART);
art.append(artPath);
const hideDock = el('button', { className: 'icon-button', text: '×', attrs: { type: 'button', title: 'Hide the live analysis column', 'aria-label': 'Hide the live analysis column' } });
const hideDock = el('button', { className: 'icon-button', attrs: { type: 'button', title: 'Hide the live analysis column', 'aria-label': 'Hide the live analysis column' } }, [closeIcon()]);
hideDock.addEventListener('click', () => setDockHidden(true));
workbench.dockArea.replaceChildren(
el('header', { className: 'af-dock-head' }, [el('span', { text: 'Live analysis' }), el('span', { className: 'af-live', text: 'Waiting', attrs: { 'data-state': 'idle' } }), el('span', { className: 'af-spacer' }), hideDock]),
Expand Down
7 changes: 4 additions & 3 deletions apps/ide/src/renderer/agentFirst/chatView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export function createChatView(sessionId: string, deps: ChatViewDeps): ChatView
bar.chips,
el('div', { className: 'af-input-wrap' }, [input, bar.popup, slashPopup]),
queueNote,
el('div', { className: 'af-composer-row' }, [bar.attachButton, modeSelect, optionsSlot, el('span', { className: 'af-spacer' }), sendButton]),
el('div', { className: 'af-composer-row' }, [bar.attachButton, el('label', { className: 'af-option' }, [el('span', { className: 'af-option-name', text: 'Mode' }), modeSelect]), optionsSlot, el('span', { className: 'af-spacer' }), sendButton]),
]);

const element = el('section', { className: 'af-chat', attrs: { 'data-testid': 'af-chat', 'data-session': sessionId } }, [header, worktreeBar.element, transcript, plan, composer]);
Expand Down Expand Up @@ -485,7 +485,8 @@ export function createChatView(sessionId: string, deps: ChatViewDeps): ChatView
}
}

function configSelect(option: ConfigOptionView): HTMLSelectElement {
/** One of the agent's options (model, effort...): its name stays visible above the value (visual polish V4). */
function configSelect(option: ConfigOptionView): HTMLElement {
const select = el('select', { className: 'af-select', attrs: { 'aria-label': option.name, title: option.name, 'data-option': option.id } });
select.append(...option.values.map((value) => {
const node = el('option', { text: value.name, attrs: { value: value.id, title: value.description ?? '' } });
Expand All @@ -495,7 +496,7 @@ export function createChatView(sessionId: string, deps: ChatViewDeps): ChatView
select.addEventListener('change', () => {
deps.api.setConfigOption(sessionId, option.id, select.value).catch((error: unknown) => deps.onStatus(errorText(error)));
});
return select;
return el('label', { className: 'af-option' }, [el('span', { className: 'af-option-name', text: option.name }), select]);
}

modeSelect.addEventListener('change', () => {
Expand Down
4 changes: 4 additions & 0 deletions apps/ide/src/renderer/agentFirst/sessionsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ export function createSessionsView(container: HTMLElement, deps: SessionsViewDep
return option;
}));
newChatButton.disabled = !agents.some((agent) => agent.kind === 'acp' && agent.availability !== 'missing');
if (newChatButton.disabled) {
// Never an empty picker: say why New chat is off (visual polish V3).
agentSelect.prepend(el('option', { text: 'No agent yet', attrs: { value: '', disabled: '', selected: '' } }));
}
const builtins = agents.filter((agent) => agent.kind === 'builtin');
const builtinRow: HTMLElement[] = [];
if (builtins.length > 0) {
Expand Down
57 changes: 24 additions & 33 deletions apps/ide/src/renderer/debug/debug.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,9 @@
.debug-config {
flex: 1;
min-width: 0;
height: 26px;
border: 1px solid var(--line);
border-radius: 4px;
background: var(--editor);
color: var(--fg);
font: inherit;
}
.debug-start svg { fill: #3fb950; stroke: #3fb950; }
.debug-status { margin: 0 12px 8px; font-size: 12px; }
.debug-start svg { fill: var(--ok); stroke: var(--ok); }
.debug-status { margin: 0 12px 8px; font-size: var(--fs-sm); }
.debug-status[hidden] { display: none; }
.debug-status.is-warning { color: var(--warn); }
.debug-status.is-error { color: var(--crit); }
Expand All @@ -29,7 +23,7 @@
gap: 4px;
height: 24px;
padding: 0 8px 0 4px;
font-size: 11px;
font-size: var(--fs-xs);
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
Expand All @@ -40,8 +34,8 @@
.debug-section-title > span:first-of-type { flex: 1; }
.debug-section-actions { display: flex; gap: 2px; }
.debug-section-body { padding-bottom: 6px; }
.debug-empty { margin: 4px 12px; font-size: 12px; }
.debug-thread { margin: 2px 12px; font-size: 12px; }
.debug-empty { margin: 4px 12px; font-size: var(--fs-sm); }
.debug-thread { margin: 2px 12px; font-size: var(--fs-sm); }

.debug-tree { list-style: none; margin: 0; padding: 0; }
.debug-row {
Expand All @@ -50,8 +44,8 @@
gap: 2px;
min-height: 22px;
padding: 0 8px;
font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
font-size: 12px;
font-family: var(--font-mono);
font-size: var(--fs-sm);
white-space: nowrap;
overflow: hidden;
cursor: pointer;
Expand All @@ -61,7 +55,7 @@
.debug-twisty::before { content: '\203A'; display: inline-block; transition: transform 0.1s; }
.debug-node[aria-expanded='true'] > .debug-row .debug-twisty::before { transform: rotate(90deg); }
.debug-twisty.is-leaf::before { content: ''; }
.debug-node.is-scope > .debug-row .debug-var-name { font-family: system-ui, sans-serif; font-weight: 600; }
.debug-node.is-scope > .debug-row .debug-var-name { font-family: var(--font-ui); font-weight: 600; }
.debug-var-name { color: var(--symbol); flex: none; }
.debug-var-sep { flex: none; color: var(--muted); }
.debug-var-value { overflow: hidden; text-overflow: ellipsis; }
Expand All @@ -75,22 +69,19 @@
margin: 4px 12px;
padding: 3px 6px;
border: 1px solid var(--accent);
border-radius: 3px;
background: var(--editor);
color: var(--fg);
font: 12px ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
font: var(--fs-sm) var(--font-mono);
}
.debug-watch-input[hidden] { display: none; }

.debug-frame { justify-content: space-between; gap: 8px; font-family: inherit; }
.debug-frame.is-selected { background: var(--hover); box-shadow: inset 2px 0 0 var(--accent); }
.debug-frame.is-subtle { opacity: 0.6; }
.debug-frame-name { overflow: hidden; text-overflow: ellipsis; }
.debug-frame-where { flex: none; font-size: 11px; }
.debug-frame-where { flex: none; font-size: var(--fs-xs); }
.debug-breakpoint-row { gap: 6px; font-family: inherit; }
.debug-breakpoint-row .debug-frame-where { margin-left: auto; }
.debug-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #e51400; }
.debug-dot.is-unverified { background: none; border: 1px solid #848484; }
.debug-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--breakpoint); }
.debug-dot.is-unverified { background: none; border: 1px solid var(--muted); }

/* The floating toolbar, centred over the editors while a session runs. */
.debug-toolbar {
Expand All @@ -101,19 +92,19 @@
padding: 2px 4px;
transform: translateX(-50%);
border: 1px solid var(--line);
border-radius: 5px;
border-radius: var(--radius);
background: var(--chrome);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
box-shadow: var(--shadow-sm);
}
.debug-toolbar[hidden] { display: none; }
.debug-toolbar .icon-button[hidden] { display: none; }
.debug-toolbar .icon-button:disabled { opacity: 0.4; cursor: default; }
.debug-toolbar [data-testid='debug-continue'] svg { stroke: #3fb950; }
.debug-toolbar [data-testid='debug-continue'] svg { stroke: var(--ok); }
.debug-toolbar [data-testid='debug-stop'] svg { stroke: var(--crit); }
.debug-toolbar [data-testid='debug-restart'] svg { stroke: #3fb950; }
.debug-toolbar [data-testid='debug-restart'] svg { stroke: var(--ok); }

/* The status bar turns orange while debugging, as in VS Code. */
body.is-debugging .status-bar { background: #b8541b; }
body.is-debugging .status-bar { background: var(--status-debug); }

/* The Debug Console. */
.debug-console { display: flex; flex-direction: column; height: 100%; min-height: 0; }
Expand All @@ -123,7 +114,7 @@ body.is-debugging .status-bar { background: #b8541b; }
min-height: 0;
overflow: auto;
padding: 4px 12px;
font: 12px/1.45 ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
font: var(--fs-sm)/1.45 var(--font-mono);
white-space: pre-wrap;
word-break: break-word;
user-select: text;
Expand All @@ -132,7 +123,7 @@ body.is-debugging .status-bar { background: #b8541b; }
.debug-console-line.is-console, .debug-console-line.is-important { color: var(--accent); }
.debug-console-line.is-input { color: var(--muted); }
.debug-console-row { display: flex; align-items: center; gap: 6px; padding: 2px 12px 4px; border-top: 1px solid var(--line); }
.debug-console-prompt { color: var(--accent); font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace; }
.debug-console-prompt { color: var(--accent); font-family: var(--font-mono); }
.debug-console-input {
flex: 1;
min-width: 0;
Expand All @@ -141,7 +132,7 @@ body.is-debugging .status-bar { background: #b8541b; }
outline: 0;
background: none;
color: var(--fg);
font: 12px ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
font: var(--fs-sm) var(--font-mono);
}

/* The editor: breakpoints in the glyph margin, the paused line. */
Expand All @@ -155,9 +146,9 @@ body.is-debugging .status-bar { background: #b8541b; }
height: 9px;
margin: -4.5px 0 0 -4.5px;
border-radius: 50%;
background: #e51400;
background: var(--breakpoint);
}
.monaco-editor .debug-breakpoint.is-unverified::before { background: none; border: 1px solid #848484; box-sizing: border-box; }
.monaco-editor .debug-breakpoint.is-unverified::before { background: none; border: 1px solid var(--muted); box-sizing: border-box; }
.monaco-editor .debug-breakpoint-hint::before { background: rgba(229, 20, 0, 0.4); }
.monaco-editor .debug-current-line { background: rgba(255, 238, 0, 0.18); }
.monaco-editor .debug-frame-line { background: rgba(80, 200, 120, 0.15); }
Expand All @@ -170,8 +161,8 @@ body.is-debugging .status-bar { background: #b8541b; }
margin: -5px 0 0 -3px;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 7px solid #ffcc00;
border-left: 7px solid var(--debug-frame);
}
.monaco-editor .debug-frame-arrow::after { border-left-color: #3fb950; }
.monaco-editor .debug-frame-arrow::after { border-left-color: var(--ok); }
.monaco-editor .debug-breakpoint, .monaco-editor .debug-breakpoint-hint,
.monaco-editor .debug-current-arrow, .monaco-editor .debug-frame-arrow { position: relative; cursor: pointer; }
8 changes: 8 additions & 0 deletions apps/ide/src/renderer/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ export function icon(pathData: string, className?: string): SVGSVGElement {
return svg;
}

/** The one close glyph of the workbench (tabs, notifications, the scene, the dock): an X drawn in SVG, never a text character. */
export const CLOSE_ICON_PATH = 'M6 6l12 12M18 6L6 18';

/** A close glyph for an `icon-button` or a notification. */
export function closeIcon(): SVGSVGElement {
return icon(CLOSE_ICON_PATH, 'close-icon');
}

let iconSheetAdopted = false;

/**
Expand Down
30 changes: 15 additions & 15 deletions apps/ide/src/renderer/extensions/extensions.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.extensions-scroll { flex: 1; min-height: 0; overflow: auto; padding-bottom: 12px; }
.extensions-section { display: flex; flex-direction: column; }
.extensions-section[hidden] { display: none; }
.extensions-section-title { margin: 6px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.extensions-section-title { margin: 6px 12px 4px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.extensions-section .side-note { margin: 2px 12px 8px; }
.extensions-list { list-style: none; margin: 0; padding: 0; }
.extensions-more { margin: 6px 12px; align-self: flex-start; }
Expand All @@ -14,40 +14,40 @@
.extension-row { display: flex; gap: 10px; padding: 8px 10px 8px 12px; cursor: pointer; border-left: 2px solid transparent; min-width: 0; }
.extension-row:hover { background: var(--hover); }
.extension-row:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }
.extension-icon { flex: none; width: 36px; height: 36px; border-radius: 4px; object-fit: contain; }
.extension-icon { flex: none; width: 36px; height: 36px; border-radius: var(--radius); object-fit: contain; }
.extension-icon.is-placeholder { background: var(--hover); }
.extension-icon.is-large { width: 96px; height: 96px; }
.extension-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.extension-title-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.extension-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.extension-meta { flex: none; font-size: 11px; margin-left: auto; }
.extension-description { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.extension-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; }
.extension-meta { flex: none; font-size: var(--fs-xs); margin-left: auto; }
.extension-description { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.extension-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: var(--fs-sm); }
.extension-publisher { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); }
.extension-verified svg { width: 13px; height: 13px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.extension-state { color: var(--accent); }
.extension-actions { display: inline-flex; gap: 4px; margin-left: auto; }
.extension-action { margin: 0; width: auto; padding: 2px 8px; font-size: 12px; }
.extension-busy, .extension-installed-mark { font-size: 12px; }
.extension-action { margin: 0; width: auto; padding: 2px 8px; font-size: var(--fs-sm); }
.extension-busy, .extension-installed-mark { font-size: var(--fs-sm); }

.extension-details { grid-area: editor; z-index: 39; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--editor); overflow: auto; }
.extension-details:focus { outline: none; }
.extension-details-loading { margin: 24px; }
.extension-details-head { display: flex; gap: 20px; align-items: flex-start; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.extension-details-title { flex: 1; min-width: 0; }
.extension-details-title h2 { margin: 0 0 4px; font-size: 22px; font-weight: 600; overflow-wrap: anywhere; }
.extension-details-title h2 { margin: 0 0 4px; font-size: var(--fs-2xl); font-weight: 600; overflow-wrap: anywhere; }
.extension-details-publisher { display: flex; align-items: center; gap: 4px; margin: 0 0 6px; color: var(--muted); }
.extension-details-description { margin: 0 0 10px; }
.extension-details-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.extension-details-actions .extension-action { padding: 4px 12px; font-size: 13px; }
.extension-details-actions .extension-action { padding: 4px 12px; font-size: var(--fs-md); }
.extension-details-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 280px); gap: 24px; padding: 16px 24px 24px; min-height: 0; }
.extension-details-readme { min-width: 0; }
.extension-details-readme .markdown-preview { border: 0; height: auto; }
.extension-details-readme .markdown-preview-header { display: none; }
.extension-details-readme .markdown-preview-body { overflow: visible; padding: 0; }
.extension-details-side { min-width: 0; }
.extension-details-side h3 { margin: 16px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.extension-details-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 12px; }
.extension-details-side h3 { margin: 16px 0 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.extension-details-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: var(--fs-sm); }
.extension-details-facts dt { color: var(--muted); }
.extension-details-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
Expand All @@ -62,8 +62,8 @@
.activity-item { position: relative; }
.activity-item > .codicon-glyph { width: 24px; font-size: 24px; }
.activity-item > .ext-icon-mask { width: 24px; height: 24px; }
.activity-letter { font-weight: 600; font-size: 16px; }
.activity-badge { position: absolute; right: 6px; bottom: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--status-fg); font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; }
.activity-letter { font-weight: 600; font-size: var(--fs-xl); }
.activity-badge { position: absolute; right: 6px; bottom: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--button-bg); color: var(--on-accent); font-size: var(--fs-2xs); font-weight: 600; line-height: 16px; text-align: center; }
.activity-badge[hidden] { display: none; }

/* The Source Control and Run and Debug panes hold their view and, under it, extensions' views. */
Expand All @@ -90,7 +90,7 @@
.ext-view-message { margin: 4px 12px 6px; }
.ext-view-message[hidden] { display: none; }

.ext-action.is-text { width: auto; padding: 0 6px; font: inherit; font-size: 12px; }
.ext-action.is-text { width: auto; padding: 0 6px; font: inherit; font-size: var(--fs-sm); }
.ext-action:disabled { opacity: 0.4; cursor: default; }

.ext-tree-row { gap: 4px; }
Expand All @@ -100,7 +100,7 @@
.ext-tree-checkbox { flex: none; margin: 0 2px 0 0; }
.ext-tree-actions { margin-left: auto; display: none; align-items: center; gap: 2px; }
.ext-tree-row:hover > .ext-tree-actions, .ext-tree-row:focus > .ext-tree-actions, .ext-tree-row[aria-selected='true'] > .ext-tree-actions { display: flex; }
.ext-tree-actions > .ext-action { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--muted); cursor: pointer; }
.ext-tree-actions > .ext-action { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); cursor: pointer; }
.ext-tree-actions > .ext-action:hover { background: var(--hover); color: var(--fg); }

.ext-welcome { padding: 6px 0 8px; }
Expand Down
Loading
Loading