Skip to content

Commit 7dd68cb

Browse files
authored
feat: repaint the desktop chrome, adopt the DeepSeek tokens, and add thinking effort levels (#97)
## Related Issue No issue. The problem is described below. ## Problem Several things had drifted at once across the desktop app and the web UI: - The desktop window painted its own chrome, lost the native macOS corners and the vibrancy material, and shipped without the release changesets it needed. - The web UI's colours came from ad-hoc values. In the light theme the secondary and meta label ramp measured 3.71:1, 2.13:1 and 1.26:1 on white — all below WCAG AA. - The composer offered a single thinking on/off row that always sent `high`, even though the model catalog knows which effort levels each model supports and every other renderer already offers the full set. - The model quick-switch menu had a height floor but no ceiling, so a provider with roughly twenty models filled the whole window. - The marketing site was removed, but a desktop test still read `apps/site/src/App.vue` and an oauth comment still pointed at it. - The legacy migration package was removed, leaving stale references behind. ## What changed **Desktop.** The macOS window keeps its native frame and vibrancy material, both palettes were repainted, the window is opaque on every platform, and the release workflow now pins its actions to commit SHAs and publishes to the dedicated desktop release repository. **Design tokens.** The web UI adopts the vendored DeepSeek token sheets. The light palette overrides three label tokens, because the vendored ramp fails AA on a white page and the neutral scale has no step between -600 and -700; the replacements measure 5.00:1, 4.57:1 and 3.25:1 and keep the ramp ordering. Dark mode keeps the vendored aliases untouched. **Thinking effort.** The model catalog now carries `support_efforts` and `adaptive_thinking` through all five layers (zod schema → `toProtocolModel` → `WireModel` → `toAppModel` → `AppModel`), so the web client finally knows what a model offers. The composer lists those levels, clamps a requested level to the nearest lower supported one, and shows the effective level in the footer pill. The rules mirror `packages/node-sdk/src/thinking-levels.ts`; the web app has no dependency on the SDK, so the mirror is deliberate. **Menu height.** The quick-switch dropdown is capped at 360px and scrolls. **Cleanup.** The marketing site references, the legacy migration fallout, and two stale attachment-chip theme overrides are gone. The prompt anchor rail's setting hint and code comment now describe what the rail actually draws. ### Verification - Full suite: 10285 passed, 71 skipped, 2 todo — green via the pre-push hook. - `pnpm --filter @pymodel/pythinker-web run typecheck` — exit 0. - `pnpm run lint` — exit 0, no errors. - Light-theme contrast measured live in Chromium, not calculated only. ## Checklist - [x] I have read the [CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md) document. - [x] I have linked a related issue, or explained the problem above. - [x] I have added tests that prove my feature works. - [x] Ran `gen-changesets` skill, or this PR needs no changeset. - [x] Ran `gen-docs` skill, or this PR needs no doc update.
1 parent ac29bc4 commit 7dd68cb

270 files changed

Lines changed: 2535 additions & 13494 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/gen-changesets/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: Use when generating changesets in the pythinker-code repository, in
99

1010
- `@pymodel/pythinker-code`: the CLI
1111

12-
All other `@pymodel/*` packages are treated as internal packages, including `@pymodel/pythinker-code-sdk`, `agent-core`, `kosong`, `kaos`, `pythinker-code-oauth`, `pythinker-telemetry`, and `migration-legacy`.
12+
All other `@pymodel/*` packages are treated as internal packages, including `@pymodel/pythinker-code-sdk`, `agent-core`, `kosong`, `kaos`, `pythinker-code-oauth`, and `pythinker-telemetry`.
1313

1414
## Core Rules
1515

.changeset/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@ All other workspace packages are private internal packages, are not published to
2222
- `@pymodel/pythinker-telemetry`
2323
- `@pymodel/pythinker-web`
2424
- `@pymodel/kosong`
25-
- `@pymodel/migration-legacy`
2625
- `@pymodel/protocol`
2726
- `@pymodel/server`
2827
- `@pymodel/server-e2e`
2928
- `@pymodel/dashboard`
3029
- `@pymodel/dashboard-server`
3130
- `@pymodel/dashboard-web`
32-
- `pythinker-migration-legacy`
3331

3432
Version impact from internal dependencies must be judged manually. The published artifacts for CLI and SDK bundle internal workspace packages into the artifact itself; runtime `dependencies` of published packages must not include any `@pymodel/*` internal workspace packages.
3533

.changeset/config.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
"@pymodel/pythinker-telemetry",
1515
"@pymodel/pythinker-web",
1616
"@pymodel/kosong",
17-
"@pymodel/migration-legacy",
1817
"@pymodel/protocol",
1918
"@pymodel/server",
2019
"@pymodel/server-e2e",
2120
"@pymodel/dashboard",
2221
"@pymodel/dashboard-server",
23-
"@pymodel/dashboard-web",
24-
"pythinker-migration-legacy"
22+
"@pymodel/dashboard-web"
2523
],
2624
"snapshot": {
2725
"useCalculatedVersion": true,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@pymodel/pythinker-code": patch
3+
"@pymodel/pythinker-desktop": patch
4+
---
5+
6+
Make the workspace header, session timestamps, and the settings row legible in dark mode on the translucent desktop sidebar.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pymodel/pythinker-desktop": patch
3+
---
4+
5+
Publish desktop releases to a dedicated update channel so update checks resolve a desktop build instead of an unrelated release, and fail the release when a packaged build carries no update feed.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@pymodel/pythinker-desktop": patch
3+
---
4+
5+
Pin the Host port so the desktop app reconnects to its own Host, and stop reporting builds that cannot self-update as update errors.

.changeset/general-session-mode.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@pymodel/agent-core": minor
3+
"@pymodel/protocol": minor
4+
---
5+
6+
Add a general non-coding session mode for research and connected tools.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@pymodel/protocol": minor
3+
"@pymodel/agent-core": minor
4+
"@pymodel/pythinker-web": minor
5+
---
6+
7+
The model catalog now carries per-model thinking-effort levels and the adaptive-thinking flag to API clients.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@pymodel/pythinker-code': minor
3+
---
4+
5+
Remove the legacy pythinker-cli migration: the `pythinker migrate` subcommand, the first-launch
6+
migration prompt, and the `[imported]` session badge.

.github/workflows/release.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ jobs:
6161
id-token: write # Required for NPM Trusted Publishing (OIDC)
6262
steps:
6363
- name: Checkout
64-
uses: actions/checkout@v6
64+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
6565
with:
6666
fetch-depth: 0
6767

6868
- name: Setup pnpm
69-
uses: pnpm/action-setup@v6
69+
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # pinned from v6
7070

7171
- name: Setup Node.js
72-
uses: actions/setup-node@v6
72+
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # pinned from v6
7373
with:
7474
node-version-file: .nvmrc
7575
cache: "pnpm"
@@ -93,14 +93,14 @@ jobs:
9393

9494
- name: Mint release-bot token
9595
id: release-bot
96-
uses: actions/create-github-app-token@v2
96+
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # pinned from v2
9797
with:
9898
app-id: ${{ vars.RELEASE_BOT_APP_ID }}
9999
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
100100

101101
- name: Create Release Pull Request or Publish to npm
102102
id: changesets
103-
uses: changesets/action@v1
103+
uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # pinned from v1
104104
with:
105105
publish: node scripts/release/changeset-publish-idempotent.mjs
106106
version: pnpm run version:release
@@ -142,13 +142,13 @@ jobs:
142142
runs-on: ubuntu-latest
143143
steps:
144144
- name: Checkout
145-
uses: actions/checkout@v6
145+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
146146

147147
- name: Setup pnpm
148-
uses: pnpm/action-setup@v6
148+
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # pinned from v6
149149

150150
- name: Setup Node.js
151-
uses: actions/setup-node@v6
151+
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # pinned from v6
152152
with:
153153
node-version-file: .nvmrc
154154
cache: "pnpm"
@@ -196,7 +196,7 @@ jobs:
196196
197197
- name: Upload VSIX artifacts
198198
if: always()
199-
uses: actions/upload-artifact@v7
199+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # pinned from v7
200200
with:
201201
name: pythinker-code-vsix
202202
path: apps/vscode/artifacts/vsix/*.vsix
@@ -296,12 +296,12 @@ jobs:
296296
runs-on: ubuntu-latest
297297
steps:
298298
- name: Checkout
299-
uses: actions/checkout@v6
299+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
300300
with:
301301
fetch-depth: 0
302302

303303
- name: Setup Node.js
304-
uses: actions/setup-node@v6
304+
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # pinned from v6
305305
with:
306306
node-version-file: .nvmrc
307307

@@ -318,10 +318,10 @@ jobs:
318318
runs-on: ubuntu-latest
319319
steps:
320320
- name: Checkout
321-
uses: actions/checkout@v6
321+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
322322

323323
- name: Setup Node.js
324-
uses: actions/setup-node@v6
324+
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # pinned from v6
325325
with:
326326
node-version-file: .nvmrc
327327

@@ -330,7 +330,7 @@ jobs:
330330
# Cloning and pushing the tap needs contents and nothing else.
331331
- name: Mint tap token
332332
id: tap-token
333-
uses: actions/create-github-app-token@v2
333+
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # pinned from v2
334334
with:
335335
app-id: ${{ vars.RELEASE_BOT_APP_ID }}
336336
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
@@ -388,10 +388,10 @@ jobs:
388388

389389
steps:
390390
- name: Checkout
391-
uses: actions/checkout@v6
391+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
392392

393393
- name: Download native artifacts
394-
uses: actions/download-artifact@v8
394+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # pinned from v8
395395
with:
396396
pattern: pythinker-code-native-*
397397
path: dist-native-release

0 commit comments

Comments
 (0)