@design.estate/dees-catalog 21.48.0 → 21.49.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.
@@ -4,7 +4,7 @@
4
4
  export * from './interfaces.js';
5
5
  export * from './toolregistry.js';
6
6
  export * from './harness.helpers.js';
7
- export { HarnessMarkdown, markdownStyles } from './harness.markdown.js';
7
+ export { HarnessMarkdown, harnessMarkdownRenderOptions, markdownStyles } from './harness.markdown.js';
8
8
  export { harnessCardStyles, harnessPillStyles, harnessMonoStyles } from './harness.styles.js';
9
9
  export * from './harness.demodata.js';
10
10
  export * from './dees-harness-overflow-text.js';
@@ -25,4 +25,4 @@ export * from './dees-harness-thread-cut/index.js';
25
25
  export * from './dees-harness-todos/index.js';
26
26
  export * from './dees-harness-tool-card/index.js';
27
27
  export * from './dees-harness-usage/index.js';
28
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi90c193ZWIvZWxlbWVudHMvMDBncm91cC1oYXJuZXNzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLG9DQUFvQztBQUNwQywyRUFBMkU7QUFDM0UsNkVBQTZFO0FBQzdFLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLE9BQU8sRUFBRSxlQUFlLEVBQUUsY0FBYyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDeEUsT0FBTyxFQUFFLGlCQUFpQixFQUFFLGlCQUFpQixFQUFFLGlCQUFpQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDOUYsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLGlDQUFpQyxDQUFDO0FBRWhELGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxjQUFjLHdDQUF3QyxDQUFDO0FBQ3ZELGNBQWMsNkNBQTZDLENBQUM7QUFDNUQsY0FBYyxpQ0FBaUMsQ0FBQztBQUNoRCxjQUFjLHlDQUF5QyxDQUFDO0FBQ3hELGNBQWMsdUNBQXVDLENBQUM7QUFDdEQsY0FBYyxzQ0FBc0MsQ0FBQztBQUNyRCxjQUFjLG1DQUFtQyxDQUFDO0FBQ2xELGNBQWMsc0NBQXNDLENBQUM7QUFDckQsY0FBYyx5Q0FBeUMsQ0FBQztBQUN4RCxjQUFjLGlDQUFpQyxDQUFDO0FBQ2hELGNBQWMsZ0NBQWdDLENBQUM7QUFDL0MsY0FBYyxvQ0FBb0MsQ0FBQztBQUNuRCxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsbUNBQW1DLENBQUM7QUFDbEQsY0FBYywrQkFBK0IsQ0FBQyJ9
28
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi90c193ZWIvZWxlbWVudHMvMDBncm91cC1oYXJuZXNzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLG9DQUFvQztBQUNwQywyRUFBMkU7QUFDM0UsNkVBQTZFO0FBQzdFLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLE9BQU8sRUFBRSxlQUFlLEVBQUUsNEJBQTRCLEVBQUUsY0FBYyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDdEcsT0FBTyxFQUFFLGlCQUFpQixFQUFFLGlCQUFpQixFQUFFLGlCQUFpQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDOUYsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLGlDQUFpQyxDQUFDO0FBRWhELGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxjQUFjLHdDQUF3QyxDQUFDO0FBQ3ZELGNBQWMsNkNBQTZDLENBQUM7QUFDNUQsY0FBYyxpQ0FBaUMsQ0FBQztBQUNoRCxjQUFjLHlDQUF5QyxDQUFDO0FBQ3hELGNBQWMsdUNBQXVDLENBQUM7QUFDdEQsY0FBYyxzQ0FBc0MsQ0FBQztBQUNyRCxjQUFjLG1DQUFtQyxDQUFDO0FBQ2xELGNBQWMsc0NBQXNDLENBQUM7QUFDckQsY0FBYyx5Q0FBeUMsQ0FBQztBQUN4RCxjQUFjLGlDQUFpQyxDQUFDO0FBQ2hELGNBQWMsZ0NBQWdDLENBQUM7QUFDL0MsY0FBYyxvQ0FBb0MsQ0FBQztBQUNuRCxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsbUNBQW1DLENBQUM7QUFDbEQsY0FBYywrQkFBK0IsQ0FBQyJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "21.48.0",
3
+ "version": "21.49.0",
4
4
  "private": false,
5
5
  "description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
6
6
  "main": "dist_ts_web/index.js",
