Commit 1dd9ed2
authored
feat(shell): add thinking effort controls and auto-mode deliberation (#50)
* test(auth): guard committed login-brand assets against source drift
web/static/ is a build output (scripts/build_web.py rmtree's + repopulates it
from the vite build, whose brand files come from web/public/brand). The two
brand assets are force-committed only so the test job — which doesn't run the
web build — has the files the OAuth callback reads. Add a guard asserting those
committed copies stay byte-identical to web/public/brand, so a brand-source
change can't silently leave the branding tests validating a stale fixture.
* fix(auth): fail soft when a browser-login brand asset is missing
The OAuth callback page embeds icon.svg/favicon.ico as data URIs. These are
build outputs (web/static) and normally always present, but a broken build
shouldn't crash login over a cosmetic asset. Catch OSError in the data-uri
helper, log a warning, and embed an empty source so the callback still renders.
Add a test for the degraded path.
* feat(approval): deliberate before destructive auto-approved actions
Under auto_deliberate, an irreversible shell action (rm -rf, git push
--force, git reset --hard, dd, truncate) is bounced once before running --
even under auto/yolo -- so the agent weighs alternatives first. One-shot:
the identical re-issue runs, so deliberation never permanently whitelists
the command. ApprovalResult gains a deliberation variant whose feedback is
not framed as a user rejection.
* feat(ui): thinking-level cycle + frame-color helpers for Shift+Tab
Pure helpers for the Shift+Tab thinking feature: next_thinking_level()
cycles off->minimal->low->medium->high->xhigh->off, and thinking_frame_color/
thinking_frame_style map each level to a prompt border color (grey->blue->
violet->purple) per theme. Keymap + prompt-handler wiring follows.
* fix(tui): avoid prompt resize artifacts
* feat(ui): continue thinking effort selector port
* docs: spec for shimmer traveling-waves redesign
* feat(ui): traveling-wave shimmer with center-out splash
Restructure the active-work shimmer into a four-phase loop: a wave
sweeps right-to-left, splashes outward from the middle, sweeps back
left-to-right, splashes again, then repeats. Replaces the previous
single-direction repeating sweep. Stays purely time-derived so the
prompt, activity tree, and pinned-todo renderers animate in sync.
* feat(ui): silver shimmer sheen over muted orange-yellow verb
Recolor the active-work shimmer: highlight is now silver (#D8DCE2)
instead of violet, and the verb-spinner/pinned-todo base is a muted
orange-yellow (#D49E5A) instead of golden amber. Point palette tests at
the motion constants so future shade tweaks don't churn test literals.
* fix(recap): summarize turn outcome instead of opening intent
The per-turn '※ recap:' line quoted the assistant's first sentence,
which is always an intent preamble ('I'll start by gathering...') rather
than what the turn accomplished. Add an outcome-sentence heuristic that
skips intent/offer/question/path-noise lines and prefers the closing
summary, and append factual deltas (N files changed · M steps). Wire the
live view to count files changed per turn from diff display blocks.
Also improve /recap: session bullets lead with the session outcome
instead of the first user message, and a single short no-op session is
reported plainly as a light day rather than padded into a bullet list.
* feat(thinking): support minimal reasoning effort across providers
Make "minimal" a first-class ThinkingEffort: OpenAI round-trips it
natively, the Pythinker provider preserves it instead of collapsing to
low, Anthropic clamps it down to its floor (low) rather than up to high,
and Gemini maps it to its lowest thinking level/budget.
* feat(thinking): make thinking effort a first-class config and runtime setting
Add a persisted default_thinking_effort alongside the legacy
default_thinking bool, with the effort string as the source of truth
(falling back to the bool only for pre-existing configs). create_llm now
takes an explicit effort, clamps it to model capabilities, preserves
levels like xhigh/minimal instead of collapsing every enabled request to
high, and threads the effort through the CLI, ACP, review, web API,
subagents, login flows, setup, and the /model and /thinking selectors.
Always-thinking models surface native reasoning instead of an effort
dial.
* feat(ui): cycle thinking effort with Shift+Tab and color the prompt by effort
Repurpose Shift+Tab from plan-mode toggle to a thinking-effort cycle over
the model's available levels, with a toast and telemetry. The prompt
separator and bottom-toolbar label now reflect the active effort (or
"native reasoning"), and the effort color ramp moves from a grey/violet
scale to a cool-to-warm slate→pink ramp. Tips and keybinding help updated
to match.
* feat(auto): auto-deliberate policy with blind advisor for AskUserQuestion
Add an "auto_deliberate" ask-user policy: in auto mode, instead of
silently dismissing AskUserQuestion, run an independent tool-less advisor
that blind-ranks the agent's own options and hand the verdict back so the
agent self-decides. Destructive auto-approved actions are bounced once for
deliberation via a tool-agnostic classifier, and the auto-mode prompt
invites the tool at genuine forks under this policy.
* fix(ui): render reports as padded panels and preserve report-fence seams
Render report blocks as a rounded, padded Rich panel (a standalone
reading surface) with hanging-indented wrapped locations, and keep a
one-row seam when a report fence follows streamed prose. Ask-question
cards gain blank-row separation between header and questions.
* fix(ui): keep status shimmer animating during quiet wire periods
Add a prompt-scoped refresh loop so the pinned-status shimmer stays
frame-based when wire events are sparse (e.g. a long-running subagent),
honoring reduced-motion with a slower interval.
* feat(shell): no-arg /logout selector and provider login status
Map each login/logout entry to the managed provider keys that signal it is
configured, so /login and /logout report real status and a bare /logout
opens a selector over only the logged-in providers (with a single OpenAI
entry covering both OAuth and API-key credentials).
* fix(agent): include base_prompt in run-agents fingerprint
Two RunAgents calls differing only in base_prompt produced the same
fingerprint; include it so distinct launches are not deduplicated.
* test(ui): align compaction-seam and recap spacing expectations
Update rendering tests to match the committed compaction/recap seam
behavior: compaction commits a leading blank row plus block, and turn
recaps are framed by blank rows.
* docs(changelog): note thinking effort controls
* test(ui): address report fence review feedback1 parent ccdcb0d commit 1dd9ed2
90 files changed
Lines changed: 2900 additions & 306 deletions
File tree
- docs/superpowers/specs
- packages/pythinker-core
- src/pythinker_core
- chat_provider
- contrib/chat_provider
- tests
- api_snapshot_tests
- src/pythinker_code
- acp
- auth
- cli
- soul
- dynamic_injections
- subagents
- tools
- agent
- ask_user
- ui
- shell
- components
- selectors
- tool_renderers
- visualize
- web/api
- tests
- auth
- core
- tools
- ui_and_conv
- web
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
Lines changed: 130 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| |||
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
140 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| |||
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
| 202 | + | |
| 203 | + | |
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
178 | 183 | | |
179 | 184 | | |
180 | 185 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
194 | | - | |
| 195 | + | |
| 196 | + | |
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
106 | 111 | | |
107 | 112 | | |
108 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
59 | | - | |
| 61 | + | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
0 commit comments