@cellarnode/ui 0.202.0 → 0.206.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -9
- package/dist/agent/activity-ledger.d.ts.map +1 -1
- package/dist/agent/activity-ledger.js +1 -1
- package/dist/agent/activity-ledger.js.map +1 -1
- package/dist/agent/composer.d.ts +64 -2
- package/dist/agent/composer.d.ts.map +1 -1
- package/dist/agent/composer.js +247 -9
- package/dist/agent/composer.js.map +1 -1
- package/dist/agent/confirm-card.d.ts.map +1 -1
- package/dist/agent/confirm-card.js +1 -1
- package/dist/agent/confirm-card.js.map +1 -1
- package/dist/agent/context.d.ts +94 -0
- package/dist/agent/context.d.ts.map +1 -0
- package/dist/agent/context.js +92 -0
- package/dist/agent/context.js.map +1 -0
- package/dist/agent/conversation.d.ts +41 -1
- package/dist/agent/conversation.d.ts.map +1 -1
- package/dist/agent/conversation.js +91 -6
- package/dist/agent/conversation.js.map +1 -1
- package/dist/agent/dropzone.d.ts +155 -0
- package/dist/agent/dropzone.d.ts.map +1 -0
- package/dist/agent/dropzone.js +404 -0
- package/dist/agent/dropzone.js.map +1 -0
- package/dist/agent/fixtures.d.ts.map +1 -1
- package/dist/agent/fixtures.js +6 -0
- package/dist/agent/fixtures.js.map +1 -1
- package/dist/agent/index.d.ts +12 -1
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +10 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/markdown.d.ts.map +1 -1
- package/dist/agent/markdown.js +127 -9
- package/dist/agent/markdown.js.map +1 -1
- package/dist/agent/mentions.d.ts +75 -0
- package/dist/agent/mentions.d.ts.map +1 -0
- package/dist/agent/mentions.js +184 -0
- package/dist/agent/mentions.js.map +1 -0
- package/dist/agent/message.d.ts +16 -1
- package/dist/agent/message.d.ts.map +1 -1
- package/dist/agent/message.js +26 -6
- package/dist/agent/message.js.map +1 -1
- package/dist/agent/quote-reply.d.ts +40 -0
- package/dist/agent/quote-reply.d.ts.map +1 -0
- package/dist/agent/quote-reply.js +97 -0
- package/dist/agent/quote-reply.js.map +1 -0
- package/dist/agent/role-cards/brand-profile-card.d.ts +60 -0
- package/dist/agent/role-cards/brand-profile-card.d.ts.map +1 -0
- package/dist/agent/role-cards/brand-profile-card.js +113 -0
- package/dist/agent/role-cards/brand-profile-card.js.map +1 -0
- package/dist/agent/role-cards/card-text.d.ts +10 -0
- package/dist/agent/role-cards/card-text.d.ts.map +1 -0
- package/dist/agent/role-cards/card-text.js +38 -0
- package/dist/agent/role-cards/card-text.js.map +1 -0
- package/dist/agent/role-cards/fixtures.d.ts +29 -1
- package/dist/agent/role-cards/fixtures.d.ts.map +1 -1
- package/dist/agent/role-cards/fixtures.js +210 -1
- package/dist/agent/role-cards/fixtures.js.map +1 -1
- package/dist/agent/role-cards/host-contract.d.ts +34 -4
- package/dist/agent/role-cards/host-contract.d.ts.map +1 -1
- package/dist/agent/role-cards/host-contract.js +87 -1
- package/dist/agent/role-cards/host-contract.js.map +1 -1
- package/dist/agent/role-cards/inspector-view.d.ts.map +1 -1
- package/dist/agent/role-cards/inspector-view.js +12 -0
- package/dist/agent/role-cards/inspector-view.js.map +1 -1
- package/dist/agent/role-cards/lab-report-card.d.ts +40 -0
- package/dist/agent/role-cards/lab-report-card.d.ts.map +1 -0
- package/dist/agent/role-cards/lab-report-card.js +58 -0
- package/dist/agent/role-cards/lab-report-card.js.map +1 -0
- package/dist/agent/role-cards/label-card.d.ts +42 -0
- package/dist/agent/role-cards/label-card.d.ts.map +1 -0
- package/dist/agent/role-cards/label-card.js +65 -0
- package/dist/agent/role-cards/label-card.js.map +1 -0
- package/dist/agent/role-cards/org-card.d.ts +20 -0
- package/dist/agent/role-cards/org-card.d.ts.map +1 -0
- package/dist/agent/role-cards/org-card.js +37 -0
- package/dist/agent/role-cards/org-card.js.map +1 -0
- package/dist/agent/role-cards/registry.d.ts +13 -1
- package/dist/agent/role-cards/registry.d.ts.map +1 -1
- package/dist/agent/role-cards/registry.js +33 -0
- package/dist/agent/role-cards/registry.js.map +1 -1
- package/dist/agent/role-cards/schedule-card.d.ts +30 -0
- package/dist/agent/role-cards/schedule-card.d.ts.map +1 -0
- package/dist/agent/role-cards/schedule-card.js +58 -0
- package/dist/agent/role-cards/schedule-card.js.map +1 -0
- package/dist/agent/role-cards/stats-card.d.ts +30 -0
- package/dist/agent/role-cards/stats-card.d.ts.map +1 -0
- package/dist/agent/role-cards/stats-card.js +31 -0
- package/dist/agent/role-cards/stats-card.js.map +1 -0
- package/dist/agent/role-cards/text-safety.d.ts +3 -0
- package/dist/agent/role-cards/text-safety.d.ts.map +1 -1
- package/dist/agent/role-cards/text-safety.js +16 -0
- package/dist/agent/role-cards/text-safety.js.map +1 -1
- package/dist/agent/schema.d.ts +21 -0
- package/dist/agent/schema.d.ts.map +1 -1
- package/dist/agent/schema.js +22 -1
- package/dist/agent/schema.js.map +1 -1
- package/dist/agent/suggestions.d.ts +66 -0
- package/dist/agent/suggestions.d.ts.map +1 -0
- package/dist/agent/suggestions.js +186 -0
- package/dist/agent/suggestions.js.map +1 -0
- package/dist/agent/text-clean.d.ts +12 -0
- package/dist/agent/text-clean.d.ts.map +1 -0
- package/dist/agent/text-clean.js +55 -0
- package/dist/agent/text-clean.js.map +1 -0
- package/dist/agent/thread-list.d.ts +16 -4
- package/dist/agent/thread-list.d.ts.map +1 -1
- package/dist/agent/thread-list.js +43 -26
- package/dist/agent/thread-list.js.map +1 -1
- package/dist/agent/thread-title.d.ts +46 -0
- package/dist/agent/thread-title.d.ts.map +1 -0
- package/dist/agent/thread-title.js +99 -0
- package/dist/agent/thread-title.js.map +1 -0
- package/dist/agent/tool-activity-model.d.ts +4 -0
- package/dist/agent/tool-activity-model.d.ts.map +1 -1
- package/dist/agent/tool-activity-model.js +7 -0
- package/dist/agent/tool-activity-model.js.map +1 -1
- package/dist/agent/tool-activity.d.ts +6 -0
- package/dist/agent/tool-activity.d.ts.map +1 -1
- package/dist/agent/tool-activity.js +51 -9
- package/dist/agent/tool-activity.js.map +1 -1
- package/dist/agent/tool-call-card.d.ts +2 -0
- package/dist/agent/tool-call-card.d.ts.map +1 -1
- package/dist/agent/tool-call-card.js +13 -3
- package/dist/agent/tool-call-card.js.map +1 -1
- package/dist/agent/ui.d.ts +7 -0
- package/dist/agent/ui.d.ts.map +1 -1
- package/dist/agent/ui.js +7 -0
- package/dist/agent/ui.js.map +1 -1
- package/dist/animated-icons/download-icon.d.ts.map +1 -1
- package/dist/animated-icons/download-icon.js +6 -1
- package/dist/animated-icons/download-icon.js.map +1 -1
- package/dist/animated-icons/filter-icon.d.ts.map +1 -1
- package/dist/animated-icons/filter-icon.js +6 -1
- package/dist/animated-icons/filter-icon.js.map +1 -1
- package/dist/animated-icons/upload-icon.d.ts.map +1 -1
- package/dist/animated-icons/upload-icon.js +6 -1
- package/dist/animated-icons/upload-icon.js.map +1 -1
- package/dist/brand/brand-image-source-picker.d.ts.map +1 -1
- package/dist/brand/brand-image-source-picker.js +9 -6
- package/dist/brand/brand-image-source-picker.js.map +1 -1
- package/dist/brand/brand-profile-form-values.d.ts +2 -2
- package/dist/chat/chat-surface.d.ts +16 -1
- package/dist/chat/chat-surface.d.ts.map +1 -1
- package/dist/chat/chat-surface.js +18 -16
- package/dist/chat/chat-surface.js.map +1 -1
- package/dist/chat/chat-toggle-button.d.ts.map +1 -1
- package/dist/chat/chat-toggle-button.js +11 -5
- package/dist/chat/chat-toggle-button.js.map +1 -1
- package/dist/chat/index.d.ts +1 -1
- package/dist/chat/index.d.ts.map +1 -1
- package/dist/chat/index.js.map +1 -1
- package/dist/components/bottle-extract-dialog.js +1 -1
- package/dist/components/bottle-extract-dialog.js.map +1 -1
- package/dist/components/branch-overview-panel.d.ts.map +1 -1
- package/dist/components/branch-overview-panel.js +8 -4
- package/dist/components/branch-overview-panel.js.map +1 -1
- package/dist/components/branch-resolution-modal.js +1 -1
- package/dist/components/branch-resolution-modal.js.map +1 -1
- package/dist/components/card-stack.d.ts.map +1 -1
- package/dist/components/card-stack.js +9 -1
- package/dist/components/card-stack.js.map +1 -1
- package/dist/components/copy-button.d.ts.map +1 -1
- package/dist/components/copy-button.js +15 -4
- package/dist/components/copy-button.js.map +1 -1
- package/dist/components/listbox.d.ts.map +1 -1
- package/dist/components/listbox.js +5 -1
- package/dist/components/listbox.js.map +1 -1
- package/dist/components/metric-card.d.ts +1 -1
- package/dist/components/metric-card.d.ts.map +1 -1
- package/dist/components/metric-card.js +2 -2
- package/dist/components/metric-card.js.map +1 -1
- package/dist/components/shadcn-button.d.ts +1 -1
- package/dist/components/sidebar/sidebar-menu.d.ts +1 -1
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toast.js.map +1 -1
- package/dist/discovery/command-palette-trigger.d.ts.map +1 -1
- package/dist/discovery/command-palette-trigger.js +2 -2
- package/dist/discovery/command-palette-trigger.js.map +1 -1
- package/dist/globe/globe-scene-camera.d.ts.map +1 -1
- package/dist/globe/globe-scene-camera.js +5 -2
- package/dist/globe/globe-scene-camera.js.map +1 -1
- package/dist/lab-reports/upload-lab-report-dialog.d.ts.map +1 -1
- package/dist/lab-reports/upload-lab-report-dialog.js +3 -3
- package/dist/lab-reports/upload-lab-report-dialog.js.map +1 -1
- package/dist/mcp-connect/clients.d.ts +4 -2
- package/dist/mcp-connect/clients.d.ts.map +1 -1
- package/dist/mcp-connect/clients.js +5 -3
- package/dist/mcp-connect/clients.js.map +1 -1
- package/dist/mcp-connect/mcp-connect-panel.js +1 -1
- package/dist/mcp-connect/mcp-connect-panel.js.map +1 -1
- package/dist/nav/app-sidebar.d.ts +5 -0
- package/dist/nav/app-sidebar.d.ts.map +1 -1
- package/dist/nav/app-sidebar.js +5 -3
- package/dist/nav/app-sidebar.js.map +1 -1
- package/dist/nav/sidebar-footer.d.ts +3 -1
- package/dist/nav/sidebar-footer.d.ts.map +1 -1
- package/dist/nav/sidebar-footer.js +5 -3
- package/dist/nav/sidebar-footer.js.map +1 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/notification-badge.d.ts +2 -0
- package/dist/notifications/notification-badge.d.ts.map +1 -1
- package/dist/notifications/notification-badge.js +9 -2
- package/dist/notifications/notification-badge.js.map +1 -1
- package/dist/notifications/notification-tray.d.ts.map +1 -1
- package/dist/notifications/notification-tray.js +12 -2
- package/dist/notifications/notification-tray.js.map +1 -1
- package/dist/offer/negotiation-labels.d.ts +5 -1
- package/dist/offer/negotiation-labels.d.ts.map +1 -1
- package/dist/offer/negotiation-labels.js +1 -1
- package/dist/offer/negotiation-labels.js.map +1 -1
- package/dist/offer/new-activity-pill.js +1 -1
- package/dist/offer/new-activity-pill.js.map +1 -1
- package/dist/opportunities/index.d.ts +1 -1
- package/dist/opportunities/index.d.ts.map +1 -1
- package/dist/opportunities/index.js.map +1 -1
- package/dist/opportunities/opportunity-add-to-journey-button.d.ts.map +1 -1
- package/dist/opportunities/opportunity-add-to-journey-button.js +17 -3
- package/dist/opportunities/opportunity-add-to-journey-button.js.map +1 -1
- package/dist/opportunities/opportunity-filter-bar.d.ts.map +1 -1
- package/dist/opportunities/opportunity-filter-bar.js +7 -1
- package/dist/opportunities/opportunity-filter-bar.js.map +1 -1
- package/dist/opportunities/wizard/wizard-stepper.d.ts +15 -0
- package/dist/opportunities/wizard/wizard-stepper.d.ts.map +1 -1
- package/dist/opportunities/wizard/wizard-stepper.js +17 -8
- package/dist/opportunities/wizard/wizard-stepper.js.map +1 -1
- package/dist/org/invite-member-dialog.d.ts.map +1 -1
- package/dist/org/invite-member-dialog.js +12 -1
- package/dist/org/invite-member-dialog.js.map +1 -1
- package/dist/portfolio/version-rail.d.ts.map +1 -1
- package/dist/portfolio/version-rail.js +1 -1
- package/dist/portfolio/version-rail.js.map +1 -1
- package/dist/portfolio-import/import-job-detail-view.d.ts.map +1 -1
- package/dist/portfolio-import/import-job-detail-view.js +12 -1
- package/dist/portfolio-import/import-job-detail-view.js.map +1 -1
- package/dist/portfolio-import/import-job-panels.d.ts.map +1 -1
- package/dist/portfolio-import/import-job-panels.js +13 -2
- package/dist/portfolio-import/import-job-panels.js.map +1 -1
- package/dist/portfolio-import/import-products-dialog.d.ts.map +1 -1
- package/dist/portfolio-import/import-products-dialog.js +5 -2
- package/dist/portfolio-import/import-products-dialog.js.map +1 -1
- package/dist/profile/api-keys/backend-as-metadata.fixture.d.ts +9 -0
- package/dist/profile/api-keys/backend-as-metadata.fixture.d.ts.map +1 -0
- package/dist/profile/api-keys/backend-as-metadata.fixture.js +42 -0
- package/dist/profile/api-keys/backend-as-metadata.fixture.js.map +1 -0
- package/dist/profile/api-keys/connected-apps-card.d.ts +2 -2
- package/dist/profile/api-keys/connected-apps-card.d.ts.map +1 -1
- package/dist/profile/api-keys/connected-apps-card.js +7 -3
- package/dist/profile/api-keys/connected-apps-card.js.map +1 -1
- package/dist/profile/api-keys/create-api-key-dialog.js +2 -2
- package/dist/profile/api-keys/create-api-key-dialog.js.map +1 -1
- package/dist/profile/api-keys/index.d.ts +2 -1
- package/dist/profile/api-keys/index.d.ts.map +1 -1
- package/dist/profile/api-keys/index.js +2 -1
- package/dist/profile/api-keys/index.js.map +1 -1
- package/dist/profile/api-keys/oauth-scopes.d.ts +8 -0
- package/dist/profile/api-keys/oauth-scopes.d.ts.map +1 -0
- package/dist/profile/api-keys/oauth-scopes.js +41 -0
- package/dist/profile/api-keys/oauth-scopes.js.map +1 -0
- package/dist/profile/api-keys/profile-keys-section.d.ts +6 -1
- package/dist/profile/api-keys/profile-keys-section.d.ts.map +1 -1
- package/dist/profile/api-keys/profile-keys-section.js +17 -2
- package/dist/profile/api-keys/profile-keys-section.js.map +1 -1
- package/dist/profile/api-keys/scope-list.d.ts +6 -1
- package/dist/profile/api-keys/scope-list.d.ts.map +1 -1
- package/dist/profile/api-keys/scope-list.js +10 -3
- package/dist/profile/api-keys/scope-list.js.map +1 -1
- package/dist/profile/api-keys/types.d.ts +14 -0
- package/dist/profile/api-keys/types.d.ts.map +1 -1
- package/dist/profile/api-keys/types.js +21 -0
- package/dist/profile/api-keys/types.js.map +1 -1
- package/dist/realtime/organisation-events/schemas.d.ts +2 -2
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -197,9 +197,9 @@ make test-watch Run Vitest in watch mode
|
|
|
197
197
|
make storybook Start Storybook dev server on :6006
|
|
198
198
|
make build-storybook Build static Storybook to storybook-static/
|
|
199
199
|
make publish Manual fallback ONLY — build and publish current version to npm (not the normal path)
|
|
200
|
-
make release-patch Bump patch version, commit, and git tag (
|
|
201
|
-
make release-minor Bump minor version, commit, and git tag (
|
|
202
|
-
make release-major Bump major version, commit, and git tag (
|
|
200
|
+
make release-patch Bump patch version, commit, and git tag (publishes after main's CI is green)
|
|
201
|
+
make release-minor Bump minor version, commit, and git tag (publishes after main's CI is green)
|
|
202
|
+
make release-major Bump major version, commit, and git tag (publishes after main's CI is green)
|
|
203
203
|
```
|
|
204
204
|
|
|
205
205
|
---
|
|
@@ -228,9 +228,9 @@ claude mcp add storybook-mcp --transport http http://localhost:6006/mcp --scope
|
|
|
228
228
|
## Publishing
|
|
229
229
|
|
|
230
230
|
Packages are published to npm (public access — `publishConfig.access: "public"`, see CEL-1983) via **npm Trusted Publishing (OIDC)** —
|
|
231
|
-
`.github/workflows/publish.yml` publishes automatically
|
|
232
|
-
`package.json`'s version. Nobody runs `npm publish` by hand; there is no
|
|
233
|
-
in the publish job. Releases are cut locally via Make, then landed through a normal PR:
|
|
231
|
+
`.github/workflows/publish.yml` publishes automatically once the push-to-`main` CI run for the **tip of main**
|
|
232
|
+
is green AND `package.json`'s version is not on npm yet. Nobody runs `npm publish` by hand; there is no
|
|
233
|
+
long-lived npm token in the publish job. Releases are cut locally via Make, then landed through a normal PR:
|
|
234
234
|
|
|
235
235
|
```bash
|
|
236
236
|
make release-patch # 0.2.1 → 0.2.2
|
|
@@ -239,6 +239,22 @@ make release-major # 0.2.1 → 1.0.0
|
|
|
239
239
|
```
|
|
240
240
|
|
|
241
241
|
Each release target: bumps version in `package.json`, rolls `CHANGELOG.md`, builds, commits, and
|
|
242
|
-
creates a git tag `ui-vX.Y.Z` — it does **not** publish. Push the branch, open a PR, and
|
|
243
|
-
|
|
244
|
-
a local `npm login` with publish rights); it is not the normal path.
|
|
242
|
+
creates a git tag `ui-vX.Y.Z` — it does **not** publish. Push the branch, open a PR, and merge it.
|
|
243
|
+
Publishing then follows the green CI run on `main`'s tip. `make publish` remains as an explicit manual
|
|
244
|
+
fallback (needs a local `npm login` with publish rights); it is not the normal path.
|
|
245
|
+
|
|
246
|
+
How the gated publish behaves (CEL-2530):
|
|
247
|
+
|
|
248
|
+
- **Wait for CI.** `Publish to npm` starts when the `CI` workflow of a push to `main` completes with success, so expect the CI wall
|
|
249
|
+
clock (1.5-8 h on the shared runner pool) before the package appears. Watch the **Publish to npm** run, not the merge.
|
|
250
|
+
- **Merge the release PR LAST** and pause other merges to `main` until the publish appears: only the tip of `main` publishes, so a later
|
|
251
|
+
merge makes the older commit's run skip ("main has moved on") and the newer commit's own green CI decides. If CI on the tip is red or
|
|
252
|
+
cancelled, nothing is published: fix forward or re-run CI on the tip.
|
|
253
|
+
- **`[skip ci]` tips never publish** (no CI run, nothing to wait for).
|
|
254
|
+
- **`gitHead` in the published package** may not equal the `ui-vX.Y.Z` tag commit when a later green tip published the version.
|
|
255
|
+
- **Recovery.** Re-run the failed CI job on `main`'s tip (the publish follows the new green result), or use the escape hatch: Actions >
|
|
256
|
+
*Publish to npm* > *Run workflow* from `main`, typing the exact `package.json` version in `confirm`. The real
|
|
257
|
+
controls on that run: it must start from `main`, the person who starts it must be on the actor allowlist in `publish.yml` (a JSON list in
|
|
258
|
+
the job `if`; add a maintainer in a reviewed PR), the typed `confirm` must match, the commit must still be the tip of `main` (otherwise the run
|
|
259
|
+
fails and you start it again), and the same "version not on npm yet" check applies. There is no environment or required-reviewers gate (not
|
|
260
|
+
available on a private repo of this plan); keep npm's trusted-publisher "Environment" field blank.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-ledger.d.ts","sourceRoot":"","sources":["../../src/agent/activity-ledger.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAoBD,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IAC5B,2FAA2F;IAC3F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,SAAS,EACT,iBAAiB,EACjB,IAAI,EACJ,SAAS,GACV,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"activity-ledger.d.ts","sourceRoot":"","sources":["../../src/agent/activity-ledger.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAoBD,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IAC5B,2FAA2F;IAC3F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,SAAS,EACT,iBAAiB,EACjB,IAAI,EACJ,SAAS,GACV,EAAE,wBAAwB,2CAyF1B"}
|
|
@@ -42,7 +42,7 @@ export function AgentActivityLedger({ steps, collapsed, onCollapsedChange, copy,
|
|
|
42
42
|
setUserCollapsed(next);
|
|
43
43
|
onCollapsedChange?.(next);
|
|
44
44
|
}
|
|
45
|
-
return (_jsxs("div", { "data-collapsed": isCollapsed, className: cn("rounded-xl bg-card text-sm/5 ring-1 ring-border/60", className), children: [_jsxs("button", { type: "button", "aria-expanded": !isCollapsed, "aria-label": `${c.heading}: ${summary}. ${isCollapsed ? c.expand : c.collapse}`, onClick: toggle, className: cn("flex min-h-10 w-full items-center gap-2 rounded-xl px-3 text-left", focusRing), children: [_jsx(ChevronRight, { "aria-hidden": true, className: cn("size-3.5 shrink-0 text-muted-foreground transition-transform duration-[var(--duration-micro)] motion-reduce:transition-none", !isCollapsed && "rotate-90") }), _jsx("span", { "aria-hidden": true, className: "text-xs/4 font-medium uppercase tracking-wider text-muted-foreground", children: c.heading }), _jsx("span", { "aria-hidden": true, className: cn("min-w-0 flex-1 truncate", failed > 0 && !running ? "text-[var(--tone-warning-fg)]" : "text-foreground"), children: summary })] }), !isCollapsed && (_jsx("ol", { className: "border-t border-border/60 px-3 py-2", children: steps.map((step) => {
|
|
45
|
+
return (_jsxs("div", { "data-collapsed": isCollapsed, className: cn("rounded-xl bg-card text-sm/5 ring-1 ring-border/60", className), children: [_jsxs("button", { type: "button", "aria-expanded": !isCollapsed, "aria-label": `${c.heading}: ${summary}. ${isCollapsed ? c.expand : c.collapse}`, onClick: toggle, className: cn("flex min-h-10 w-full items-center gap-2 rounded-xl px-3 text-left", focusRing), children: [_jsx(ChevronRight, { "aria-hidden": true, className: cn("size-3.5 shrink-0 text-muted-foreground transition-transform duration-[var(--duration-micro)] motion-reduce:transition-none", !isCollapsed && "rotate-90") }), _jsx("span", { "aria-hidden": true, className: "text-xs/4 font-medium uppercase tracking-wider text-muted-foreground", children: c.heading }), " ", _jsx("span", { "aria-hidden": true, className: cn("min-w-0 flex-1 truncate", failed > 0 && !running ? "text-[var(--tone-warning-fg)]" : "text-foreground"), children: summary })] }), !isCollapsed && (_jsx("ol", { className: "border-t border-border/60 px-3 py-2", children: steps.map((step) => {
|
|
46
46
|
const s = STATUS[step.status];
|
|
47
47
|
return (_jsxs("li", { "data-status": step.status, className: "flex items-start gap-2 py-1.5", children: [_jsx("span", { className: cn("mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full", toneChip[s.tone]), children: _jsx(s.icon, { "aria-hidden": true, className: cn("size-3", s.spin && "animate-spin motion-reduce:animate-none") }) }), _jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "text-xs/4 text-muted-foreground", children: c[`kind_${step.kind}`] }), _jsx("p", { className: "text-foreground", children: step.title }), step.detail && _jsx("p", { className: "text-muted-foreground", children: step.detail })] })] }, step.id));
|
|
48
48
|
}) }))] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-ledger.js","sourceRoot":"","sources":["../../src/agent/activity-ledger.tsx"],"names":[],"mapp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AAC"}
|
package/dist/agent/composer.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { type AgentSuggestion, type AgentSuggestionRowCopy } from "./suggestions.js";
|
|
2
|
+
import { type AgentContextChipsCopy, type AgentContextRef, type AgentQuote, type AgentSendMeta } from "./context.js";
|
|
3
|
+
import type { AgentLinkPolicy } from "./markdown.js";
|
|
4
|
+
import { type AgentMentionCopy, type AgentMentionSource } from "./mentions.js";
|
|
5
|
+
import { type AgentDropZoneCopy, type AgentUpload } from "./dropzone.js";
|
|
1
6
|
export interface AgentComposerCopy {
|
|
2
7
|
label: string;
|
|
3
8
|
placeholder: string;
|
|
@@ -12,7 +17,11 @@ export interface AgentComposerCopy {
|
|
|
12
17
|
disclaimer: string;
|
|
13
18
|
}
|
|
14
19
|
export interface AgentComposerProps {
|
|
15
|
-
|
|
20
|
+
/**
|
|
21
|
+
* The message text, and what the person attached to it as STRUCTURED data (quoted passages, `@` mentions, context chips). The ui
|
|
22
|
+
* never writes any of it into the text: the host decides how the model sees it (and should treat quotes as untrusted).
|
|
23
|
+
*/
|
|
24
|
+
onSubmit: (text: string, meta?: AgentSendMeta) => void;
|
|
16
25
|
onStop?: () => void;
|
|
17
26
|
/** A run is in flight: sending is blocked, Stop is offered. */
|
|
18
27
|
running?: boolean;
|
|
@@ -21,6 +30,59 @@ export interface AgentComposerProps {
|
|
|
21
30
|
disabled?: boolean;
|
|
22
31
|
maxLength?: number;
|
|
23
32
|
suggestions?: readonly string[];
|
|
33
|
+
/**
|
|
34
|
+
* Host-provided, page-aware suggested actions: one scrolling row above the field while it is empty and idle. A chip fills the
|
|
35
|
+
* field with its prompt for the person to read, edit and send; it never sends.
|
|
36
|
+
*/
|
|
37
|
+
suggestedActions?: readonly AgentSuggestion[];
|
|
38
|
+
suggestedActionsCopy?: Partial<AgentSuggestionRowCopy>;
|
|
39
|
+
/** Called with the chosen suggestion, after the field has been filled. */
|
|
40
|
+
onSuggestedAction?: (suggestion: AgentSuggestion) => void;
|
|
41
|
+
/** Put this text in the field and focus it. A new `nonce` re-applies the same text (a follow-up chosen twice). */
|
|
42
|
+
draft?: {
|
|
43
|
+
text: string;
|
|
44
|
+
nonce: number;
|
|
45
|
+
};
|
|
46
|
+
/** The field's current text, for a host that shows something only while it is empty. */
|
|
47
|
+
onValueChange?: (text: string) => void;
|
|
48
|
+
/** ArrowUp pressed in an empty field. Hosts use it to move into a list above (the follow-up palette). */
|
|
49
|
+
onArrowUpEmpty?: () => void;
|
|
50
|
+
/** Id of the follow-up palette's hint. While set, the field says ArrowUp enters the palette (`aria-keyshortcuts`) and is described by the hint. */
|
|
51
|
+
paletteHintId?: string;
|
|
52
|
+
/** What this question is about, attached by the host (the page or entity). Each chip can be removed; the host owns the list. */
|
|
53
|
+
contexts?: readonly AgentContextRef[];
|
|
54
|
+
onRemoveContext?: (context: AgentContextRef) => void;
|
|
55
|
+
contextCopy?: Partial<AgentContextChipsCopy>;
|
|
56
|
+
onNavigate?: (path: string) => void;
|
|
57
|
+
linkPolicy?: AgentLinkPolicy;
|
|
58
|
+
/** A passage to quote (from "Reply" on an answer). A new `nonce` adds it; the same text is never added twice. */
|
|
59
|
+
quoteRequest?: {
|
|
60
|
+
quote: AgentQuote;
|
|
61
|
+
nonce: number;
|
|
62
|
+
};
|
|
63
|
+
/** Turns on `@` mentions: the search the host runs (debounced, abortable, capped by the ui). */
|
|
64
|
+
mentionSource?: AgentMentionSource;
|
|
65
|
+
mentionCopy?: Partial<AgentMentionCopy>;
|
|
66
|
+
/**
|
|
67
|
+
* Turns on "Drop anything here or browse". Gets the `File` objects that passed the checks; the ui never reads their contents and
|
|
68
|
+
* never sends them anywhere: uploading (and what the model may see of it) is the host's business. `accept`, `maxBytes` and
|
|
69
|
+
* `maxFiles` are UX checks only: the HOST MUST validate type and size again on the server.
|
|
70
|
+
*/
|
|
71
|
+
onFiles?: (files: File[]) => void;
|
|
72
|
+
/** `<input accept>` grammar (`.pdf,image/*`). */
|
|
73
|
+
accept?: string;
|
|
74
|
+
/** The most files held at once, uploads in the list included. Default 5. */
|
|
75
|
+
maxFiles?: number;
|
|
76
|
+
/** The biggest file in bytes. */
|
|
77
|
+
maxBytes?: number;
|
|
78
|
+
/** The host's upload state, drawn as chips. */
|
|
79
|
+
uploads?: readonly AgentUpload[];
|
|
80
|
+
onRemoveUpload?: (id: string) => void;
|
|
81
|
+
dropCopy?: Partial<AgentDropZoneCopy>;
|
|
82
|
+
/** BCP 47 tag for numbers in drop-zone messages. */
|
|
83
|
+
locale?: string;
|
|
84
|
+
/** The ids of the answers on screen. A quote whose answer is gone (another thread) is dropped. Omit to keep quotes regardless. */
|
|
85
|
+
knownMessageIds?: ReadonlySet<string>;
|
|
24
86
|
copy?: Partial<AgentComposerCopy>;
|
|
25
87
|
className?: string;
|
|
26
88
|
}
|
|
@@ -28,5 +90,5 @@ export interface AgentComposerProps {
|
|
|
28
90
|
* @internal Composer: a rounded field with a circular send button that becomes a circular Stop button while a run streams,
|
|
29
91
|
* and a quiet disclaimer line underneath (`copy.disclaimer`). Enter sends, Shift+Enter newline, Esc stops a running run.
|
|
30
92
|
*/
|
|
31
|
-
export declare function AgentComposer({ onSubmit, onStop, running, approvalPending, disabled, maxLength, suggestions, copy, className, }: AgentComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
93
|
+
export declare function AgentComposer({ onSubmit, onStop, running, approvalPending, disabled, maxLength, suggestions, suggestedActions, suggestedActionsCopy, onSuggestedAction, draft, onValueChange, onArrowUpEmpty, paletteHintId, contexts, onRemoveContext, contextCopy, onNavigate, linkPolicy, quoteRequest, mentionSource, mentionCopy, knownMessageIds, onFiles, accept, maxFiles, maxBytes, uploads, onRemoveUpload, dropCopy, locale, copy, className, }: AgentComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
32
94
|
//# sourceMappingURL=composer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composer.d.ts","sourceRoot":"","sources":["../../src/agent/composer.tsx"],"names":[],"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AAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;IACjC,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACtC,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kIAAkI;IAClI,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,MAAM,EACN,OAAe,EACf,eAAuB,EACvB,QAAgB,EAChB,SAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,QAAQ,EACR,eAAe,EACf,WAAW,EACX,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,cAAc,EACd,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,SAAS,GACV,EAAE,kBAAkB,2CA2YpB"}
|
package/dist/agent/composer.js
CHANGED
|
@@ -1,10 +1,50 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useId, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
+
import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
3
3
|
import { ArrowUp, Square } from "lucide-react";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
5
|
import { fmt, useCopy } from "./copy.js";
|
|
6
|
+
import { AgentSuggestionRow, suggestionPrompt, } from "./suggestions.js";
|
|
7
|
+
import { AgentContextChips, AgentQuoteChip, MAX_QUOTES, cleanQuote, DEFAULT_CONTEXT_COPY, } from "./context.js";
|
|
8
|
+
import { clipCodePoints } from "./role-cards/text-safety.js";
|
|
9
|
+
import { AgentMentionList, DEFAULT_MENTION_COPY, mentionAnnouncement, useMentions, } from "./mentions.js";
|
|
10
|
+
import { AgentDropZone } from "./dropzone.js";
|
|
6
11
|
import { focusRing } from "./ui.js";
|
|
7
12
|
import { useChanged } from "./use-motion.js";
|
|
13
|
+
/**
|
|
14
|
+
* Moves spans through an edit from `before` to `after`. The edit is the region between the common prefix and the common suffix,
|
|
15
|
+
* found from the CARET: the text after the caret is untouched by the edit, so the suffix is measured first and never reaches
|
|
16
|
+
* left of it. (Prefix first would put a deletion of text that repeats its neighbour one repeat too far right, and drop or keep the
|
|
17
|
+
* wrong one of two identical mentions.) `caret` is the END of the selection after the edit: an undo or a drag-drop leaves the
|
|
18
|
+
* inserted text selected, so the start would be wrong. The prefix never reaches past `startBefore`, where the selection began
|
|
19
|
+
* before the edit, so a replacement that begins with the same characters does not keep the span it replaced. Without them (a
|
|
20
|
+
* programmatic change) the longest common suffix and prefix are used;
|
|
21
|
+
* a span entirely before it stays, one entirely after it shifts, and one the edit touches (or lands inside) is dropped. So deleting
|
|
22
|
+
* or changing "@Leroy" drops exactly that mention, never another with a similar or the same name.
|
|
23
|
+
*/
|
|
24
|
+
function moveSpans(spans, before, after, caret, startBefore) {
|
|
25
|
+
if (before === after || spans.length === 0)
|
|
26
|
+
return spans;
|
|
27
|
+
const max = Math.min(before.length, after.length);
|
|
28
|
+
const cap = caret === undefined ? max : Math.min(max, Math.max(0, after.length - caret));
|
|
29
|
+
let s = 0;
|
|
30
|
+
while (s < cap && before[before.length - 1 - s] === after[after.length - 1 - s])
|
|
31
|
+
s++;
|
|
32
|
+
let p = 0;
|
|
33
|
+
const pCap = startBefore === undefined ? Infinity : startBefore;
|
|
34
|
+
while (p < max - s && p < pCap && before[p] === after[p])
|
|
35
|
+
p++;
|
|
36
|
+
const removedEnd = before.length - s; // the edit replaced before[p, removedEnd)
|
|
37
|
+
const delta = after.length - before.length;
|
|
38
|
+
const out = [];
|
|
39
|
+
for (const sp of spans) {
|
|
40
|
+
const end = sp.start + sp.length;
|
|
41
|
+
if (end <= p)
|
|
42
|
+
out.push(sp);
|
|
43
|
+
else if (sp.start >= removedEnd && (removedEnd > p || sp.start >= p))
|
|
44
|
+
out.push({ ...sp, start: sp.start + delta });
|
|
45
|
+
}
|
|
46
|
+
return out;
|
|
47
|
+
}
|
|
8
48
|
const DEFAULT_COPY = {
|
|
9
49
|
label: "Message the agent",
|
|
10
50
|
placeholder: "Ask a question. Enter to send, Shift+Enter for a new line.",
|
|
@@ -23,9 +63,102 @@ const roundButton = "inline-flex size-8 shrink-0 items-center justify-center rou
|
|
|
23
63
|
* @internal Composer: a rounded field with a circular send button that becomes a circular Stop button while a run streams,
|
|
24
64
|
* and a quiet disclaimer line underneath (`copy.disclaimer`). Enter sends, Shift+Enter newline, Esc stops a running run.
|
|
25
65
|
*/
|
|
26
|
-
export function AgentComposer({ onSubmit, onStop, running = false, approvalPending = false, disabled = false, maxLength = 4000, suggestions, copy, className, }) {
|
|
66
|
+
export function AgentComposer({ onSubmit, onStop, running = false, approvalPending = false, disabled = false, maxLength = 4000, suggestions, suggestedActions, suggestedActionsCopy, onSuggestedAction, draft, onValueChange, onArrowUpEmpty, paletteHintId, contexts, onRemoveContext, contextCopy, onNavigate, linkPolicy, quoteRequest, mentionSource, mentionCopy, knownMessageIds, onFiles, accept, maxFiles, maxBytes, uploads, onRemoveUpload, dropCopy, locale, copy, className, }) {
|
|
67
|
+
const card = useRef(null);
|
|
27
68
|
const c = useCopy(DEFAULT_COPY, copy);
|
|
28
|
-
const
|
|
69
|
+
const ctxCopy = useCopy(DEFAULT_CONTEXT_COPY, contextCopy);
|
|
70
|
+
const [value, setValueState] = useState("");
|
|
71
|
+
// The legacy string `suggestions` go through the same row, so there is ONE suggestion look.
|
|
72
|
+
const rowItems = suggestedActions?.length
|
|
73
|
+
? suggestedActions
|
|
74
|
+
: (suggestions ?? []).map((label, i) => ({ id: `s${i}`, label }));
|
|
75
|
+
const [caret, setCaretState] = useState(0);
|
|
76
|
+
// Where the selection began, as of the last selection change: what an edit starts from (see `moveSpans`).
|
|
77
|
+
const selStartRef = useRef(0);
|
|
78
|
+
const setCaret = (at) => {
|
|
79
|
+
selStartRef.current = at;
|
|
80
|
+
setCaretState(at);
|
|
81
|
+
};
|
|
82
|
+
const [quotes, setQuotes] = useState([]);
|
|
83
|
+
const [spans, setSpans] = useState([]);
|
|
84
|
+
const valueRef = useRef("");
|
|
85
|
+
// Said by the persistent live region: a quote the limit turned away.
|
|
86
|
+
const [notice, setNotice] = useState(null);
|
|
87
|
+
const mentionCopyResolved = useCopy(DEFAULT_MENTION_COPY, mentionCopy);
|
|
88
|
+
const mention = useMentions(value, caret, mentionSource);
|
|
89
|
+
const mentionOpen = mention.open;
|
|
90
|
+
const mentionHasItems = mention.items.length > 0;
|
|
91
|
+
// A passage quoted from an answer: add it once (the same text again is a no-op), at most MAX_QUOTES (a new one is turned away at the limit).
|
|
92
|
+
const quoteNonce = useRef(undefined);
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
if (!quoteRequest || quoteRequest.nonce === quoteNonce.current)
|
|
95
|
+
return;
|
|
96
|
+
quoteNonce.current = quoteRequest.nonce;
|
|
97
|
+
const text = cleanQuote(quoteRequest.quote.text);
|
|
98
|
+
if (!text)
|
|
99
|
+
return;
|
|
100
|
+
if (quotes.some((x) => x.text === text))
|
|
101
|
+
return;
|
|
102
|
+
// At the limit a new passage is turned away (and said), not allowed to push an older one out unseen.
|
|
103
|
+
if (quotes.length >= MAX_QUOTES) {
|
|
104
|
+
setNotice((prev) => ({
|
|
105
|
+
text: fmt(ctxCopy.quoteLimit, { max: MAX_QUOTES }),
|
|
106
|
+
n: (prev?.n ?? 0) + 1,
|
|
107
|
+
}));
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
setNotice(null);
|
|
111
|
+
setQuotes([...quotes, { messageId: quoteRequest.quote.messageId, text }]);
|
|
112
|
+
taRef.current?.focus();
|
|
113
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- applies once per request nonce
|
|
114
|
+
}, [quoteRequest]);
|
|
115
|
+
// Quotes belong to the answers on screen: when the thread changes, the ones whose answer is gone go too.
|
|
116
|
+
useEffect(() => {
|
|
117
|
+
if (!knownMessageIds)
|
|
118
|
+
return;
|
|
119
|
+
setQuotes((all) => all.every((q) => knownMessageIds.has(q.messageId))
|
|
120
|
+
? all
|
|
121
|
+
: all.filter((q) => knownMessageIds.has(q.messageId)));
|
|
122
|
+
}, [knownMessageIds]);
|
|
123
|
+
// The refusal is said, shown, and then let go: it must not hold the live region (the search status needs it) for ever.
|
|
124
|
+
// While the `@` list is speaking the refusal waits its turn (its 6 s start when the list falls quiet), instead of being lost.
|
|
125
|
+
const listSpeaking = Boolean(mentionSource) && mentionAnnouncement(mention, mentionCopyResolved) !== "";
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
if (!notice || listSpeaking)
|
|
128
|
+
return;
|
|
129
|
+
const t = setTimeout(() => setNotice(null), 6000);
|
|
130
|
+
return () => clearTimeout(t);
|
|
131
|
+
}, [notice, listSpeaking]);
|
|
132
|
+
const setValue = (text, caretAfter) => {
|
|
133
|
+
// (read BEFORE the updater runs: a pending update would otherwise show it the new text)
|
|
134
|
+
const prev = valueRef.current;
|
|
135
|
+
const from = selStartRef.current;
|
|
136
|
+
setSpans((all) => moveSpans(all, prev, text, caretAfter, caretAfter === undefined ? undefined : from));
|
|
137
|
+
if (caretAfter === undefined)
|
|
138
|
+
setCaret(text.length); // a programmatic change: the caret is at the end, said outright
|
|
139
|
+
valueRef.current = text;
|
|
140
|
+
setValueState(text);
|
|
141
|
+
onValueChange?.(text);
|
|
142
|
+
};
|
|
143
|
+
// A draft from the host (a follow-up or suggested action chosen elsewhere): fill the field and put the caret at the end.
|
|
144
|
+
const draftNonce = useRef(undefined);
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
if (!draft || draft.nonce === draftNonce.current)
|
|
147
|
+
return;
|
|
148
|
+
draftNonce.current = draft.nonce;
|
|
149
|
+
// A host replacement of the whole text: the mentions it replaced are gone.
|
|
150
|
+
setSpans([]);
|
|
151
|
+
setCaret(draft.text.length);
|
|
152
|
+
valueRef.current = draft.text;
|
|
153
|
+
setValueState(draft.text);
|
|
154
|
+
onValueChange?.(draft.text);
|
|
155
|
+
const ta = taRef.current;
|
|
156
|
+
if (ta) {
|
|
157
|
+
ta.focus();
|
|
158
|
+
ta.setSelectionRange(draft.text.length, draft.text.length);
|
|
159
|
+
}
|
|
160
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- applies once per nonce
|
|
161
|
+
}, [draft]);
|
|
29
162
|
const taRef = useRef(null);
|
|
30
163
|
const id = useId();
|
|
31
164
|
const over = value.length - maxLength;
|
|
@@ -42,11 +175,59 @@ export function AgentComposer({ onSubmit, onStop, running = false, approvalPendi
|
|
|
42
175
|
if (!running && buttonRef.current && document.activeElement === buttonRef.current)
|
|
43
176
|
taRef.current?.focus();
|
|
44
177
|
}, [running]);
|
|
178
|
+
function acceptMention(i) {
|
|
179
|
+
const picked = mention.accept(i);
|
|
180
|
+
if (!picked)
|
|
181
|
+
return;
|
|
182
|
+
// (the edit moves the other spans first; the new one is added after, at the position the accept reports)
|
|
183
|
+
const prev = valueRef.current;
|
|
184
|
+
setSpans((all) => [
|
|
185
|
+
...moveSpans(all, prev, picked.text, picked.caret),
|
|
186
|
+
{ ref: picked.mention, start: picked.start, length: picked.length },
|
|
187
|
+
]);
|
|
188
|
+
valueRef.current = picked.text;
|
|
189
|
+
setValueState(picked.text);
|
|
190
|
+
onValueChange?.(picked.text);
|
|
191
|
+
setCaret(picked.caret);
|
|
192
|
+
requestAnimationFrame(() => {
|
|
193
|
+
const ta = taRef.current;
|
|
194
|
+
if (!ta)
|
|
195
|
+
return;
|
|
196
|
+
ta.focus();
|
|
197
|
+
ta.setSelectionRange(picked.caret, picked.caret);
|
|
198
|
+
setCaret(picked.caret);
|
|
199
|
+
});
|
|
200
|
+
}
|
|
45
201
|
function submit() {
|
|
46
202
|
if (!canSend)
|
|
47
203
|
return;
|
|
48
|
-
|
|
204
|
+
const text = value.trim();
|
|
205
|
+
// A mention counts only while ITS characters are still where it was put: the span must still read `@label`. Deleting or editing
|
|
206
|
+
// those words drops that mention (and only that one), whatever other names look like it.
|
|
207
|
+
const seen = new Set();
|
|
208
|
+
const live = [];
|
|
209
|
+
for (const sp of spans) {
|
|
210
|
+
if (value.slice(sp.start, sp.start + sp.length) !== `@${sp.ref.label}`)
|
|
211
|
+
continue;
|
|
212
|
+
// ...and the name must still END there: a letter typed straight after it makes it a different word.
|
|
213
|
+
if (/[\p{L}\p{N}_]/u.test(value.charAt(sp.start + sp.length)))
|
|
214
|
+
continue;
|
|
215
|
+
const k = `${sp.ref.kind}\u0000${sp.ref.id}`;
|
|
216
|
+
if (seen.has(k))
|
|
217
|
+
continue;
|
|
218
|
+
seen.add(k);
|
|
219
|
+
live.push(sp.ref);
|
|
220
|
+
}
|
|
221
|
+
const attached = quotes.length > 0 || live.length > 0 || (contexts?.length ?? 0) > 0;
|
|
222
|
+
// Without anything attached the call is exactly what it always was: one argument.
|
|
223
|
+
if (attached)
|
|
224
|
+
onSubmit(text, { quotes, mentions: live, contexts: contexts ?? [] });
|
|
225
|
+
else
|
|
226
|
+
onSubmit(text);
|
|
49
227
|
setValue("");
|
|
228
|
+
setQuotes([]);
|
|
229
|
+
setSpans([]);
|
|
230
|
+
setNotice(null);
|
|
50
231
|
// The button that was just pressed becomes Stop; the next thing to type goes in the field.
|
|
51
232
|
taRef.current?.focus();
|
|
52
233
|
}
|
|
@@ -59,14 +240,71 @@ export function AgentComposer({ onSubmit, onStop, running = false, approvalPendi
|
|
|
59
240
|
e.preventDefault();
|
|
60
241
|
onStop?.();
|
|
61
242
|
}
|
|
62
|
-
}, children: [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
243
|
+
}, children: [rowItems.length > 0 && value === "" && !blocked && (_jsx(AgentSuggestionRow, { suggestions: rowItems, copy: suggestedActions?.length
|
|
244
|
+
? suggestedActionsCopy
|
|
245
|
+
: { label: c.suggestions, ...suggestedActionsCopy }, onSelect: (s) => {
|
|
246
|
+
setValue(suggestionPrompt(s));
|
|
247
|
+
taRef.current?.focus();
|
|
248
|
+
onSuggestedAction?.(s);
|
|
249
|
+
} })), _jsxs("div", { ref: card,
|
|
250
|
+
// `data-dragging` is set by the drop zone while a file is over the card: the whole card shows it, not only the top row.
|
|
251
|
+
className: "rounded-2xl bg-card p-2 shadow-[var(--shadow-soft)] ring-1 ring-border focus-within:ring-2 focus-within:ring-ring data-[dragging]:ring-2 data-[dragging]:ring-ring", children: [onFiles && (
|
|
252
|
+
// Off while the agent works or waits for an approval; a file dropped anywhere on the card is taken (or refused) here.
|
|
253
|
+
_jsx(AgentDropZone, { target: card, onFiles: onFiles, accept: accept, maxFiles: maxFiles, maxBytes: maxBytes, uploads: uploads, onRemoveUpload: onRemoveUpload, disabled: blocked, reasonId: reason ? `${id}-note` : undefined, locale: locale, copy: dropCopy, className: "px-1 pb-2" })), ((contexts?.length ?? 0) > 0 || quotes.length > 0) && (_jsxs("div", { role: "group", "aria-label": ctxCopy.attached,
|
|
254
|
+
// Capped: three quotes, several contexts and the mention list must not squeeze the log (320 px), so it scrolls.
|
|
255
|
+
className: "flex max-h-28 flex-col items-start gap-1.5 overflow-y-auto px-1 pb-2", children: [notice && (
|
|
256
|
+
// (sighted users see the refusal too; the live region above is what is spoken)
|
|
257
|
+
_jsx("p", { "aria-hidden": true, className: "text-xs/5 text-muted-foreground", children: notice.text })), contexts && contexts.length > 0 && (_jsx(AgentContextChips, { contexts: contexts, onRemove: onRemoveContext, onNavigate: onNavigate, linkPolicy: linkPolicy, copy: contextCopy, className: "justify-start" })), quotes.map((q, i) => (_jsx(AgentQuoteChip, { text: q.text, removeLabel: fmt(ctxCopy.removeQuote, { text: clipCodePoints(q.text, 40) }), onRemove: () => {
|
|
258
|
+
setNotice(null);
|
|
259
|
+
setQuotes((all) => all.filter((_, j) => j !== i));
|
|
260
|
+
} }, `${i}:${q.text.slice(0, 24)}`)))] })), _jsx("p", { role: "status", className: "sr-only", children: listSpeaking ? (_jsx("span", { children: mentionAnnouncement(mention, mentionCopyResolved) }, mentionAnnouncement(mention, mentionCopyResolved))) : notice ? (_jsx("span", { children: notice.text }, `n${notice.n}`)) : null }), mentionSource && (_jsx(AgentMentionList, { state: mention, copy: mentionCopy, onAccept: acceptMention })), _jsx("label", { htmlFor: id, className: "sr-only", children: c.label }), _jsx("textarea", { id: id, "data-agent-composer-field": "", ref: taRef, rows: 2, value: value, disabled: disabled, placeholder: c.placeholder, "aria-describedby": [reason || over > 0 ? `${id}-note` : undefined, paletteHintId]
|
|
261
|
+
.filter(Boolean)
|
|
262
|
+
.join(" ") || undefined, "aria-keyshortcuts": paletteHintId ? "ArrowUp" : undefined, "aria-invalid": over > 0 || undefined, onChange: (e) => {
|
|
263
|
+
// The END of the selection anchors the edit (an undo leaves the inserted text selected); the start is the caret.
|
|
264
|
+
const end = e.target.selectionEnd ?? e.target.value.length;
|
|
265
|
+
setValue(e.target.value, end);
|
|
266
|
+
setCaret(e.target.selectionStart ?? end);
|
|
267
|
+
}, onSelect: (e) => setCaret(e.currentTarget.selectionStart ?? 0), ...(mentionSource
|
|
268
|
+
? {
|
|
269
|
+
"aria-haspopup": "listbox",
|
|
270
|
+
"aria-controls": mentionOpen && mentionHasItems ? mention.listId : undefined,
|
|
271
|
+
"aria-activedescendant": mentionOpen && mentionHasItems ? mention.optionId(mention.active) : undefined,
|
|
272
|
+
"aria-autocomplete": "list",
|
|
273
|
+
}
|
|
274
|
+
: {}), onKeyDown: (e) => {
|
|
275
|
+
if (mentionOpen && !e.nativeEvent.isComposing) {
|
|
276
|
+
if (mentionHasItems && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
|
|
277
|
+
e.preventDefault();
|
|
278
|
+
mention.move(e.key === "ArrowDown" ? 1 : -1);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
if (mentionHasItems && (e.key === "Enter" || e.key === "Tab")) {
|
|
282
|
+
e.preventDefault();
|
|
283
|
+
acceptMention(mention.active);
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
if (e.key === "Escape") {
|
|
287
|
+
// Closes the list; it must not also stop a run.
|
|
288
|
+
e.preventDefault();
|
|
289
|
+
e.stopPropagation();
|
|
290
|
+
mention.dismiss();
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
// Holding Enter must not re-send; it also stops the key that chose a follow-up from sending it on repeat.
|
|
295
|
+
if (e.key === "Enter" && e.repeat && !e.shiftKey)
|
|
296
|
+
e.preventDefault();
|
|
297
|
+
else if (e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing) {
|
|
67
298
|
e.preventDefault();
|
|
68
299
|
submit();
|
|
69
300
|
}
|
|
301
|
+
else if (e.key === "ArrowUp" &&
|
|
302
|
+
value === "" &&
|
|
303
|
+
onArrowUpEmpty &&
|
|
304
|
+
!e.nativeEvent.isComposing) {
|
|
305
|
+
e.preventDefault();
|
|
306
|
+
onArrowUpEmpty();
|
|
307
|
+
}
|
|
70
308
|
}, className: "block max-h-40 min-h-12 w-full resize-none bg-transparent px-2 py-1.5 text-sm/5 text-foreground outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed" }), _jsxs("div", { className: "flex items-center justify-between gap-2 px-1 pt-1", children: [_jsx("p", { id: `${id}-note`, className: cn("min-w-0 text-xs/4", over > 0 ? "text-[var(--tone-danger-fg)]" : "text-muted-foreground"), children: over > 0 ? fmt(c.tooLong, { over }) : reason }), _jsxs("div", { className: "flex items-center gap-2", children: [value.length > maxLength * 0.8 && (_jsx("span", { className: "text-xs/4 tabular-nums text-muted-foreground", children: fmt(c.counter, { used: value.length, max: maxLength }) })), _jsx("button", { ref: buttonRef, type: running ? "button" : "submit", "aria-label": running ? c.stop : c.send, title: running ? c.stop : c.send, disabled: !running && !canSend, "aria-disabled": running && !onStop ? true : undefined, onClick: (e) => {
|
|
71
309
|
if (!running)
|
|
72
310
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composer.js","sourceRoot":"","sources":["../../src/agent/composer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAe1C,MAAM,YAAY,GAAsB;IACtC,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,4DAA4D;IACzE,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,wCAAwC;IACrD,gBAAgB,EAAE,uCAAuC;IACzD,OAAO,EAAE,8CAA8C;IACvD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,uDAAuD;CACpE,CAAC;AAEF,MAAM,WAAW,GACf,gTAAgT;IAChT,SAAS,CAAC;AAgBZ;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,QAAQ,EACR,MAAM,EACN,OAAO,GAAG,KAAK,EACf,eAAe,GAAG,KAAK,EACvB,QAAQ,GAAG,KAAK,EAChB,SAAS,GAAG,IAAI,EAChB,WAAW,EACX,IAAI,EACJ,SAAS,GACU;IACnB,MAAM,CAAC,GAAG,OAAO,C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BAAmB,EAAE,MAAM,CAAC;IAC5B,gEAAgE;IAChE,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,yBAAyB,EAAE,oBAiDvC,CAAC;AAyBF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,aAAa,CAAC;IACxB,sEAAsE;IACtE,UAAU,EAAE,CACV,QAAQ,EAAE,SAAS,GAAG,QAAQ,EAC9B,KAAK,CAAC,EAAE,MAAM;IACd,gGAAgG;IAChG,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACnC,IAAI,CAAC;IACV,sGAAsG;IACtG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsBD,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,UAAU,EACV,KAAK,EACL,IAAI,EACJ,SAAS,GACV,EAAE,qBAAqB,2CA2WvB"}
|
|
@@ -152,7 +152,7 @@ export function AgentConfirmCard({ approval, onDecision, nowMs, copy, className,
|
|
|
152
152
|
? fmt(c.threadTaint, {
|
|
153
153
|
sources: approval.threadTaint.sources.map(readableSource).join(", "),
|
|
154
154
|
})
|
|
155
|
-
: c.threadTaintGeneric })] })), _jsx("p", { id: titleId, className: "mt-2 text-base/6 font-medium text-foreground", children: approval.intent }), _jsxs("p", { className: "mt-1 break-all font-mono text-xs/4 text-foreground", children: [_jsx("span", { className: "font-semibold", children: approval.method }), " ", approval.routeTemplate] }), hasChanges ? (_jsx("dl", { "aria-label": c.changesHeading, tabIndex: 0, className: cn("mt-3 max-h-56 divide-y divide-border/60 overflow-y-auto rounded-lg ring-1 ring-border/60", focusRing), children: approval.changes.map((row, i) => (_jsxs("div", { className: "grid grid-cols-[minmax(0,9rem)_1fr] gap-x-3 px-3 py-1.5", children: [_jsx("dt", { className: "break-words text-xs/5 text-muted-foreground", title: row.label, children: row.label }), _jsxs("dd", { className: "flex min-w-0 flex-wrap items-center gap-1.5 text-sm/5", children: [row.before !== undefined && (_jsxs("span", { className: "text-muted-foreground line-through decoration-muted-foreground/60", children: [_jsxs("span", { className: "sr-only", children: [c.was, ": "] }), _jsx(MaskedValue, { value: row.before, empty: c.emptyValue })] })), row.before !== undefined && row.after !== undefined && (_jsx(ArrowRight, { "aria-hidden": true, className: "size-3 shrink-0 text-muted-foreground" })), row.after !== undefined && (_jsxs("span", { className: "font-medium text-foreground", children: [_jsxs("span", { className: "sr-only", children: [c.now, ": "] }), _jsx(MaskedValue, { value: row.after, empty: c.emptyValue })] }))] })] }, rowKey(row.label, i)))) })) : (bodyText !== undefined && (_jsx("p", { className: "mt-3 text-xs/5 text-muted-foreground", children: c.noChanges }))), approval.cost && (_jsxs("p", { className: "mt-2 text-xs/4 text-muted-foreground", children: [approval.cost.label, approval.cost.capRemaining
|
|
155
|
+
: c.threadTaintGeneric })] })), _jsx("p", { id: titleId, dir: "auto", className: "mt-2 text-base/6 font-medium text-foreground [unicode-bidi:isolate]", children: approval.intent }), _jsxs("p", { className: "mt-1 break-all font-mono text-xs/4 text-foreground", children: [_jsx("span", { className: "font-semibold", children: approval.method }), " ", approval.routeTemplate] }), hasChanges ? (_jsx("dl", { "aria-label": c.changesHeading, tabIndex: 0, className: cn("mt-3 max-h-56 divide-y divide-border/60 overflow-y-auto rounded-lg ring-1 ring-border/60", focusRing), children: approval.changes.map((row, i) => (_jsxs("div", { className: "grid grid-cols-[minmax(0,9rem)_1fr] gap-x-3 px-3 py-1.5", children: [_jsx("dt", { className: "break-words text-xs/5 text-muted-foreground", title: row.label, children: row.label }), _jsxs("dd", { className: "flex min-w-0 flex-wrap items-center gap-1.5 text-sm/5", children: [row.before !== undefined && (_jsxs("span", { className: "text-muted-foreground line-through decoration-muted-foreground/60", children: [_jsxs("span", { className: "sr-only", children: [c.was, ": "] }), _jsx(MaskedValue, { value: row.before, empty: c.emptyValue })] })), row.before !== undefined && row.after !== undefined && (_jsx(ArrowRight, { "aria-hidden": true, className: "size-3 shrink-0 text-muted-foreground" })), row.after !== undefined && (_jsxs("span", { className: "font-medium text-foreground", children: [_jsxs("span", { className: "sr-only", children: [c.now, ": "] }), _jsx(MaskedValue, { value: row.after, empty: c.emptyValue })] }))] })] }, rowKey(row.label, i)))) })) : (bodyText !== undefined && (_jsx("p", { className: "mt-3 text-xs/5 text-muted-foreground", children: c.noChanges }))), approval.cost && (_jsxs("p", { className: "mt-2 text-xs/4 text-muted-foreground", children: [approval.cost.label, approval.cost.capRemaining
|
|
156
156
|
? ` · ${fmt(c.capRemaining, { remaining: approval.cost.capRemaining })}`
|
|
157
157
|
: ""] })), bodyText !== undefined && (_jsxs("div", { className: "mt-2", children: [_jsxs("button", { type: "button", "aria-expanded": showBody, onClick: () => setShowBody((v) => !v), className: cn("inline-flex min-h-6 items-center gap-1 rounded-md text-xs/4 text-muted-foreground hover:text-foreground", focusRing), children: [_jsx(ChevronRight, { "aria-hidden": true, className: cn("size-3.5 transition-transform duration-[var(--duration-micro)] motion-reduce:transition-none", showBody && "rotate-90") }), showBody ? c.hideRequest : c.showRequest] }), showBody && (_jsx("pre", { tabIndex: 0, "aria-label": c.exactRequest, className: cn("mt-1 max-h-40 overflow-auto rounded-lg bg-muted p-2.5 font-mono text-xs/5 text-foreground", focusRing), children: bodyText }))] }))] }), _jsxs("div", { className: "px-3 py-2", children: [g.status === "pending" && !inFlight && (approval.attestations?.length ?? 0) > 0 && (_jsxs("fieldset", { className: "mb-3 min-w-0", children: [_jsx("legend", { className: "text-sm/5 font-medium text-foreground", children: c.attestationsHeading }), _jsx("div", { className: "mt-1.5 flex flex-col gap-1.5", children: approval.attestations.map((key) => (_jsxs("label", { className: "flex min-h-8 items-start gap-2 text-sm/5 text-foreground", children: [_jsx("input", { type: "checkbox", checked: ticked.has(key), onChange: (e) => setTickState(() => {
|
|
158
158
|
const next = new Set(ticked);
|