dsh-deepseek-webchat 0.4.7 → 0.4.8

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
@@ -17,6 +17,7 @@ browser uses.
17
17
  - [Known limitations](#known-limitations)
18
18
  - [How it works](#how-it-works)
19
19
  - [Development](#development)
20
+ - [Publishing](#publishing)
20
21
 
21
22
  ## What it does
22
23
 
@@ -407,6 +408,53 @@ regress.
407
408
  If you hit that dialog, your installed copy is stale. Reinstall (see
408
409
  [Install](#install)) after pulling the fixed commit.
409
410
 
411
+ ## Publishing
412
+
413
+ This package is published to npm as `dsh-deepseek-webchat`. `package.json`
414
+ carries `publishConfig` (`access: public`, `registry: https://registry.npmjs.org/`),
415
+ so a plain `npm publish` targets the right registry with no extra flags — even
416
+ though a local `~/.npmrc` may point at a mirror.
417
+
418
+ Releases are **automatic**. Push to `main` and `.github/workflows/publish.yml`
419
+ runs the suite, then publishes — but only if `package.json`'s `version` is one
420
+ the registry does not already have. So the whole release procedure is:
421
+
422
+ 1. Bump `version` in `package.json`.
423
+ 2. Run `npm run build`, commit `src/` and `lib/` together (`npm test` fails if
424
+ they differ), and push to `main`.
425
+
426
+ The run either publishes that version or reports that it is already live and
427
+ exits successfully. **A push without a version bump is a no-op, not a
428
+ failure** — which is why every change that should ship needs its own bump.
429
+ Docs-only commits still trigger the workflow and still no-op.
430
+
431
+ Authentication is npm **Trusted Publishing** (OIDC): GitHub mints a short-lived
432
+ token for the job and npm exchanges it for a publish token scoped to this one
433
+ package. There is **no `NPM_TOKEN` secret anywhere**. The workflow deliberately
434
+ does not use `actions/setup-node`'s `registry-url` input — that writes
435
+ `//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}` into `~/.npmrc`, and with
436
+ no such variable defined the placeholder survives as a literal string that npm
437
+ would send as the token. `publishConfig.registry` already names the registry.
438
+
439
+ <details>
440
+ <summary>One-time setup: attaching the trusted publisher</summary>
441
+
442
+ A trusted publisher can only be attached to a package that **already exists on
443
+ the registry**, so the very first release was published by hand (`npm publish`
444
+ from a checkout); the workflow takes over from the second one. On npmjs.com:
445
+ package → Settings → Trusted Publisher → GitHub Actions, then
446
+
447
+ | Field | Value |
448
+ |---|---|
449
+ | Repository | `Ckarefulon/dsh-deepseek-webchat` |
450
+ | Workflow filename | `publish.yml` |
451
+ | Environment | *(leave blank)* |
452
+
453
+ The filename must match exactly — npm ties the grant to it, and a mismatch
454
+ shows up as the publish failing with `ENEEDAUTH`.
455
+
456
+ </details>
457
+
410
458
  ## License
411
459
 
412
460
  MIT. See [LICENSE](LICENSE).
package/lib/client.js CHANGED
@@ -569,7 +569,16 @@ window.__ModuleLoader__.load({
569
569
  '[' + OVERLAY_ATTR + '] webview{-webkit-app-region:no-drag;border:0;display:flex;width:100%;height:100%}',
570
570
  // The panel itself.
571
571
  '.dswc-root{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;font-size:12px;color:var(--dsw-alias-label-primary,inherit)}',
572
- '.dswc-toolbar{display:flex;align-items:center;gap:6px;padding:6px 8px;border-bottom:1px solid var(--dsw-alias-border-l4,rgba(128,128,128,.25));flex:none}',
572
+ // The toolbar carries the panel's top rule, so its height is not a taste
573
+ // decision: the shell puts the conversation header's horizontal line at
574
+ // the bottom of a 38px tab strip (`_tabStrip` is `height:28px;
575
+ // padding:10px 6px 0`), and every sidebar tab the shell ships opens with
576
+ // a `height:38px; border-bottom:.5px` header. A tab body starts at y=38,
577
+ // so a 38px header puts its rule at 76 — the same row as the
578
+ // conversation's. Measured against the live app: 6px of padding around
579
+ // 24px buttons plus a 1px border came to 36px, leaving this rule two
580
+ // pixels above the one it is meant to continue.
581
+ '.dswc-toolbar{box-sizing:border-box;display:flex;align-items:center;gap:6px;height:38px;padding:0 8px;border-bottom:.5px solid var(--dsw-alias-border-l3,rgba(128,128,128,.24));flex:none}',
573
582
  '.dswc-status{font-size:11px;line-height:1;color:var(--dsw-alias-label-tertiary,#adb2b8)}',
574
583
  '.dswc-status[data-state="bound"]{color:#2ea043}',
575
584
  '.dswc-status[data-state="error"]{color:#d1242f}',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-deepseek-webchat",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Embeds the official chat.deepseek.com web app in a DSH sidebar tab through the desktop shell's native browser guest, binds one DeepSeek conversation per DSH Session, and sends selected DSH context into the DeepSeek composer as a blockquote.",
5
5
  "keywords": [
6
6
  "dsh",
@@ -569,7 +569,16 @@ window.__ModuleLoader__.load({
569
569
  '[' + OVERLAY_ATTR + '] webview{-webkit-app-region:no-drag;border:0;display:flex;width:100%;height:100%}',
570
570
  // The panel itself.
571
571
  '.dswc-root{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;font-size:12px;color:var(--dsw-alias-label-primary,inherit)}',
572
- '.dswc-toolbar{display:flex;align-items:center;gap:6px;padding:6px 8px;border-bottom:1px solid var(--dsw-alias-border-l4,rgba(128,128,128,.25));flex:none}',
572
+ // The toolbar carries the panel's top rule, so its height is not a taste
573
+ // decision: the shell puts the conversation header's horizontal line at
574
+ // the bottom of a 38px tab strip (`_tabStrip` is `height:28px;
575
+ // padding:10px 6px 0`), and every sidebar tab the shell ships opens with
576
+ // a `height:38px; border-bottom:.5px` header. A tab body starts at y=38,
577
+ // so a 38px header puts its rule at 76 — the same row as the
578
+ // conversation's. Measured against the live app: 6px of padding around
579
+ // 24px buttons plus a 1px border came to 36px, leaving this rule two
580
+ // pixels above the one it is meant to continue.
581
+ '.dswc-toolbar{box-sizing:border-box;display:flex;align-items:center;gap:6px;height:38px;padding:0 8px;border-bottom:.5px solid var(--dsw-alias-border-l3,rgba(128,128,128,.24));flex:none}',
573
582
  '.dswc-status{font-size:11px;line-height:1;color:var(--dsw-alias-label-tertiary,#adb2b8)}',
574
583
  '.dswc-status[data-state="bound"]{color:#2ea043}',
575
584
  '.dswc-status[data-state="error"]{color:#d1242f}',