@kmugalkhod/lightcode 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # Lightcode
2
2
 
3
- A personal AI coding agent with a terminal UI. Lightcode pairs an OpenTUI
4
- chat interface with a local Hono API server, persistent SQLite sessions, a
3
+ A personal AI coding agent with terminal and localhost browser interfaces.
4
+ Lightcode pairs an OpenTUI client and a React browser workspace with one local
5
+ Hono API server, persistent SQLite sessions, a
5
6
  permission-gated tool suite (files, shell, git, web, MCP), and tiered context
6
7
  optimization that keeps long sessions inside the model's context window
7
8
  without ever losing history.
@@ -10,7 +11,8 @@ without ever losing history.
10
11
 
11
12
  ```bash
12
13
  npm install -g @kmugalkhod/lightcode
13
- lightcode
14
+ lightcode # terminal UI
15
+ lightcode web # browser UI on 127.0.0.1
14
16
  ```
15
17
 
16
18
  Works on macOS (Apple Silicon and Intel), Linux, and Windows. Bun ships with
@@ -19,17 +21,30 @@ uses the bundled runtime automatically (and reuses a system Bun if you already
19
21
  have one). The published package is scoped as `@kmugalkhod/lightcode`; the
20
22
  command it installs is `lightcode`.
21
23
 
24
+ The two interfaces share the same local sessions, history, provider settings,
25
+ and agent engine. `lightcode web` opens a dedicated loopback-only server and
26
+ launches your browser. Choose a folder under Desktop, then start or resume a
27
+ project chat. The per-launch browser credential stays in the URL fragment and
28
+ the current browser tab; it is never passed to agent subprocesses.
29
+
30
+ The first browser release runs one Lightcode interface at a time: press Ctrl+C
31
+ to stop the TUI or browser server before switching. Sessions remain available
32
+ when you reopen them in the other interface. Use `lightcode web --no-open` on
33
+ headless systems; set `LIGHTCODE_WEB_PORT` to choose its starting port.
34
+
22
35
  ## Quick start (from source)
23
36
 
24
37
  ```bash
25
38
  bun install
26
39
  bun run cli:dev # starts the TUI; it boots the server automatically
40
+ bun run web:build && bun apps/cli/src/index.tsx web # browser UI from source
27
41
  ```
28
42
 
29
43
  Lightcode is aware of the directory you launch it in: each turn it reads the
30
- project's shape (top-level files, git branch/status) and any `AGENTS.md` /
31
- `CLAUDE.md` / `README.md`, so "review my code" or "explain this" inspects your
32
- actual files instead of asking you to paste them.
44
+ project's shape (top-level files and git branch/status), uses root `AGENTS.md`
45
+ instructions with `CLAUDE.md` as a fallback, and loads nested instructions only
46
+ when related paths are accessed. `README.md` remains ordinary project context,
47
+ not privileged instructions.
33
48
 
34
49
  On first run Lightcode walks you through provider setup (Anthropic,
35
50
  OpenRouter, OpenCode Zen, or any OpenAI-compatible endpoint) and stores the
@@ -40,6 +55,8 @@ API key in `~/.lightcode/credentials.json`. Environment variables such as
40
55
 