package/readme.md CHANGED
@@ -5834,7 +5834,7 @@ For a queued or held user prompt the host can still withdraw, set `pendingAction
5834
5834
 
5835
5835
  Image attachments with inline `dataBase64` open in a `DeesModal` on click. When an image has metadata only, pass `.resolveAttachment` to `dees-harness-chat`, `dees-harness-message-list`, or the message itself. The `THarnessAttachmentResolver` receives `{ messageId, attachmentId }` and returns a complete `IHarnessAttachment` with the image's `dataBase64` after the host authorizes and reads it. The modal shows loading and read failure; closing it, unmounting the message, or replacing the message ignores a late result. The component accepts image bytes only, never a URL or filesystem path.
5836
5836
 
5837
- One message: role accent, markdown (assistant default, `message.markdown` overrides), attachments grid, reasoning parts, streaming cursor, usage/error footer. Markdown renders through `domtools.plugins.smartmarkdown` (GFM, sanitized). `markdownWhileStreaming` defaults to `true`, with throttled ≥150 ms re-parses while streaming; set it to `false` to retain plain text during the stream and parse once when the message ends. Fenced code is highlighted lazily after the final parse. Streaming methods: `appendTextDelta()`, `appendReasoningDelta()`, `endReasoning()`, `endStream(usage?, error?)`. A message that carries nothing but a tool call renders the bare row instead of the message frame, forwards `showTimestamp` to it, and reserves one line while virtualized when the transcript marks it with `data-tool-row`. A `role: 'user'` message carries `pending` (`THarnessPendingState`) while the session has not taken it in yet. The transcript list shows such a message in its queue (see `DeesHarnessMessageList`), and the element renders it like any other user message with one caption line under its content: "Steering · read at the next step" (`'steering'`), "Queued for the next turn" (`'queued'`), "Delivery unconfirmed" (`'uncertain'`), or "Held · not sent" with **Resend** and **Discard** buttons (`'held'`), which emit `harness-held-resend` and `harness-held-discard` with `{ messageId }`, bubbling and composed. A button pressed after the message stopped being held emits nothing. The line is gone once `pending` is cleared, and another role never shows it. `playAcceptanceSweep()` sweeps a scan across a user bubble once to mark that the session took it up: the former tool-card outcome scan in `--dees-color-accent-primary`, a band moving on `transform` alone, clipped to the bubble's rounded box, with nothing laid out anew and nothing clipped at rest. The transcript list calls it once a message it moved out of the queue has landed; a host that shows a message on its own calls it when the session takes the prompt up. It does nothing for another role or under `prefers-reduced-motion: reduce`, a sweep already playing plays on, and a new `id` ends it. A sweep that starts where nobody can see it — a row `content-visibility` skips, a hidden list, a background tab — still ends on schedule and never plays late. A block that appears in a message already shown — the thinking block as reasoning starts, the reply's text after it, attachments, a tool call beside text, the error and the usage footer as the stream ends — opens its space and then blends in, exactly like a transcript row, and takes no space on its first frame; later reasoning parts and streamed text grow the block they belong to instead. Nothing arrives on a first render, while `entering` is set (the list sets it while the message's row opens its space, so a block comes with the row), under reduced motion, or where the message is not rendered, and an engine without `Element.checkVisibility` shows the blocks without motion. Subtask activation emits the bubbling, composed, cancelable `harness-subtask-open` event with `{ sessionId, call }` before any inspector opens.
5837
+ One message: role accent, markdown (assistant default, `message.markdown` overrides), attachments grid, reasoning parts, streaming cursor, usage/error footer. Markdown renders through `domtools.plugins.smartmarkdown` (GFM, sanitized) with `harnessMarkdownRenderOptions`: a line break the model wrote is a line break (`breaks: true`), so a finished reply keeps the lines it streamed with, and `---` blocks at a reply's start are its text, never frontmatter (`frontmatter: false`). `markdownWhileStreaming` defaults to `true`, with throttled ≥150 ms re-parses while streaming; set it to `false` to retain plain text during the stream and parse once when the message ends. Fenced code is highlighted lazily after the final parse. Streaming methods: `appendTextDelta()`, `appendReasoningDelta()`, `endReasoning()`, `endStream(usage?, error?)`. A message that carries nothing but a tool call renders the bare row instead of the message frame, forwards `showTimestamp` to it, and reserves one line while virtualized when the transcript marks it with `data-tool-row`. A `role: 'user'` message carries `pending` (`THarnessPendingState`) while the session has not taken it in yet. The transcript list shows such a message in its queue (see `DeesHarnessMessageList`), and the element renders it like any other user message with one caption line under its content: "Steering · read at the next step" (`'steering'`), "Queued for the next turn" (`'queued'`), "Delivery unconfirmed" (`'uncertain'`), or "Held · not sent" with **Resend** and **Discard** buttons (`'held'`), which emit `harness-held-resend` and `harness-held-discard` with `{ messageId }`, bubbling and composed. A button pressed after the message stopped being held emits nothing. The line is gone once `pending` is cleared, and another role never shows it. `playAcceptanceSweep()` sweeps a scan across a user bubble once to mark that the session took it up: the former tool-card outcome scan in `--dees-color-accent-primary`, a band moving on `transform` alone, clipped to the bubble's rounded box, with nothing laid out anew and nothing clipped at rest. The transcript list calls it once a message it moved out of the queue has landed; a host that shows a message on its own calls it when the session takes the prompt up. It does nothing for another role or under `prefers-reduced-motion: reduce`, a sweep already playing plays on, and a new `id` ends it. A sweep that starts where nobody can see it — a row `content-visibility` skips, a hidden list, a background tab — still ends on schedule and never plays late. A block that appears in a message already shown — the thinking block as reasoning starts, the reply's text after it, attachments, a tool call beside text, the error and the usage footer as the stream ends — opens its space and then blends in, exactly like a transcript row, and takes no space on its first frame; later reasoning parts and streamed text grow the block they belong to instead. Nothing arrives on a first render, while `entering` is set (the list sets it while the message's row opens its space, so a block comes with the row), under reduced motion, or where the message is not rendered, and an engine without `Element.checkVisibility` shows the blocks without motion. Subtask activation emits the bubbling, composed, cancelable `harness-subtask-open` event with `{ sessionId, call }` before any inspector opens.
5838
5838
 
5839
5839
  `refreshMessage()` reconciles direct same-object host mutations across text, reasoning, and tool content.
5840
5840
 
@@ -6025,7 +6025,7 @@ Pass `.history` as `IHarnessComposerHistoryEntry[]` in oldest-to-newest send ord
6025
6025
 
6026
6026
  Place optional reply or task context in `slot="context"` to integrate it above the textarea inside one input surface. Set `contextDescription` to the same context as plain text for the textarea's accessible description. An empty slot reserves no space. Clicking informational context focuses the prompt; links and controls retain their own behavior. `DeesHarnessChat` supplies its reply heading here and keeps the composer within the conversation column, alongside the full-height desktop sidebar.
6027
6027
 
6028
- Prompt input: autogrow textarea, attachment picker/paste/drag-drop with configurable `maxAttachmentCount`, `maxAttachmentBytes` (10 MB default), and `maxTotalAttachmentBytes` (30 MB default), image/text/binary classification, optional account, model, and reasoning-effort dropdowns, Cmd/Ctrl+Enter to send. Attachment count is unlimited unless the host sets it. `attachmentAccept` names the files the host takes, as an `<input type="file">` `accept` list (`.pdf`, `application/pdf`, `image/*`): the picker offers those, and a picked, pasted or dropped file of another type is refused with `harness-attachment-error`; empty takes every file. `dees-harness-chat` forwards all three limits, `attachmentAccept` and `commands` to its composer. Controlled component — the host owns `value`, `attachments`, `commands`, `account`, and the other selections. Set `accountOptions` to `{ label, value }[]` so the dropdown displays readable labels while events retain opaque stable account values. Account changes emit `harness-account-change` with `{ account }`; `harness-send` includes optional `account` alongside `model` and `reasoningEffort`. While `account` names no usable option the account select says "Choose an account", and an empty `model` or `reasoningEffort` reads "Choose a model" or "Choose an effort".
6028
+ Prompt input: autogrow textarea, attachment picker/paste/drag-drop with configurable `maxAttachmentCount`, `maxAttachmentBytes` (10 MB default), and `maxTotalAttachmentBytes` (30 MB default), image/text/binary classification, optional account, model, and reasoning-effort dropdowns, Enter to send (also Cmd/Ctrl+Enter), Shift+Enter for a new line. The controls stay one row while they fit: the account and model pickers shrink to their minimum widths (120 and 150 px; they size from those widths, never from their labels), then the trailing actions (queued count, delivery hint, More options, Stop, Queue, the main action) wrap together onto their own line at the trailing edge; below a 760 px content box — measured inside a docked bar's inset, not on the full-bleed host — the pickers take a row of their own. Nothing widens the composer past its column; an Enter that commits an IME composition (`isComposing`, or key 229 right after `compositionend`) stays the composition's, and an open slash-command menu takes Enter to complete its highlighted entry first. Attachment count is unlimited unless the host sets it. `attachmentAccept` names the files the host takes, as an `<input type="file">` `accept` list (`.pdf`, `application/pdf`, `image/*`): the picker offers those, and a picked, pasted or dropped file of another type is refused with `harness-attachment-error`; empty takes every file. `dees-harness-chat` forwards all three limits, `attachmentAccept` and `commands` to its composer. Controlled component — the host owns `value`, `attachments`, `commands`, `account`, and the other selections. Set `accountOptions` to `{ label, value }[]` so the dropdown displays readable labels while events retain opaque stable account values. Account changes emit `harness-account-change` with `{ account }`; `harness-send` includes optional `account` alongside `model` and `reasoningEffort`. While `account` names no usable option the account select says "Choose an account", and an empty `model` or `reasoningEffort` reads "Choose a model" or "Choose an effort".
6029
6029
 
6030
6030
  An account that cannot be used right now stays listed: give its option `disabled: true` and a `description` with the reason or the fix ("Sign in again in Accounts to use it."). It cannot be chosen, and it is never the current account: an `account` that names a disabled option shows as no selection, and the host's `account` property is left as the host set it. When the host's `account` is a disabled option, `harness-send` carries no `account`, whatever its delivery. Treat a missing `account` as "no usable account": refuse the send or prompt for an account, and never fall back to a default account. `accountNote` is a note on the account choice, shown under the controls with or without options — for accounts that need attention, or for an account service that is unavailable and lists none. Its polite live region (`role="status"`) is in the DOM whenever the model controls show (`showModelControls`), visually hidden and taking no space while the note is empty, so both the note's first appearance and every later change are announced. It hides with the model controls, and `dees-harness-chat` forwards it.
6031
6031
 
@@ -6041,7 +6041,7 @@ and `addFiles()` ingestion; cancels queued/in-flight additions; and sends an emp
6041
6041
  and file drops cannot navigate away from the page. The host-owned attachments array
6042
6042
  is retained, so re-enabling the capability restores its chips without data loss.
6043
6043
 
6044
- Set `commands` to the `IHarnessComposerCommand[]` the host understands, each `{ name, description?, available?, unavailableReason?, argument? }`, where `argument` is `{ hint?, options? }`: `hint` shows after the name (`<model>`, `[prompt]`) and `options` are `IHarnessComposerOption[]` values for it. The composer filters the list itself, and the menu belongs to slash commands only: it opens while the prompt is a slash and part of a name (`/mo` lists the commands whose name starts with `mo`, case-insensitively), and once a name with argument options is complete (`/model `), it lists the options whose label or value contains the typed argument. Any other prompt opens nothing — ordinary text, a path such as `/tmp/build.log`, a name nothing matches, or a second line. While the textarea owns focus, the listbox stays anchored above the composer; moving focus to another control closes it. Arrow keys wrap through rows; Enter or Tab completes the highlighted row and never sends, and Escape closes the menu until the next keystroke. Completing a command puts `/name ` into the prompt (`/name` for a command without an argument) and leads on to its options; completing an option puts `/name value`. Each completion emits the bubbling/composed `harness-input`. A new `commands` array highlights the first row again, so keep its reference stable while the list is unchanged. A command with `available: false`, and an option with `disabled: true`, stays listed with its reason (`unavailableReason`, or the option's `description`) and cannot be completed.
6044
+ Set `commands` to the `IHarnessComposerCommand[]` the host understands, each `{ name, description?, available?, unavailableReason?, argument? }`, where `argument` is `{ hint?, options? }`: `hint` shows after the name (`<model>`, `[prompt]`) and `options` are `IHarnessComposerOption[]` values for it. The composer filters the list itself, and the menu belongs to slash commands only: it opens while the prompt is a slash and part of a name (`/mo` lists the commands whose name starts with `mo`, case-insensitively), and once a name with argument options is complete (`/model `), it lists the options whose label or value contains the typed argument. Any other prompt opens nothing — ordinary text, a path such as `/tmp/build.log`, a name nothing matches, or a second line. While the textarea owns focus, the listbox stays anchored above the composer; moving focus to another control closes it. Arrow keys wrap through rows; Enter or Tab completes the highlighted row, and Escape closes the menu until the next keystroke. A prompt that already is a row's completion (`/model gpt-5` while `gpt-5.5` is listed too, or `/new`) highlights that row, and Enter sends it instead of completing another. Completing a command puts `/name ` into the prompt (`/name` for a command without an argument) and leads on to its options; completing an option puts `/name value`. Each completion emits the bubbling/composed `harness-input`. A new `commands` array highlights the first row again, so keep its reference stable while the list is unchanged. A command with `available: false`, and an option with `disabled: true`, stays listed with its reason (`unavailableReason`, or the option's `description`) and cannot be completed.
6045
6045
 
6046
6046
  Sending a prompt whose first word names a listed command exactly emits `harness-command` instead of `harness-send`, with `IHarnessComposerCommandDetail` `{ name, argument, text, attachments, account?, model?, reasoningEffort? }`: `argument` is the trimmed text after the name, `text` the prompt as typed. A command runs whenever the composer is unlocked, busy or not — `busyDeliveryModes` applies to messages only — and while the prompt names one, the main action reads **Run**; an unavailable command cannot run, and the disabled button shows its reason. Every other prompt is a message and emits `harness-send`, including one that starts with an unlisted `/word`. Neither event clears the prompt: the host does, once it took the message or ran the command (`clearComposer()` on the chat).
6047
6047
 
@@ -6053,7 +6053,7 @@ While `busy` (a turn runs), Stop renders as an additional button and the main ac
6053
6053
  | `next-turn` | For a harness that reads messages only between turns: read after this turn. | **Send**, "Read after this turn" |
6054
6054
  | `queue` | Held by the host and sent as its own turn after this turn. | **Queue**, "Sent after this turn" |
6055
6055
 
6056
- The main action is `steer` when listed, else `next-turn`, else `queue`; its hint shows as a caption beside the actions and as its tooltip. With `queue` listed beside `steer` or `next-turn`, a secondary **Queue** button ("Queue for after this turn") stands between Stop and the main action. Every send emits `harness-send` with `IHarnessComposerSendDetail.delivery`: `'turn'` while nothing runs, otherwise the chosen `THarnessBusyDelivery`. While busy a delivery needs a nonempty draft, and an empty `busyDeliveryModes` sends nothing. Keyboard: **Cmd/Ctrl+Enter** is the main action, and **Alt+Enter** (also with Cmd/Ctrl) queues for after this turn whenever the host lists `queue` (a prompt naming a listed command runs it on either key instead); while nothing runs, or without `queue`, Alt+Enter stays the textarea's own. Stop only halts the running turn: it emits `harness-abort`, sends nothing and keeps the draft. What the session had not taken in yet is the host's to mark `held` (see `DeesHarnessMessageList`); the host owns delivery, acknowledgment and clearing the draft. A positive `queuedCount` shows as "N queued" beside the actions while busy.
6056
+ The main action is `steer` when listed, else `next-turn`, else `queue`; its hint shows as a caption beside the actions and as its tooltip. With `queue` listed beside `steer` or `next-turn`, a secondary **Queue** button ("Queue for after this turn") stands between Stop and the main action. Every send emits `harness-send` with `IHarnessComposerSendDetail.delivery`: `'turn'` while nothing runs, otherwise the chosen `THarnessBusyDelivery`. While busy a delivery needs a nonempty draft, and an empty `busyDeliveryModes` sends nothing. Keyboard: **Enter** (also **Cmd/Ctrl+Enter**) is the main action, and **Alt+Enter** (also with Cmd/Ctrl) queues for after this turn whenever the host lists `queue` (a prompt naming a listed command runs it on either key instead); while nothing runs, or without `queue`, Alt+Enter stays the textarea's own. Stop only halts the running turn: it emits `harness-abort`, sends nothing and keeps the draft. What the session had not taken in yet is the host's to mark `held` (see `DeesHarnessMessageList`); the host owns delivery, acknowledgment and clearing the draft. A positive `queuedCount` shows as "N queued" beside the actions while busy.
6057
6057
 
6058
6058
  Set `menuActions` to `IHarnessComposerMenuAction[]` (`{ key, label, iconName?, disabled?, disabledReason? }`) for host commands that belong to the conversation but not to the prompt, such as restarting the harness it runs in. While the list is not empty, a ghost `sm` button with a vertical ellipsis stands directly before Stop and the send actions. It is named "More options", announces a menu and whether it is open, takes Enter and Space, and opens a `dees-contextmenu` against itself — below it, or above it when the composer sits at the bottom of the window. Choosing a command emits `harness-menu-action` with `{ key }` (`IHarnessComposerMenuActionDetail`), bubbling and composed; the host runs the command. A command that cannot run right now stays listed with `disabled: true` and a `disabledReason` under its label, which the arrow keys reach, so the reason is heard too. The commands belong to the host, not to the prompt: `disabled` and `inputLocked` lock composing and sending only, so the button stays enabled and an open menu stays open while the composer is locked — a restart is often wanted exactly while the host holds the composer read-only. Each command's own `disabled` decides whether it runs, and a command the host disables or withdraws while the menu is open is refused. Emptying `menuActions` closes an open menu. `dees-harness-chat` forwards `menuActions`.
6059
6059
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '21.48.0',
6
+ version: '21.49.0',
7
7
  description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
8
8
  }
@@ -60,7 +60,7 @@ export const demoFunc = () => demoPage('Composer', 'Write, attach files, choose
60
60
  accountNote="Accounts could not be loaded. Chat resumes once the account service answers."
61
61
  .modelOptions=${['gpt-5.5', 'gpt-5']}
62
62
  ></dees-harness-composer>
63
- <div class="dees-demo-label">Slash commands: type / to list them, Enter or Tab completes, Cmd/Ctrl+Enter runs</div>
63
+ <div class="dees-demo-label">Slash commands: type / to list them, Enter or Tab completes, Enter again runs</div>
64
64
  <dees-harness-composer
65
65
  .showModelControls=${false}
66
66
  .commands=${[
@@ -156,7 +156,8 @@ const deliveryHintKeys = {
156
156
  /**
157
157
  * Prompt composer: autogrow textarea, attachments (picker / paste /
158
158
  * drag-drop with accepted types and per-file and total size limits), optional account, model,
159
- * and reasoning-effort dropdowns. Cmd/Ctrl+Enter sends. While busy, Stop is an
159
+ * and reasoning-effort dropdowns. Enter (also Cmd/Ctrl+Enter) sends, Shift+Enter starts a new line,
160
+ * and an Enter that commits an IME composition stays the composition's. While busy, Stop is an
160
161
  * additional button and the main action delivers the draft the way the host supports
161
162
  * (`busyDeliveryModes`): Steer (read at the next step) when it can, else Send (read after this
162
163
  * turn); "Queue for after this turn" is the secondary action, also on Alt+Enter.
@@ -165,7 +166,8 @@ const deliveryHintKeys = {
165
166
  * Slash commands: `commands` lists the commands the host understands. A prompt that starts with
166
167
  * `/` and part of a name opens a menu of the matching commands, and once a name is complete, of
167
168
  * its argument options; any other prompt opens nothing. Enter or Tab completes the highlighted
168
- * entry and never sends, Escape closes the menu until the next keystroke. Sending a prompt that
169
+ * entry, Enter on the entry the prompt already is sends it, and Escape closes the menu until the
170
+ * next keystroke. Sending a prompt that
169
171
  * names a listed command emits `harness-command` instead of `harness-send`, busy or not, and the
170
172
  * main button reads Run; every other prompt, such as `/tmp/build.log`, is a message.
171
173
  *
@@ -255,7 +257,7 @@ export class DeesHarnessComposer extends DeesElement {
255
257
 
256
258
  /**
257
259
  * How the host can deliver a message sent while a turn runs (`THarnessBusyDelivery`). The main
258
- * action (Cmd/Ctrl+Enter) is `steer` when listed ("Steer", read at the next step), else
260
+ * action (Enter, Cmd/Ctrl+Enter) is `steer` when listed ("Steer", read at the next step), else
259
261
  * `next-turn` ("Send", read after this turn), else `queue` ("Queue"); with `queue` listed beside
260
262
  * one of the others, "Queue" is a secondary action for after this turn (Alt+Enter). Empty, a
261
263
  * busy composer sends nothing. `harness-send` carries the chosen `delivery`.
@@ -479,6 +481,11 @@ export class DeesHarnessComposer extends DeesElement {
479
481
 
480
482
  .composer {
481
483
  display: grid;
484
+ /* No control may widen the composer past its column: a row that does not fit wraps. */
485
+ grid-template-columns: minmax(0, 1fr);
486
+ /* The controls' breakpoints measure the content box, which a docked bar insets to the
487
+ transcript's measure, not the full-bleed host. */
488
+ container: harness-composer / inline-size;
482
489
  gap: var(--dees-spacing-sm);
