@agent-native/core 0.91.1 → 0.92.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/blueprints/action/crud.md +1 -1
- package/blueprints/channel/discord.md +1 -1
- package/blueprints/provider/stripe.md +1 -1
- package/blueprints/sandbox/docker.md +1 -1
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +31 -0
- package/corpus/core/blueprints/action/crud.md +1 -1
- package/corpus/core/blueprints/channel/discord.md +1 -1
- package/corpus/core/blueprints/provider/stripe.md +1 -1
- package/corpus/core/blueprints/sandbox/docker.md +1 -1
- package/corpus/core/docs/content/faq.mdx +17 -0
- package/corpus/core/docs/content/notifications.mdx +12 -6
- package/corpus/core/package.json +6 -5
- package/corpus/core/src/agent/production-agent.ts +140 -46
- package/corpus/core/src/agent/run-manager.ts +23 -2
- package/corpus/core/src/agent/run-store.ts +2 -2
- package/corpus/core/src/agent/tool-search.ts +71 -4
- package/corpus/core/src/cli/add.ts +1 -1
- package/corpus/core/src/cli/create.ts +8 -3
- package/corpus/core/src/cli/index.ts +25 -4
- package/corpus/core/src/cli/upgrade.ts +798 -0
- package/corpus/core/src/client/AssistantChat.tsx +1 -1
- package/corpus/core/src/client/HighlightedCodeBlock.tsx +20 -3
- package/corpus/core/src/client/agent-chat-adapter.ts +31 -6
- package/corpus/core/src/client/chat/message-components.tsx +85 -8
- package/corpus/core/src/client/chat/tool-call-display.tsx +355 -144
- package/corpus/core/src/client/code-agent-chat-adapter.ts +2 -9
- package/corpus/core/src/client/extensions/ExtensionSlot.tsx +7 -0
- package/corpus/core/src/client/settings/SettingsPanel.tsx +533 -389
- package/corpus/core/src/client/settings/SettingsSection.tsx +154 -17
- package/corpus/core/src/client/sse-event-processor.ts +29 -2
- package/corpus/core/src/extensions/actions.ts +113 -5
- package/corpus/core/src/jobs/scheduler.ts +30 -1
- package/corpus/core/src/localization/default-messages.ts +21 -0
- package/corpus/core/src/notifications/channels.ts +88 -25
- package/corpus/core/src/notifications/registry.ts +17 -3
- package/corpus/core/src/notifications/types.ts +4 -1
- package/corpus/core/src/server/agent-chat-plugin.ts +7 -3
- package/corpus/core/src/server/request-context.ts +7 -0
- package/corpus/core/src/styles/agent-conversation.css +1 -1
- package/corpus/core/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/core/src/templates/default/AGENTS.md +10 -3
- package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/de-DE.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/en-US.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/es-ES.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +19 -0
- package/corpus/core/src/templates/default/package.json +4 -3
- package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/core/src/templates/headless/AGENTS.md +9 -3
- package/corpus/core/src/templates/headless/package.json +4 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/core/src/templates/workspace-core/package.json +6 -6
- package/corpus/core/src/templates/workspace-root/AGENTS.md +10 -4
- package/corpus/core/src/templates/workspace-root/package.json +3 -2
- package/corpus/core/src/triggers/dispatcher.ts +30 -2
- package/corpus/core/src/vite/client.ts +96 -1
- package/corpus/templates/analytics/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +20 -2
- package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/analytics/AGENTS.md +7 -5
- package/corpus/templates/analytics/actions/save-monitor.ts +14 -0
- package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +41 -6
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +122 -11
- package/corpus/templates/analytics/app/global.css +26 -10
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/analytics/app/i18n-data.ts +25 -0
- package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +8 -2
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +151 -32
- package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +17 -2
- package/corpus/templates/analytics/app/pages/monitoring/uptime/types.ts +4 -0
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +461 -286
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +285 -294
- package/corpus/templates/analytics/changelog/2026-07-08-console-details-expand-inline-under-each-row-and-the-event-t.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-dashboard-tables-keep-their-size-while-loading.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-monitoring-uptime-and-errors-tabs-now-clearly-show-which-view-is-active.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-session-replay-keeps-a-usable-stage-when-dev-tools-is-open-a.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-session-replay-resumes-after-scrubbing-and-expands-console-r.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-session-replay-uses-stock-rrweb-sizing-again-so-recorded.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-session-replays-wait-for-full-load-keep-a-normal-viewport-an.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-sidebar-dashboard-menus-now-open-above-the-dashboard-canvas.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-08-uptime-alerting-clarifies-in-app-inbox-vs-email-and-lets-you-paste-slack-or-webhook-urls-per-monitor.md +6 -0
- package/corpus/templates/analytics/docs/uptime-monitoring.md +13 -11
- package/corpus/templates/analytics/package.json +2 -2
- package/corpus/templates/analytics/server/db/schema-monitoring.ts +4 -0
- package/corpus/templates/analytics/server/lib/uptime-monitors.ts +60 -12
- package/corpus/templates/analytics/server/plugins/db.ts +10 -0
- package/corpus/templates/assets/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/assets/package.json +2 -2
- package/corpus/templates/brain/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/brain/package.json +2 -2
- package/corpus/templates/calendar/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/calendar/AGENTS.md +10 -0
- package/corpus/templates/calendar/actions/create-event.ts +5 -1
- package/corpus/templates/calendar/actions/event-action-helpers.ts +41 -0
- package/corpus/templates/calendar/actions/get-attendee-timezones.ts +28 -0
- package/corpus/templates/calendar/actions/set-attendee-timezone.ts +68 -0
- package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +150 -11
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +36 -1
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +32 -0
- package/corpus/templates/calendar/app/hooks/use-attendee-timezones.ts +24 -0
- package/corpus/templates/calendar/app/i18n/zh-TW.ts +2 -0
- package/corpus/templates/calendar/app/i18n-data.ts +20 -0
- package/corpus/templates/calendar/app/lib/attendee-local-time.ts +122 -0
- package/corpus/templates/calendar/changelog/2026-07-08-event-details-now-support-extension-widgets-and-you-can-see-.md +6 -0
- package/corpus/templates/calendar/changelog/2026-07-08-when-you-invite-guests-to-a-new-event-you-now-appear-in.md +6 -0
- package/corpus/templates/calendar/package.json +2 -2
- package/corpus/templates/calendar/server/handlers/events.ts +5 -1
- package/corpus/templates/calendar/shared/api.ts +6 -0
- package/corpus/templates/chat/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/chat/package.json +2 -2
- package/corpus/templates/clips/.agents/skills/meetings/SKILL.md +6 -2
- package/corpus/templates/clips/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/clips/actions/create-meeting.ts +8 -3
- package/corpus/templates/clips/actions/list-meetings.ts +31 -3
- package/corpus/templates/clips/changelog/2026-07-08-after-finishing-a-desktop-recording-reopening-clips-restor.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-clips-now-pops-up-to-take-notes-when-you-join-an-adhoc-zoom-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-desktop-clip-recordings-are-louder-after-capture-mic-only.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-desktop-meeting-notes-stay-active-from-tray-and-shortcut-controls.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-desktop-meeting-popovers-can-start-notes-and-join-the-meetin.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-meeting-notes-keep-their-recording-state-when-the-desktop.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-meeting-reminder-dropdowns-now-expand-fully-instead-of-being.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-meeting-reminders-now-appear-1-minute-before-start-stay-unti.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-08-the-desktop-meetings-panel-has-room-for-its-drop-shadow-and-.md +6 -0
- package/corpus/templates/clips/chrome-extension/package.json +2 -2
- package/corpus/templates/clips/desktop/package.json +2 -2
- package/corpus/templates/clips/desktop/src/app.tsx +214 -37
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +30 -6
- package/corpus/templates/clips/desktop/src/lib/meeting-notification-timing.ts +83 -0
- package/corpus/templates/clips/desktop/src/lib/native-recording-warm.ts +21 -0
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +98 -20
- package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +197 -50
- package/corpus/templates/clips/desktop/src/styles.css +150 -53
- package/corpus/templates/clips/desktop/src-tauri/src/adhoc_meetings_watcher.rs +362 -0
- package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +41 -7
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +9 -2
- package/corpus/templates/clips/desktop/src-tauri/src/meetings_watcher.rs +89 -11
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +71 -17
- package/corpus/templates/clips/desktop/src-tauri/src/native_speech.rs +36 -1
- package/corpus/templates/clips/desktop/src-tauri/src/notifications.rs +62 -10
- package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +3 -3
- package/corpus/templates/clips/desktop/src-tauri/src/silence_detector.rs +1 -25
- package/corpus/templates/clips/desktop/src-tauri/src/state.rs +5 -0
- package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +18 -6
- package/corpus/templates/clips/desktop/src-tauri/src/util.rs +36 -1
- package/corpus/templates/clips/package.json +2 -2
- package/corpus/templates/content/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/content/actions/_batch-utils.ts +8 -0
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +7 -5
- package/corpus/templates/content/actions/_content-database-personal-view.ts +80 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +776 -319
- package/corpus/templates/content/actions/_database-utils.ts +6 -1
- package/corpus/templates/content/actions/_property-utils.ts +168 -0
- package/corpus/templates/content/actions/add-content-database-source-field-property.ts +19 -12
- package/corpus/templates/content/actions/bind-content-database-source-field.ts +19 -12
- package/corpus/templates/content/actions/delete-document.ts +9 -13
- package/corpus/templates/content/actions/get-content-database-personal-view.ts +27 -0
- package/corpus/templates/content/actions/refresh-content-database-source.ts +5 -5
- package/corpus/templates/content/actions/update-content-database-personal-view.ts +31 -0
- package/corpus/templates/content/actions/update-content-database-view.ts +3 -0
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +1 -1
- package/corpus/templates/content/app/components/editor/body-hydration.ts +35 -11
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +2631 -551
- package/corpus/templates/content/app/components/editor/database/filter-sort.ts +220 -18
- package/corpus/templates/content/app/hooks/use-content-database.ts +32 -0
- package/corpus/templates/content/app/hooks/use-documents.ts +8 -2
- package/corpus/templates/content/app/i18n/zh-TW.ts +16 -0
- package/corpus/templates/content/app/i18n-data.ts +154 -0
- package/corpus/templates/content/changelog/2026-07-08-builder-source-sync-now-completes-reliably-on-hosted-databases.md +6 -0
- package/corpus/templates/content/changelog/2026-07-08-database-filters-now-support-notion-style-reset-save-for-eve.md +6 -0
- package/corpus/templates/content/changelog/2026-07-08-date-filters-can-now-target-a-between-range.md +6 -0
- package/corpus/templates/content/changelog/2026-07-08-fixed-builder-database-sync-so-large-sources-continue-past-t.md +6 -0
- package/corpus/templates/content/package.json +2 -2
- package/corpus/templates/content/parity/matrix.md +1 -1
- package/corpus/templates/content/parity/matrix.ts +2 -0
- package/corpus/templates/content/server/plugins/db.ts +19 -0
- package/corpus/templates/content/shared/api.ts +24 -0
- package/corpus/templates/design/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/design/package.json +2 -2
- package/corpus/templates/dispatch/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/dispatch/app/i18n/zh-TW.ts +34 -1
- package/corpus/templates/dispatch/app/i18n-data.ts +387 -10
- package/corpus/templates/dispatch/app/routes/automations.tsx +1 -0
- package/corpus/templates/dispatch/changelog/2026-07-08-added-an-automations-page-to-review-pause-and-create.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-08-destinations-now-shows-outbound-delivery-queue-health.md +6 -0
- package/corpus/templates/dispatch/package.json +2 -2
- package/corpus/templates/forms/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/forms/package.json +2 -2
- package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/macros/package.json +2 -2
- package/corpus/templates/mail/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/mail/app/hooks/use-emails.ts +56 -44
- package/corpus/templates/mail/app/lib/gmail-mutation-queue.ts +325 -0
- package/corpus/templates/mail/changelog/2026-07-08-rapid-archive-and-mark-read-now-batch-gmail-updates-so-the-i.md +6 -0
- package/corpus/templates/mail/package.json +2 -2
- package/corpus/templates/plan/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/plan/package.json +2 -2
- package/corpus/templates/slides/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +46 -29
- package/corpus/templates/slides/app/context/DeckContext.tsx +45 -18
- package/corpus/templates/slides/app/i18n/ar-SA.ts +4 -0
- package/corpus/templates/slides/app/i18n/de-DE.ts +4 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +4 -0
- package/corpus/templates/slides/app/i18n/es-ES.ts +4 -0
- package/corpus/templates/slides/app/i18n/fr-FR.ts +4 -0
- package/corpus/templates/slides/app/i18n/hi-IN.ts +4 -0
- package/corpus/templates/slides/app/i18n/ja-JP.ts +4 -0
- package/corpus/templates/slides/app/i18n/ko-KR.ts +4 -0
- package/corpus/templates/slides/app/i18n/pt-BR.ts +4 -0
- package/corpus/templates/slides/app/i18n/zh-CN.ts +4 -0
- package/corpus/templates/slides/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/slides/app/lib/image-drop-to-agent.ts +115 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +22 -13
- package/corpus/templates/slides/changelog/2026-07-08-dropping-an-image-onto-a-slide-and-sending-it-to-the-agent-w.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-08-undo-works-after-the-agent-edits-a-slide-so-you-can-reverse.md +6 -0
- package/corpus/templates/slides/package.json +2 -2
- package/corpus/templates/videos/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/corpus/templates/voice/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/agent/production-agent.d.ts +5 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +112 -42
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +23 -2
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/run-store.js +2 -2
- package/dist/agent/run-store.js.map +1 -1
- package/dist/agent/tool-search.d.ts +2 -0
- package/dist/agent/tool-search.d.ts.map +1 -1
- package/dist/agent/tool-search.js +60 -4
- package/dist/agent/tool-search.js.map +1 -1
- package/dist/catalog.json +2 -2
- package/dist/cli/add.js +1 -1
- package/dist/cli/add.js.map +1 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +8 -3
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +24 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/upgrade.d.ts +100 -0
- package/dist/cli/upgrade.d.ts.map +1 -0
- package/dist/cli/upgrade.js +678 -0
- package/dist/cli/upgrade.js.map +1 -0
- package/dist/client/AssistantChat.js +1 -1
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/HighlightedCodeBlock.d.ts +2 -0
- package/dist/client/HighlightedCodeBlock.d.ts.map +1 -1
- package/dist/client/HighlightedCodeBlock.js +10 -1
- package/dist/client/HighlightedCodeBlock.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +32 -4
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +61 -8
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +12 -0
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +136 -42
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/code-agent-chat-adapter.js +2 -9
- package/dist/client/code-agent-chat-adapter.js.map +1 -1
- package/dist/client/extensions/ExtensionSlot.js +6 -0
- package/dist/client/extensions/ExtensionSlot.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +52 -19
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsSection.d.ts +19 -4
- package/dist/client/settings/SettingsSection.d.ts.map +1 -1
- package/dist/client/settings/SettingsSection.js +33 -4
- package/dist/client/settings/SettingsSection.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts +9 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +20 -2
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +85 -5
- package/dist/extensions/actions.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/jobs/scheduler.js +26 -1
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/localization/default-messages.d.ts +19 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +19 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/notifications/channels.d.ts +8 -3
- package/dist/notifications/channels.d.ts.map +1 -1
- package/dist/notifications/channels.js +61 -22
- package/dist/notifications/channels.js.map +1 -1
- package/dist/notifications/registry.d.ts.map +1 -1
- package/dist/notifications/registry.js +14 -3
- package/dist/notifications/registry.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/notifications/types.d.ts +4 -1
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/notifications/types.js.map +1 -1
- package/dist/observability/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/server/agent-chat-plugin.d.ts +5 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +2 -2
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/request-context.d.ts +7 -0
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-context.js.map +1 -1
- package/dist/styles/agent-conversation.css +1 -1
- package/dist/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/templates/default/AGENTS.md +10 -3
- package/dist/templates/default/app/i18n/ar-SA.ts +21 -0
- package/dist/templates/default/app/i18n/de-DE.ts +21 -0
- package/dist/templates/default/app/i18n/en-US.ts +21 -0
- package/dist/templates/default/app/i18n/es-ES.ts +21 -0
- package/dist/templates/default/app/i18n/fr-FR.ts +21 -0
- package/dist/templates/default/app/i18n/hi-IN.ts +20 -0
- package/dist/templates/default/app/i18n/ja-JP.ts +21 -0
- package/dist/templates/default/app/i18n/ko-KR.ts +20 -0
- package/dist/templates/default/app/i18n/pt-BR.ts +21 -0
- package/dist/templates/default/app/i18n/zh-CN.ts +20 -0
- package/dist/templates/default/app/i18n/zh-TW.ts +19 -0
- package/dist/templates/default/package.json +4 -3
- package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/templates/headless/AGENTS.md +9 -3
- package/dist/templates/headless/package.json +4 -3
- package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/dist/templates/workspace-core/package.json +6 -6
- package/dist/templates/workspace-root/AGENTS.md +10 -4
- package/dist/templates/workspace-root/package.json +3 -2
- package/dist/triggers/dispatcher.js +27 -2
- package/dist/triggers/dispatcher.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +70 -1
- package/dist/vite/client.js.map +1 -1
- package/docs/content/faq.mdx +17 -0
- package/docs/content/notifications.mdx +12 -6
- package/package.json +7 -6
- package/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/src/templates/default/AGENTS.md +10 -3
- package/src/templates/default/app/i18n/ar-SA.ts +21 -0
- package/src/templates/default/app/i18n/de-DE.ts +21 -0
- package/src/templates/default/app/i18n/en-US.ts +21 -0
- package/src/templates/default/app/i18n/es-ES.ts +21 -0
- package/src/templates/default/app/i18n/fr-FR.ts +21 -0
- package/src/templates/default/app/i18n/hi-IN.ts +20 -0
- package/src/templates/default/app/i18n/ja-JP.ts +21 -0
- package/src/templates/default/app/i18n/ko-KR.ts +20 -0
- package/src/templates/default/app/i18n/pt-BR.ts +21 -0
- package/src/templates/default/app/i18n/zh-CN.ts +20 -0
- package/src/templates/default/app/i18n/zh-TW.ts +19 -0
- package/src/templates/default/package.json +4 -3
- package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/src/templates/headless/AGENTS.md +9 -3
- package/src/templates/headless/package.json +4 -3
- package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
- package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
- package/src/templates/workspace-core/package.json +6 -6
- package/src/templates/workspace-root/AGENTS.md +10 -4
- package/src/templates/workspace-root/package.json +3 -2
|
@@ -53,13 +53,12 @@ export function applyDatabaseView(
|
|
|
53
53
|
const activeFilters = filters.filter(isActiveFilter);
|
|
54
54
|
const filtered = activeFilters.length
|
|
55
55
|
? searched.filter((item) =>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
),
|
|
56
|
+
databaseItemMatchesFilterTree(
|
|
57
|
+
item,
|
|
58
|
+
properties,
|
|
59
|
+
activeFilters,
|
|
60
|
+
filterMode,
|
|
61
|
+
),
|
|
63
62
|
)
|
|
64
63
|
: searched;
|
|
65
64
|
|
|
@@ -79,6 +78,53 @@ export function applyDatabaseView(
|
|
|
79
78
|
});
|
|
80
79
|
}
|
|
81
80
|
|
|
81
|
+
function databaseItemMatchesFilterTree(
|
|
82
|
+
item: ContentDatabaseItem,
|
|
83
|
+
properties: DocumentProperty[],
|
|
84
|
+
filters: DatabaseFilter[],
|
|
85
|
+
filterMode: DatabaseFilterMode,
|
|
86
|
+
) {
|
|
87
|
+
const rootFilters = filters.filter((filter) => !filter.parentFilterGroupId);
|
|
88
|
+
const nestedGroups = nestedDatabaseFilterGroups(filters);
|
|
89
|
+
const matches = [
|
|
90
|
+
...rootFilters.map((filter) =>
|
|
91
|
+
databaseItemMatchesFilter(item, properties, filter),
|
|
92
|
+
),
|
|
93
|
+
...nestedGroups.map((group) =>
|
|
94
|
+
combineDatabaseFilterMatches(
|
|
95
|
+
group.map((filter) =>
|
|
96
|
+
databaseItemMatchesFilter(item, properties, filter),
|
|
97
|
+
),
|
|
98
|
+
filterMode,
|
|
99
|
+
),
|
|
100
|
+
),
|
|
101
|
+
];
|
|
102
|
+
|
|
103
|
+
return combineDatabaseFilterMatches(matches, filterMode);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function nestedDatabaseFilterGroups(filters: DatabaseFilter[]) {
|
|
107
|
+
const groups = new Map<string, DatabaseFilter[]>();
|
|
108
|
+
for (const filter of filters) {
|
|
109
|
+
if (!filter.parentFilterGroupId || !filter.filterGroupId) continue;
|
|
110
|
+
groups.set(filter.filterGroupId, [
|
|
111
|
+
...(groups.get(filter.filterGroupId) ?? []),
|
|
112
|
+
filter,
|
|
113
|
+
]);
|
|
114
|
+
}
|
|
115
|
+
return [...groups.values()].filter((group) => group.length > 0);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function combineDatabaseFilterMatches(
|
|
119
|
+
matches: boolean[],
|
|
120
|
+
filterMode: DatabaseFilterMode,
|
|
121
|
+
) {
|
|
122
|
+
if (matches.length === 0) return true;
|
|
123
|
+
return filterMode === "or"
|
|
124
|
+
? matches.some((matched) => matched)
|
|
125
|
+
: matches.every((matched) => matched);
|
|
126
|
+
}
|
|
127
|
+
|
|
82
128
|
export function defaultDatabaseSort(): DatabaseSort {
|
|
83
129
|
return {
|
|
84
130
|
key: "name",
|
|
@@ -284,15 +330,27 @@ function databaseFilterDefaultValueForNewItem(
|
|
|
284
330
|
if (filter.operator === "is_unchecked") {
|
|
285
331
|
return property.definition.type === "checkbox" ? false : undefined;
|
|
286
332
|
}
|
|
333
|
+
if (property.definition.type === "multi_select") {
|
|
334
|
+
if (filter.operator !== "equals" && filter.operator !== "contains") {
|
|
335
|
+
return undefined;
|
|
336
|
+
}
|
|
337
|
+
const values = databaseFilterSelectedValues(filter.value);
|
|
338
|
+
if (values.length === 0) return undefined;
|
|
339
|
+
return values.map(
|
|
340
|
+
(value) =>
|
|
341
|
+
databasePropertyOptionIdForFilterValue(property, value) ?? value,
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
if (property.definition.type === "person" && filter.operator === "contains") {
|
|
345
|
+
const values = databaseFilterSelectedValues(filter.value);
|
|
346
|
+
return values.length > 0 ? values : undefined;
|
|
347
|
+
}
|
|
287
348
|
if (filter.operator !== "equals") return undefined;
|
|
288
349
|
|
|
289
350
|
const value = filter.value.trim();
|
|
290
351
|
if (!value) return undefined;
|
|
291
352
|
|
|
292
353
|
const optionValue = databasePropertyOptionIdForFilterValue(property, value);
|
|
293
|
-
if (property.definition.type === "multi_select") {
|
|
294
|
-
return [optionValue ?? value];
|
|
295
|
-
}
|
|
296
354
|
if (
|
|
297
355
|
property.definition.type === "select" ||
|
|
298
356
|
property.definition.type === "status"
|
|
@@ -320,6 +378,47 @@ function databasePropertyOptionIdForFilterValue(
|
|
|
320
378
|
)?.id;
|
|
321
379
|
}
|
|
322
380
|
|
|
381
|
+
function databaseFilterSelectedValues(value: string) {
|
|
382
|
+
const trimmed = value.trim();
|
|
383
|
+
if (!trimmed) return [];
|
|
384
|
+
try {
|
|
385
|
+
const parsed = JSON.parse(trimmed) as unknown;
|
|
386
|
+
if (!Array.isArray(parsed)) return [trimmed];
|
|
387
|
+
return [
|
|
388
|
+
...new Set(
|
|
389
|
+
parsed
|
|
390
|
+
.filter((item): item is string => typeof item === "string")
|
|
391
|
+
.map((item) => item.trim())
|
|
392
|
+
.filter(Boolean),
|
|
393
|
+
),
|
|
394
|
+
];
|
|
395
|
+
} catch {
|
|
396
|
+
return [trimmed];
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
function databaseFilterDateRangeValues(value: string): [string, string] {
|
|
401
|
+
const trimmed = value.trim();
|
|
402
|
+
if (!trimmed) return ["", ""];
|
|
403
|
+
try {
|
|
404
|
+
const parsed = JSON.parse(trimmed) as unknown;
|
|
405
|
+
if (!Array.isArray(parsed)) return [trimmed, ""];
|
|
406
|
+
const start = typeof parsed[0] === "string" ? parsed[0].trim() : "";
|
|
407
|
+
const end = typeof parsed[1] === "string" ? parsed[1].trim() : "";
|
|
408
|
+
return [start, end];
|
|
409
|
+
} catch {
|
|
410
|
+
return [trimmed, ""];
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
function databaseFilterDateRangeValue(value: string): [number, number] | null {
|
|
415
|
+
const [startValue, endValue] = databaseFilterDateRangeValues(value);
|
|
416
|
+
const start = new Date(startValue).getTime();
|
|
417
|
+
const end = new Date(endValue).getTime();
|
|
418
|
+
if (!Number.isFinite(start) || !Number.isFinite(end)) return null;
|
|
419
|
+
return start <= end ? [start, end] : [end, start];
|
|
420
|
+
}
|
|
421
|
+
|
|
323
422
|
function databaseItemMatchesFilter(
|
|
324
423
|
item: ContentDatabaseItem,
|
|
325
424
|
properties: DocumentProperty[],
|
|
@@ -343,10 +442,20 @@ function databaseItemMatchesFilter(
|
|
|
343
442
|
: current < target;
|
|
344
443
|
}
|
|
345
444
|
|
|
346
|
-
if (
|
|
445
|
+
if (
|
|
446
|
+
filter.operator === "before" ||
|
|
447
|
+
filter.operator === "after" ||
|
|
448
|
+
filter.operator === "between"
|
|
449
|
+
) {
|
|
347
450
|
const current = propertyDateValue(property);
|
|
451
|
+
if (!Number.isFinite(current)) return false;
|
|
452
|
+
if (filter.operator === "between") {
|
|
453
|
+
const range = databaseFilterDateRangeValue(filter.value);
|
|
454
|
+
if (!range) return false;
|
|
455
|
+
return current >= range[0] && current <= range[1];
|
|
456
|
+
}
|
|
348
457
|
const target = new Date(filter.value.trim()).getTime();
|
|
349
|
-
if (!Number.isFinite(
|
|
458
|
+
if (!Number.isFinite(target)) return false;
|
|
350
459
|
return filter.operator === "before" ? current < target : current > target;
|
|
351
460
|
}
|
|
352
461
|
|
|
@@ -355,8 +464,31 @@ function databaseItemMatchesFilter(
|
|
|
355
464
|
properties,
|
|
356
465
|
filter.key,
|
|
357
466
|
).map((candidate) => candidate.trim().toLowerCase());
|
|
467
|
+
const selectedFilterValues = databaseFilterSelectedValues(filter.value).map(
|
|
468
|
+
(candidate) => candidate.trim().toLowerCase(),
|
|
469
|
+
);
|
|
358
470
|
const normalizedValue = value.trim().toLowerCase();
|
|
359
|
-
const normalizedFilter =
|
|
471
|
+
const normalizedFilter = selectedFilterValues[0] ?? "";
|
|
472
|
+
const usesDiscreteValues =
|
|
473
|
+
property?.definition.type === "select" ||
|
|
474
|
+
property?.definition.type === "status" ||
|
|
475
|
+
property?.definition.type === "multi_select" ||
|
|
476
|
+
property?.definition.type === "person";
|
|
477
|
+
|
|
478
|
+
if (
|
|
479
|
+
usesDiscreteValues &&
|
|
480
|
+
(filter.operator === "equals" || filter.operator === "contains")
|
|
481
|
+
) {
|
|
482
|
+
return selectedFilterValues.some((filterValue) =>
|
|
483
|
+
candidateValues.includes(filterValue),
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
if (usesDiscreteValues && filter.operator === "does_not_equal") {
|
|
487
|
+
return selectedFilterValues.every(
|
|
488
|
+
(filterValue) => !candidateValues.includes(filterValue),
|
|
489
|
+
);
|
|
490
|
+
}
|
|
491
|
+
|
|
360
492
|
if (filter.operator === "equals") {
|
|
361
493
|
return candidateValues.includes(normalizedFilter);
|
|
362
494
|
}
|
|
@@ -529,9 +661,66 @@ export function propertyNumberValue(
|
|
|
529
661
|
export function databaseFilterOptionChoices(
|
|
530
662
|
key: string,
|
|
531
663
|
properties: DocumentProperty[],
|
|
664
|
+
items: ContentDatabaseItem[] = [],
|
|
532
665
|
) {
|
|
533
|
-
const property =
|
|
534
|
-
|
|
666
|
+
const property = databaseFilterPropertyForKey(key, properties);
|
|
667
|
+
if (property?.definition.type === "person") {
|
|
668
|
+
return databaseFilterPersonChoices(property.definition.id, items);
|
|
669
|
+
}
|
|
670
|
+
const optionProperty = databaseFilterOptionPropertyForKey(key, properties);
|
|
671
|
+
return optionProperty?.definition.options.options ?? [];
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
function databaseFilterPersonChoices(
|
|
675
|
+
propertyId: string,
|
|
676
|
+
items: ContentDatabaseItem[],
|
|
677
|
+
) {
|
|
678
|
+
const people = new Map<string, string>();
|
|
679
|
+
for (const item of items) {
|
|
680
|
+
const property = item.properties.find(
|
|
681
|
+
(candidate) => candidate.definition.id === propertyId,
|
|
682
|
+
);
|
|
683
|
+
for (const person of databasePersonItems(property?.value ?? null)) {
|
|
684
|
+
const key = person.trim().toLowerCase();
|
|
685
|
+
if (!people.has(key)) people.set(key, person);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
return Array.from(people.values()).map((person) => ({
|
|
689
|
+
id: person,
|
|
690
|
+
name: databasePersonLabel(person),
|
|
691
|
+
color: "gray" as const,
|
|
692
|
+
}));
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
function databasePersonItems(value: DocumentProperty["value"]) {
|
|
696
|
+
const rawItems = Array.isArray(value)
|
|
697
|
+
? value
|
|
698
|
+
: typeof value === "string"
|
|
699
|
+
? value.split(/[\n,]+/)
|
|
700
|
+
: [];
|
|
701
|
+
const seen = new Set<string>();
|
|
702
|
+
return rawItems
|
|
703
|
+
.map((item) => item.trim())
|
|
704
|
+
.filter((item) => {
|
|
705
|
+
if (!item) return false;
|
|
706
|
+
const key = item.toLowerCase();
|
|
707
|
+
if (seen.has(key)) return false;
|
|
708
|
+
seen.add(key);
|
|
709
|
+
return true;
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
function databasePersonLabel(value: string) {
|
|
714
|
+
const trimmed = value.trim();
|
|
715
|
+
if (!trimmed) return "Empty";
|
|
716
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(trimmed)
|
|
717
|
+
? trimmed
|
|
718
|
+
.split("@")[0]
|
|
719
|
+
.split(/[._-]+/)
|
|
720
|
+
.filter(Boolean)
|
|
721
|
+
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
722
|
+
.join(" ")
|
|
723
|
+
: trimmed;
|
|
535
724
|
}
|
|
536
725
|
|
|
537
726
|
export function databaseFilterOptionPropertyForKey(
|
|
@@ -543,7 +732,8 @@ export function databaseFilterOptionPropertyForKey(
|
|
|
543
732
|
if (
|
|
544
733
|
property.definition.type !== "select" &&
|
|
545
734
|
property.definition.type !== "status" &&
|
|
546
|
-
property.definition.type !== "multi_select"
|
|
735
|
+
property.definition.type !== "multi_select" &&
|
|
736
|
+
property.definition.type !== "person"
|
|
547
737
|
) {
|
|
548
738
|
return null;
|
|
549
739
|
}
|
|
@@ -554,6 +744,11 @@ function databaseFilterValueLabel(
|
|
|
554
744
|
filter: DatabaseFilter,
|
|
555
745
|
properties: DocumentProperty[],
|
|
556
746
|
) {
|
|
747
|
+
if (filter.operator === "between") {
|
|
748
|
+
const [start, end] = databaseFilterDateRangeValues(filter.value);
|
|
749
|
+
if (start && end) return `${start} to ${end}`;
|
|
750
|
+
return start || end || "Choose dates";
|
|
751
|
+
}
|
|
557
752
|
const option = databaseFilterOptionChoices(filter.key, properties).find(
|
|
558
753
|
(candidate) =>
|
|
559
754
|
candidate.id === filter.value || candidate.name === filter.value,
|
|
@@ -593,6 +788,7 @@ export const FILTER_OPERATOR_LABELS: Record<FilterOperator, string> = {
|
|
|
593
788
|
less_than: "Less than",
|
|
594
789
|
before: "Before",
|
|
595
790
|
after: "After",
|
|
791
|
+
between: "Between",
|
|
596
792
|
is_checked: "Checked",
|
|
597
793
|
is_unchecked: "Unchecked",
|
|
598
794
|
is_empty: "Is empty",
|
|
@@ -609,8 +805,13 @@ export function filterOperatorsForKey(
|
|
|
609
805
|
return ["is_checked", "is_unchecked"];
|
|
610
806
|
}
|
|
611
807
|
|
|
612
|
-
if (
|
|
613
|
-
|
|
808
|
+
if (
|
|
809
|
+
type === "select" ||
|
|
810
|
+
type === "status" ||
|
|
811
|
+
type === "multi_select" ||
|
|
812
|
+
type === "person"
|
|
813
|
+
) {
|
|
814
|
+
return ["contains", "does_not_equal", "is_empty", "is_not_empty"];
|
|
614
815
|
}
|
|
615
816
|
|
|
616
817
|
if (type === "number") {
|
|
@@ -634,6 +835,7 @@ export function filterOperatorsForKey(
|
|
|
634
835
|
"does_not_equal",
|
|
635
836
|
"before",
|
|
636
837
|
"after",
|
|
838
|
+
"between",
|
|
637
839
|
"is_empty",
|
|
638
840
|
"is_not_empty",
|
|
639
841
|
];
|
|
@@ -6,6 +6,7 @@ import type {
|
|
|
6
6
|
BuilderCmsModelsResponse,
|
|
7
7
|
ChangeContentDatabaseSourceRoleRequest,
|
|
8
8
|
ContentDatabaseResponse,
|
|
9
|
+
ContentDatabasePersonalViewResponse,
|
|
9
10
|
ContentDatabaseSourceFieldMapping,
|
|
10
11
|
CreateInlineDatabaseRequest,
|
|
11
12
|
CreateInlineDatabaseResponse,
|
|
@@ -34,6 +35,7 @@ import type {
|
|
|
34
35
|
StageBuilderSourceBulkUpdateResponse,
|
|
35
36
|
StageBuilderRevisionRequest,
|
|
36
37
|
SuggestSourceJoinKeyResponse,
|
|
38
|
+
UpdateContentDatabasePersonalViewRequest,
|
|
37
39
|
UpdateContentDatabaseViewRequest,
|
|
38
40
|
ValidateBuilderSourceExecutionRequest,
|
|
39
41
|
} from "@shared/api";
|
|
@@ -614,6 +616,36 @@ export function useUpdateContentDatabaseView(documentId: string) {
|
|
|
614
616
|
});
|
|
615
617
|
}
|
|
616
618
|
|
|
619
|
+
export function useContentDatabasePersonalView(databaseId: string | null) {
|
|
620
|
+
return useActionQuery<ContentDatabasePersonalViewResponse>(
|
|
621
|
+
"get-content-database-personal-view",
|
|
622
|
+
databaseId ? { databaseId } : undefined,
|
|
623
|
+
{
|
|
624
|
+
enabled: !!databaseId,
|
|
625
|
+
retry: false,
|
|
626
|
+
placeholderData: (previous) => previous,
|
|
627
|
+
},
|
|
628
|
+
);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
export function useUpdateContentDatabasePersonalView(
|
|
632
|
+
databaseId: string | null,
|
|
633
|
+
) {
|
|
634
|
+
const queryClient = useQueryClient();
|
|
635
|
+
return useActionMutation<
|
|
636
|
+
ContentDatabasePersonalViewResponse,
|
|
637
|
+
UpdateContentDatabasePersonalViewRequest
|
|
638
|
+
>("update-content-database-personal-view", {
|
|
639
|
+
onSuccess: (data) => {
|
|
640
|
+
if (!databaseId) return;
|
|
641
|
+
queryClient.setQueryData(
|
|
642
|
+
["action", "get-content-database-personal-view", { databaseId }],
|
|
643
|
+
data,
|
|
644
|
+
);
|
|
645
|
+
},
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
|
|
617
649
|
export function useAttachContentDatabaseSource(documentId: string) {
|
|
618
650
|
const queryClient = useQueryClient();
|
|
619
651
|
return useActionMutation<
|
|
@@ -14,6 +14,7 @@ import { useQueryClient } from "@tanstack/react-query";
|
|
|
14
14
|
import { toast } from "sonner";
|
|
15
15
|
|
|
16
16
|
import { databaseItemBodyHydrationIsPending } from "@/components/editor/body-hydration";
|
|
17
|
+
import { isEffectivelyEmptyDocumentContent } from "@/components/editor/body-hydration";
|
|
17
18
|
|
|
18
19
|
import type { DocumentUpdateConflictResponse } from "../../actions/update-document";
|
|
19
20
|
import { useRestoreContentDatabase } from "./use-content-database";
|
|
@@ -85,14 +86,19 @@ export function seedDatabaseItemDocumentCaches(
|
|
|
85
86
|
queryClient: Pick<QueryClient, "getQueryData" | "setQueryData">,
|
|
86
87
|
item: ContentDatabaseItem,
|
|
87
88
|
) {
|
|
89
|
+
const sourceBackedEmptyBody =
|
|
90
|
+
(!!item.bodyHydration || !!item.document.databaseMembership?.sourceId) &&
|
|
91
|
+
isEffectivelyEmptyDocumentContent(item.document.content);
|
|
88
92
|
// Seed only cold caches. Overwriting an existing entry would bump its
|
|
89
93
|
// freshness with possibly older table-snapshot data (a background database
|
|
90
94
|
// refetch can lag a just-saved document edit) and suppress the correcting
|
|
91
95
|
// refetch for the whole staleTime window. Rows whose Builder body has not
|
|
92
|
-
// hydrated yet
|
|
93
|
-
//
|
|
96
|
+
// hydrated yet, or whose source-backed list snapshot intentionally omits the
|
|
97
|
+
// body, are never seeded: their empty table-snapshot `content` would render as
|
|
98
|
+
// an authoritative empty document.
|
|
94
99
|
if (
|
|
95
100
|
!databaseItemBodyHydrationIsPending(item) &&
|
|
101
|
+
!sourceBackedEmptyBody &&
|
|
96
102
|
queryClient.getQueryData(documentQueryKey(item.document.id)) === undefined
|
|
97
103
|
) {
|
|
98
104
|
queryClient.setQueryData<Document>(documentQueryKey(item.document.id), {
|
|
@@ -655,9 +655,18 @@ const messages = {
|
|
|
655
655
|
failedToMoveRow: "行動行失敗",
|
|
656
656
|
failedToSavePageIcon: "儲存頁面圖示失敗",
|
|
657
657
|
failedToSavePagePreview: "儲存頁面預覽失敗",
|
|
658
|
+
failedToSaveView: "儲存檢視失敗",
|
|
658
659
|
failedToUpdateCheckbox: "更新核取方塊失敗",
|
|
659
660
|
failedToUpdateEverySelectedRow: "未能更新所有選取行",
|
|
660
661
|
filter: "篩選",
|
|
662
|
+
filterBy: "篩選條件...",
|
|
663
|
+
addAdvancedFilter: "新增進階篩選器",
|
|
664
|
+
addFilterRule: "新增篩選規則",
|
|
665
|
+
addFilterGroup: "新增篩選群組",
|
|
666
|
+
nestedFilterGroupUnavailable: "巢狀篩選群組需要資料模型更新",
|
|
667
|
+
deleteFilter: "刪除篩選器",
|
|
668
|
+
where: "條件",
|
|
669
|
+
sortBy: "排序依據...",
|
|
661
670
|
group: "分組",
|
|
662
671
|
click: "點選",
|
|
663
672
|
column: "列",
|
|
@@ -665,6 +674,7 @@ const messages = {
|
|
|
665
674
|
clearColumn: "清空列",
|
|
666
675
|
clearRow: "清空行",
|
|
667
676
|
deleteColumn: "刪除列",
|
|
677
|
+
deleteSort: "刪除排序",
|
|
668
678
|
drag: "拖動",
|
|
669
679
|
headerColumn: "標題列",
|
|
670
680
|
headerRow: "標題行",
|
|
@@ -675,6 +685,8 @@ const messages = {
|
|
|
675
685
|
insertRight: "在右側插入",
|
|
676
686
|
layout: "布局",
|
|
677
687
|
matchExistingItemsToDetails: "將現有項目比對到詳細資料",
|
|
688
|
+
moveFilterDown: "下移",
|
|
689
|
+
moveFilterUp: "上移",
|
|
678
690
|
name: "名稱",
|
|
679
691
|
nameColumnMenu: "名稱列選單",
|
|
680
692
|
newBoardGroupName: "新看板分組名稱",
|
|
@@ -691,19 +703,23 @@ const messages = {
|
|
|
691
703
|
noRowsMatchThisView: "沒有行匹配此檢視",
|
|
692
704
|
editFilesForSelectedRows: "編輯所選行的檔案",
|
|
693
705
|
oneFileOrMediaLinkPerLine: "每行一個檔案或媒體連結",
|
|
706
|
+
personalViewChanges: "僅自己可見",
|
|
694
707
|
previewPageTitle: "預覽頁面標題",
|
|
695
708
|
previousDatabasePage: "上一頁面資料庫頁面",
|
|
696
709
|
previousMonth: "上個月",
|
|
697
710
|
previousTimelineRange: "上一個時間線範圍",
|
|
698
711
|
propertyVisibility: "屬性可見性",
|
|
712
|
+
reset: "重設",
|
|
699
713
|
resizeNameColumn: "調整名稱列寬",
|
|
700
714
|
row: "行",
|
|
701
715
|
rowOptions: "行選項",
|
|
702
716
|
search: "搜尋",
|
|
717
|
+
saveForEveryone: "為所有人儲存",
|
|
703
718
|
searchBuilderModels: "搜尋 Builder 模型",
|
|
704
719
|
searchGroupProperties: "搜尋分組屬性",
|
|
705
720
|
searchModels: "搜尋模型",
|
|
706
721
|
searchOptions: "搜尋選項",
|
|
722
|
+
searchForAProperty: "搜尋屬性...",
|
|
707
723
|
searchProperties: "搜尋屬性",
|
|
708
724
|
somethingWentWrong: "出了點問題",
|
|
709
725
|
sort: "排序",
|