@cellarnode/ui 0.203.0 → 0.207.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 +88 -5
- 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/index.d.ts +11 -0
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +9 -0
- package/dist/agent/index.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/schema.d.ts +18 -0
- package/dist/agent/schema.d.ts.map +1 -1
- package/dist/agent/schema.js +17 -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/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.map +1 -1
- package/dist/agent/tool-activity.js +4 -2
- package/dist/agent/tool-activity.js.map +1 -1
- package/dist/agent/tool-call-card.d.ts.map +1 -1
- package/dist/agent/tool-call-card.js +2 -1
- 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/commercial-price/commercial-price-format.d.ts +2 -0
- package/dist/commercial-price/commercial-price-format.d.ts.map +1 -1
- package/dist/commercial-price/commercial-price-format.js +4 -0
- package/dist/commercial-price/commercial-price-format.js.map +1 -1
- package/dist/commercial-price/commercial-terms.d.ts.map +1 -1
- package/dist/commercial-price/commercial-terms.js +9 -1
- package/dist/commercial-price/commercial-terms.js.map +1 -1
- package/dist/components/animated-shadcn-select.d.ts +2 -1
- package/dist/components/animated-shadcn-select.d.ts.map +1 -1
- package/dist/components/animated-shadcn-select.js +1 -1
- package/dist/components/animated-shadcn-select.js.map +1 -1
- package/dist/components/api-error-message.d.ts +17 -0
- package/dist/components/api-error-message.d.ts.map +1 -0
- package/dist/components/api-error-message.js +13 -0
- package/dist/components/api-error-message.js.map +1 -0
- package/dist/components/attachment-row.d.ts.map +1 -1
- package/dist/components/attachment-row.js +9 -1
- package/dist/components/attachment-row.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.d.ts +9 -1
- package/dist/components/branch-resolution-modal.d.ts.map +1 -1
- package/dist/components/branch-resolution-modal.js +12 -6
- 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/certification-upload-card.d.ts +19 -1
- package/dist/components/certification-upload-card.d.ts.map +1 -1
- package/dist/components/certification-upload-card.js +35 -7
- package/dist/components/certification-upload-card.js.map +1 -1
- package/dist/components/composition-editor.d.ts +24 -1
- package/dist/components/composition-editor.d.ts.map +1 -1
- package/dist/components/composition-editor.js +65 -13
- package/dist/components/composition-editor.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/currency-select.d.ts +11 -1
- package/dist/components/currency-select.d.ts.map +1 -1
- package/dist/components/currency-select.js +2 -2
- package/dist/components/currency-select.js.map +1 -1
- package/dist/components/file-dropzone.d.ts.map +1 -1
- package/dist/components/file-dropzone.js +4 -1
- package/dist/components/file-dropzone.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/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.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/lib/describe-api-error.d.ts +19 -0
- package/dist/lib/describe-api-error.d.ts.map +1 -0
- package/dist/lib/describe-api-error.js +228 -0
- package/dist/lib/describe-api-error.js.map +1 -0
- 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/counter-slide-over.d.ts +38 -12
- package/dist/offer/counter-slide-over.d.ts.map +1 -1
- package/dist/offer/counter-slide-over.js +130 -36
- package/dist/offer/counter-slide-over.js.map +1 -1
- package/dist/offer/facts-card.d.ts +3 -1
- package/dist/offer/facts-card.d.ts.map +1 -1
- package/dist/offer/facts-card.js +19 -10
- package/dist/offer/facts-card.js.map +1 -1
- package/dist/offer/index.d.ts +1 -1
- package/dist/offer/index.d.ts.map +1 -1
- package/dist/offer/index.js.map +1 -1
- package/dist/offer/negotiation-flow-timeline.d.ts.map +1 -1
- package/dist/offer/negotiation-flow-timeline.js +7 -4
- package/dist/offer/negotiation-flow-timeline.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/offer/offer-document.d.ts.map +1 -1
- package/dist/offer/offer-document.js +8 -30
- package/dist/offer/offer-document.js.map +1 -1
- package/dist/offer/offer-product-record.d.ts.map +1 -1
- package/dist/offer/offer-product-record.js +7 -2
- package/dist/offer/offer-product-record.js.map +1 -1
- package/dist/offer/offered-product-props.d.ts +20 -0
- package/dist/offer/offered-product-props.d.ts.map +1 -0
- package/dist/offer/offered-product-props.js +42 -0
- package/dist/offer/offered-product-props.js.map +1 -0
- package/dist/offer/round-diff-banner.d.ts.map +1 -1
- package/dist/offer/round-diff-banner.js +6 -1
- package/dist/offer/round-diff-banner.js.map +1 -1
- package/dist/offer/terms-card.d.ts.map +1 -1
- package/dist/offer/terms-card.js +2 -0
- package/dist/offer/terms-card.js.map +1 -1
- package/dist/offer/timeline-event.d.ts.map +1 -1
- package/dist/offer/timeline-event.js +7 -4
- package/dist/offer/timeline-event.js.map +1 -1
- package/dist/offer/types.d.ts +4 -0
- package/dist/offer/types.d.ts.map +1 -1
- package/dist/opportunities/index.d.ts +6 -2
- package/dist/opportunities/index.d.ts.map +1 -1
- package/dist/opportunities/index.js +2 -0
- 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/allowed-delivery-terms-section.d.ts +14 -1
- package/dist/opportunities/wizard/allowed-delivery-terms-section.d.ts.map +1 -1
- package/dist/opportunities/wizard/allowed-delivery-terms-section.js +84 -4
- package/dist/opportunities/wizard/allowed-delivery-terms-section.js.map +1 -1
- package/dist/opportunities/wizard/mixed-delivery-terms.d.ts +25 -0
- package/dist/opportunities/wizard/mixed-delivery-terms.d.ts.map +1 -0
- package/dist/opportunities/wizard/mixed-delivery-terms.js +33 -0
- package/dist/opportunities/wizard/mixed-delivery-terms.js.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.d.ts +18 -0
- package/dist/opportunities/wizard/opportunity-wizard.d.ts.map +1 -1
- package/dist/opportunities/wizard/opportunity-wizard.js +30 -63
- package/dist/opportunities/wizard/opportunity-wizard.js.map +1 -1
- package/dist/opportunities/wizard/package-sizes-field.d.ts +13 -0
- package/dist/opportunities/wizard/package-sizes-field.d.ts.map +1 -0
- package/dist/opportunities/wizard/package-sizes-field.js +66 -0
- package/dist/opportunities/wizard/package-sizes-field.js.map +1 -0
- package/dist/opportunities/wizard/price-ranges-editor.d.ts +17 -0
- package/dist/opportunities/wizard/price-ranges-editor.d.ts.map +1 -0
- package/dist/opportunities/wizard/price-ranges-editor.js +84 -0
- package/dist/opportunities/wizard/price-ranges-editor.js.map +1 -0
- package/dist/opportunities/wizard/price-ranges.d.ts +54 -0
- package/dist/opportunities/wizard/price-ranges.d.ts.map +1 -0
- package/dist/opportunities/wizard/price-ranges.js +104 -0
- package/dist/opportunities/wizard/price-ranges.js.map +1 -0
- package/dist/opportunities/wizard/publish-issues.d.ts +32 -0
- package/dist/opportunities/wizard/publish-issues.d.ts.map +1 -0
- package/dist/opportunities/wizard/publish-issues.js +124 -0
- package/dist/opportunities/wizard/publish-issues.js.map +1 -0
- package/dist/opportunities/wizard/step-opportunities.d.ts.map +1 -1
- package/dist/opportunities/wizard/step-opportunities.js +12 -7
- package/dist/opportunities/wizard/step-opportunities.js.map +1 -1
- package/dist/opportunities/wizard/step-pricing-timeline.d.ts +1 -1
- package/dist/opportunities/wizard/step-pricing-timeline.d.ts.map +1 -1
- package/dist/opportunities/wizard/step-pricing-timeline.js +7 -9
- package/dist/opportunities/wizard/step-pricing-timeline.js.map +1 -1
- package/dist/opportunities/wizard/step-review.d.ts +19 -3
- package/dist/opportunities/wizard/step-review.d.ts.map +1 -1
- package/dist/opportunities/wizard/step-review.js +58 -13
- package/dist/opportunities/wizard/step-review.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/opportunities/wizard/wizard.types.d.ts +4 -4
- package/dist/opportunities/wizard/wizard.types.d.ts.map +1 -1
- package/dist/opportunities/wizard/wizard.types.js +13 -6
- package/dist/opportunities/wizard/wizard.types.js.map +1 -1
- package/dist/opportunity-facts/build-opportunity-facts.d.ts.map +1 -1
- package/dist/opportunity-facts/build-opportunity-facts.js +11 -1
- package/dist/opportunity-facts/build-opportunity-facts.js.map +1 -1
- package/dist/opportunity-facts/glossary.en.d.ts +34 -0
- package/dist/opportunity-facts/glossary.en.d.ts.map +1 -1
- package/dist/opportunity-facts/glossary.en.js +34 -0
- package/dist/opportunity-facts/glossary.en.js.map +1 -1
- package/dist/opportunity-facts/index.d.ts +3 -1
- package/dist/opportunity-facts/index.d.ts.map +1 -1
- package/dist/opportunity-facts/index.js +2 -0
- package/dist/opportunity-facts/index.js.map +1 -1
- package/dist/opportunity-facts/labels.d.ts +38 -0
- package/dist/opportunity-facts/labels.d.ts.map +1 -1
- package/dist/opportunity-facts/labels.js +34 -0
- package/dist/opportunity-facts/labels.js.map +1 -1
- package/dist/opportunity-facts/opportunity-fact-sheet.d.ts +9 -1
- package/dist/opportunity-facts/opportunity-fact-sheet.d.ts.map +1 -1
- package/dist/opportunity-facts/opportunity-fact-sheet.js +21 -2
- package/dist/opportunity-facts/opportunity-fact-sheet.js.map +1 -1
- package/dist/opportunity-facts/price-cases-section.d.ts +18 -0
- package/dist/opportunity-facts/price-cases-section.d.ts.map +1 -0
- package/dist/opportunity-facts/price-cases-section.js +36 -0
- package/dist/opportunity-facts/price-cases-section.js.map +1 -0
- package/dist/opportunity-facts/price-cases.d.ts +5 -0
- package/dist/opportunity-facts/price-cases.d.ts.map +1 -0
- package/dist/opportunity-facts/price-cases.js +127 -0
- package/dist/opportunity-facts/price-cases.js.map +1 -0
- package/dist/opportunity-facts/source-document-download.d.ts +34 -0
- package/dist/opportunity-facts/source-document-download.d.ts.map +1 -0
- package/dist/opportunity-facts/source-document-download.js +91 -0
- package/dist/opportunity-facts/source-document-download.js.map +1 -0
- package/dist/opportunity-facts/types.d.ts +69 -0
- package/dist/opportunity-facts/types.d.ts.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/portfolio-import/review-queue-panel.d.ts.map +1 -1
- package/dist/portfolio-import/review-queue-panel.js +36 -4
- package/dist/portfolio-import/review-queue-panel.js.map +1 -1
- package/dist/portfolio-import/session/index.d.ts +1 -1
- package/dist/portfolio-import/session/index.d.ts.map +1 -1
- package/dist/portfolio-import/session/index.js +1 -1
- package/dist/portfolio-import/session/index.js.map +1 -1
- package/dist/portfolio-import/session/save-review-field.d.ts +29 -4
- package/dist/portfolio-import/session/save-review-field.d.ts.map +1 -1
- package/dist/portfolio-import/session/save-review-field.js +115 -30
- package/dist/portfolio-import/session/save-review-field.js.map +1 -1
- package/dist/portfolio-import/session/types.d.ts +6 -0
- package/dist/portfolio-import/session/types.d.ts.map +1 -1
- package/dist/portfolio-import/types.d.ts +6 -0
- package/dist/portfolio-import/types.d.ts.map +1 -1
- package/dist/portfolio-import/types.js.map +1 -1
- package/dist/product-editor/field-routing.d.ts +2 -1
- package/dist/product-editor/field-routing.d.ts.map +1 -1
- package/dist/product-editor/field-routing.js +9 -1
- package/dist/product-editor/field-routing.js.map +1 -1
- package/dist/product-editor/index.d.ts +1 -1
- package/dist/product-editor/index.d.ts.map +1 -1
- package/dist/product-editor/index.js.map +1 -1
- package/dist/product-editor/product-editor-form.d.ts +37 -2
- package/dist/product-editor/product-editor-form.d.ts.map +1 -1
- package/dist/product-editor/product-editor-form.js +96 -3
- package/dist/product-editor/product-editor-form.js.map +1 -1
- package/dist/product-editor/product-editor-surface.d.ts.map +1 -1
- package/dist/product-editor/product-editor-surface.js +2 -4
- package/dist/product-editor/product-editor-surface.js.map +1 -1
- package/dist/product-editor/product-editor.d.ts.map +1 -1
- package/dist/product-editor/product-editor.js +17 -6
- package/dist/product-editor/product-editor.js.map +1 -1
- package/dist/product-editor/schema.d.ts +20 -0
- package/dist/product-editor/schema.d.ts.map +1 -1
- package/dist/product-editor/schema.js +70 -0
- package/dist/product-editor/schema.js.map +1 -1
- package/dist/product-editor/tabs/product-composition-section.d.ts +26 -0
- package/dist/product-editor/tabs/product-composition-section.d.ts.map +1 -0
- package/dist/product-editor/tabs/product-composition-section.js +47 -0
- package/dist/product-editor/tabs/product-composition-section.js.map +1 -0
- package/dist/product-editor/tabs/product-essentials-details-sections.d.ts +4 -2
- package/dist/product-editor/tabs/product-essentials-details-sections.d.ts.map +1 -1
- package/dist/product-editor/tabs/product-essentials-details-sections.js +4 -2
- package/dist/product-editor/tabs/product-essentials-details-sections.js.map +1 -1
- package/dist/product-editor/tabs/product-essentials-tab.d.ts +4 -2
- package/dist/product-editor/tabs/product-essentials-tab.d.ts.map +1 -1
- package/dist/product-editor/tabs/product-essentials-tab.js +2 -2
- package/dist/product-editor/tabs/product-essentials-tab.js.map +1 -1
- package/dist/product-editor/tabs/product-production-capacity-field.d.ts +23 -0
- package/dist/product-editor/tabs/product-production-capacity-field.d.ts.map +1 -0
- package/dist/product-editor/tabs/product-production-capacity-field.js +57 -0
- package/dist/product-editor/tabs/product-production-capacity-field.js.map +1 -0
- package/dist/product-editor/tabs/product-resources-tab.d.ts.map +1 -1
- package/dist/product-editor/tabs/product-resources-tab.js +1 -1
- package/dist/product-editor/tabs/product-resources-tab.js.map +1 -1
- package/dist/product-editor/tabs/resources/certifications-panel.d.ts.map +1 -1
- package/dist/product-editor/tabs/resources/certifications-panel.js +47 -47
- package/dist/product-editor/tabs/resources/certifications-panel.js.map +1 -1
- package/dist/product-editor/types.d.ts +61 -4
- package/dist/product-editor/types.d.ts.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC5F,OAAO,EACL,eAAe,EACf,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vC,OAAO,EACL,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,oBAAoB,EACpB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,GAC7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,wBAAwB,EACxB,KAAK,gBAAgB,EACrB,KAAK,aAAa,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,oBAAoB,EACpB,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,GAC/B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,GAC7B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA;;;;;;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EAC1B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,4BAA4B,CAAC"}
|
package/dist/agent/index.js
CHANGED
|
@@ -20,6 +20,9 @@ export { AgentMarkdown, classifyHref, resolveLink, } from "./markdown.js";
|
|
|
20
20
|
export { AgentToolCallCard, } from "./tool-call-card.js";
|
|
21
21
|
export { AgentActivityLedger, } from "./activity-ledger.js";
|
|
22
22
|
export { AgentComposer } from "./composer.js";
|
|
23
|
+
export { AgentContextChips, AgentQuoteBlock, cleanQuote, sameContexts, } from "./context.js";
|
|
24
|
+
export { AgentDropZone, cleanFileName, matchesAccept, middleTruncate, } from "./dropzone.js";
|
|
25
|
+
export { AgentFollowUps, AgentSuggestionRow, suggestionPrompt, } from "./suggestions.js";
|
|
23
26
|
export { AgentMessage } from "./message.js";
|
|
24
27
|
export { AgentConversation, } from "./conversation.js";
|
|
25
28
|
export { AgentPanelFrame, } from "./panel-frame.js";
|
|
@@ -32,6 +35,12 @@ export { AgentOfferCard, } from "./role-cards/offer-card.js";
|
|
|
32
35
|
export { AgentProductCard, } from "./role-cards/product-card.js";
|
|
33
36
|
export { AgentOpportunityCard, } from "./role-cards/opportunity-card.js";
|
|
34
37
|
export { AgentMatchCard, } from "./role-cards/match-card.js";
|
|
38
|
+
export { AgentScheduleCard, } from "./role-cards/schedule-card.js";
|
|
39
|
+
export { AgentLabelCard, } from "./role-cards/label-card.js";
|
|
40
|
+
export { AgentStatsCard, } from "./role-cards/stats-card.js";
|
|
41
|
+
export { AgentBrandProfileCard, } from "./role-cards/brand-profile-card.js";
|
|
42
|
+
export { AgentLabReportCard, } from "./role-cards/lab-report-card.js";
|
|
43
|
+
export { AgentOrgCard } from "./role-cards/org-card.js";
|
|
35
44
|
export { AgentDataTableCard, DEFAULT_THIRD_PARTY_COLUMNS, MAX_AGENT_TABLE_ROWS, } from "./role-cards/data-table-card.js";
|
|
36
45
|
export { agentLinkKind, createSurfaceAllowLink, surfaceThirdPartyColumns, } from "./role-cards/surface-links.js";
|
|
37
46
|
export { AgentInspectorDrawer, } from "./role-cards/inspector-drawer.js";
|
package/dist/agent/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,qBAAqB,EACrB,cAAc,GAGf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAA+C,MAAM,gBAAgB,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAmD,MAAM,YAAY,CAAC;AAC5F,OAAO,EACL,eAAe,EACf,UAAU,GAMX,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,gBAAgB,EAChB,yBAAyB,GAG1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,mBAAmB,GAGpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,GAGlB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,GAcrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,aAAa,EACb,YAAY,EACZ,WAAW,GAKZ,MAAM,YAAY,CAAC;AACpB,0FAA0F;AAC1F,OAAO,EACL,iBAAiB,GAGlB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,mBAAmB,GAGpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAmD,MAAM,YAAY,CAAC;AAC5F,OAAO,EAAE,Y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BAA6B,CAAC;AACrC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAItB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,SAAS,GAcV,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type CellValue } from "./schema.js";
|
|
2
|
+
import type { AgentMentionRef } from "./context.js";
|
|
3
|
+
/** One result of an `@` search, as the host's `mentionSource` returns it. Everything is untrusted text. */
|
|
4
|
+
export interface AgentMentionCandidate {
|
|
5
|
+
/** "organisation", "offer", ... Shown small. Cleaned and cut. */
|
|
6
|
+
kind: string;
|
|
7
|
+
/** The stable id the host gets back. Never shown, never put into the text. */
|
|
8
|
+
id: string;
|
|
9
|
+
/** The name that goes into the text after the `@`. Cleaned, cut, never markup. */
|
|
10
|
+
label: string;
|
|
11
|
+
/** A second line (country, status). A masked value stays masked. */
|
|
12
|
+
detail?: CellValue;
|
|
13
|
+
}
|
|
14
|
+
/** Search for things to mention. Must honour `signal` (it is aborted when the person types on). The ui debounces and caps the result. */
|
|
15
|
+
export type AgentMentionSource = (query: string, signal: AbortSignal) => Promise<readonly AgentMentionCandidate[]>;
|
|
16
|
+
export declare const MAX_MENTION_RESULTS = 8;
|
|
17
|
+
export declare const MENTION_DEBOUNCE_MS = 200;
|
|
18
|
+
export declare const MAX_MENTION_QUERY = 40;
|
|
19
|
+
export interface AgentMentionCopy {
|
|
20
|
+
/** Accessible name of the results list. */
|
|
21
|
+
list: string;
|
|
22
|
+
searching: string;
|
|
23
|
+
none: string;
|
|
24
|
+
error: string;
|
|
25
|
+
/** Said when results arrive; `{count}` is how many. */
|
|
26
|
+
results: string;
|
|
27
|
+
/** How a candidate's `kind` is shown, by kind ("organisation" -> "Organisation"). A kind without an entry is shown as the host sent it. */
|
|
28
|
+
kindLabels: Readonly<Record<string, string>>;
|
|
29
|
+
}
|
|
30
|
+
export declare const DEFAULT_MENTION_COPY: AgentMentionCopy;
|
|
31
|
+
/** The `@query` at the caret: it starts the text or follows whitespace, and has no space in it yet. */
|
|
32
|
+
export declare function activeMentionQuery(text: string, caret: number): {
|
|
33
|
+
start: number;
|
|
34
|
+
query: string;
|
|
35
|
+
} | null;
|
|
36
|
+
/** Candidates the ui will draw: valid, cleaned, de-duplicated and capped. A host cannot make the list longer or the text unsafe. */
|
|
37
|
+
export declare function sanitizeCandidates(raw: readonly AgentMentionCandidate[]): AgentMentionCandidate[];
|
|
38
|
+
type Status = "idle" | "loading" | "ready" | "error";
|
|
39
|
+
export interface MentionsState {
|
|
40
|
+
open: boolean;
|
|
41
|
+
status: Status;
|
|
42
|
+
/** The results for the CURRENT query only: while a new query loads this is empty, so a stale row can never be accepted. */
|
|
43
|
+
items: AgentMentionCandidate[];
|
|
44
|
+
active: number;
|
|
45
|
+
listId: string;
|
|
46
|
+
optionId: (i: number) => string;
|
|
47
|
+
setActive: (i: number) => void;
|
|
48
|
+
move: (delta: number) => void;
|
|
49
|
+
dismiss: () => void;
|
|
50
|
+
/** The text with the `@query` replaced by `@label `, the caret after it, and the mention for the host. */
|
|
51
|
+
accept: (i: number) => {
|
|
52
|
+
text: string;
|
|
53
|
+
caret: number;
|
|
54
|
+
/** Where `@label` starts and how long it is (without the trailing space), in the new text. */
|
|
55
|
+
start: number;
|
|
56
|
+
length: number;
|
|
57
|
+
mention: AgentMentionRef;
|
|
58
|
+
} | null;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @internal The `@` state: the query at the caret, a debounced and abortable search, a capped and cleaned result list, and the
|
|
62
|
+
* keyboard model (up and down, Enter or Tab to accept, Escape to close until the query changes). A source that throws, rejects,
|
|
63
|
+
* or returns something that is not a list ends in the error state, never in "Searching" for ever.
|
|
64
|
+
*/
|
|
65
|
+
export declare function useMentions(text: string, caret: number, source: AgentMentionSource | undefined): MentionsState;
|
|
66
|
+
/** What a screen reader hears about the list: searching, how many results, none, or the error. Empty when the list is closed. */
|
|
67
|
+
export declare function mentionAnnouncement(state: MentionsState, copy: AgentMentionCopy): string;
|
|
68
|
+
/** The results, drawn above the field: text only (kind small, then the label, then the detail), masked details masked. */
|
|
69
|
+
export declare function AgentMentionList({ state, copy, onAccept, }: {
|
|
70
|
+
state: MentionsState;
|
|
71
|
+
copy?: Partial<AgentMentionCopy>;
|
|
72
|
+
onAccept: (i: number) => void;
|
|
73
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=mentions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentions.d.ts","sourceRoot":"","sources":["../../src/agent/mentions.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,2GAA2G;AAC3G,MAAM,WAAW,qBAAqB;IACpC,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,EAAE,EAAE,MAAM,CAAC;IACX,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,yIAAyI;AACzI,MAAM,MAAM,kBAAkB,GAAG,CAC/B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,WAAW,KAChB,OAAO,CAAC,SAAS,qBAAqB,EAAE,CAAC,CAAC;AAE/C,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAIpC,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MA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;;GAIG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,kBAAkB,GAAG,SAAS,GACrC,aAAa,CAyEf;AAGD,iIAAiI;AACjI,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAOxF;AAED,0HAA0H;AAC1H,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B,kDA6DA"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
3
|
+
import { AtSign } from "lucide-react";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
import { fmt, useCopy } from "./copy.js";
|
|
6
|
+
import { MaskedValue } from "./masked-value.js";
|
|
7
|
+
import { cleanLine } from "./text-clean.js";
|
|
8
|
+
import { isMasked } from "./schema.js";
|
|
9
|
+
export const MAX_MENTION_RESULTS = 8;
|
|
10
|
+
export const MENTION_DEBOUNCE_MS = 200;
|
|
11
|
+
export const MAX_MENTION_QUERY = 40;
|
|
12
|
+
const MAX_MENTION_LABEL = 80;
|
|
13
|
+
const MAX_ID = 128;
|
|
14
|
+
export const DEFAULT_MENTION_COPY = {
|
|
15
|
+
list: "Mention suggestions",
|
|
16
|
+
searching: "Searching",
|
|
17
|
+
none: "No matches",
|
|
18
|
+
error: "Could not search. Keep typing to try again.",
|
|
19
|
+
results: "{count} results",
|
|
20
|
+
kindLabels: {},
|
|
21
|
+
};
|
|
22
|
+
/** The `@query` at the caret: it starts the text or follows whitespace, and has no space in it yet. */
|
|
23
|
+
export function activeMentionQuery(text, caret) {
|
|
24
|
+
const before = text.slice(0, caret);
|
|
25
|
+
const m = /(^|\s)@([^\s@]{0,40})$/u.exec(before);
|
|
26
|
+
if (!m)
|
|
27
|
+
return null;
|
|
28
|
+
const query = m[2] ?? "";
|
|
29
|
+
return { start: caret - query.length - 1, query };
|
|
30
|
+
}
|
|
31
|
+
const MAX_DETAIL = 60;
|
|
32
|
+
const MAX_MASK_DISPLAY = 40;
|
|
33
|
+
/** A second line the ui will draw: text cleaned and cut, a mask rebuilt (still a mask), numbers and booleans kept, the rest dropped. */
|
|
34
|
+
function cleanDetail(detail) {
|
|
35
|
+
if (typeof detail === "string")
|
|
36
|
+
return cleanLine(detail, MAX_DETAIL, true);
|
|
37
|
+
if (typeof detail === "number")
|
|
38
|
+
return Number.isFinite(detail) ? detail : undefined;
|
|
39
|
+
if (typeof detail === "boolean")
|
|
40
|
+
return detail;
|
|
41
|
+
if (isMasked(detail))
|
|
42
|
+
return {
|
|
43
|
+
masked: true,
|
|
44
|
+
display: cleanLine(detail.display, MAX_MASK_DISPLAY, true) ?? "hidden",
|
|
45
|
+
};
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
/** Candidates the ui will draw: valid, cleaned, de-duplicated and capped. A host cannot make the list longer or the text unsafe. */
|
|
49
|
+
export function sanitizeCandidates(raw) {
|
|
50
|
+
const seen = new Set();
|
|
51
|
+
const out = [];
|
|
52
|
+
for (const c of raw) {
|
|
53
|
+
if (out.length >= MAX_MENTION_RESULTS)
|
|
54
|
+
break;
|
|
55
|
+
if (typeof c?.id !== "string" || c.id === "" || c.id.length > MAX_ID)
|
|
56
|
+
continue;
|
|
57
|
+
// The label goes into the person's message: no invisible or look-alike-hiding characters survive.
|
|
58
|
+
const label = cleanLine(c.label, MAX_MENTION_LABEL, true);
|
|
59
|
+
const kind = cleanLine(c.kind, 24, true);
|
|
60
|
+
if (!label || !kind)
|
|
61
|
+
continue;
|
|
62
|
+
const key = `${kind}\u0000${c.id}`;
|
|
63
|
+
if (seen.has(key))
|
|
64
|
+
continue;
|
|
65
|
+
seen.add(key);
|
|
66
|
+
const detail = cleanDetail(c.detail);
|
|
67
|
+
out.push({ kind, id: c.id, label, ...(detail === undefined ? {} : { detail }) });
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @internal The `@` state: the query at the caret, a debounced and abortable search, a capped and cleaned result list, and the
|
|
73
|
+
* keyboard model (up and down, Enter or Tab to accept, Escape to close until the query changes). A source that throws, rejects,
|
|
74
|
+
* or returns something that is not a list ends in the error state, never in "Searching" for ever.
|
|
75
|
+
*/
|
|
76
|
+
export function useMentions(text, caret, source) {
|
|
77
|
+
const listId = useId();
|
|
78
|
+
const active_ = source ? activeMentionQuery(text, caret) : null;
|
|
79
|
+
const query = active_?.query;
|
|
80
|
+
const start = active_?.start;
|
|
81
|
+
const key = query === undefined ? undefined : `${start}:${query}`;
|
|
82
|
+
const [result, setResult] = useState();
|
|
83
|
+
const [active, setActive] = useState(0);
|
|
84
|
+
const [dismissedKey, setDismissedKey] = useState();
|
|
85
|
+
const sourceRef = useRef(source);
|
|
86
|
+
sourceRef.current = source;
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
if (query === undefined || key === undefined)
|
|
89
|
+
return;
|
|
90
|
+
const controller = new AbortController();
|
|
91
|
+
const timer = setTimeout(() => {
|
|
92
|
+
const run = sourceRef.current;
|
|
93
|
+
if (!run)
|
|
94
|
+
return;
|
|
95
|
+
// One chain: a throw anywhere in it (the source, or cleaning what it returned) ends in the error state.
|
|
96
|
+
Promise.resolve()
|
|
97
|
+
.then(() => run(query, controller.signal))
|
|
98
|
+
.then((found) => {
|
|
99
|
+
if (controller.signal.aborted)
|
|
100
|
+
return;
|
|
101
|
+
if (!Array.isArray(found))
|
|
102
|
+
throw new Error("not a list");
|
|
103
|
+
setResult({ key, status: "ready", items: sanitizeCandidates(found) });
|
|
104
|
+
setActive(0);
|
|
105
|
+
})
|
|
106
|
+
.catch(() => {
|
|
107
|
+
if (!controller.signal.aborted)
|
|
108
|
+
setResult({ key, status: "error", items: [] });
|
|
109
|
+
});
|
|
110
|
+
}, MENTION_DEBOUNCE_MS);
|
|
111
|
+
return () => {
|
|
112
|
+
clearTimeout(timer);
|
|
113
|
+
controller.abort();
|
|
114
|
+
};
|
|
115
|
+
}, [query, key]);
|
|
116
|
+
const fresh = result && result.key === key ? result : undefined;
|
|
117
|
+
const status = key === undefined ? "idle" : (fresh?.status ?? "loading");
|
|
118
|
+
const items = fresh?.status === "ready" ? fresh.items : EMPTY;
|
|
119
|
+
const open = key !== undefined && key !== dismissedKey;
|
|
120
|
+
const move = useCallback((delta) => setActive((a) => Math.max(0, Math.min(items.length - 1, a + delta))), [items.length]);
|
|
121
|
+
return {
|
|
122
|
+
open,
|
|
123
|
+
status,
|
|
124
|
+
items,
|
|
125
|
+
active: Math.min(active, Math.max(0, items.length - 1)),
|
|
126
|
+
listId,
|
|
127
|
+
optionId: (i) => `${listId}-o${i}`,
|
|
128
|
+
setActive,
|
|
129
|
+
move,
|
|
130
|
+
dismiss: () => setDismissedKey(key),
|
|
131
|
+
accept: (i) => {
|
|
132
|
+
const item = items[i];
|
|
133
|
+
if (!item || start === undefined)
|
|
134
|
+
return null;
|
|
135
|
+
const insert = `@${item.label} `;
|
|
136
|
+
const next = text.slice(0, start) + insert + text.slice(caret);
|
|
137
|
+
return {
|
|
138
|
+
text: next,
|
|
139
|
+
caret: start + insert.length,
|
|
140
|
+
start,
|
|
141
|
+
length: insert.length - 1,
|
|
142
|
+
mention: { kind: item.kind, id: item.id, label: item.label },
|
|
143
|
+
};
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
const EMPTY = [];
|
|
148
|
+
/** What a screen reader hears about the list: searching, how many results, none, or the error. Empty when the list is closed. */
|
|
149
|
+
export function mentionAnnouncement(state, copy) {
|
|
150
|
+
if (!state.open)
|
|
151
|
+
return "";
|
|
152
|
+
if (state.status === "loading")
|
|
153
|
+
return copy.searching;
|
|
154
|
+
if (state.status === "error")
|
|
155
|
+
return copy.error;
|
|
156
|
+
if (state.status === "ready")
|
|
157
|
+
return state.items.length === 0 ? copy.none : fmt(copy.results, { count: state.items.length });
|
|
158
|
+
return "";
|
|
159
|
+
}
|
|
160
|
+
/** The results, drawn above the field: text only (kind small, then the label, then the detail), masked details masked. */
|
|
161
|
+
export function AgentMentionList({ state, copy, onAccept, }) {
|
|
162
|
+
const c = useCopy(DEFAULT_MENTION_COPY, copy);
|
|
163
|
+
if (!state.open)
|
|
164
|
+
return null;
|
|
165
|
+
const note = state.status === "loading"
|
|
166
|
+
? c.searching
|
|
167
|
+
: state.status === "error"
|
|
168
|
+
? c.error
|
|
169
|
+
: state.status === "ready" && state.items.length === 0
|
|
170
|
+
? c.none
|
|
171
|
+
: null;
|
|
172
|
+
if (state.items.length === 0 && note === null)
|
|
173
|
+
return null;
|
|
174
|
+
return (_jsxs("div", { className: "agent-fade-in mb-1 overflow-hidden rounded-xl ring-1 ring-border/60", children: [state.items.length > 0 && (_jsx("ul", { id: state.listId, role: "listbox", "aria-label": c.list, className: "flex max-h-56 flex-col overflow-y-auto", children: state.items.map((m, i) => (_jsxs("li", { id: state.optionId(i), role: "option", "aria-selected": i === state.active,
|
|
175
|
+
// Keep focus (and the caret) in the field: choosing must not blur it.
|
|
176
|
+
onMouseDown: (e) => e.preventDefault(), onMouseEnter: () => state.setActive(i), onClick: () => onAccept(i), className: cn("flex min-h-9 cursor-pointer items-center gap-2 px-3 py-1.5 text-sm/5 text-foreground pointer-coarse:min-h-11 not-first:border-t not-first:border-border/60", i === state.active ? "bg-muted" : "bg-transparent"), children: [_jsx(AtSign, { "aria-hidden": true, className: "size-3.5 shrink-0 text-muted-foreground" }), _jsx("span", { className: "shrink-0 text-xs/5 text-muted-foreground", children: c.kindLabels[m.kind] ?? m.kind }), _jsx("bdi", { className: "min-w-0 flex-1 truncate", children: m.label }), m.detail !== undefined &&
|
|
177
|
+
m.detail !== null &&
|
|
178
|
+
m.detail !== "" && (
|
|
179
|
+
// The detail gives way first: it is capped, and the name keeps the room.
|
|
180
|
+
_jsx("span", { className: "min-w-0 max-w-[35%] truncate text-xs/5 text-muted-foreground", children: _jsx(MaskedValue, { value: m.detail }) }))] }, `${m.kind}\u0000${m.id}`))) })), note !== null && (
|
|
181
|
+
// (the announcement is spoken by the composer's persistent live region: this is the visible copy)
|
|
182
|
+
_jsx("p", { "aria-hidden": true, className: "px-3 py-1.5 text-xs/5 text-muted-foreground", children: note }))] }));
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=mentions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentions.js","sourceRoot":"","sources":["../../src/agent/mentions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAkB,MAAM,UAAU,CAAC;AAqBpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AACrC,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AACvC,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AACpC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,MAAM,GAAG,GAAG,CAAC;AAanB,MAAM,CAAC,MAAM,oBAAoB,GAAqB;IACpD,IAAI,EAAE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3B,CACR,KAzBE,GAAG,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,EAAE,CA0B1B,CACN,CAAC,GACC,CACN,EACA,IAAI,KAAK,IAAI,IAAI;YAChB,kGAAkG;YAClG,iCAAe,SAAS,EAAC,6CAA6C,YACnE,IAAI,GACH,CACL,IACG,CACP,CAAC;AACJ,CAAC"}
|
package/dist/agent/message.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AgentContextChipsCopy, type AgentQuote } from "./context.js";
|
|
1
2
|
import { type ReactNode } from "react";
|
|
2
3
|
import { type AgentLinkPolicy, type AgentMarkdownCopy } from "./markdown.js";
|
|
3
4
|
import { type AgentToolActivityCopy } from "./tool-activity.js";
|
|
@@ -11,6 +12,8 @@ export interface AgentMessageCopy {
|
|
|
11
12
|
retry: string;
|
|
12
13
|
copy: string;
|
|
13
14
|
copied: string;
|
|
15
|
+
/** The action beside Copy that quotes the reply (or the part selected in it) into the composer. */
|
|
16
|
+
quote: string;
|
|
14
17
|
/** @deprecated A thought is a step in the activity trail now: its wording is `activityCopy.thought`. Unused. */
|
|
15
18
|
thinking: string;
|
|
16
19
|
}
|
|
@@ -38,6 +41,18 @@ export interface AgentMessageProps extends AgentToolNaming {
|
|
|
38
41
|
markdownCopy?: Partial<AgentMarkdownCopy>;
|
|
39
42
|
/** The message arrived while the conversation was open: it fades and slides in once. Parts added later fade in on their own. */
|
|
40
43
|
entering?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Show this user message's `context` chips above it. The conversation turns it on only when the context differs from the previous
|
|
46
|
+
* question's, so a run of questions about the same page names it once. Default: show.
|
|
47
|
+
*/
|
|
48
|
+
showContext?: boolean;
|
|
49
|
+
/** This question has no context although the one before it had: say so quietly, so a change to "none" is not invisible. */
|
|
50
|
+
contextCleared?: boolean;
|
|
51
|
+
/** The ids of the messages in the thread: a sent quote offers "Show the answer" only while its answer is among them. */
|
|
52
|
+
knownMessageIds?: ReadonlySet<string>;
|
|
53
|
+
/** Adds a "Quote" action beside Copy on an answer. Gets the selected passage inside this reply, else the start of the whole reply. */
|
|
54
|
+
onQuote?: (quote: AgentQuote) => void;
|
|
55
|
+
contextCopy?: Partial<AgentContextChipsCopy>;
|
|
41
56
|
/** Clock override (ms since epoch) for approval expiry; stories and tests pin it. */
|
|
42
57
|
nowMs?: number;
|
|
43
58
|
copy?: Partial<AgentMessageCopy>;
|
|
@@ -48,5 +63,5 @@ export interface AgentMessageProps extends AgentToolNaming {
|
|
|
48
63
|
* re-read) and render as markdown; user messages are plain text in a right-aligned bubble. A run of tool calls is one
|
|
49
64
|
* activity row, never a card per call; approvals and domain cards stay in place, prominent.
|
|
50
65
|
*/
|
|
51
|
-
export declare function AgentMessage({ message, approvalStatus, onApproval, onRetry, onRetryTool, renderCard, toolLabels, formatToolLabel, cardLabels, toolWording, cardCoversCall, onNavigate, linkPolicy, locale, activityCopy, markdownCopy, entering, nowMs, copy, className, }: AgentMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export declare function AgentMessage({ message, approvalStatus, onApproval, onRetry, onRetryTool, renderCard, toolLabels, formatToolLabel, cardLabels, toolWording, cardCoversCall, onNavigate, linkPolicy, locale, activityCopy, markdownCopy, entering, showContext, contextCleared, knownMessageIds, onQuote, contextCopy, nowMs, copy, className, }: AgentMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
52
67
|
//# sourceMappingURL=message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/agent/message.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/agent/message.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlE,OAAO,EAAiB,K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1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { AgentContextChips, AgentQuoteBlock, DEFAULT_CONTEXT_COPY, cleanQuote, } from "./context.js";
|
|
3
|
+
import { useMemo, useRef, useState } from "react";
|
|
4
|
+
import { Quote, RotateCw } from "lucide-react";
|
|
5
|
+
import { selectedQuote } from "./quote-reply.js";
|
|
4
6
|
import { CopyButton } from "../components/copy-button.js";
|
|
5
7
|
import { cn } from "../lib/utils.js";
|
|
6
8
|
import { useCopy } from "./copy.js";
|
|
@@ -17,6 +19,7 @@ const DEFAULT_COPY = {
|
|
|
17
19
|
retry: "Retry",
|
|
18
20
|
copy: "Copy reply",
|
|
19
21
|
copied: "Copied",
|
|
22
|
+
quote: "Quote reply",
|
|
20
23
|
thinking: "Summary",
|
|
21
24
|
};
|
|
22
25
|
const partKey = (part, i) => `${part.type}:${i}`;
|
|
@@ -25,8 +28,10 @@ const partKey = (part, i) => `${part.type}:${i}`;
|
|
|
25
28
|
* re-read) and render as markdown; user messages are plain text in a right-aligned bubble. A run of tool calls is one
|
|
26
29
|
* activity row, never a card per call; approvals and domain cards stay in place, prominent.
|
|
27
30
|
*/
|
|
28
|
-
export function AgentMessage({ message, approvalStatus, onApproval, onRetry, onRetryTool, renderCard, toolLabels, formatToolLabel, cardLabels, toolWording, cardCoversCall, onNavigate, linkPolicy, locale, activityCopy, markdownCopy, entering, nowMs, copy, className, }) {
|
|
31
|
+
export function AgentMessage({ message, approvalStatus, onApproval, onRetry, onRetryTool, renderCard, toolLabels, formatToolLabel, cardLabels, toolWording, cardCoversCall, onNavigate, linkPolicy, locale, activityCopy, markdownCopy, entering, showContext = true, contextCleared = false, knownMessageIds, onQuote, contextCopy, nowMs, copy, className, }) {
|
|
29
32
|
const c = useCopy(DEFAULT_COPY, copy);
|
|
33
|
+
const ctxCopy = useCopy(DEFAULT_CONTEXT_COPY, contextCopy);
|
|
34
|
+
const articleRef = useRef(null);
|
|
30
35
|
const user = message.role === "user";
|
|
31
36
|
const text = message.parts.flatMap((p) => (p.type === "text" ? [p.text] : [])).join("\n\n");
|
|
32
37
|
// The host's cards are drawn once, here: whether a card drew anything decides whether its step is marked "shown below".
|
|
@@ -49,7 +54,7 @@ export function AgentMessage({ message, approvalStatus, onApproval, onRetry, onR
|
|
|
49
54
|
// part that arrives afterwards fades in by itself.
|
|
50
55
|
const [mountedParts] = useState(message.parts.length);
|
|
51
56
|
const lastIndex = message.parts.length - 1;
|
|
52
|
-
return (_jsxs("article", { "aria-label": user ? c.userLabel : c.assistantLabel, "data-role": message.role, className: cn("flex flex-col gap-2", user ? "items-end" : "items-stretch", entering && "agent-enter", className), children: [items.map((item) => {
|
|
57
|
+
return (_jsxs("article", { ref: articleRef, "aria-label": user ? c.userLabel : c.assistantLabel, "data-role": message.role, "data-message-id": message.id, className: cn("flex flex-col gap-2", user ? "items-end" : "items-stretch", entering && "agent-enter", className), children: [user && showContext && message.context && message.context.length > 0 && (_jsx(AgentContextChips, { contexts: message.context, onNavigate: onNavigate, linkPolicy: linkPolicy, copy: contextCopy })), user && contextCleared && (_jsx("p", { className: "text-xs/4 text-muted-foreground", children: ctxCopy.cleared })), user && message.quotes && message.quotes.length > 0 && (_jsx("div", { className: "flex flex-col items-end gap-1.5 self-end", children: message.quotes.map((q, i) => (_jsx(AgentQuoteBlock, { text: q.text, messageId: q.messageId, canJump: Boolean(q.messageId && knownMessageIds?.has(q.messageId)), copy: contextCopy }, `${i}:${q.text.slice(0, 24)}`))) })), items.map((item) => {
|
|
53
58
|
if (item.kind === "activity") {
|
|
54
59
|
return (_jsx(AgentToolActivity, { steps: item.steps, toolLabels: toolLabels, formatToolLabel: formatToolLabel, cardLabels: cardLabels, toolWording: toolWording, onRetry: onRetryTool, locale: locale, copy: activityCopy, className: item.startIndex >= mountedParts ? "agent-fade-in" : undefined }, item.key));
|
|
55
60
|
}
|
|
@@ -62,7 +67,9 @@ export function AgentMessage({ message, approvalStatus, onApproval, onRetry, onR
|
|
|
62
67
|
return (_jsx("p", { className: "max-w-5/6 rounded-2xl rounded-br-sm bg-primary px-3.5 py-2 text-sm/6 whitespace-pre-wrap text-primary-foreground", children: part.text }, key));
|
|
63
68
|
if (part.text.trim() === "")
|
|
64
69
|
return null;
|
|
65
|
-
return (
|
|
70
|
+
return (
|
|
71
|
+
// `data-quotable`: the only part of an answer a quote may come from (not its cards, activity or controls).
|
|
72
|
+
_jsx("div", { "data-quotable": "", children: _jsx(AgentMarkdown, { text: part.text, streaming: Boolean(message.streaming) && i === lastIndex, onNavigate: onNavigate, linkPolicy: linkPolicy, copy: markdownCopy, className: later ? "agent-fade-in" : undefined }) }, key));
|
|
66
73
|
case "thinking":
|
|
67
74
|
return null; // a thought is a step in the activity trail
|
|
68
75
|
case "toolCall":
|
|
@@ -78,6 +85,19 @@ export function AgentMessage({ message, approvalStatus, onApproval, onRetry, onR
|
|
|
78
85
|
return (_jsx("div", { className: later ? "agent-fade-in" : undefined, children: card }, key));
|
|
79
86
|
}
|
|
80
87
|
}
|
|
81
|
-
}), !user && message.stopped && _jsx("p", { className: "text-xs/4 text-muted-foreground", children: c.stopped }), !user && message.failed && (_jsxs("div", { className: "flex items-center gap-2 text-xs/5 text-[var(--tone-danger-fg)]", children: [_jsx("span", { children: c.failed }), onRetry && (_jsxs("button", { type: "button", className: agentButton.ghost, onClick: () => onRetry(message.id), children: [_jsx(RotateCw, { "aria-hidden": true, className: "size-3.5" }), c.retry] }))] })), !user && !message.streaming && text && (
|
|
88
|
+
}), !user && message.stopped && _jsx("p", { className: "text-xs/4 text-muted-foreground", children: c.stopped }), !user && message.failed && (_jsxs("div", { className: "flex items-center gap-2 text-xs/5 text-[var(--tone-danger-fg)]", children: [_jsx("span", { children: c.failed }), onRetry && (_jsxs("button", { type: "button", className: agentButton.ghost, onClick: () => onRetry(message.id), children: [_jsx(RotateCw, { "aria-hidden": true, className: "size-3.5" }), c.retry] }))] })), !user && !message.streaming && text && (_jsxs("div", { className: "flex items-center gap-1 self-start", children: [_jsx(CopyButton, { value: text, label: c.copy, copiedLabel: c.copied }), onQuote && (_jsx("button", { type: "button", "aria-label": c.quote, title: c.quote, className: agentButton.ghost, onClick: () => {
|
|
89
|
+
// A passage selected in THIS reply, else the start of the reply itself (the same cleaning and cut either way).
|
|
90
|
+
const article = articleRef.current;
|
|
91
|
+
const frame = article?.closest('[role="log"]') ?? article;
|
|
92
|
+
const picked = article && frame ? selectedQuote(frame, article) : null;
|
|
93
|
+
// else the start of what is SHOWN of the first text part (not the markdown source of all of them)
|
|
94
|
+
const first = article?.querySelector("[data-quotable]")?.textContent;
|
|
95
|
+
const quote = picked?.quote ?? {
|
|
96
|
+
messageId: message.id,
|
|
97
|
+
text: cleanQuote(first ?? message.parts.find((p) => p.type === "text")?.text ?? ""),
|
|
98
|
+
};
|
|
99
|
+
if (quote.text)
|
|
100
|
+
onQuote(quote);
|
|
101
|
+
}, children: _jsx(Quote, { "aria-hidden": true, className: "size-3.5 rtl:-scale-x-100" }) }))] }))] }));
|
|
82
102
|
}
|
|
83
103
|
//# sourceMappingURL=message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/agent/message.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../src/agent/message.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,UAAU,GAGX,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,UAAU,EAA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C,CAAC,CAAC,CAAC,IAAI,CAAC;4BACvE,kGAAkG;4BAClG,MAAM,KAAK,GAAG,OAAO,EAAE,aAAa,CAAc,iBAAiB,CAAC,EAAE,WAAW,CAAC;4BAClF,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI;gCAC7B,SAAS,EAAE,OAAO,CAAC,EAAE;gCACrB,IAAI,EAAE,UAAU,CACd,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,EAAE,IAAI,IAAI,EAAE,CAClE;6BACF,CAAC;4BACF,IAAI,KAAK,CAAC,IAAI;gCAAE,OAAO,CAAC,KAAK,CAAC,CAAC;wBACjC,CAAC,YAED,KAAC,KAAK,yBAAa,SAAS,EAAC,2BAA2B,GAAG,GACpD,CACV,IACG,CACP,IACO,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import { type AgentQuote } from "./context.js";
|
|
3
|
+
export interface AgentQuoteReplyCopy {
|
|
4
|
+
/** The chip beside a selection in an answer. */
|
|
5
|
+
reply: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const DEFAULT_QUOTE_REPLY_COPY: AgentQuoteReplyCopy;
|
|
8
|
+
interface Selection_ {
|
|
9
|
+
quote: AgentQuote;
|
|
10
|
+
/** The chip's offset from the frame's start edge (left, or right in a right-to-left frame), in px. */
|
|
11
|
+
x: number;
|
|
12
|
+
top: number;
|
|
13
|
+
rtl: boolean;
|
|
14
|
+
frameWidth: number;
|
|
15
|
+
}
|
|
16
|
+
/** The selected text when the whole selection sits inside ONE quotable part (of the given article, when one is named). */
|
|
17
|
+
export declare function selectedQuote(frame: HTMLElement, within?: HTMLElement): {
|
|
18
|
+
quote: AgentQuote;
|
|
19
|
+
range: Range;
|
|
20
|
+
} | null;
|
|
21
|
+
/**
|
|
22
|
+
* @internal Watches the document selection and reports the passage selected inside one answer's text, with where to draw the
|
|
23
|
+
* "Reply" chip. The passage is cleaned and cut here ({@link cleanQuote}); nothing is read from the DOM but plain selected text.
|
|
24
|
+
* Only listens while `enabled`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useQuoteSelection(frameRef: RefObject<HTMLElement | null>, enabled: boolean): {
|
|
27
|
+
selection: Selection_ | null;
|
|
28
|
+
clear: () => void;
|
|
29
|
+
};
|
|
30
|
+
export declare function AgentQuoteReplyButton({ top, x, rtl, frameWidth, onClick, copy, }: {
|
|
31
|
+
top: number;
|
|
32
|
+
/** Offset from the frame's start edge (its left, or right when `rtl`). */
|
|
33
|
+
x: number;
|
|
34
|
+
rtl: boolean;
|
|
35
|
+
frameWidth: number;
|
|
36
|
+
onClick: () => void;
|
|
37
|
+
copy?: Partial<AgentQuoteReplyCopy>;
|
|
38
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=quote-reply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quote-reply.d.ts","sourceRoot":"","sources":["../../src/agent/quote-reply.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlG,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAGxD,MAAM,WAAW,mBAAmB;IAClC,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;CACf;AACD,eAAO,MAAM,wBAAwB,EAAE,mBAAwC,CAAC;AAEhF,UAAU,UAAU;IAClB,KAAK,EAAE,UAAU,CAAC;IAClB,sGAAsG;IACtG,CAAC,EAAE,MAAM,CAAC;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAaD,0HAA0H;AAC1H,wBAAgB,aAAa,CAC3B,KAAK,EAAE,WAAW,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,GAAG,IAAI,CAW5C;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO;;;EAkD1F;AAED,wBAAgB,qBAAqB,CAAC,EACpC,GAAG,EACH,CAAC,EACD,GAAG,EACH,UAAU,EACV,OAAO,EACP,IAAI,GACL,EAAE;IACD,GAAG,EAAE,MAAM,CAAC;IACZ,0EAA0E;IAC1E,CAAC,EAAE,MAAM,CAAC;IACV,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACrC,2CAqBA"}
|