@@ -105,15 +105,18 @@
105105 - [x] `/model` — interactive model selector (Select component, available providers/models)
106106 - [x] `/effort` — effort level selector
107107 - [x] `/session` — session manager (list, resume). Scoped to CWD.
108+- [x] `/login` — OAuth login via pi-ai (browser-based flow, no manual code input)
108109 - [x] Overlay layer system for interactive Select commands
109110 - [x] Wire `parseInput()` into Enter handler, route commands vs text
110111 - [x] Session truncation — keep max 20 per CWD, runs on init
112+- [x] Fix: pass `apiKey` from `state.providers` through `RunAgentOpts` to `streamSimple` (OAuth providers failed without this)
113+- [x] Fix: pass `effort` (reasoning level) to `streamSimple` (was silently ignored)
114+- [ ] `/logout` — OAuth logout (clear saved credentials)
111115 - [ ] `/new` — new session, reset counters
112116 - [ ] `/fork` — fork current session
113117 - [ ] `/undo` — remove last turn
114118 - [ ] `/reasoning` — toggle thinking display
115119 - [ ] `/verbose` — toggle full output (disable truncation)
116-- [ ] `/login` / `/logout` — OAuth flows via pi-ai
117120 - [ ] `/help` — list commands, AGENTS.md files, skills, plugins
118121 - [ ] `/` + Tab — command autocomplete in input
119122
@@ -125,20 +128,26 @@
125128 - `/effort` shows 4 levels (low/medium/high/xhigh), marks current.
126129 - `/session` lists sessions via `listSessions(db, cwd)`, labels show relative timestamp (`formatSessionDate`) + model + `(current)` marker. Resume swaps `state.session`, reloads messages and stats.
127130 - `truncateSessions(db, cwd, keep)` in `session.ts` — deletes oldest beyond limit per CWD. `listSessions` SQL uses `rowid DESC` tiebreaker for deterministic ordering.
131+- `/login` shows OAuth providers from `getOAuthProviders()` with login status. `performLogin()` calls `provider.login()` with `onAuth` (opens browser via `xdg-open`/`open`), `onProgress` (status in log). `onPrompt` rejects (no manual code input). On success: persists creds, registers API key in `state.providers`, auto-selects model if none.
132+- `apiKey` added to `RunAgentOpts` and passed to `streamSimple` — required for OAuth providers (env vars not set). `effort` also passed as `reasoning` option.
128133 - `handleInput()` routes through `parseInput()` → `handleCommand()` for commands, `submitMessage()` for text. Skill and image cases are stubs for Phase 4d.
129134 - `Theme` gained `overlayBg: Color` (default `"color08"`).
135+- `appendInfoMessage()` helper for system status messages in the log (login progress, etc.).
130136 - 162 tests across 9 files (session: 24, tools: 36, git: 10, skills: 14, prompt: 21, agent: 12, plugins: 10, input: 30, theme: 5).
131137
132138 ### Spec review findings (Phase 4c checkpoint)
133139
134-**Bugs / missing behavior:**
140+**Bugs (from earlier phases, deferred):**
135141
136-- `agent.ts` never passes `reasoning` (effort level) to `streamSimple()`. The `/effort` command updates `state.effort` but it has no effect on the LLM call. `RunAgentOpts` needs an `effort` field, and the `streamSimple` call needs `{ signal, reasoning: effort }`.
137-- Assistant messages not visibly streaming — text appears as full blocks instead of incrementally, causing jarring scroll jumps. Likely a rendering or event issue in `ui.ts` streaming path.
138-- Shell tool rendering doesn't show exit code (spec: "Shows the command, head + tail truncated output with a visual marker, and exit code"). `ToolExecResult` carries `isError` but not the numeric exit code.
139-- Status bar CWD truncation from the left (`…/mini-coder`) on narrow terminals — not implemented, just shows full abbreviated path.
140-- `Ctrl+Z` suspend/background — not implemented (spec lists it in key bindings).
141-- `/session` spec says "list, resume, delete" — we intentionally deferred delete (design decision).
142+- Assistant messages not visibly streaming — text appears as full blocks instead of incrementally, causing jarring scroll jumps. Likely a rendering or event issue in `ui.ts` streaming path (Phase 4b).
143+- Shell tool rendering doesn't show exit code (spec: "Shows the command, head + tail truncated output with a visual marker, and exit code"). `ToolExecResult` carries `isError` but not the numeric exit code (Phase 4b).
144+- Status bar CWD truncation from the left (`…/mini-coder`) on narrow terminals — not implemented, just shows full abbreviated path (Phase 4b).
145+- `Ctrl+Z` suspend/background — not implemented (spec lists it in key bindings) (Phase 4b).
146+
147+**Design decisions:**
148+
149+- `/session` delete deferred — spec says "list, resume, delete" but Select component doesn't expose highlighted item for secondary actions.
150+- `/login` has no manual code input fallback — `onPrompt` rejects. Browser callback has always worked in practice.
142151
143152 ### 4d — Polish