@furayoshi/dsh-widechat 0.7.0 → 0.8.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 +41 -24
- package/lib/client/index.js +55 -34
- package/lib/index.d.ts +35 -1
- package/lib/index.js +22 -6
- package/package.json +4 -6
package/README.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# @furayoshi/dsh-widechat
|
|
2
2
|
|
|
3
|
-
A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) plugin that widens the conversation column past the shipped
|
|
3
|
+
A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) plugin that widens the conversation column past the shipped cap, right-aligns the session stats strip, caps the user-message bubble, and caps the composer's inner scroll so long inputs do not hide the conversation above. Adds a settings row to the General page so all of these can be tuned without restarting DSH.
|
|
4
|
+
|
|
5
|
+
**Compatibility**
|
|
6
|
+
| DSH version | min version |
|
|
7
|
+
| :--- | :--- |
|
|
8
|
+
| `0.1.2-rc.1` | `0.8` |
|
|
9
|
+
| `0.1.1-rc.1` | `<0.8` |
|
|
10
|
+
|
|
11
|
+
**NOTE**: as at the current state, this packages has been heavily vibecoded, including most of this README. I might rewrite it at the later date, but you have been warned :)
|
|
4
12
|
|
|
5
13
|

|
|
6
14
|
|
|
@@ -8,14 +16,14 @@ A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) plugin tha
|
|
|
8
16
|
|
|
9
17
|
## What it does
|
|
10
18
|
|
|
11
|
-
The shipped DSH web UI caps the chat content
|
|
19
|
+
The shipped DSH web UI caps the chat content with `--dsh-chat-content-width` (a fixed pixel value on pre-0.1.2 hosts, a `clamp()` of the column width on 0.1.2+) and centers the column with `margin: 0 auto`. On any monitor wider than ~1024px this leaves large empty gutters on both sides and a narrow reading area. This plugin widens that cap to leave only the configured gutter, caps the user-message bubble to a share of the column (the shipped default is narrow on wide viewports), and caps the composer's inner scroll to a percentage of the viewport so long inputs do not eat the conversation above.
|
|
12
20
|
|
|
13
21
|
A small row in the **General** settings page lets you tune four values:
|
|
14
22
|
|
|
15
23
|
- **Chat column gutter** — a slider, 0–10% of the cell on each side. The shipped default is `1 %`. The column is sized to leave this much whitespace on each side.
|
|
16
24
|
- **Session-stats alignment** — a three-way toggle (left / center / right). The shipped default is `right`. The session-stats line under the composer (token counts, duration, etc.) lines up accordingly.
|
|
17
25
|
- **Your message bubble width** — a slider, 30–100% of the chat column. The shipped default is `75 %`. Your outgoing messages are right-aligned at this width; the assistant's messages fill the rest of the column.
|
|
18
|
-
- **Composer max height** — a slider, 20–80% of the viewport. The shipped default is `50 %`. The composer
|
|
26
|
+
- **Composer max height** — a slider, 20–80% of the viewport. The shipped default is `50 %`. The composer's inner textarea scroll is capped at this height (with a 52 px floor), so long inputs do not push the conversation off-screen.
|
|
19
27
|
|
|
20
28
|
If a saved value is out of range or of the wrong type, the plugin falls back to the default and logs a `console.warn` with the offending field. The page never refuses to render.
|
|
21
29
|
|
|
@@ -23,7 +31,7 @@ If a saved value is out of range or of the wrong type, the plugin falls back to
|
|
|
23
31
|
|
|
24
32
|
DSH's `plugin` subcommand forwards pnpm commands into the profile directory and reconciles the profile's `dsh.profile.bundles` array against the installed packages. So `dsh plugin --profile web add <spec>` is the canonical install path: it runs `pnpm add <spec>`, then automatically appends the package to `bundles` if (and only if) the installed `package.json` declares a `dsh.bundle.patch` — which this package does.
|
|
25
33
|
|
|
26
|
-
### From
|
|
34
|
+
### From npmjs
|
|
27
35
|
|
|
28
36
|
```sh
|
|
29
37
|
dsh plugin --profile web add @furayoshi/dsh-widechat
|
|
@@ -41,7 +49,7 @@ The `github:<owner>/<repo>` spec is pnpm's shorthand for `https://github.com/<ow
|
|
|
41
49
|
|
|
42
50
|
```sh
|
|
43
51
|
# A specific tag
|
|
44
|
-
dsh plugin --profile web add @furayoshi/dsh-widechat@github:FraYoshi/dsh-widechat#v0.
|
|
52
|
+
dsh plugin --profile web add @furayoshi/dsh-widechat@github:FraYoshi/dsh-widechat#v0.8.0
|
|
45
53
|
|
|
46
54
|
# A branch (e.g. main)
|
|
47
55
|
dsh plugin --profile web add @furayoshi/dsh-widechat@github:FraYoshi/dsh-widechat#main
|
|
@@ -102,27 +110,32 @@ If you want to edit the source, the build is `npm run build` (which calls `tsc`
|
|
|
102
110
|
|
|
103
111
|
The plugin is two halves:
|
|
104
112
|
|
|
105
|
-
- **Host** (`lib/index.js`) registers
|
|
113
|
+
- **Host** (`lib/index.js`) registers the settings namespace `dsh-widechat` on the host `settings` service via `ctx.settings.register("dsh-widechat", schema)` with a `z.object` schema (`chatGutterPct`, `statsAlign`, `userBubblePct`, `composerMaxHeightPct`). The schema's bounds match the slider ranges exactly.
|
|
106
114
|
- **Client** (`lib/client/index.js`) binds a `SettingsScope` to that namespace, re-injects a small CSS override on every scope change, and registers a row in the `settings.general.item` slot.
|
|
107
115
|
|
|
108
|
-
The CSS override is intentionally minimal — it touches
|
|
116
|
+
The CSS override is intentionally minimal — it touches three things, one per setting (hashes as of DSH 0.1.2-rc.1; the column, bubble and stats hashes live in `dsh-client-ui-chat`, the rest in `dsh-client-ui-conversation`):
|
|
109
117
|
|
|
110
118
|
```css
|
|
111
119
|
:root, .wSkVaW_root, [data-phase] {
|
|
112
120
|
--dsh-chat-content-width: calc(100% - 2 × <chatGutterPct>%) !important;
|
|
113
121
|
--dsh-composer-card-max-width: calc(100% - 2 × <chatGutterPct>%) !important;
|
|
114
122
|
}
|
|
115
|
-
.
|
|
116
|
-
.
|
|
117
|
-
|
|
118
|
-
|
|
123
|
+
.Sixlwa_userStack { max-width: <userBubblePct>% !important; }
|
|
124
|
+
.uV2eYG_scroll {
|
|
125
|
+
min-height: 52px !important; /* floor, see below */
|
|
126
|
+
max-height: calc(<composerMaxHeightPct>vh - 64px) !important; /* ceiling on the textarea */
|
|
127
|
+
}
|
|
128
|
+
.uV2eYG_hero .uV2eYG_scroll { max-height: calc(<composerMaxHeightPct>vh - 132px) !important; }
|
|
129
|
+
.-NDN2W_root { text-align: <statsAlign> !important; }
|
|
119
130
|
```
|
|
120
131
|
|
|
121
132
|
`chatGutterPct` and `userBubblePct` are **percentages of the cell**; `composerMaxHeightPct` is a **percentage of the viewport**. The cell grows when the sidebar collapses to the rail (56px from 280px), so the column and the bubble grow with it — and the gutter stays at the same percentage. The composer cap, in contrast, is absolute to the viewport so the conversation above is always visible regardless of the sidebar state.
|
|
122
133
|
|
|
123
|
-
The
|
|
134
|
+
The composer card itself has **no** `max-height` and **no** `overflow: hidden` override. The card grows naturally to fit its inner scroll (capped above) plus the card's chrome (accessory row, trigger row, padding, gaps). Earlier versions did enforce `max-height: <cap>vh; overflow: hidden;` on the card — but the popover menus (model picker, permission presets, …) open upward from the trigger row inside the card via `bottom: calc(100% + 8px)`, and the card's `overflow: hidden` clipped any portion of the menu that extended above the card top. With the card free to overflow, the menus extend above the card into the conversation area and are fully visible. The conversation scroll above the composer shrinks to make room for the taller card.
|
|
124
135
|
|
|
125
|
-
|
|
136
|
+
The `min-height: 52px` on `.uV2eYG_scroll` mirrors the shipped hero variant's mirror floor. Without it, on a small viewport with a low cap, the scroll collapses to ~28 px and the trigger row below it ends up visually overlapping the typing area. The 52 px floor keeps the textarea usable in that case; below it, the slider value is a no-op for the cap (the scroll holds at 52 px and does not get any smaller).
|
|
137
|
+
|
|
138
|
+
DSH's shipped rules are left untouched. The column is still `width: 100%`, `max-width: var(--dsh-chat-content-width)`, `margin: 0 auto`. Toggle, scroll, resize — all the DSH default behavior. The plugin only changes the values of variables (and a few caps on the composer's inner scroll) that DSH's CSS already reads.
|
|
126
139
|
|
|
127
140
|
## Configuration
|
|
128
141
|
|
|
@@ -143,9 +156,13 @@ Invalid values are dropped to the defaults and a `console.warn` is logged with t
|
|
|
143
156
|
|
|
144
157
|
### This plugin overrides internal CSS-module class hashes
|
|
145
158
|
|
|
146
|
-
`.wSkVaW_root`, `.
|
|
159
|
+
`.wSkVaW_root`, `.EvIC1a_column`, `.uV2eYG_card`, `.uV2eYG_scroll`, `.Sixlwa_userStack`, `.-NDN2W_root` are CSS-Modules-generated class names from the DSH UI packages — since 0.1.2 the root and composer hashes come from `@deepseek-ai/dsh-client-ui-conversation` and the column, bubble and stats hashes from the new `@deepseek-ai/dsh-client-ui-chat`. Their hashes (the part after the underscore) are recomputed every time the owning package is rebuilt. Any release of those packages can therefore silently break this plugin — specifically, if the shipped rule that reads the variable or has the matching class name changes shape, our override no longer reaches it.
|
|
160
|
+
|
|
161
|
+
After upgrading DSH, check whether the chat column widens, the user bubble stays right-aligned at the configured width, the composer's inner scroll caps at the configured height (and never gets smaller than 52 px), and the stats line still aligns. If any of those regress, the upstream CSS-module hashes changed; see "Updating" below.
|
|
162
|
+
|
|
163
|
+
### The slider wins over DSH's drag-to-resize (0.1.2+)
|
|
147
164
|
|
|
148
|
-
|
|
165
|
+
DSH 0.1.2 added drag handles on the chat column that persist a width in `localStorage` (`dsh.conversation.contentWidth`) and write it inline as `--dsh-chat-user-width`. This plugin's `!important` override of `--dsh-chat-content-width` takes precedence over that inline value, so the gutter slider stays the source of truth and dragging the handles is effectively a no-op while the plugin is installed.
|
|
149
166
|
|
|
150
167
|
### The `chatGutterPct` is interpreted against the cell, not the viewport
|
|
151
168
|
|
|
@@ -161,18 +178,18 @@ The package ships a `cordis.patch.yml` (in `files: ["lib", "cordis.patch.yml", "
|
|
|
161
178
|
|
|
162
179
|
## Updating
|
|
163
180
|
|
|
164
|
-
When the upstream hashes change, the fix is mechanical but unavoidable until DSH exposes a stable public API for layout overrides. The plugin targets six CSS-module class hashes:
|
|
181
|
+
When the upstream hashes change, the fix is mechanical but unavoidable until DSH exposes a stable public API for layout overrides. The plugin targets six CSS-module class hashes (as of DSH 0.1.2-rc.1):
|
|
165
182
|
|
|
166
|
-
- `.wSkVaW_root` — the conversation root (defines the chat-content-width variable)
|
|
167
|
-
- `.
|
|
168
|
-
- `.uV2eYG_card` — the composer card (
|
|
169
|
-
- `.uV2eYG_scroll` — the composer's inner textarea scroll (we cap its max-height)
|
|
170
|
-
- `.
|
|
171
|
-
-
|
|
183
|
+
- `.wSkVaW_root` — the conversation root (defines the chat-content-width variable) — `dsh-client-ui-conversation`
|
|
184
|
+
- `.EvIC1a_column` — the chat column (reads the variable as max-width) — `dsh-client-ui-chat`
|
|
185
|
+
- `.uV2eYG_card` — the composer card (no override — see "How it works" for why) — `dsh-client-ui-conversation`
|
|
186
|
+
- `.uV2eYG_scroll` — the composer's inner textarea scroll (we cap its max-height; we floor it at 52px so the trigger row stays below the typing area) — `dsh-client-ui-conversation`
|
|
187
|
+
- `.Sixlwa_userStack` — the user-message bubble stack (we set its max-width) — `dsh-client-ui-chat`
|
|
188
|
+
- `.-NDN2W_root` — the session-stats line (we set its text-align) — `dsh-client-ui-chat`
|
|
172
189
|
|
|
173
|
-
|
|
190
|
+
The hashes live in `dsh-client-ui-conversation/lib/client.js` and `dsh-client-ui-chat/lib/client.js` (in the profile's `node_modules`). Since 0.1.2 the CSS is inlined as `const css$N = "..."` strings, so search for the rule you're overriding (e.g. `chat-content-width`) and read the class hash out of the selector. To update:
|
|
174
191
|
|
|
175
|
-
1.
|
|
192
|
+
1. Search both `client.js` files for each of the six names above. If a name has changed (the part after the underscore), update the corresponding name in `src/client/css.ts`. If a name has been removed (e.g. DSH restructured the composer), comment out the matching rule and the matching slider in `src/client/WideChatRow.tsx`, and update this README's Caveats and "How it works" sections to match.
|
|
176
193
|
2. `npm run build` to rebuild the host and client bundles.
|
|
177
194
|
3. Bump the version in `package.json` (the user-facing change is a patch for a single-hash fix, minor for a class-set change, major for an API change).
|
|
178
195
|
|
package/lib/client/index.js
CHANGED
|
@@ -337,9 +337,18 @@ const dictionaries = {
|
|
|
337
337
|
* toggle and window resize, exactly the way the user already knows.
|
|
338
338
|
*
|
|
339
339
|
* Class hashes are the CSS-modules-generated ones from
|
|
340
|
-
* `@deepseek-ai/dsh-client-ui-conversation`
|
|
341
|
-
* `@deepseek-ai/dsh-client-ui-
|
|
342
|
-
*
|
|
340
|
+
* `@deepseek-ai/dsh-client-ui-conversation` (conversation root, composer
|
|
341
|
+
* card/scroll) and `@deepseek-ai/dsh-client-ui-chat` (chat column,
|
|
342
|
+
* user bubble, stats line). They are recomputed on every upstream
|
|
343
|
+
* rebuild; when they change this file is what needs updating.
|
|
344
|
+
*
|
|
345
|
+
* Current targets (DSH 0.1.2-rc.1):
|
|
346
|
+
* wSkVaW_root conversation root (dsh-client-ui-conversation)
|
|
347
|
+
* EvIC1a_column chat column, max-width: var(--dsh-chat-content-width)
|
|
348
|
+
* uV2eYG_card composer card
|
|
349
|
+
* uV2eYG_scroll composer inner scroll
|
|
350
|
+
* Sixlwa_userStack user-message bubble stack (dsh-client-ui-chat)
|
|
351
|
+
* -NDN2W_root session stats line (dsh-client-ui-chat)
|
|
343
352
|
*/
|
|
344
353
|
/** Validate and clamp a single field. Returns `fallback` on any deviation. */
|
|
345
354
|
function clampInt(value, min, max, fallback) {
|
|
@@ -381,18 +390,21 @@ function resolveConfig(raw, defaults) {
|
|
|
381
390
|
/**
|
|
382
391
|
* Build the override stylesheet for one resolved config.
|
|
383
392
|
*
|
|
384
|
-
* The chat column cap is
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
393
|
+
* The chat column cap is pinned to `100% - 2*chatGutterPct%` of the
|
|
394
|
+
* conversation root via `--dsh-chat-content-width`. DSH 0.1.2-rc.1
|
|
395
|
+
* ships the variable as an adaptive clamp
|
|
396
|
+
* (`clamp(680px, column*0.64, 920px)`) that its drag-to-resize handles
|
|
397
|
+
* can override through `--dsh-chat-user-width` (written inline on the
|
|
398
|
+
* root); our `!important` class declaration wins over that, so the
|
|
399
|
+
* slider stays the source of truth. The column itself
|
|
400
|
+
* (`EvIC1a_column`) keeps the shipped `width: 100%` and
|
|
401
|
+
* `margin: 0 auto`, so it still reflows on sidebar toggle and window
|
|
402
|
+
* resize, exactly the way the user already knows.
|
|
391
403
|
*
|
|
392
404
|
* The composer card inherits the same cap through
|
|
393
405
|
* `--dsh-composer-card-max-width`, which the shipped composer CSS
|
|
394
406
|
* already reads. The stats line aligns to the user's choice via
|
|
395
|
-
*
|
|
407
|
+
* `.-NDN2W_root { text-align: ... }`.
|
|
396
408
|
*/
|
|
397
409
|
function buildStylesheet(config) {
|
|
398
410
|
const cap = `calc(100% - ${config.chatGutterPct * 2}%)`;
|
|
@@ -406,40 +418,49 @@ function buildStylesheet(config) {
|
|
|
406
418
|
--dsh-composer-card-max-width: ${cap} !important;
|
|
407
419
|
}
|
|
408
420
|
|
|
409
|
-
/* User-message bubble width. The shipped cap is
|
|
410
|
-
* max-width: min(
|
|
411
|
-
* columns. We replace the cap
|
|
412
|
-
* the chat column, so the bubble
|
|
413
|
-
* align-items: flex-end on
|
|
414
|
-
* to the right edge. */
|
|
415
|
-
.
|
|
421
|
+
/* User-message bubble width. The shipped cap (DSH 0.1.2-rc.1) is
|
|
422
|
+
* max-width: min(calc(var(--dsh-chat-content-width,748px) * .702), 82%),
|
|
423
|
+
* which keeps user bubbles narrow on wide columns. We replace the cap
|
|
424
|
+
* with the configured userBubblePct of the chat column, so the bubble
|
|
425
|
+
* scales with the column. The shipped align-items: flex-end on
|
|
426
|
+
* .Sixlwa_userRow keeps the bubble pinned to the right edge. */
|
|
427
|
+
.Sixlwa_userStack {
|
|
416
428
|
max-width: ${ub} !important;
|
|
417
429
|
}
|
|
418
430
|
|
|
419
|
-
/* Composer card
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
* configured percentage of the viewport
|
|
423
|
-
*
|
|
431
|
+
/* Composer card height. The shipped card has no max-height, so on long
|
|
432
|
+
* inputs the textarea + accessory row grow until they eat most of the
|
|
433
|
+
* screen and hide the conversation above. We cap the inner textarea
|
|
434
|
+
* scroll at the configured percentage of the viewport (minus the card's
|
|
435
|
+
* chrome — accessory row, trigger row, padding, gaps) so the textarea
|
|
436
|
+
* itself stops growing. The card's natural height follows the inner
|
|
437
|
+
* scroll's cap; the conversation scroll above the composer shrinks to
|
|
438
|
+
* make room.
|
|
424
439
|
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
overflow: hidden !important;
|
|
434
|
-
}
|
|
440
|
+
* Note: we deliberately do NOT set overflow:hidden on the card.
|
|
441
|
+
* Earlier versions did, to enforce a hard cap on the card's visible
|
|
442
|
+
* box, but that clipped the popover menus (model picker, permission
|
|
443
|
+
* presets, …) which open upward from the trigger row inside the card.
|
|
444
|
+
* The menus are absolutely positioned descendants of an element inside
|
|
445
|
+
* the card, so the card's overflow clipping killed them. With the card
|
|
446
|
+
* free to overflow, the menus extend above the card into the
|
|
447
|
+
* conversation area and are fully visible. */
|
|
435
448
|
.uV2eYG_scroll {
|
|
449
|
+
/* min-height mirrors the shipped hero variant's input floor
|
|
450
|
+
* (.uV2eYG_hero .uV2eYG_input { min-height: 52px }), so the typing
|
|
451
|
+
* area stays usable even when the cap falls below the natural
|
|
452
|
+
* height of its content. Without this, on a small viewport with a
|
|
453
|
+
* low cap, the scroll collapses to ~28px and the trigger row below
|
|
454
|
+
* it visually sits on top of the typing area. */
|
|
455
|
+
min-height: 52px !important;
|
|
436
456
|
max-height: calc(${cmh} - 64px) !important;
|
|
437
457
|
}
|
|
438
458
|
.uV2eYG_hero .uV2eYG_scroll {
|
|
459
|
+
min-height: 52px !important;
|
|
439
460
|
max-height: calc(${cmh} - 132px) !important;
|
|
440
461
|
}
|
|
441
462
|
|
|
442
|
-
|
|
463
|
+
.-NDN2W_root {
|
|
443
464
|
text-align: ${config.statsAlign} !important;
|
|
444
465
|
}
|
|
445
466
|
`;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host half of `@furayoshi/dsh-widechat`. Registers a settings namespace
|
|
3
|
+
* under `dsh-widechat` whose schema the browser half binds to via
|
|
4
|
+
* `ctx.settingsScope.bind({ namespace: "dsh-widechat" })`. The browser
|
|
5
|
+
* writes here, this registration makes those writes durable, and the browser
|
|
6
|
+
* reads them back through the same scope on every settings change.
|
|
7
|
+
*
|
|
8
|
+
* Loaded by the DSH Cordis Loader on the host. The companion `cordis.patch.yml`
|
|
9
|
+
* inserts this row into the host composition so the registration actually
|
|
10
|
+
* runs; the npm install flow also needs the bundle-patch row for the same
|
|
11
|
+
* reason (`dsh.bundle.patch`).
|
|
12
|
+
*
|
|
13
|
+
* The constants, defaults, and field keys live in `./settings.ts` so the
|
|
14
|
+
* client half can import them without pulling `@deepseek-ai/schemastery`
|
|
15
|
+
* into the browser bundle (where the loader has no module table entry for
|
|
16
|
+
* it and would refuse to resolve).
|
|
17
|
+
*
|
|
18
|
+
* DSH >= 0.1.2-rc.1: the settings service (`ctx.settings`, a
|
|
19
|
+
* `SettingsProvider` from `@deepseek-ai/dsh-settings`) registers
|
|
20
|
+
* namespaces with a plain lowercase-hyphenated string:
|
|
21
|
+
*
|
|
22
|
+
* ctx.settings.register("dsh-widechat", schema)
|
|
23
|
+
*
|
|
24
|
+
* The pre-0.1.2 `settingsNamespace()` helper export no longer exists in
|
|
25
|
+
* `@deepseek-ai/dsh-settings`; a static import of it fails the whole
|
|
26
|
+
* plugin tree at boot with
|
|
27
|
+
* `SyntaxError: ... does not provide an export named 'settingsNamespace'`.
|
|
28
|
+
*/
|
|
1
29
|
import z from "@deepseek-ai/schemastery";
|
|
2
30
|
/**
|
|
3
31
|
* Durable settings schema. The browser half binds a scope to this same
|
|
@@ -16,6 +44,12 @@ export declare const WideChatSettingsSchema: z<Schemastery.ObjectS<{
|
|
|
16
44
|
userBubblePct: z<number, number>;
|
|
17
45
|
composerMaxHeightPct: z<number, number>;
|
|
18
46
|
}>>;
|
|
19
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Host plugin body. Registers the namespace with the host settings service.
|
|
49
|
+
*
|
|
50
|
+
* The namespace is passed as a plain string (DSH >= 0.1.2-rc.1 API). All
|
|
51
|
+
* fields are optional, so a stored section with no values resolves to an
|
|
52
|
+
* empty object and the client half applies its own bundled defaults.
|
|
53
|
+
*/
|
|
20
54
|
export declare function apply(ctx: any): void;
|
|
21
55
|
export { WIDE_CHAT_SETTINGS_NAMESPACE, CHAT_GUTTER_PCT_FIELD, STATS_ALIGN_FIELD, STATS_ALIGN_VALUES, CHAT_GUTTER_PCT_MIN, CHAT_GUTTER_PCT_MAX, USER_BUBBLE_PCT_FIELD, USER_BUBBLE_PCT_MIN, USER_BUBBLE_PCT_MAX, COMPOSER_MAX_HEIGHT_PCT_FIELD, COMPOSER_MAX_HEIGHT_PCT_MIN, COMPOSER_MAX_HEIGHT_PCT_MAX, DEFAULTS, } from "./settings.js";
|
package/lib/index.js
CHANGED
|
@@ -11,11 +11,21 @@
|
|
|
11
11
|
* reason (`dsh.bundle.patch`).
|
|
12
12
|
*
|
|
13
13
|
* The constants, defaults, and field keys live in `./settings.ts` so the
|
|
14
|
-
* client half can import them without pulling `@deepseek-ai/
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* client half can import them without pulling `@deepseek-ai/schemastery`
|
|
15
|
+
* into the browser bundle (where the loader has no module table entry for
|
|
16
|
+
* it and would refuse to resolve).
|
|
17
|
+
*
|
|
18
|
+
* DSH >= 0.1.2-rc.1: the settings service (`ctx.settings`, a
|
|
19
|
+
* `SettingsProvider` from `@deepseek-ai/dsh-settings`) registers
|
|
20
|
+
* namespaces with a plain lowercase-hyphenated string:
|
|
21
|
+
*
|
|
22
|
+
* ctx.settings.register("dsh-widechat", schema)
|
|
23
|
+
*
|
|
24
|
+
* The pre-0.1.2 `settingsNamespace()` helper export no longer exists in
|
|
25
|
+
* `@deepseek-ai/dsh-settings`; a static import of it fails the whole
|
|
26
|
+
* plugin tree at boot with
|
|
27
|
+
* `SyntaxError: ... does not provide an export named 'settingsNamespace'`.
|
|
17
28
|
*/
|
|
18
|
-
import { settingsNamespace } from "@deepseek-ai/dsh-settings";
|
|
19
29
|
import z from "@deepseek-ai/schemastery";
|
|
20
30
|
import { CHAT_GUTTER_PCT_FIELD, CHAT_GUTTER_PCT_MAX, CHAT_GUTTER_PCT_MIN, COMPOSER_MAX_HEIGHT_PCT_FIELD, COMPOSER_MAX_HEIGHT_PCT_MAX, COMPOSER_MAX_HEIGHT_PCT_MIN, STATS_ALIGN_FIELD, STATS_ALIGN_VALUES, USER_BUBBLE_PCT_FIELD, USER_BUBBLE_PCT_MAX, USER_BUBBLE_PCT_MIN, WIDE_CHAT_SETTINGS_NAMESPACE, } from "./settings.js";
|
|
21
31
|
/**
|
|
@@ -42,10 +52,16 @@ export const WideChatSettingsSchema = z.object({
|
|
|
42
52
|
.max(COMPOSER_MAX_HEIGHT_PCT_MAX)
|
|
43
53
|
.required(false),
|
|
44
54
|
});
|
|
45
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Host plugin body. Registers the namespace with the host settings service.
|
|
57
|
+
*
|
|
58
|
+
* The namespace is passed as a plain string (DSH >= 0.1.2-rc.1 API). All
|
|
59
|
+
* fields are optional, so a stored section with no values resolves to an
|
|
60
|
+
* empty object and the client half applies its own bundled defaults.
|
|
61
|
+
*/
|
|
46
62
|
export function apply(ctx) {
|
|
47
63
|
ctx.inject(["settings"], (settingsCtx) => {
|
|
48
|
-
settingsCtx.settings.register(
|
|
64
|
+
settingsCtx.settings.register(WIDE_CHAT_SETTINGS_NAMESPACE, WideChatSettingsSchema);
|
|
49
65
|
});
|
|
50
66
|
}
|
|
51
67
|
export { WIDE_CHAT_SETTINGS_NAMESPACE, CHAT_GUTTER_PCT_FIELD, STATS_ALIGN_FIELD, STATS_ALIGN_VALUES, CHAT_GUTTER_PCT_MIN, CHAT_GUTTER_PCT_MAX, USER_BUBBLE_PCT_FIELD, USER_BUBBLE_PCT_MIN, USER_BUBBLE_PCT_MAX, COMPOSER_MAX_HEIGHT_PCT_FIELD, COMPOSER_MAX_HEIGHT_PCT_MIN, COMPOSER_MAX_HEIGHT_PCT_MAX, DEFAULTS, } from "./settings.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@furayoshi/dsh-widechat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "DeepSeek Harness plugin: widens the conversation column, sets the user-bubble width and composer max height, and right-aligns the session stats strip, with a settings-row UI to tune all four. Built for the DSH client plugin slot `settings.general.item`.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
"client": {
|
|
47
47
|
"platform": "web",
|
|
48
48
|
"inject": [
|
|
49
|
-
"@deepseek-ai/dsh-client-runtime",
|
|
50
49
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
51
50
|
"@deepseek-ai/dsh-client-ui-settings-general",
|
|
52
51
|
"@deepseek-ai/dsh-client-locale"
|
|
@@ -61,17 +60,16 @@
|
|
|
61
60
|
},
|
|
62
61
|
"peerDependencies": {
|
|
63
62
|
"@deepseek-ai/cordis": ">=4.0.1",
|
|
64
|
-
"@deepseek-ai/dsh-settings": ">=0.1.
|
|
63
|
+
"@deepseek-ai/dsh-settings": ">=0.1.2-rc.1"
|
|
65
64
|
},
|
|
66
65
|
"dependencies": {
|
|
67
66
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
68
67
|
},
|
|
69
68
|
"devDependencies": {
|
|
70
|
-
"@deepseek-ai/cordis": "4.0.
|
|
71
|
-
"@deepseek-ai/dsh-client-runtime": "0.1.0-rc.8",
|
|
69
|
+
"@deepseek-ai/cordis": "4.0.2",
|
|
72
70
|
"@deepseek-ai/dsh-client-ui-primitives": "0.1.0-rc.8",
|
|
73
71
|
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.8",
|
|
74
|
-
"@deepseek-ai/dsh-settings": "0.1.
|
|
72
|
+
"@deepseek-ai/dsh-settings": "0.1.2-rc.1",
|
|
75
73
|
"@types/node": "^22.15.0",
|
|
76
74
|
"@types/react": "^19.2.18",
|
|
77
75
|
"react": "^18.3.1",
|