@design.estate/dees-catalog 22.5.3 → 22.6.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/dist_bundle/bundle.js +44 -18
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-76VF6K64.js → chunk-EDEJNSV7.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-77DA2Q4J.js → chunk-ISDTXJM5.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-3ND5XEOV.js → chunk-Q5VMRCKS.js} +4 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-3ND5XEOV.js.map → chunk-Q5VMRCKS.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-3GDPSSEC.js → de-G2A4G5Y2.js} +3 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-3GDPSSEC.js.map → de-G2A4G5Y2.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-GZZH74FG.js → dees-modal-XOFBPIM6.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-QL3ESJCM.js → dees-workspace-terminal-LS7IYP6V.js} +4 -4
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-message/dees-harness-message.d.ts +3 -2
- package/dist_ts_web/elements/00group-harness/dees-harness-message/dees-harness-message.demo.js +12 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-message/dees-harness-message.js +35 -12
- package/dist_ts_web/elements/00group-harness/interfaces.d.ts +18 -4
- package/dist_ts_web/i18n/de.d.ts +5 -1
- package/dist_ts_web/i18n/de.js +2 -1
- package/dist_ts_web/i18n/messages.d.ts +5 -1
- package/dist_ts_web/i18n/messages.js +3 -2
- package/package.json +1 -1
- package/readme.md +3 -3
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-harness/dees-harness-message/dees-harness-message.demo.ts +11 -0
- package/ts_web/elements/00group-harness/dees-harness-message/dees-harness-message.ts +36 -11
- package/ts_web/elements/00group-harness/interfaces.ts +19 -4
- package/ts_web/i18n/de.ts +1 -0
- package/ts_web/i18n/messages.ts +2 -1
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-76VF6K64.js.map → chunk-EDEJNSV7.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-77DA2Q4J.js.map → chunk-ISDTXJM5.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-GZZH74FG.js.map → dees-modal-XOFBPIM6.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-QL3ESJCM.js.map → dees-workspace-terminal-LS7IYP6V.js.map} +0 -0
package/readme.md
CHANGED
|
@@ -6004,7 +6004,7 @@ Scrollable streaming-safe log. Up to 40 canonical entries (`messages` + `permiss
|
|
|
6004
6004
|
|
|
6005
6005
|
Producers with authoritative source chronology can set `IHarnessMessage.order` to `{ messageIndex, partIndex }`; explicitly ordered messages retain that relative order while timestamps continue to place legacy messages and ancillary cards. Every entry is one row of a single column at its chronological position — there are no tool groups, grids or columns, and a status change never moves a row. Rows are held to a reading measure — `--dees-harness-content-width`, default `--dees-content-width-lg` (800px), capped at the available width — and a message that is nothing but a tool call renders as one inline row rather than a card. Only the row a reader opens takes the full pane, on a `max-width` transition running on `--dees-transition-default` with `--dees-ease-standard`, so a diff or command output gets the room while its neighbours keep the measure; the opened row also gains a `--dees-spacing-sm` margin so it steps out of the run around it, and consecutive collapsed tool rows pull together into one list. A row that mounts open is already at its width and does not animate into it, and `prefers-reduced-motion: reduce` drops the width and margin transitions. Every row that arrives live at the tail of an already-rendered transcript — a message of any role, a tool row, a permission or question card, one that lands above a request still pinned to the end included — takes its place in two steps on the same timing: the list opens the row's space from nothing, and only then does the row blend into it, so what sits below and the followed bottom travel rather than jump, in the flowed and the virtualized transcript alike; rows arriving in one update open together. The space step needs keyword size interpolation — where a browser lacks it the row is simply there and only blends in. Nothing enters on the first render, a new `transcriptKey`, earlier history, a re-render, or a row coming back from eviction; reduced motion means the row is simply there. A host that gives a message a new `id`, when its stream ends say, makes it a new row, which arrives again. While a row opens its space the list sets `entering` on its `dees-harness-message`, so a block that appears in the message meanwhile comes with the row rather than arriving on its own.
|
|
6006
6006
|
|
|
6007
|
-
A `role: 'user'` message with `pending` set has not been taken in by the session yet, and waits in a queue under the working indicator instead of in the transcript: a thin rule either side of a centred "Pending" label in caption size and muted text, then the waiting messages in the order they were sent, each in its ordinary bubble with a line that says where it stands (see `DeesHarnessMessage`), all on the status line's measure. `pending` is a `THarnessPendingState`: `'steering'` (handed to the running turn, read at its next step), `'queued'` (confirmed to wait for the next turn), `'uncertain'` (delivery attempted but unconfirmed), or `'held'` (not sent: the run was stopped before the session took it in). A held message offers **Resend** and **Discard**, which emit `harness-held-resend` and `harness-held-discard` with `{ messageId }` (`IHarnessHeldMessageDetail`), bubbling and composed out of the list and the chat; the host sends it again (setting `'queued'` or `'steering'`) or removes it. Nothing held is ever sent on its own. Without a status line the queue sits directly under the transcript, still under its divider. It is never virtualized: it is the bottom that auto-follow keeps in view. A message joining the queue arrives like a row, and the divider arrives with the first. When the host clears `pending` on the same `id` — by passing the message again without it, or by mutating the shared object and calling `refreshMessages([id])` — the message glides from its slot to its place in the transcript in one motion on `--dees-transition-slow` with `--dees-ease-standard`, while the working indicator, the divider and the rest of the queue travel with it; what waited below it stays where it is (the slot keeps showing the state line the message waited with while it closes, so it gives that line's space back too, and under a followed bottom the transcript settles down by it), and the divider closes its space and blends out with the last message to leave. Its place is chronological like any message's, by `order` or `createdAt`, so a host that delivers queued prompts when the running turn ends stamps them then, and they land at the tail rather than among that turn's output. Taking a message up keeps a pinned transcript pinned and an unpinned reader's anchor still, virtualized or not. Once the message has landed it sweeps its acceptance scan, never over the glide (see `DeesHarnessMessage`). A message taken up while it still arrives in the queue finishes arriving first. Under reduced motion the message is simply in its place, with neither glide nor sweep; a browser without keyword size interpolation places it at once and sweeps; where the list is not rendered — hidden, or skipped by `content-visibility` — or cannot tell (no `Element.checkVisibility`), it is simply in its place. A message the host removes from the queue just goes. The composer's `queuedCount` stays host-driven. Subagent rows have no body at all: activating one opens its thread in the fullscreen view, exactly like opening it from the sidebar, and the transcript stays where it was. The docked composer keeps its full-bleed bar and insets its content to the same measure, so the prompt lines up with the messages above it. The status line under the transcript sits on that measure too, so the working indicator starts where the messages start rather than at the pane edge. Set the custom property on the chat or the list to widen or disable the column; it is read when rows are measured, so change it at mount rather than while a virtualized transcript is scrolled. Nothing opens or closes on its own: a reader's disclosure is kept in the retained view state and survives status changes, eviction and remounting. Auto-follow responds to streamed growth but does not repeatedly repin while a disclosure shrinks. Permission requests and questions behave as before. Props: `messages`, `permissions`/`permissionsBusy`, `questions`, `status`, `viewState`, `transcriptKey`, `hasEarlierMessages`, `loadingEarlier`, `autoFollow`, `hideScrollbar`, `fadeScrollEdges`, `showRoles`, `showTimestamps`, `markdownWhileStreaming` (default `true`), `emptyTitle`/`emptyText` (+ `slot="empty"`), `starterPrompts`. `starterPrompts` (`IHarnessStarterPrompt[]`) renders as buttons under the empty transcript's text; choosing one emits the bubbling, composed `harness-starter-prompt` with `IHarnessStarterPromptDetail` `{ prompt }` (its `prompt`, else its `label`) and sends nothing. They belong to the default empty content, so content assigned to `slot="empty"` replaces them. Native browser find and selection cover the mounted window; hosts that require complete-history search or copy should operate on their canonical `messages`, `permissions`, and `questions` models.
|
|
6007
|
+
A `role: 'user'` message with `pending` set has not been taken in by the session yet, and waits in a queue under the working indicator instead of in the transcript: a thin rule either side of a centred "Pending" label in caption size and muted text, then the waiting messages in the order they were sent, each in its ordinary bubble with a line that says where it stands (see `DeesHarnessMessage`), all on the status line's measure. `pending` is a `THarnessPendingState`: `'steering'` (handed to the running turn, read at its next step), `'queued'` (confirmed to wait for the next turn), `'uncertain'` (delivery attempted but unconfirmed), or `'held'` (not sent: the run was stopped before the session took it in). A held message offers **Resend** and **Discard**, which emit `harness-held-resend` and `harness-held-discard` with `{ messageId }` (`IHarnessHeldMessageDetail`), bubbling and composed out of the list and the chat; the host sends it again (setting `'queued'` or `'steering'`) or removes it. Nothing held is ever sent on its own. `heldActions` (`THarnessHeldAction[]`: `'resend'`, `'discard'`) on the message states which of the two a held or uncertain message offers; set `heldActions: ['discard']` on an uncertain message to let the reader drop it without offering a resend that could deliver it twice (see `DeesHarnessMessage`). Without a status line the queue sits directly under the transcript, still under its divider. It is never virtualized: it is the bottom that auto-follow keeps in view. A message joining the queue arrives like a row, and the divider arrives with the first. When the host clears `pending` on the same `id` — by passing the message again without it, or by mutating the shared object and calling `refreshMessages([id])` — the message glides from its slot to its place in the transcript in one motion on `--dees-transition-slow` with `--dees-ease-standard`, while the working indicator, the divider and the rest of the queue travel with it; what waited below it stays where it is (the slot keeps showing the state line the message waited with while it closes, so it gives that line's space back too, and under a followed bottom the transcript settles down by it), and the divider closes its space and blends out with the last message to leave. Its place is chronological like any message's, by `order` or `createdAt`, so a host that delivers queued prompts when the running turn ends stamps them then, and they land at the tail rather than among that turn's output. Taking a message up keeps a pinned transcript pinned and an unpinned reader's anchor still, virtualized or not. Once the message has landed it sweeps its acceptance scan, never over the glide (see `DeesHarnessMessage`). A message taken up while it still arrives in the queue finishes arriving first. Under reduced motion the message is simply in its place, with neither glide nor sweep; a browser without keyword size interpolation places it at once and sweeps; where the list is not rendered — hidden, or skipped by `content-visibility` — or cannot tell (no `Element.checkVisibility`), it is simply in its place. A message the host removes from the queue just goes. The composer's `queuedCount` stays host-driven. Subagent rows have no body at all: activating one opens its thread in the fullscreen view, exactly like opening it from the sidebar, and the transcript stays where it was. The docked composer keeps its full-bleed bar and insets its content to the same measure, so the prompt lines up with the messages above it. The status line under the transcript sits on that measure too, so the working indicator starts where the messages start rather than at the pane edge. Set the custom property on the chat or the list to widen or disable the column; it is read when rows are measured, so change it at mount rather than while a virtualized transcript is scrolled. Nothing opens or closes on its own: a reader's disclosure is kept in the retained view state and survives status changes, eviction and remounting. Auto-follow responds to streamed growth but does not repeatedly repin while a disclosure shrinks. Permission requests and questions behave as before. Props: `messages`, `permissions`/`permissionsBusy`, `questions`, `status`, `viewState`, `transcriptKey`, `hasEarlierMessages`, `loadingEarlier`, `autoFollow`, `hideScrollbar`, `fadeScrollEdges`, `showRoles`, `showTimestamps`, `markdownWhileStreaming` (default `true`), `emptyTitle`/`emptyText` (+ `slot="empty"`), `starterPrompts`. `starterPrompts` (`IHarnessStarterPrompt[]`) renders as buttons under the empty transcript's text; choosing one emits the bubbling, composed `harness-starter-prompt` with `IHarnessStarterPromptDetail` `{ prompt }` (its `prompt`, else its `label`) and sends nothing. They belong to the default empty content, so content assigned to `slot="empty"` replaces them. Native browser find and selection cover the mounted window; hosts that require complete-history search or copy should operate on their canonical `messages`, `permissions`, and `questions` models.
|
|
6008
6008
|
|
|
6009
6009
|
#### `DeesHarnessMessage`
|
|
6010
6010
|
|
|
@@ -6012,7 +6012,7 @@ For a queued or held user prompt the host can still withdraw, set `pendingAction
|
|
|
6012
6012
|
|
|
6013
6013
|
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.
|
|
6014
6014
|
|
|
6015
|
-
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
|
|
6015
|
+
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. The message's `heldActions` (`THarnessHeldAction[]`) states which buttons a held or uncertain message shows, always Resend before Discard; left out, a held message shows both and an uncertain one none, and in any other state it is ignored. `heldActions: ['discard']` on an uncertain message shows **Discard** alone, after "A resend could deliver it twice", since the prompt may already have reached the session; a held message the host lets the reader only discard shows Discard with no such note. A button pressed after the message stopped offering its action 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.
|
|
6016
6016
|
|
|
6017
6017
|
`refreshMessage()` reconciles direct same-object host mutations across text, reasoning, and tool content.
|
|
6018
6018
|
|
|
@@ -6202,7 +6202,7 @@ chat.addEventListener('harness-question-response', async (event) => {
|
|
|
6202
6202
|
|
|
6203
6203
|
#### `DeesHarnessComposer`
|
|
6204
6204
|
|
|
6205
|
-
An `uncertain` pending prompt says “Delivery unconfirmed”: the host has attempted dispatch but cannot confirm whether the harness took it. Keep that prompt with `pendingActionAvailable: false` until the host reconciles the outcome; it cannot be resent or withdrawn meanwhile. Consecutive assistant messages containing only reasoning share the first row's role, model, and time range while each message keeps its own collapsible reasoning trace and stable ID. User messages, tool calls, model changes, or assistant text break the run.
|
|
6205
|
+
An `uncertain` pending prompt says “Delivery unconfirmed”: the host has attempted dispatch but cannot confirm whether the harness took it. Keep that prompt with `pendingActionAvailable: false` until the host reconciles the outcome; it cannot be resent or withdrawn meanwhile. A host that can forget the prompt sets `heldActions: ['discard']` on it, and the message offers Discard alone (`harness-held-discard`) and says that a resend could deliver it twice. Consecutive assistant messages containing only reasoning share the first row's role, model, and time range while each message keeps its own collapsible reasoning trace and stable ID. User messages, tool calls, model changes, or assistant text break the run.
|
|
6206
6206
|
|
|
6207
6207
|
Pass `.history` as `IHarnessComposerHistoryEntry[]` in oldest-to-newest send order. Each entry has `{ id, text, attachments? }`; attachments supplied for resend must include their complete payloads. With no pending prompt, ArrowUp at the start of the textarea cycles backward through known entries and ArrowDown at the end moves forward, returning to the draft that was there before browsing. Set `.hasEarlierHistory` and `.loadEarlierHistory` when the host has older pages: ArrowUp at the oldest known entry awaits one callback, which updates the authoritative `.history`, then moves once to the newly preceding entry. A failed callback emits `harness-history-load-error` with `{ error }` and preserves the current entry. Multiline movement, command menu navigation, modifier keys, composition, and locked input retain their normal behavior. `dees-harness-chat` forwards these properties and its `transcriptKey` to the composer, resetting navigation when the conversation changes. When any pending prompt exists, history waits. ArrowUp on an empty composer emits `harness-pending-action` for Edit of the latest pending prompt only when it is queued or held and its `pendingActionAvailable` is true; the host withdraws it before filling the composer.
|
|
6208
6208
|
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@design.estate/dees-catalog',
|
|
6
|
-
version: '22.
|
|
6
|
+
version: '22.6.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
|
}
|
|
@@ -112,12 +112,23 @@ export const demoFunc = () => demoPage('Messages', 'Conversation turns, model de
|
|
|
112
112
|
${([
|
|
113
113
|
['steering', 'Use the route manifest hash for the cache key.'],
|
|
114
114
|
['queued', 'Then run the sitemap tests again.'],
|
|
115
|
+
['uncertain', 'Check the CDN purge log as well.'],
|
|
115
116
|
['held', 'Also bump the cache version.'],
|
|
116
117
|
] as const).map(([pending, text]) => html`
|
|
117
118
|
<dees-harness-message
|
|
118
119
|
.message=${{ id: `pending-${pending}`, role: 'user' as const, text, createdAt: Date.now(), pending }}
|
|
119
120
|
></dees-harness-message>
|
|
120
121
|
`)}
|
|
122
|
+
<dees-harness-message
|
|
123
|
+
.message=${{
|
|
124
|
+
id: 'pending-uncertain-discard',
|
|
125
|
+
role: 'user' as const,
|
|
126
|
+
text: 'Retry the deploy with the new cache key.',
|
|
127
|
+
createdAt: Date.now(),
|
|
128
|
+
pending: 'uncertain' as const,
|
|
129
|
+
heldActions: ['discard'] as const,
|
|
130
|
+
}}
|
|
131
|
+
></dees-harness-message>
|
|
121
132
|
</div>
|
|
122
133
|
<dees-button @clicked=${startStreamingDemo}>Simulate streaming</dees-button>
|
|
123
134
|
<dees-harness-message
|
|
@@ -29,6 +29,7 @@ import type {
|
|
|
29
29
|
IHarnessMessage,
|
|
30
30
|
IHarnessMessageViewState,
|
|
31
31
|
IHarnessUsage,
|
|
32
|
+
THarnessHeldAction,
|
|
32
33
|
THarnessMessageStreamDelta,
|
|
33
34
|
THarnessPendingState,
|
|
34
35
|
THarnessAttachmentResolver,
|
|
@@ -93,6 +94,23 @@ const pendingStates = {
|
|
|
93
94
|
const pendingStateOf = (messageArg: IHarnessMessage): THarnessPendingState | undefined =>
|
|
94
95
|
messageArg.role === 'user' ? messageArg.pending : undefined;
|
|
95
96
|
|
|
97
|
+
/** The events a held or unconfirmed message's actions emit, in the order its buttons stand. */
|
|
98
|
+
const heldActionEvents = {
|
|
99
|
+
resend: 'harness-held-resend',
|
|
100
|
+
discard: 'harness-held-discard',
|
|
101
|
+
} as const satisfies Record<THarnessHeldAction, string>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* What the reader can do with a user message the host holds unsent or unconfirmed: what the host
|
|
105
|
+
* lists, else Resend and Discard while it is held and nothing while it is uncertain.
|
|
106
|
+
*/
|
|
107
|
+
const heldActionsOf = (messageArg: IHarnessMessage): THarnessHeldAction[] => {
|
|
108
|
+
const state = pendingStateOf(messageArg);
|
|
109
|
+
if (state !== 'held' && state !== 'uncertain') return [];
|
|
110
|
+
const listed = messageArg.heldActions ?? (state === 'held' ? ['resend', 'discard'] : []);
|
|
111
|
+
return (Object.keys(heldActionEvents) as THarnessHeldAction[]).filter((action) => listed.includes(action));
|
|
112
|
+
};
|
|
113
|
+
|
|
96
114
|
const shownBlocksOf = (messageArg: IHarnessMessage): ReadonlySet<THarnessMessageBlock> => {
|
|
97
115
|
// A bare tool call is the row itself, so its card is already there if a frame comes later.
|
|
98
116
|
if (harnessRendersToolRow(messageArg)) return new Set(['toolCall']);
|
|
@@ -452,7 +470,7 @@ export class DeesHarnessMessage extends DeesElement {
|
|
|
452
470
|
font-size: var(--dees-font-caption2-size, 10px);
|
|
453
471
|
}
|
|
454
472
|
|
|
455
|
-
/* Where a message the session has not taken in yet stands, and a held one's actions. */
|
|
473
|
+
/* Where a message the session has not taken in yet stands, and a held or unconfirmed one's actions. */
|
|
456
474
|
.pendingState {
|
|
457
475
|
display: flex;
|
|
458
476
|
flex-wrap: wrap;
|
|
@@ -661,22 +679,29 @@ export class DeesHarnessMessage extends DeesElement {
|
|
|
661
679
|
|
|
662
680
|
/**
|
|
663
681
|
* Where a user message the session has not taken in yet stands. A held one was never sent: the
|
|
664
|
-
* reader resends or discards it, and the host acts on the event.
|
|
682
|
+
* reader resends or discards it, and the host acts on the event. An unconfirmed one offers what
|
|
683
|
+
* the host lists; offered Discard without Resend, it says that a resend could deliver it twice.
|
|
665
684
|
*/
|
|
666
685
|
private renderPendingState(): TemplateResult {
|
|
667
686
|
const state = pendingStateOf(this.message)!;
|
|
687
|
+
const actions = heldActionsOf(this.message);
|
|
668
688
|
return html`
|
|
669
689
|
<span class="pendingLabel">
|
|
670
690
|
<dees-icon icon=${pendingStates[state].icon} iconSize="12" aria-hidden="true"></dees-icon>
|
|
671
691
|
<span>${this.t(pendingStates[state].label)}</span>
|
|
672
692
|
</span>
|
|
673
|
-
${state === '
|
|
693
|
+
${state === 'uncertain' && actions.length && !actions.includes('resend')
|
|
694
|
+
? html`<span class="pendingNote">${this.t('message.resendUnconfirmed')}</span>`
|
|
695
|
+
: ''}
|
|
696
|
+
${actions.length
|
|
674
697
|
? html`
|
|
675
698
|
<span class="pendingActions">
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
699
|
+
${actions.includes('resend') ? html`
|
|
700
|
+
<dees-button class="resendButton" type="default" size="sm"
|
|
701
|
+
@clicked=${() => this.emitHeldAction('resend')}>${this.t('message.resend')}</dees-button>` : ''}
|
|
702
|
+
${actions.includes('discard') ? html`
|
|
703
|
+
<dees-button class="discardButton" type="ghost" size="sm"
|
|
704
|
+
@clicked=${() => this.emitHeldAction('discard')}>${this.t('message.discard')}</dees-button>` : ''}
|
|
680
705
|
</span>
|
|
681
706
|
`
|
|
682
707
|
: ''}
|
|
@@ -732,11 +757,11 @@ export class DeesHarnessMessage extends DeesElement {
|
|
|
732
757
|
}
|
|
733
758
|
}
|
|
734
759
|
|
|
735
|
-
/** Resend and Discard act
|
|
736
|
-
private emitHeldAction(
|
|
737
|
-
if (
|
|
760
|
+
/** Resend and Discard act only while the message still offers them when the reader chooses them. */
|
|
761
|
+
private emitHeldAction(actionArg: THarnessHeldAction): void {
|
|
762
|
+
if (!heldActionsOf(this.message).includes(actionArg)) return;
|
|
738
763
|
const detail: IHarnessHeldMessageDetail = { messageId: this.message.id };
|
|
739
|
-
this.dispatchEvent(new CustomEvent(
|
|
764
|
+
this.dispatchEvent(new CustomEvent(heldActionEvents[actionArg], { detail, bubbles: true, composed: true }));
|
|
740
765
|
}
|
|
741
766
|
|
|
742
767
|
/**
|
|
@@ -19,13 +19,21 @@ export type THarnessRole = 'user' | 'assistant' | 'system' | 'tool';
|
|
|
19
19
|
* - `queued`: confirmed to wait for the next turn, behind the running turn (the host's queue,
|
|
20
20
|
* or a harness that reads messages only between turns).
|
|
21
21
|
* - `uncertain`: dispatch was attempted, but the host cannot confirm whether the harness took it.
|
|
22
|
-
* The host retains the prompt until it can reconcile the outcome; it cannot be
|
|
22
|
+
* The host retains the prompt until it can reconcile the outcome; it cannot be withdrawn, and a
|
|
23
|
+
* resend could deliver it twice. A host that can let the reader drop it lists `'discard'` in
|
|
24
|
+
* `IHarnessMessage.heldActions`.
|
|
23
25
|
* - `held`: not sent. The run was stopped before the message was taken in; it waits for the
|
|
24
26
|
* reader to resend it (`harness-held-resend`) or discard it (`harness-held-discard`) and is
|
|
25
27
|
* never sent on its own.
|
|
26
28
|
*/
|
|
27
29
|
export type THarnessPendingState = 'steering' | 'queued' | 'uncertain' | 'held';
|
|
28
30
|
|
|
31
|
+
/**
|
|
32
|
+
* What the reader can do with a held or unconfirmed user message (`IHarnessMessage.heldActions`):
|
|
33
|
+
* `resend` emits `harness-held-resend`, `discard` emits `harness-held-discard`.
|
|
34
|
+
*/
|
|
35
|
+
export type THarnessHeldAction = 'resend' | 'discard';
|
|
36
|
+
|
|
29
37
|
export interface IHarnessReasoningPart {
|
|
30
38
|
id: string;
|
|
31
39
|
text: string;
|
|
@@ -219,10 +227,17 @@ export interface IHarnessMessage {
|
|
|
219
227
|
* A user message the session has not taken in yet, and where it stands (see
|
|
220
228
|
* `THarnessPendingState`). The transcript list shows it in its queue, under the working
|
|
221
229
|
* indicator, instead of in the transcript, and the message says its state; a held one offers
|
|
222
|
-
* Resend and Discard. Clearing it on the same id is the acceptance: the
|
|
223
|
-
* place in the transcript and sweeps a scan across itself once.
|
|
230
|
+
* Resend and Discard (see `heldActions`). Clearing it on the same id is the acceptance: the
|
|
231
|
+
* message glides into its place in the transcript and sweeps a scan across itself once.
|
|
224
232
|
*/
|
|
225
233
|
pending?: THarnessPendingState;
|
|
234
|
+
/**
|
|
235
|
+
* The actions a `held` or `uncertain` message offers, as the host states them. Left out, a held
|
|
236
|
+
* message offers Resend and Discard and an uncertain one offers none. `['discard']` on an
|
|
237
|
+
* uncertain message offers Discard alone and says why there is no Resend. Ignored in any other
|
|
238
|
+
* state.
|
|
239
|
+
*/
|
|
240
|
+
heldActions?: readonly THarnessHeldAction[];
|
|
226
241
|
/** Host-confirmed ability to withdraw a queued or held prompt before it is taken in. */
|
|
227
242
|
pendingActionAvailable?: boolean;
|
|
228
243
|
/** defaults to role === 'assistant' when undefined */
|
|
@@ -1084,7 +1099,7 @@ export type THarnessBusyDelivery = 'steer' | 'next-turn' | 'queue';
|
|
|
1084
1099
|
/** How a sent message reaches the session: `turn` starts a turn (nothing runs), or a busy delivery. */
|
|
1085
1100
|
export type THarnessComposerDelivery = 'turn' | THarnessBusyDelivery;
|
|
1086
1101
|
|
|
1087
|
-
/** Detail of `harness-held-resend` and `harness-held-discard`: the held message's `id`. */
|
|
1102
|
+
/** Detail of `harness-held-resend` and `harness-held-discard`: the held or unconfirmed message's `id`. */
|
|
1088
1103
|
export interface IHarnessHeldMessageDetail {
|
|
1089
1104
|
messageId: string;
|
|
1090
1105
|
}
|
package/ts_web/i18n/de.ts
CHANGED
|
@@ -1292,6 +1292,7 @@ export default dcMessages.translation('de', {
|
|
|
1292
1292
|
'message.pendingQueued': 'Für den nächsten Lauf eingereiht',
|
|
1293
1293
|
'message.pendingUncertain': 'Zustellung unbestätigt',
|
|
1294
1294
|
'message.pendingHeld': 'Zurückgehalten · nicht gesendet',
|
|
1295
|
+
'message.resendUnconfirmed': 'Erneutes Senden könnte sie doppelt zustellen',
|
|
1295
1296
|
'message.resend': 'Erneut senden',
|
|
1296
1297
|
'message.discard': 'Verwerfen',
|
|
1297
1298
|
'message.pendingOptions': 'Optionen für ausstehende Nachricht',
|
package/ts_web/i18n/messages.ts
CHANGED
|
@@ -1352,8 +1352,9 @@ export const dcMessages = plugins.smarti18n.defineCatalog({
|
|
|
1352
1352
|
'message.pendingQueued': { message: 'Queued for the next turn', description: 'Said on a message that waits for the next turn.' },
|
|
1353
1353
|
'message.pendingUncertain': { message: 'Delivery unconfirmed', description: 'Said when the host cannot confirm whether an attempted prompt reached the harness.' },
|
|
1354
1354
|
'message.pendingHeld': { message: 'Held · not sent', description: 'Said on a message that was not sent because the run was stopped.' },
|
|
1355
|
+
'message.resendUnconfirmed': { message: 'A resend could deliver it twice', description: 'Said beside Discard on a prompt whose delivery is unconfirmed, to say why it offers no Resend.' },
|
|
1355
1356
|
'message.resend': { message: 'Resend', description: 'The button that sends a held message.' },
|
|
1356
|
-
'message.discard': { message: 'Discard', description: 'The button that drops a held message.' },
|
|
1357
|
+
'message.discard': { message: 'Discard', description: 'The button that drops a held or unconfirmed message.' },
|
|
1357
1358
|
'message.pendingOptions': { message: 'Pending message options', description: 'Opens the edit and retract menu on a pending message.' },
|
|
1358
1359
|
'message.editPending': { message: 'Edit pending message', description: 'Withdraws a pending message for editing in the composer.' },
|
|
1359
1360
|
'message.retractPending': { message: 'Retract pending message', description: 'Withdraws a pending message without putting it in the composer.' },
|
/package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-76VF6K64.js.map → chunk-EDEJNSV7.js.map}
RENAMED
|
File without changes
|
/package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-77DA2Q4J.js.map → chunk-ISDTXJM5.js.map}
RENAMED
|
File without changes
|
|
File without changes
|