41
56
  ```bash
42
57
  bun run cli:dev # TUI (auto-starts the server)
58
+ bun run web:dev # asset-only browser dev server (no agent API proxy)
59
+ bun run web:build # build the browser assets
43
60
  bun run server:dev # API server alone, watch mode
44
61
  bun run typecheck # TypeScript + tool schema preflight
45
62
  bun test # test suite
@@ -61,6 +78,8 @@ variables. Notable keys:
61
78
  | `context.compactAtFraction` | Context compaction threshold (default 0.8) |
62
79
  | `context.pruneAtFraction` | Tool-output pruning threshold (default 0.6) |
63
80
  | `context.contextWindowOverride` | Override the model context window |
81
+ | `webSearch.backend` | `auto`, `provider`, `brave`, `tavily`, or `disabled` |
82
+ | `webSearch.maxResults`, `webSearch.maxUsesPerTurn` | Bound search results and per-turn search usage |
64
83
  | `maxRetries` | Provider-call retries for transient errors (default 5) |
65
84
  | `autoContinue.stallTimeoutSeconds` | Abort+retry a byte-silent stream (default 300; raise for very slow reasoning models) |
66
85
  | `autoContinue.maxErrorRetries` | Auto-resends before surfacing a stream error (default 8) |
@@ -113,6 +132,7 @@ are parsed (`name`, `description`); the rest of the file is the instruction body
113
132
  ## Workspaces
114
133
 
115
134
  - `apps/cli` — OpenTUI React terminal interface
135
+ - `apps/web` — React localhost browser interface
116
136
  - `apps/server` — Hono API server (sessions, streaming, diagnostics)
117
137
  - `packages/ai` — agent core: tools, permissions, context engine, config
118
138
  - `packages/db` — Prisma + local SQLite storage
@@ -0,0 +1 @@
1
+ :root{--buncss-light: ;--buncss-dark:initial;color-scheme:dark;font-synthesis:none;--base:#0d1117;--panel:#121820;--elevated:#18212b;--inset:#10151c;--border:#273241;--border-soft:#202a36;--accent:#f2a65a;--accent-soft:#33260f;--accent-text:#f6c99a;--text:#eef3f8;--text-secondary:#b6c2cf;--text-muted:#7f8d9d;--success:#8bd49c;--warning:#e5c07b;--error:#f28b82;--info:#9cbdfd;--mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}html,body,#root{width:100%;height:100%;margin:0}body{overflow:hidden;background:var(--base);color:var(--text);text-rendering:optimizeLegibility;min-width:320px;font-size:14px;line-height:1.5}button,textarea,input,select{color:inherit;font:inherit}button,select,label,summary{-webkit-tap-highlight-color:transparent}button{border:0}button:not(:disabled),select:not(:disabled),summary{cursor:pointer}label:has(input:not(:disabled)){cursor:pointer}button:disabled,select:disabled,textarea:disabled,input:disabled{cursor:not-allowed;opacity:.5}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}::selection{color:var(--text);background:#67421e}.sr-only{position:absolute;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0}.app-shell{display:grid;grid-template-columns:264px minmax(0,1fr);background:var(--panel);width:100%;height:100dvh}.session-rail{position:relative;z-index:30;display:flex;overflow:hidden;background:var(--base);border-right:1px solid var(--border);flex-direction:column;min-width:0;height:100%}.rail-header{display:flex;border-bottom:1px solid var(--border-soft);justify-content:space-between;align-items: center;min-height:58px;padding:0 16px}.brand-lockup{display:flex;color:var(--text);letter-spacing:-.01em;align-items: center;gap:9px;font-size:15px;font-weight:670}.brand-mark,.new-session-mark,.empty-mark,.authorization-mark{display:inline-flex;color:var(--accent);justify-content:center;align-items: center}.brand-mark{background:var(--accent-soft);border:1px solid #57402a;border-radius:8px;width:27px;height:27px}.rail-actions{display:grid;gap:7px;padding:14px 12px 12px}.new-session-button,.project-button{display:flex;border:1px solid var(--border);background:var(--panel);color:var(--text-secondary);text-align:left;border-radius:9px;align-items: center;gap:9px;width:100%;min-height:36px;padding:7px 10px;transition:background-color .16s ease-out,border-color .16s ease-out,color .16s ease-out}.new-session-button:hover:not(:disabled),.project-button:hover:not(:disabled){background:var(--elevated);color:var(--text);border-color:#3b495b}.new-session-button kbd{color:var(--text-muted);font-family:var(--mono);margin-left:auto;font-size:11px;font-weight:500}.project-button{color:var(--text-muted);background:0 0;border-color:#0000}.project-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rail-section-heading{display:flex;color:var(--text-muted);letter-spacing:.055em;text-transform:uppercase;justify-content:space-between;align-items: center;padding:7px 15px;font-size:11px;font-weight:650}.session-list{overflow-y:auto;flex:1;min-height:80px;padding:2px 8px 18px}.session-item{position:relative;display:flex;color:var(--text-secondary);text-align:left;background:0 0;border-radius:8px;align-items: center;gap:9px;width:100%;min-height:58px;padding:8px 9px;transition:background-color .16s ease-out,color .16s ease-out}.session-item:hover{background:var(--panel);color:var(--text)}.session-item.active{background:var(--elevated);color:var(--text)}.session-marker{background:var(--border);border-radius:50%;flex:none;width:5px;height:5px}.session-item.active .session-marker{background:var(--accent)}.session-copy{display:grid;gap:2px;min-width:0}.session-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:590}.session-copy small{color:var(--text-muted);font-size:11px}.rail-state{display:flex;border:1px solid var(--border-soft);color:var(--text-muted);border-radius:9px;align-items: flex-start;gap:10px;margin:7px;padding:12px}.rail-state p{margin:0;font-size:12px}.rail-footer{border-top:1px solid var(--border-soft);padding:8px 8px 14px}.later-item{display:flex;color:var(--text-muted);text-align:left;background:0 0;border-radius:7px;align-items: center;gap:9px;width:100%;min-height:32px;padding:5px 8px}.later-item span{flex:1}.later-item small{font-family:var(--mono);font-size:10px}.session-skeleton,.folder-skeleton,.conversation-skeleton{display:grid;gap:12px;padding:12px}.session-skeleton span,.folder-skeleton span,.conversation-skeleton span{display:block;background:var(--elevated);animation:skeleton-pulse 1.4s ease-in-out infinite alternate;border-radius:4px;height:10px}.session-skeleton span:first-child{width:82%}.session-skeleton span:nth-child(2){width:74%}.session-skeleton span:nth-child(3){width:68%}.session-skeleton span:nth-child(4){width:61%}.folder-skeleton span:first-child{width:58%}.folder-skeleton span:nth-child(2){width:71%}.folder-skeleton span:nth-child(3){width:84%}.folder-skeleton span:nth-child(4){width:67%}.folder-skeleton span:nth-child(5){width:79%}.folder-skeleton span:nth-child(6){width:62%}.folder-skeleton span:nth-child(7){width:75%}@keyframes skeleton-pulse{0%{opacity:.45}to{opacity:.95}}.workspace-main{display:flex;overflow:hidden;background:var(--panel);flex-direction:column;min-width:0;min-height:0}.workspace-ribbon{position:relative;z-index:10;display:flex;border-top:2px solid var(--accent);color:var(--accent-text);background:#211a13;border-bottom:1px solid #493522;align-items: center;gap:9px;min-height:56px;padding:6px 14px}.workspace-path{display:flex;color:inherit;text-align:left;background:0 0;border-radius:8px;align-items: center;gap:8px;min-width:180px;max-width:min(42vw,560px);padding:5px 7px}.workspace-path:hover{background:#2c2117}.workspace-icon{display:inline-flex;color:var(--accent);align-items: center}.workspace-path-copy{display:grid;gap:0;min-width:0}.workspace-path-copy strong,.workspace-path-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace-path-copy strong{color:var(--text);font-size:13px;font-weight:650}.workspace-path-copy small{color:#be9e7e;font-family:var(--mono);font-size:10px}.ribbon-status,.ribbon-model{display:flex;color:#d8b38d;white-space:nowrap;align-items: center;gap:7px;font-size:12px}.live-dot{display:inline-block;background:#6f665d;border-radius:50%;flex:none;width:7px;height:7px}.live-dot.active,.agent-working .live-dot{background:var(--accent);animation:live-pulse 1.1s ease-out infinite alternate}@keyframes live-pulse{0%{opacity:.55}to{opacity:1}}.ribbon-spacer{flex:1}.ribbon-model{overflow:hidden;color:#b69778;text-overflow:ellipsis;max-width:190px}.ribbon-select{position:relative;display:flex;color:var(--accent-text);background:#2b2016;border:1px solid #59412b;border-radius:7px;align-items: center;gap:6px;height:32px;padding:0 7px}.ribbon-select select{appearance:none;outline:0;color:inherit;background:0 0;border:0;font-size:12px}.ribbon-select select:focus-visible{outline:0}.ribbon-select:focus-within{outline:2px solid var(--accent);outline-offset:2px}.chat-surface{display:flex;overflow:hidden;flex-direction:column;flex:1;min-height:0}.conversation-scroll{overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0}.conversation-column{width:min(100%,900px);margin:0 auto;padding-inline-start:28px;padding-inline-end:28px}.conversation-scroll>.conversation-column{display:flex;flex-direction:column;min-height:100%;padding-top:32px;padding-bottom:28px}.conversation-empty{display:grid;justify-items:start;width:min(100%,610px);margin:auto;padding:48px 0 92px}.empty-mark{background:var(--accent-soft);border:1px solid #62472d;border-radius:12px;width:43px;height:43px;margin-bottom:20px}.conversation-empty h1,.new-session-title h1,.authorization-gate h1{color:var(--text);letter-spacing:-.025em;margin:0;font-size:25px;font-weight:650;line-height:1.2}.conversation-empty p{color:var(--text-secondary);max-width:58ch;margin:12px 0 0;font-size:15px}.chat-message{display:grid;grid-template-columns:108px minmax(0,1fr);border-bottom:1px solid var(--border-soft);gap:20px;padding:24px 0 27px}.chat-message>header{display:flex;color:var(--text-muted);align-items: center;gap:7px;height:26px;font-size:12px;font-weight:640}.role-mark{display:inline-flex;border:1px solid var(--border);background:var(--inset);border-radius:7px;justify-content:center;align-items: center;width:24px;height:24px}.role-assistant .role-mark{color:var(--success);border-color:#2d4a35}.role-user .role-mark{color:var(--info);border-color:#354561}.message-parts{min-width:0}.message-text{color:var(--text);font-size:14px;line-height:1.72}.message-text p{white-space:pre-wrap;overflow-wrap:anywhere;max-width:72ch;margin:0 0 15px}.message-text p:last-child{margin-bottom:0}.message-text .markdown-heading{color:var(--text);letter-spacing:-.018em;max-width:46ch;margin:20px 0 8px;font-size:18px;font-weight:680;line-height:1.3}.message-text .markdown-heading.level-2{font-size:16px}.message-text .markdown-heading.level-3,.message-text .markdown-heading.level-4,.message-text .markdown-heading.level-5,.message-text .markdown-heading.level-6{font-size:14px}.message-text ul,.message-text ol{max-width:72ch;margin:0 0 15px;padding-left:22px}.message-text li+li{margin-top:4px}.message-text blockquote{border-left:2px solid var(--accent);color:var(--text-secondary);white-space:pre-wrap;max-width:72ch;margin:12px 0 15px;padding-left:13px}.message-text a{color:var(--info);text-underline-offset:2px}.inline-code{border:1px solid var(--border-soft);background:var(--inset);color:#dce6ef;font-family:var(--mono);border-radius:5px;padding:1px 5px;font-size:.9em}.code-block{overflow:hidden;border:1px solid var(--border);background:var(--inset);border-radius:11px;margin:14px 0 18px}.code-header{display:flex;border-bottom:1px solid var(--border-soft);color:var(--text-muted);font-family:var(--mono);justify-content:space-between;align-items: center;min-height:34px;padding:0 12px;font-size:11px}.code-header button{color:var(--text-secondary);font-family:inherit;font-size:inherit;background:0 0}.code-block pre,.tool-details pre,.authorization-gate pre{overflow:auto;font-family:var(--mono);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:12px;line-height:1.65}.code-block pre{color:#dce6ef;white-space:pre;overflow-wrap:normal;padding:14px 16px 17px}.reasoning-part{color:var(--text-muted);margin:8px 0 14px;font-size:12px}.reasoning-part summary{color:var(--text-secondary);width:max-content}.reasoning-part p{white-space:pre-wrap;margin:8px 0 0}.tool-event{overflow:hidden;border:1px solid var(--border);background:var(--inset);border-radius:11px;margin:10px 0}.tool-event[open]{background:#111820}.tool-event summary{display:flex;list-style:none;align-items: center;gap:10px;min-height:48px;padding:8px 12px}.tool-event summary::-webkit-details-marker{display:none}.tool-event summary>svg:last-child{margin-left:auto;transition:transform .16s ease-out}.tool-event[open] summary>svg:last-child{transform:rotate(180deg)}.tool-state-mark{display:inline-flex;background:var(--elevated);color:var(--text-muted);border-radius:7px;justify-content:center;align-items: center;width:26px;height:26px}.state-output-available .tool-state-mark{color:var(--success)}.state-output-error .tool-state-mark{color:var(--error)}.state-approval-requested .tool-state-mark{color:var(--warning)}.tool-summary-copy{display:grid;min-width:0}.tool-summary-copy strong{color:var(--text-secondary);font-size:12px;font-weight:610}.tool-summary-copy small{overflow:hidden;color:var(--text-muted);font-family:var(--mono);text-overflow:ellipsis;white-space:nowrap;font-size:10px}.tool-details{display:grid;gap:12px;padding:0 12px 13px 48px}.tool-details>div>span{display:block;color:var(--text-muted);letter-spacing:.04em;text-transform:uppercase;margin-bottom:4px;font-size:10px;font-weight:650}.tool-details pre{border:1px solid var(--border-soft);background:var(--base);color:var(--text-secondary);border-radius:7px;max-height:280px;padding:10px}.source-link,.attachment-line{display:flex;color:var(--info);text-decoration:none;align-items: center;gap:7px;width:max-content;max-width:100%;margin:8px 0;font-size:12px}.source-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-link:not(.static):hover{text-decoration:underline}.source-link.static,.attachment-line{color:var(--text-muted)}.agent-working{display:flex;color:var(--text-muted);align-items: center;gap:9px;padding:17px 128px 0;font-size:12px}.conversation-controls{position:relative;z-index:4;background:var(--panel);flex:none;padding:0 0 10px}.inline-error,.new-session-error{display:flex;color:#f2aaa3;background:#261719;border:1px solid #603638;border-radius:8px;align-items: center;gap:9px;margin-bottom:8px;padding:9px 11px;font-size:12px}.inline-error span{flex:1}.inline-error button{color:var(--text);background:0 0;font-weight:620}.approval-dock,.prompt-dock{overflow:hidden;background:#211a13;border:1px solid #62472d;border-radius:11px;margin-bottom:8px}.approval-row{display:grid;grid-template-columns:auto minmax(0,1fr)auto;align-items: center;gap:11px;padding:12px}.approval-row+.approval-row{border-top:1px solid #493522}.approval-icon{display:inline-flex;color:var(--warning)}.approval-row strong,.prompt-dock strong{color:var(--text);font-size:12px}.approval-row p,.prompt-dock p{color:var(--text-secondary);margin:1px 0;font-size:12px}.approval-row small{color:#b39272;font-size:10px}.approval-actions,.project-browser-actions,.prompt-options,.prompt-custom{display:flex;align-items: center;gap:7px}.primary-button,.secondary-button{display:inline-flex;border-radius:8px;justify-content:center;align-items: center;gap:7px;min-height:36px;padding:7px 12px;font-size:12px;font-weight:650}.primary-button{background:var(--accent);color:#23170c}.primary-button:hover:not(:disabled){background:#ffc077}.secondary-button{border:1px solid var(--border);background:var(--elevated);color:var(--text-secondary)}.secondary-button:hover:not(:disabled){color:var(--text);border-color:#3e4b5d}.compact-primary{min-height:32px;padding:5px 10px}.prompt-dock{display:grid;gap:10px;padding:12px}.prompt-custom input{border:1px solid var(--border);outline:0;background:var(--inset);border-radius:7px;flex:1;min-width:0;min-height:34px;padding:6px 9px}.prompt-custom input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.composer,.starter-composer{overflow:hidden;background:var(--inset);border:1px solid #3c495a;border-radius:13px;transition:border-color .16s ease-out,background-color .16s ease-out}.composer:focus-within,.starter-composer:focus-within{border-color:var(--accent);background:#11171e}.composer.disabled{opacity:.72}.composer textarea,.starter-composer textarea{display:block;resize:none;outline:0;color:var(--text);field-sizing:content;background:0 0;border:0;width:100%;min-height:62px;max-height:220px;padding:14px 16px 6px;line-height:1.55}.composer textarea::placeholder,.starter-composer textarea::placeholder,.prompt-custom input::placeholder{color:var(--text-muted);opacity:1}.composer-toolbar,.starter-toolbar{display:flex;align-items: center;min-height:40px;padding:4px 7px 7px 13px}.composer-toolbar>span,.starter-toolbar>span{display:flex;color:var(--text-muted);align-items: center;gap:7px;font-size:11px}.send-button,.abort-button{display:inline-flex;border-radius:8px;justify-content:center;align-items: center;gap:6px;min-height:31px;margin-left:auto}.send-button{background:var(--accent);color:#20150b;width:31px}.send-button:hover:not(:disabled){background:#ffc077}.abort-button{color:#f4aaa3;background:#29191b;border:1px solid #674244;padding:5px 9px;font-size:11px}.composer-hint{display:flex;color:var(--text-muted);justify-content:space-between;padding:6px 2px 0;font-size:10px}.new-session-surface{display:grid;overflow-y:auto;flex:1;place-items: center;min-height:0;padding:32px}.new-session-inner{width:min(100%,800px);transform:translateY(-5vh)}.new-session-title{display:flex;align-items: center;gap:14px;margin-bottom:24px}.new-session-mark{background:var(--accent-soft);border:1px solid #62472d;border-radius:12px;width:44px;height:44px}.new-session-title>div{min-width:0}.new-session-title h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.new-session-title button{display:flex;color:var(--text-muted);font-family:var(--mono);background:0 0;align-items: center;gap:6px;max-width:100%;padding:3px 0;font-size:11px}.new-session-title button:hover{color:var(--accent-text)}.starter-composer textarea{min-height:116px;padding-top:17px;font-size:15px}.button-loading{animation:spin .8s linear infinite;border:2px solid #6b4622;border-top-color:#20150b;border-radius:50%;width:13px;height:13px}@keyframes spin{to{transform:rotate(360deg)}}.new-session-error{margin-top:9px;margin-bottom:0}.starter-suggestions{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.starter-suggestions button{border:1px solid var(--border-soft);color:var(--text-muted);background:0 0;border-radius:8px;min-height:34px;padding:6px 10px;font-size:11px}.starter-suggestions button:hover:not(:disabled){border-color:var(--border);background:var(--inset);color:var(--text-secondary)}.authorization-gate{display:grid;background:var(--base);align-content: center;justify-items:start;width:min(100% - 40px,560px);height:100%;margin:0 auto}.authorization-mark{background:var(--accent-soft);border:1px solid #62472d;border-radius:13px;width:48px;height:48px;margin-bottom:22px}.authorization-gate p{color:var(--text-secondary);margin:13px 0 17px;font-size:15px}.authorization-gate pre{border:1px solid var(--border);background:var(--inset);color:var(--accent-text);border-radius:9px;min-width:190px;padding:11px 14px}.authorization-gate small{color:var(--text-muted);max-width:58ch;margin-top:13px}.project-browser-backdrop{position:fixed;z-index:80;display:grid;background:#06090dc7;place-items: center;padding:24px;inset:0}.project-browser{display:grid;grid-template-rows:auto auto auto minmax(220px,1fr)auto;overflow:hidden;background:var(--panel);border:1px solid #3c495a;border-radius:14px;width:min(100%,780px);height:min(720px,100dvh - 48px);box-shadow:0 18px 54px #0000006b}.project-browser-header{display:flex;justify-content:space-between;align-items: flex-start;padding:19px 20px 16px}.project-browser-header h1{letter-spacing:-.015em;margin:0;font-size:18px;font-weight:660}.project-browser-header p{color:var(--text-muted);margin:3px 0 0;font-size:12px}.icon-button{display:inline-flex;color:var(--text-muted);background:0 0;border-radius:8px;justify-content:center;align-items: center;width:34px;height:34px}.icon-button:hover:not(:disabled){background:var(--elevated);color:var(--text)}.icon-button.compact{width:28px;height:28px}.location-strip{display:flex;border-bottom:1px solid var(--border-soft);gap:6px;padding:0 20px 12px}.location-button{display:inline-flex;border:1px solid var(--border);background:var(--inset);color:var(--text-muted);border-radius:8px;align-items: center;gap:7px;min-height:34px;padding:6px 10px;font-size:12px}.location-button.active{background:var(--accent-soft);color:var(--accent-text);border-color:#62472d}.folder-breadcrumbs{display:flex;overflow-x:auto;border-bottom:1px solid var(--border-soft);color:var(--text-muted);font-family:var(--mono);white-space:nowrap;align-items: center;gap:2px;min-height:46px;padding:7px 16px;font-size:11px}.folder-breadcrumbs>span{display:inline-flex;align-items: center}.folder-breadcrumbs button:not(.icon-button){color:var(--text-secondary);background:0 0;border-radius:5px;padding:4px 5px}.folder-breadcrumbs button:not(.icon-button):hover{background:var(--elevated);color:var(--text)}.project-browser-body{overflow-y:auto;min-height:0;padding:8px}.folder-list{display:grid;align-content: start}.folder-list.loading{opacity:.55;pointer-events:none}.folder-row{display:grid;grid-template-columns:22px minmax(0,1fr)auto 20px;color:var(--text-secondary);text-align:left;background:0 0;border-radius:7px;align-items: center;gap:8px;width:100%;min-height:42px;padding:7px 10px}button.folder-row:hover:not(:disabled){background:var(--elevated);color:var(--text)}.folder-row>svg:first-child{color:var(--accent-text)}.folder-row>svg:last-child,.file-row,.file-row>svg:first-child{color:var(--text-muted)}.entry-note{color:var(--text-muted);font-family:var(--mono);font-size:10px}.browser-state{display:grid;color:var(--text-muted);text-align:center;align-content: center;justify-items:center;min-height:220px;padding:28px}.browser-state h2{color:var(--text);margin:13px 0 3px;font-size:15px;font-weight:640}.browser-state p{max-width:50ch;margin:0 0 14px;font-size:12px}.error-state>svg{color:var(--error)}.load-more-button{border:1px solid var(--border);background:var(--inset);color:var(--text-secondary);border-radius:8px;min-height:38px;margin:9px}.project-browser-footer{display:flex;border-top:1px solid var(--border-soft);background:var(--base);justify-content:space-between;align-items: center;gap:16px;min-height:67px;padding:11px 16px}.checkbox-control{display:flex;color:var(--text-muted);white-space:nowrap;align-items: center;gap:8px;font-size:11px}.checkbox-control input{accent-color:var(--accent);width:15px;height:15px}.broad-root-warning{display:grid;grid-template-columns:auto minmax(180px,1fr);color:var(--warning);align-items: start;gap:2px 8px;max-width:520px;font-size:11px}.broad-root-warning>svg{margin-top:1px}.broad-root-warning button{grid-column:2;color:var(--text-secondary);text-decoration:underline;background:0 0;width:max-content;padding:1px 0;font-size:11px}.project-browser-footer.has-root-confirmation{min-height:78px}.project-browser-actions{justify-content:flex-end;min-width:0}.selected-path{overflow:hidden;color:var(--text-muted);font-family:var(--mono);text-overflow:ellipsis;white-space:nowrap;max-width:310px;font-size:10px}.rail-scrim,.mobile-only{display:none}@media (max-width:980px){.ribbon-model{display:none}.workspace-path{max-width:34vw}.permission-select select{max-width:112px}}@media (max-width:760px){.app-shell{display:block}.mobile-only{display:inline-flex}.session-rail{position:fixed;z-index:70;visibility:hidden;width:min(86vw,310px);transition:transform .19s cubic-bezier(.16,1,.3,1),visibility 0s linear .19s;inset:0 auto 0 0;transform:translate(-102%)}.session-rail.open{visibility:visible;transition-delay:0s;transform:translate(0)}.rail-scrim{position:fixed;z-index:60;display:block;background:#05080cb3;width:100%;height:100%;inset:0}.workspace-main{width:100%;height:100dvh}.workspace-ribbon{gap:5px;padding-inline-start:8px;padding-inline-end:8px}.ribbon-menu{color:var(--accent-text);flex:none}.ribbon-menu,.rail-header .icon-button,.send-button{width:44px;min-width:44px;height:44px;min-height:44px}.ribbon-select{min-height:44px}.workspace-path{flex:1;min-width:0;max-width:none}.workspace-path-copy small,.ribbon-status,.ribbon-spacer{display:none}.conversation-column{padding-inline-start:16px;padding-inline-end:16px}.conversation-scroll>.conversation-column{padding-top:14px;padding-bottom:18px}.chat-message{grid-template-columns:1fr;gap:10px;padding-block-start:19px;padding-block-end:22px}.chat-message>header{height:auto}.agent-working{padding-left:0}.composer-hint span:last-child{display:none}.approval-row{grid-template-columns:auto minmax(0,1fr)}.approval-actions{grid-column:2;justify-content:flex-start}.new-session-surface{align-items: start;padding:52px 16px 24px}.new-session-inner{transform:none}.new-session-title h1{font-size:20px}.starter-suggestions{display:grid}.project-browser-backdrop{padding:0}.project-browser{border:0;border-radius:0;width:100%;height:100dvh}.project-browser-footer{flex-direction:column;align-items:stretch;gap:8px}.project-browser-actions{justify-content:space-between}.selected-path{max-width:50vw}}@media (max-width:460px){.workspace-ribbon{min-height:52px}.ribbon-select{height:44px;padding-inline-start:5px;padding-inline-end:5px}.ribbon-select>svg:first-of-type{display:none}.conversation-column{padding-inline-start:11px;padding-inline-end:11px}.composer-hint{display:none}.conversation-controls{padding-bottom:7px}.approval-actions,.prompt-options{flex-direction:column;align-items:stretch}.primary-button,.secondary-button{width:100%}.project-browser-header,.location-strip{padding-inline-start:14px;padding-inline-end:14px}}@media (prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}