483
490
  padding: 12px;
484
491
  border: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
@@ -629,8 +636,13 @@ export class DeesHarnessComposer extends DeesElement {
629
636
  color: var(--dees-color-text-primary);
630
637
  }
631
638
 
639
+ /*
640
+ * One row while everything fits: the pickers shrink to their minimum widths first, then the
641
+ * trailing actions wrap together onto a line of their own, still at the trailing edge.
642
+ */
632
643
  .controlsRow {
633
644
  display: flex;
645
+ flex-wrap: wrap;
634
646
  align-items: center;
635
647
  gap: var(--dees-spacing-sm);
636
648
  }
@@ -640,10 +652,18 @@ export class DeesHarnessComposer extends DeesElement {
640
652
  .modelControls {
641
653
  display: flex;
642
654
  gap: var(--dees-spacing-xs);
643
- /* shrinks before the trailing actions do, never grows past its
644
- content: the row's spacer still pushes send/stop to the edge */
655
+ /* takes the row's free space; its pickers stop at their own widths */
656
+ flex: 1 1 auto;
657
+ min-width: 0;
658
+ }
659
+
660
+ .actions {
661
+ display: flex;
662
+ align-items: center;
663
+ gap: var(--dees-spacing-sm);
645
664
  flex: 0 1 auto;
646
665
  min-width: 0;
666
+ margin-inline-start: auto;
647
667
  }
648
668
 
649
669
  .modelControls dees-input-dropdown {
@@ -653,19 +673,26 @@ export class DeesHarnessComposer extends DeesElement {
653
673
  --dees-input-control-border: transparent;
654
674
  }
655
675
 
676
+ /*
677
+ * The pickers size from these widths, never from their labels (inline-size containment): a
678
+ * long label truncates instead of asking the row for room, so the row wraps only when the
679
+ * pickers at their minimum widths and the actions do not fit.
680
+ */
656
681
  .accountSelect {
657
- flex: 0 1 180px;
658
- width: 180px;
682
+ flex: 1 1 120px;
659
683
  min-width: 120px;
684
+ max-width: 180px;
685
+ contain: inline-size;
660
686
  }
661
687
 
662
688
  /* Model identifiers are provider-qualified ("anthropic/claude-opus-5"),
663
689
  so the control grows into the free space instead of truncating,
664
690
  while still shrinking on narrow hosts. */
665
691
  .modelSelect {
666
- flex: 0 1 280px;
667
- width: 280px;
692
+ flex: 1 1 150px;
668
693
  min-width: 150px;
694
+ max-width: 280px;
695
+ contain: inline-size;
669
696
  }
670
697
 
671
698
  .effortSelect {
@@ -673,10 +700,6 @@ export class DeesHarnessComposer extends DeesElement {
673
700
  width: 110px;
674
701
  }
675
702
 
676
- .spacer {
677
- flex: 1;
678
- }
679
-
680
703
  .accountNote {
681
704
  display: flex;
682
705
  align-items: flex-start;
@@ -713,11 +736,7 @@ export class DeesHarnessComposer extends DeesElement {
713
736
  font-variant-numeric: tabular-nums;
714
737
  }
715
738
 
716
- @container (max-width: 760px) {
717
- .controlsRow {
718
- flex-wrap: wrap;
719
- }
720
-
739
+ @container harness-composer (max-width: 760px) {
721
740
  .modelControls {
722
741
  order: -1;
723
742
  flex: 1 0 100%;
@@ -927,7 +946,7 @@ export class DeesHarnessComposer extends DeesElement {
927
946
  </div>
928
947
  `
929
948
  : ''}
930
- <span class="spacer"></span>
949
+ <div class="actions">
931
950
  ${this.busy && this.queuedCount > 0
932
951
  ? html`<span class="queuedStatus" aria-live="polite">${this.t('composer.queued', { count: this.queuedCount })}</span>`
933
952
  : ''}
@@ -997,6 +1016,7 @@ export class DeesHarnessComposer extends DeesElement {
997
1016
  ${typedCommand ? this.t('composer.run') : this.t(deliveryLabelKeys[this.primaryDelivery ?? 'turn'])}
998
1017
  </dees-button>
999
1018
  </div>
1019
+ </div>
1000
1020
  ${this.showModelControls
1001
1021
  ? html`<p class="accountNote ${this.accountNote ? '' : 'empty'}" role="status">${this.accountNote
1002
1022
  ? html`<dees-icon icon="lucide:Info" iconSize="12" aria-hidden="true"></dees-icon>
@@ -1097,7 +1117,8 @@ export class DeesHarnessComposer extends DeesElement {
1097
1117
 
1098
1118
  private handleKeydown = (event: KeyboardEvent): void => {
1099
1119
  if (this.interactionLocked) return;
1100
- if (event.isComposing || this.composing) return;
1120
+ // Some browsers deliver the Enter that commits an IME composition after compositionend, as key 229.
1121
+ if (event.isComposing || this.composing || event.keyCode === 229) return;
1101
1122
  // Alt+Enter queues for after this turn wherever the host queues; alone or with Cmd/Ctrl.
1102
1123
  if (event.key === 'Enter' && event.altKey && this.busy && this.busyDeliveryModes.includes('queue')) {
1103
1124
  event.preventDefault();
@@ -1123,10 +1144,11 @@ export class DeesHarnessComposer extends DeesElement {
1123
1144
  return;
1124
1145
  }
1125
1146
  // Enter and Tab complete the highlighted entry. On a highlighted entry that cannot be
1126
- // completed they do nothing; with no entry highlighted they keep their own meaning.
1147
+ // completed they do nothing; with no entry highlighted they keep their own meaning, and
1148
+ // Enter on the entry the prompt already is sends the prompt.
1127
1149
  if (event.key === 'Enter' || event.key === 'Tab') {
1128
1150
  const entry = menu.entries[this.activeMenuEntryIndex(menu)];
1129
- if (entry) {
1151
+ if (entry && !(event.key === 'Enter' && this.promptIsEntry(entry))) {
1130
1152
  event.preventDefault();
1131
1153
  void this.chooseMenuEntry(entry);
1132
1154
  return;
@@ -1134,6 +1156,12 @@ export class DeesHarnessComposer extends DeesElement {
1134
1156
  }
1135
1157
  }
1136
1158
  }
1159
+ // Enter sends the prompt (the main action while busy); Shift+Enter is the textarea's new line.
1160
+ if (event.key === 'Enter' && !event.shiftKey && !event.altKey) {
1161
+ event.preventDefault();
1162
+ this.send(this.primaryDelivery);
1163
+ return;
1164
+ }
1137
1165
  if (this.handlePromptHistoryKey(event)) return;
1138
1166
  // Shift+Tab cycles the agent mode without leaving the prompt
1139
1167
  if (event.key === 'Tab' && event.shiftKey && this.modeOptions.length) {
@@ -1295,10 +1323,19 @@ export class DeesHarnessComposer extends DeesElement {
1295
1323
  return commandMenuFor(this.value, this.commands);
1296
1324
  }
1297
1325
 
1298
- /** The highlighted entry: the one moved to, else the first that can be completed. */
1326
+ /**
1327
+ * The highlighted entry: the one moved to, else the one the prompt already is (`/model gpt-5`
1328
+ * among `gpt-5.5` and `gpt-5`), else the first that can be completed.
1329
+ */
1299
1330
  private activeMenuEntryIndex(menuArg: ICommandMenu): number {
1300
1331
  if (this.activeMenuIndex >= 0 && this.activeMenuIndex < menuArg.entries.length) return this.activeMenuIndex;
1301
- return menuArg.entries.findIndex((entry) => !entry.unavailable);
1332
+ const typed = menuArg.entries.findIndex((entry) => this.promptIsEntry(entry));
1333
+ return typed >= 0 ? typed : menuArg.entries.findIndex((entry) => !entry.unavailable);
1334
+ }
1335
+
1336
+ /** The prompt is the entry's completion already, and the entry leads nowhere further. */
1337
+ private promptIsEntry(entryArg: ICommandMenuEntry): boolean {
1338
+ return !entryArg.unavailable && !entryArg.opensOptions && entryArg.completion === this.value.trim();
1302
1339
  }
1303
1340
 
1304
1341
  private commandMenuOptionId(indexArg: number): string {
@@ -1,5 +1,16 @@
1
1
  import { css, type CSSResult } from '@design.estate/dees-element';
2
2
  import * as domtools from '@design.estate/dees-domtools';
3
+ import type { IMarkdownHtmlOptions } from '@push.rocks/smartmarkdown';
4
+
5
+ /**
6
+ * A reply renders as it streamed: each line break the model wrote is a line break (`breaks`), as
7
+ * the plain streaming text shows it, and a reply is never a document with frontmatter, so `---`
8
+ * blocks at its start stay its own text (`frontmatter: false`).
9
+ */
10
+ export const harnessMarkdownRenderOptions: Readonly<IMarkdownHtmlOptions> = Object.freeze({
11
+ frontmatter: false,
12
+ breaks: true,
13
+ });
3
14
 
4
15
  /**
5
16
  * Markdown service for harness messages. Uses smartmarkdown (already in the
@@ -27,7 +38,7 @@ export class HarnessMarkdown {
27
38
  this.cache.set(markdownText, cached);
28
39
  return cached;
29
40
  }
30
- const html = await domtools.plugins.smartmarkdown.SmartMarkdown.easyMarkdownToHtml(markdownText);
41
+ const html = await domtools.plugins.smartmarkdown.SmartMarkdown.markdownToHtml(markdownText, harnessMarkdownRenderOptions);
31
42
  const processed = this.postProcess(html);
32
43
  this.cache.set(markdownText, processed);
33
44
  if (this.cache.size > HarnessMarkdown.maxCacheEntries) {
@@ -4,7 +4,7 @@
4
4
  export * from './interfaces.js';
5
5
  export * from './toolregistry.js';
6
6
  export * from './harness.helpers.js';
7
- export { HarnessMarkdown, markdownStyles } from './harness.markdown.js';
7
+ export { HarnessMarkdown, harnessMarkdownRenderOptions, markdownStyles } from './harness.markdown.js';
8
8
  export { harnessCardStyles, harnessPillStyles, harnessMonoStyles } from './harness.styles.js';
9
9
  export * from './harness.demodata.js';
10
10
  export * from './dees-harness-overflow-text.js';