@furayoshi/dsh-widechat 0.7.2 → 0.8.1
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/LICENSE +1 -1
- package/README.md +31 -19
- package/lib/client/index.js +38 -26
- package/lib/index.d.ts +35 -1
- package/lib/index.js +22 -6
- package/package.json +4 -6
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
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.5-rc.2` | `0.8.1` |
|
|
9
|
+
| `0.1.2-rc.1` | `0.8.0 |
|
|
10
|
+
| `0.1.1-rc.1` | `<0.8.0` |
|
|
4
11
|
|
|
5
12
|
**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 :)
|
|
6
13
|
|
|
@@ -10,14 +17,14 @@ A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) plugin tha
|
|
|
10
17
|
|
|
11
18
|
## What it does
|
|
12
19
|
|
|
13
|
-
The shipped DSH web UI caps the chat content
|
|
20
|
+
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.
|
|
14
21
|
|
|
15
22
|
A small row in the **General** settings page lets you tune four values:
|
|
16
23
|
|
|
17
24
|
- **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.
|
|
18
25
|
- **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.
|
|
19
26
|
- **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.
|
|
20
|
-
- **Composer max height** — a slider, 20–80% of the viewport. The shipped default is `50 %`. The composer
|
|
27
|
+
- **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.
|
|
21
28
|
|
|
22
29
|
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.
|
|
23
30
|
|
|
@@ -43,7 +50,7 @@ The `github:<owner>/<repo>` spec is pnpm's shorthand for `https://github.com/<ow
|
|
|
43
50
|
|
|
44
51
|
```sh
|
|
45
52
|
# A specific tag
|
|
46
|
-
dsh plugin --profile web add @furayoshi/dsh-widechat@github:FraYoshi/dsh-widechat#v0.
|
|
53
|
+
dsh plugin --profile web add @furayoshi/dsh-widechat@github:FraYoshi/dsh-widechat#v0.8.0
|
|
47
54
|
|
|
48
55
|
# A branch (e.g. main)
|
|
49
56
|
dsh plugin --profile web add @furayoshi/dsh-widechat@github:FraYoshi/dsh-widechat#main
|
|
@@ -104,22 +111,23 @@ If you want to edit the source, the build is `npm run build` (which calls `tsc`
|
|
|
104
111
|
|
|
105
112
|
The plugin is two halves:
|
|
106
113
|
|
|
107
|
-
- **Host** (`lib/index.js`) registers
|
|
114
|
+
- **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.
|
|
108
115
|
- **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.
|
|
109
116
|
|
|
110
|
-
The CSS override is intentionally minimal — it touches three things, one per setting:
|
|
117
|
+
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`):
|
|
111
118
|
|
|
112
119
|
```css
|
|
113
120
|
:root, .wSkVaW_root, [data-phase] {
|
|
114
121
|
--dsh-chat-content-width: calc(100% - 2 × <chatGutterPct>%) !important;
|
|
115
122
|
--dsh-composer-card-max-width: calc(100% - 2 × <chatGutterPct>%) !important;
|
|
116
123
|
}
|
|
117
|
-
.
|
|
124
|
+
.Sixlwa_userStack { max-width: <userBubblePct>% !important; }
|
|
118
125
|
.uV2eYG_scroll {
|
|
119
126
|
min-height: 52px !important; /* floor, see below */
|
|
120
127
|
max-height: calc(<composerMaxHeightPct>vh - 64px) !important; /* ceiling on the textarea */
|
|
121
128
|
}
|
|
122
|
-
.
|
|
129
|
+
.uV2eYG_hero .uV2eYG_scroll { max-height: calc(<composerMaxHeightPct>vh - 132px) !important; }
|
|
130
|
+
.bOPqQW_root { justify-content: <statsAlign> !important; }
|
|
123
131
|
```
|
|
124
132
|
|
|
125
133
|
`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.
|
|
@@ -149,9 +157,13 @@ Invalid values are dropped to the defaults and a `console.warn` is logged with t
|
|
|
149
157
|
|
|
150
158
|
### This plugin overrides internal CSS-module class hashes
|
|
151
159
|
|
|
152
|
-
`.wSkVaW_root`, `.
|
|
160
|
+
`.wSkVaW_root`, `.EvIC1a_column`, `.uV2eYG_card`, `.uV2eYG_scroll`, `.Sixlwa_userStack`, `.bOPqQW_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.
|
|
161
|
+
|
|
162
|
+
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.
|
|
163
|
+
|
|
164
|
+
### The slider wins over DSH's drag-to-resize (0.1.2+)
|
|
153
165
|
|
|
154
|
-
|
|
166
|
+
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.
|
|
155
167
|
|
|
156
168
|
### The `chatGutterPct` is interpreted against the cell, not the viewport
|
|
157
169
|
|
|
@@ -167,18 +179,18 @@ The package ships a `cordis.patch.yml` (in `files: ["lib", "cordis.patch.yml", "
|
|
|
167
179
|
|
|
168
180
|
## Updating
|
|
169
181
|
|
|
170
|
-
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:
|
|
182
|
+
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):
|
|
171
183
|
|
|
172
|
-
- `.wSkVaW_root` — the conversation root (defines the chat-content-width variable)
|
|
173
|
-
- `.
|
|
174
|
-
- `.uV2eYG_card` — the composer card (no override — see "How it works" for why)
|
|
175
|
-
- `.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)
|
|
176
|
-
- `.
|
|
177
|
-
- `.
|
|
184
|
+
- `.wSkVaW_root` — the conversation root (defines the chat-content-width variable) — `dsh-client-ui-conversation`
|
|
185
|
+
- `.EvIC1a_column` — the chat column (reads the variable as max-width) — `dsh-client-ui-chat`
|
|
186
|
+
- `.uV2eYG_card` — the composer card (no override — see "How it works" for why) — `dsh-client-ui-conversation`
|
|
187
|
+
- `.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`
|
|
188
|
+
- `.Sixlwa_userStack` — the user-message bubble stack (we set its max-width) — `dsh-client-ui-chat`
|
|
189
|
+
- `.bOPqQW_root` — the session-stats line (we set its `justify-content`) — `dsh-client-ui-chat`
|
|
178
190
|
|
|
179
|
-
|
|
191
|
+
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:
|
|
180
192
|
|
|
181
|
-
1.
|
|
193
|
+
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.
|
|
182
194
|
2. `npm run build` to rebuild the host and client bundles.
|
|
183
195
|
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).
|
|
184
196
|
|
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.5-rc.2):
|
|
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
|
+
* bOPqQW_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
|
+
* `.bOPqQW_root { justify-content: ... }`.
|
|
396
408
|
*/
|
|
397
409
|
function buildStylesheet(config) {
|
|
398
410
|
const cap = `calc(100% - ${config.chatGutterPct * 2}%)`;
|
|
@@ -406,13 +418,13 @@ 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
|
|
|
@@ -434,12 +446,12 @@ function buildStylesheet(config) {
|
|
|
434
446
|
* free to overflow, the menus extend above the card into the
|
|
435
447
|
* conversation area and are fully visible. */
|
|
436
448
|
.uV2eYG_scroll {
|
|
437
|
-
/* min-height mirrors the shipped hero variant's
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
*
|
|
442
|
-
* area. */
|
|
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. */
|
|
443
455
|
min-height: 52px !important;
|
|
444
456
|
max-height: calc(${cmh} - 64px) !important;
|
|
445
457
|
}
|
|
@@ -448,8 +460,8 @@ function buildStylesheet(config) {
|
|
|
448
460
|
max-height: calc(${cmh} - 132px) !important;
|
|
449
461
|
}
|
|
450
462
|
|
|
451
|
-
.
|
|
452
|
-
|
|
463
|
+
.bOPqQW_root {
|
|
464
|
+
justify-content: ${config.statsAlign === "left" ? "flex-start" : config.statsAlign === "right" ? "flex-end" : "center"} !important;
|
|
453
465
|
}
|
|
454
466
|
`;
|
|
455
467
|
}
|
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.1",
|
|
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",
|