@agent-native/core 0.109.4 → 0.110.1
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/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +17 -0
- package/corpus/core/docs/content/actions.mdx +2 -4
- package/corpus/core/docs/content/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/audit-log.mdx +1 -2
- package/corpus/core/docs/content/authentication.mdx +3 -2
- package/corpus/core/docs/content/client.mdx +19 -18
- package/corpus/core/docs/content/components.mdx +1 -1
- package/corpus/core/docs/content/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/doctor.mdx +27 -6
- package/corpus/core/docs/content/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/getting-started.mdx +4 -2
- package/corpus/core/docs/content/internationalization.mdx +9 -6
- package/corpus/core/docs/content/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/ar-SA/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/ar-SA/client.mdx +19 -18
- package/corpus/core/docs/content/locales/ar-SA/components.mdx +1 -1
- package/corpus/core/docs/content/locales/ar-SA/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/ar-SA/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/ar-SA/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/ar-SA/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/ar-SA/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/ar-SA/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/ar-SA/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/ar-SA/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/ar-SA/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/ar-SA/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/ar-SA/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/ar-SA/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/ar-SA/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/de-DE/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/de-DE/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/de-DE/client.mdx +19 -18
- package/corpus/core/docs/content/locales/de-DE/components.mdx +1 -1
- package/corpus/core/docs/content/locales/de-DE/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/de-DE/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/de-DE/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/de-DE/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/de-DE/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/de-DE/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/de-DE/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/de-DE/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/de-DE/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/de-DE/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/de-DE/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/de-DE/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/es-ES/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/es-ES/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/es-ES/client.mdx +19 -18
- package/corpus/core/docs/content/locales/es-ES/components.mdx +1 -1
- package/corpus/core/docs/content/locales/es-ES/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/es-ES/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/es-ES/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/es-ES/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/es-ES/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/es-ES/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/es-ES/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/es-ES/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/es-ES/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/es-ES/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/es-ES/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/es-ES/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/fr-FR/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/fr-FR/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/fr-FR/client.mdx +19 -18
- package/corpus/core/docs/content/locales/fr-FR/components.mdx +1 -1
- package/corpus/core/docs/content/locales/fr-FR/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/fr-FR/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/fr-FR/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/fr-FR/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/fr-FR/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/fr-FR/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/fr-FR/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/fr-FR/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/fr-FR/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/fr-FR/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/fr-FR/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/fr-FR/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/hi-IN/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/hi-IN/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/hi-IN/client.mdx +19 -18
- package/corpus/core/docs/content/locales/hi-IN/components.mdx +1 -1
- package/corpus/core/docs/content/locales/hi-IN/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/hi-IN/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/hi-IN/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/hi-IN/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/hi-IN/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/hi-IN/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/hi-IN/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/hi-IN/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/hi-IN/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/hi-IN/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/hi-IN/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/hi-IN/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/ja-JP/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/ja-JP/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/ja-JP/client.mdx +19 -18
- package/corpus/core/docs/content/locales/ja-JP/components.mdx +1 -1
- package/corpus/core/docs/content/locales/ja-JP/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/ja-JP/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/ja-JP/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/ja-JP/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/ja-JP/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/ja-JP/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/ja-JP/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/ja-JP/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/ja-JP/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/ja-JP/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/ja-JP/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/ja-JP/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/ko-KR/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/ko-KR/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/ko-KR/client.mdx +19 -18
- package/corpus/core/docs/content/locales/ko-KR/components.mdx +1 -1
- package/corpus/core/docs/content/locales/ko-KR/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/ko-KR/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/ko-KR/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/ko-KR/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/ko-KR/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/ko-KR/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/ko-KR/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/ko-KR/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/ko-KR/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/ko-KR/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/ko-KR/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/ko-KR/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/pt-BR/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/pt-BR/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/pt-BR/client.mdx +19 -18
- package/corpus/core/docs/content/locales/pt-BR/components.mdx +1 -1
- package/corpus/core/docs/content/locales/pt-BR/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/pt-BR/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/pt-BR/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/pt-BR/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/pt-BR/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/pt-BR/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/pt-BR/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/pt-BR/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/pt-BR/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/pt-BR/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/pt-BR/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/pt-BR/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-CN/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-CN/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/zh-CN/client.mdx +19 -18
- package/corpus/core/docs/content/locales/zh-CN/components.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-CN/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/zh-CN/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/zh-CN/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/zh-CN/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/zh-CN/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/zh-CN/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/zh-CN/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-CN/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-CN/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/zh-CN/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-CN/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-CN/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/actions.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-TW/audit-log.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/authentication.mdx +3 -2
- package/corpus/core/docs/content/locales/zh-TW/client.mdx +19 -18
- package/corpus/core/docs/content/locales/zh-TW/components.mdx +1 -1
- package/corpus/core/docs/content/locales/zh-TW/context-awareness.mdx +4 -7
- package/corpus/core/docs/content/locales/zh-TW/creating-templates.mdx +7 -5
- package/corpus/core/docs/content/locales/zh-TW/doctor.mdx +10 -0
- package/corpus/core/docs/content/locales/zh-TW/drop-in-agent.mdx +6 -11
- package/corpus/core/docs/content/locales/zh-TW/embedding-sdk.mdx +8 -10
- package/corpus/core/docs/content/locales/zh-TW/internationalization.mdx +9 -6
- package/corpus/core/docs/content/locales/zh-TW/key-concepts.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-TW/observability.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/package-lifecycle.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.mdx +4 -7
- package/corpus/core/docs/content/locales/zh-TW/sharing.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/template-chat.mdx +1 -2
- package/corpus/core/docs/content/locales/zh-TW/tracking.mdx +2 -4
- package/corpus/core/docs/content/locales/zh-TW/what-is-agent-native.mdx +1 -2
- package/corpus/core/docs/content/observability.mdx +1 -2
- package/corpus/core/docs/content/package-lifecycle.mdx +29 -0
- package/corpus/core/docs/content/real-time-collaboration.mdx +8 -7
- package/corpus/core/docs/content/sharing.mdx +1 -2
- package/corpus/core/docs/content/template-chat.mdx +1 -2
- package/corpus/core/docs/content/toolkit-agent-ux.mdx +3 -2
- package/corpus/core/docs/content/toolkit-observability.mdx +1 -2
- package/corpus/core/docs/content/toolkit-settings.mdx +2 -2
- package/corpus/core/docs/content/toolkit-sharing.mdx +5 -2
- package/corpus/core/docs/content/tracking.mdx +2 -4
- package/corpus/core/docs/content/what-is-agent-native.mdx +1 -2
- package/corpus/core/export-snapshot.json +324 -0
- package/corpus/core/migration-manifest.json +1492 -0
- package/corpus/core/package.json +21 -3
- package/corpus/core/src/cli/doctor.ts +77 -7
- package/corpus/core/src/cli/migration-codemod.ts +569 -0
- package/corpus/core/src/cli/upgrade.ts +63 -7
- package/corpus/core/src/client/agent-chat/index.ts +279 -0
- package/corpus/core/src/client/agent-page/AgentContextTab.tsx +3 -1
- package/corpus/core/src/client/analytics/index.ts +40 -0
- package/corpus/core/src/client/api-path.ts +2 -2
- package/corpus/core/src/client/automation/index.ts +4 -0
- package/corpus/core/src/client/changelog/index.ts +1 -0
- package/corpus/core/src/client/chat/widgets/InlineExtensionWidget.tsx +5 -84
- package/corpus/core/src/client/chat/widgets/builtin-tool-renderers.tsx +52 -14
- package/corpus/core/src/client/chat/widgets/inline-extension-result.ts +86 -0
- package/corpus/core/src/client/client-bootstrap.ts +7 -0
- package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +1 -1
- package/corpus/core/src/client/hooks/index.ts +46 -0
- package/corpus/core/src/client/host/index.ts +170 -0
- package/corpus/core/src/client/index.ts +20 -664
- package/corpus/core/src/client/navigation/index.ts +54 -0
- package/corpus/core/src/client/resources/ResourcesPanel.tsx +1 -1
- package/corpus/core/src/client/resources/index.ts +2 -1
- package/corpus/core/src/client/resources/use-resources.ts +0 -20
- package/corpus/core/src/client/route-chunk-recovery/index.ts +1 -0
- package/corpus/core/src/client/ui/index.ts +55 -0
- package/corpus/core/src/client/uploads/index.ts +1 -0
- package/corpus/core/src/client/uploads/use-upload-resource.ts +24 -0
- package/corpus/core/src/client/widgets/index.ts +41 -0
- package/corpus/core/src/localization/default-messages.ts +2 -1
- package/corpus/core/src/package-lifecycle/deprecated-imports.ts +179 -0
- package/corpus/core/src/package-lifecycle/index.ts +5 -0
- package/corpus/core/src/package-lifecycle/migration-manifest.ts +159 -0
- package/corpus/core/src/package-lifecycle/migration-message.ts +6 -0
- package/corpus/core/src/package-lifecycle/tombstone.ts +44 -0
- package/corpus/core/src/package-lifecycle/upgrade-error.ts +19 -0
- package/corpus/core/src/templates/default/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/core/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/core/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/core/src/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/core/src/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/corpus/core/src/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/core/src/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/core/src/templates/default/app/hooks/use-navigation-state.ts +2 -5
- package/corpus/core/src/templates/default/app/i18n/index.ts +1 -1
- package/corpus/core/src/templates/default/app/lib/utils.ts +1 -1
- package/corpus/core/src/templates/default/app/root.tsx +8 -6
- package/corpus/core/src/templates/default/app/routes/_index.tsx +2 -1
- package/corpus/core/src/templates/default/app/routes/agent.tsx +2 -1
- package/corpus/core/src/templates/default/app/routes/settings.tsx +2 -3
- package/corpus/core/src/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/core/src/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
- package/corpus/core/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/core/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/core/src/vite/action-types-plugin.ts +4 -0
- package/corpus/core/src/vite/client.ts +80 -65
- package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/analytics/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/analytics/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/analytics/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/analytics/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/analytics/app/components/Markdown.tsx +1 -1
- package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +2 -1
- package/corpus/templates/analytics/app/components/agents/FeatureFlagsFleetPanel.tsx +6 -4
- package/corpus/templates/analytics/app/components/analysis/AnalysisHistoryPanel.tsx +1 -1
- package/corpus/templates/analytics/app/components/auth/AuthProvider.tsx +2 -2
- package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DashboardHistoryPanel.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RecentActivity.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +2 -1
- package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +4 -6
- package/corpus/templates/analytics/app/components/layout/DashboardHeader.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Header.tsx +2 -2
- package/corpus/templates/analytics/app/components/layout/HeaderActions.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +3 -3
- package/corpus/templates/analytics/app/components/layout/MobileNav.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/NewAnalysisDialog.tsx +4 -6
- package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +3 -5
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +10 -10
- package/corpus/templates/analytics/app/entry.client.tsx +2 -4
- package/corpus/templates/analytics/app/hooks/use-analysis-revisions.ts +4 -1
- package/corpus/templates/analytics/app/hooks/use-dashboard-chat-context.ts +6 -4
- package/corpus/templates/analytics/app/hooks/use-dashboard-revisions.ts +4 -1
- package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +1 -1
- package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +2 -4
- package/corpus/templates/analytics/app/hooks/use-replay-storage-status.ts +1 -1
- package/corpus/templates/analytics/app/hooks/use-user-pref.ts +1 -1
- package/corpus/templates/analytics/app/i18n/index.ts +1 -1
- package/corpus/templates/analytics/app/i18n-data.ts +1 -1
- package/corpus/templates/analytics/app/lib/api-hooks.ts +1 -1
- package/corpus/templates/analytics/app/lib/item-popularity.ts +1 -1
- package/corpus/templates/analytics/app/lib/query-metrics.ts +1 -1
- package/corpus/templates/analytics/app/lib/sql-query.ts +1 -1
- package/corpus/templates/analytics/app/lib/tab-id.ts +1 -1
- package/corpus/templates/analytics/app/lib/track-metric.ts +1 -1
- package/corpus/templates/analytics/app/lib/user-info.ts +1 -1
- package/corpus/templates/analytics/app/lib/utils.ts +1 -1
- package/corpus/templates/analytics/app/pages/Agents.tsx +5 -6
- package/corpus/templates/analytics/app/pages/Ask.tsx +2 -2
- package/corpus/templates/analytics/app/pages/DataDictionary.tsx +3 -3
- package/corpus/templates/analytics/app/pages/DataSources.tsx +7 -5
- package/corpus/templates/analytics/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/analytics/app/pages/Placeholder.tsx +1 -1
- package/corpus/templates/analytics/app/pages/Settings.tsx +5 -6
- package/corpus/templates/analytics/app/pages/adhoc/BlankDashboard.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventCombobox.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventPanel.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ExplorerChart.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/FilterBuilder.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/GroupByPicker.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyCombobox.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyValueCombobox.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/use-explorer-config.ts +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +8 -6
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/EmailReportDialog.tsx +2 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +4 -6
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewSqlPopover.tsx +2 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +9 -7
- package/corpus/templates/analytics/app/pages/analyses/AnalysesList.tsx +3 -6
- package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +4 -4
- package/corpus/templates/analytics/app/pages/analyses/LegacyFusionAnalysis.tsx +2 -1
- package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +1 -11
- package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +2 -1
- package/corpus/templates/analytics/app/pages/monitoring/UptimePanel.tsx +1 -14
- package/corpus/templates/analytics/app/pages/monitoring/errors/IssueDetail.tsx +1 -1
- package/corpus/templates/analytics/app/pages/monitoring/errors/IssueList.tsx +1 -1
- package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +1 -6
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorDetail.tsx +1 -8
- package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +4 -10
- package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +1 -6
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPageEditor.tsx +4 -8
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPagesView.tsx +4 -10
- package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/i18n.ts +1 -6
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +5 -6
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +1 -1
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +5 -5
- package/corpus/templates/analytics/app/pages/settings/AlertRulesSettingsCard.tsx +2 -2
- package/corpus/templates/analytics/app/pages/settings/settings-search.ts +1 -1
- package/corpus/templates/analytics/app/root.tsx +6 -6
- package/corpus/templates/analytics/app/routes/agent.tsx +1 -1
- package/corpus/templates/analytics/app/routes/catalog.tsx +2 -2
- package/corpus/templates/analytics/app/routes/chart.tsx +1 -1
- package/corpus/templates/analytics/app/routes/status.$slug.tsx +1 -13
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/assets/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/assets/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/assets/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/corpus/templates/assets/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/assets/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +2 -1
- package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +3 -3
- package/corpus/templates/assets/app/components/layout/Header.tsx +3 -5
- package/corpus/templates/assets/app/components/layout/Layout.tsx +4 -4
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +6 -6
- package/corpus/templates/assets/app/components/library/CreateLibraryDialog.tsx +2 -2
- package/corpus/templates/assets/app/components/library/GenerationPresetsPanel.tsx +2 -1
- package/corpus/templates/assets/app/components/library/LibraryCard.tsx +1 -1
- package/corpus/templates/assets/app/components/library/LibraryPresetGrid.tsx +1 -1
- package/corpus/templates/assets/app/hooks/use-image-model-menu.ts +2 -2
- package/corpus/templates/assets/app/hooks/use-navigation-state.ts +3 -3
- package/corpus/templates/assets/app/i18n/index.ts +1 -1
- package/corpus/templates/assets/app/i18n-data.ts +1 -1
- package/corpus/templates/assets/app/lib/asset-urls.ts +1 -1
- package/corpus/templates/assets/app/lib/utils.ts +1 -1
- package/corpus/templates/assets/app/root.tsx +10 -9
- package/corpus/templates/assets/app/routes/_index.tsx +3 -3
- package/corpus/templates/assets/app/routes/agent.tsx +1 -1
- package/corpus/templates/assets/app/routes/asset.$id.tsx +3 -3
- package/corpus/templates/assets/app/routes/asset.$id_.embed.tsx +1 -1
- package/corpus/templates/assets/app/routes/audit.tsx +2 -2
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +6 -4
- package/corpus/templates/assets/app/routes/brand-kits.$id_.presets.$presetId.tsx +4 -4
- package/corpus/templates/assets/app/routes/brand-kits.$id_.settings.tsx +3 -3
- package/corpus/templates/assets/app/routes/library.tsx +13 -9
- package/corpus/templates/assets/app/routes/run.$id_.embed.tsx +1 -1
- package/corpus/templates/assets/app/routes/settings.tsx +11 -12
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/brain/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/templates/brain/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/brain/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/brain/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/brain/app/components/brain/CanonicalPreviewSheet.tsx +1 -1
- package/corpus/templates/brain/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +5 -5
- package/corpus/templates/brain/app/hooks/use-distillation-bridge.ts +3 -6
- package/corpus/templates/brain/app/hooks/use-navigation-state.ts +3 -4
- package/corpus/templates/brain/app/i18n/index.ts +1 -1
- package/corpus/templates/brain/app/i18n-data.ts +1 -1
- package/corpus/templates/brain/app/lib/utils.ts +1 -1
- package/corpus/templates/brain/app/root.tsx +10 -9
- package/corpus/templates/brain/app/routes/_index.tsx +2 -2
- package/corpus/templates/brain/app/routes/agent.tsx +1 -1
- package/corpus/templates/brain/app/routes/knowledge.tsx +2 -2
- package/corpus/templates/brain/app/routes/ops.tsx +2 -2
- package/corpus/templates/brain/app/routes/review.tsx +2 -2
- package/corpus/templates/brain/app/routes/search.tsx +2 -1
- package/corpus/templates/brain/app/routes/settings.tsx +8 -7
- package/corpus/templates/brain/app/routes/sources.tsx +2 -2
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/calendar/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/calendar/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/calendar/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/calendar/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/calendar/app/components/CloudUpgrade.tsx +1 -1
- package/corpus/templates/calendar/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/calendar/app/components/TimezoneCombobox.tsx +1 -1
- package/corpus/templates/calendar/app/components/booking/BookingConfirmation.tsx +1 -1
- package/corpus/templates/calendar/app/components/booking/BookingForm.tsx +2 -1
- package/corpus/templates/calendar/app/components/booking/TimeSlotPicker.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/AddCalendarDialog.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/ApolloPanel.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/AttendeeAutocomplete.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/CommandPalette.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +3 -5
- package/corpus/templates/calendar/app/components/calendar/DayView.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/DeleteEventDialog.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventCard.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventDescription.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/EventDialog.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/EventOptionControls.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +3 -3
- package/corpus/templates/calendar/app/components/calendar/GoogleSetupWizard.tsx +3 -5
- package/corpus/templates/calendar/app/components/calendar/GoogleSyncButton.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/GuestNotificationDialog.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/IntegrationsSidebar.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/KeyboardShortcutsHelp.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/PeopleSearchDialog.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +1 -1
- package/corpus/templates/calendar/app/components/calendar/WorkingLocationEditor.tsx +1 -1
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +3 -3
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +4 -6
- package/corpus/templates/calendar/app/hooks/use-apollo.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-attendee-timezones.ts +4 -1
- package/corpus/templates/calendar/app/hooks/use-availability.ts +4 -1
- package/corpus/templates/calendar/app/hooks/use-booking-links.ts +4 -1
- package/corpus/templates/calendar/app/hooks/use-bookings.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-db-status.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-events.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-external-calendars.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-google-auth.ts +2 -2
- package/corpus/templates/calendar/app/hooks/use-integrations.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-navigation-state.ts +3 -2
- package/corpus/templates/calendar/app/hooks/use-overlay-people.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-people.ts +1 -1
- package/corpus/templates/calendar/app/hooks/use-settings.ts +4 -1
- package/corpus/templates/calendar/app/hooks/use-view-preferences.ts +2 -1
- package/corpus/templates/calendar/app/hooks/use-zoom-auth.ts +2 -1
- package/corpus/templates/calendar/app/i18n/index.ts +1 -1
- package/corpus/templates/calendar/app/i18n-data.ts +1 -1
- package/corpus/templates/calendar/app/lib/api-path.ts +1 -1
- package/corpus/templates/calendar/app/lib/utils.ts +1 -1
- package/corpus/templates/calendar/app/pages/AvailabilitySettings.tsx +1 -1
- package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +3 -1
- package/corpus/templates/calendar/app/pages/BookingPage.tsx +2 -3
- package/corpus/templates/calendar/app/pages/BookingsList.tsx +1 -1
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +3 -5
- package/corpus/templates/calendar/app/pages/ManageBookingPage.tsx +1 -1
- package/corpus/templates/calendar/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/calendar/app/pages/Settings.tsx +9 -8
- package/corpus/templates/calendar/app/root.tsx +15 -9
- package/corpus/templates/calendar/app/routes/_app.agent.tsx +2 -1
- package/corpus/templates/calendar/app/routes/_app.settings.tsx +1 -1
- package/corpus/templates/calendar/app/routes/event.tsx +3 -3
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/chat/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/chat/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +4 -4
- package/corpus/templates/chat/app/hooks/use-navigation-state.ts +3 -4
- package/corpus/templates/chat/app/i18n/index.ts +1 -1
- package/corpus/templates/chat/app/i18n-data.ts +1 -1
- package/corpus/templates/chat/app/lib/utils.ts +1 -1
- package/corpus/templates/chat/app/root.tsx +10 -9
- package/corpus/templates/chat/app/routes/_index.tsx +2 -2
- package/corpus/templates/chat/app/routes/agent.tsx +10 -3
- package/corpus/templates/chat/app/routes/database.tsx +1 -1
- package/corpus/templates/chat/app/routes/observability.tsx +2 -1
- package/corpus/templates/chat/app/routes/settings.tsx +4 -5
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/clips/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/clips/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/clips/app/components/capture-install-options.tsx +2 -1
- package/corpus/templates/clips/app/components/dictate/vocabulary-section.tsx +2 -2
- package/corpus/templates/clips/app/components/editable-recording-title.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/chapters-editor.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/editor-layout.tsx +4 -14
- package/corpus/templates/clips/app/components/editor/editor-toolbar.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/split-button.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +3 -3
- package/corpus/templates/clips/app/components/editor/thumbnail-picker.tsx +2 -1
- package/corpus/templates/clips/app/components/editor/transcript-editor.tsx +1 -1
- package/corpus/templates/clips/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +1 -1
- package/corpus/templates/clips/app/components/library/create-folder-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/library/create-space-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/library/empty-state.tsx +1 -1
- package/corpus/templates/clips/app/components/library/folder-tree.tsx +1 -1
- package/corpus/templates/clips/app/components/library/library-grid.tsx +2 -2
- package/corpus/templates/clips/app/components/library/library-layout.tsx +6 -6
- package/corpus/templates/clips/app/components/library/organization-switcher.tsx +1 -1
- package/corpus/templates/clips/app/components/library/recording-card.tsx +1 -1
- package/corpus/templates/clips/app/components/library/search-bar.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/auto-record-prompt.tsx +1 -17
- package/corpus/templates/clips/app/components/meetings/canvas-editor.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/quick-ask-sidebar.tsx +2 -20
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +3 -1
- package/corpus/templates/clips/app/components/meetings/transcript-bubbles.tsx +1 -1
- package/corpus/templates/clips/app/components/player/access-password-prompt.tsx +1 -1
- package/corpus/templates/clips/app/components/player/captions-overlay.tsx +1 -1
- package/corpus/templates/clips/app/components/player/comments-panel.tsx +2 -1
- package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +2 -1
- package/corpus/templates/clips/app/components/player/insights-panel.tsx +2 -1
- package/corpus/templates/clips/app/components/player/player-controls.tsx +1 -1
- package/corpus/templates/clips/app/components/player/settings-panel.tsx +2 -2
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +3 -3
- package/corpus/templates/clips/app/components/player/sign-in-prompt-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/player/timestamped-comment-button.tsx +2 -1
- package/corpus/templates/clips/app/components/player/transcript-panel.tsx +3 -6
- package/corpus/templates/clips/app/components/player/video-player.tsx +3 -5
- package/corpus/templates/clips/app/components/recorder/camera-visualizer.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/countdown-overlay.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/microphone-visualizer.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +2 -1
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +3 -13
- package/corpus/templates/clips/app/components/recorder/recording-toolbar.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +3 -6
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +2 -2
- package/corpus/templates/clips/app/components/sharing/viewed-by-popover.tsx +2 -1
- package/corpus/templates/clips/app/components/workspace/branding-editor.tsx +3 -5
- package/corpus/templates/clips/app/components/workspace/engagement-chart.tsx +1 -1
- package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +3 -1
- package/corpus/templates/clips/app/components/workspace/invite-dialog.tsx +2 -1
- package/corpus/templates/clips/app/components/workspace/members-list.tsx +2 -1
- package/corpus/templates/clips/app/components/workspace/notifications-list.tsx +1 -1
- package/corpus/templates/clips/app/components/workspace/top-creators-table.tsx +1 -1
- package/corpus/templates/clips/app/entry.client.tsx +2 -4
- package/corpus/templates/clips/app/hooks/use-auto-title.ts +3 -17
- package/corpus/templates/clips/app/hooks/use-library.ts +4 -1
- package/corpus/templates/clips/app/hooks/use-navigation-state.ts +2 -1
- package/corpus/templates/clips/app/hooks/use-video-storage-status.ts +1 -1
- package/corpus/templates/clips/app/hooks/use-view-tracking.ts +1 -1
- package/corpus/templates/clips/app/i18n/index.ts +5 -5
- package/corpus/templates/clips/app/lib/camera-blur.ts +1 -1
- package/corpus/templates/clips/app/lib/capture-install-options.ts +1 -1
- package/corpus/templates/clips/app/lib/thumbnail-capture.ts +1 -1
- package/corpus/templates/clips/app/lib/utils.ts +1 -1
- package/corpus/templates/clips/app/root.tsx +13 -9
- package/corpus/templates/clips/app/routes/_app.agent.tsx +2 -1
- package/corpus/templates/clips/app/routes/_app.archive.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.dictate.tsx +2 -2
- package/corpus/templates/clips/app/routes/_app.extensions.$id.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.extensions._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.library._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.library.folder.$folderId.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +2 -2
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +3 -5
- package/corpus/templates/clips/app/routes/_app.notifications.tsx +2 -2
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +7 -7
- package/corpus/templates/clips/app/routes/_app.settings.organization.tsx +2 -1
- package/corpus/templates/clips/app/routes/_app.shared.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.spaces.$spaceId.folder.$folderId.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.spaces.$spaceId.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.spaces._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.trash.tsx +2 -1
- package/corpus/templates/clips/app/routes/_index.tsx +1 -1
- package/corpus/templates/clips/app/routes/bug-report.done.tsx +2 -1
- package/corpus/templates/clips/app/routes/bug-report.tsx +2 -1
- package/corpus/templates/clips/app/routes/download.tsx +2 -1
- package/corpus/templates/clips/app/routes/embed.$shareId.tsx +2 -1
- package/corpus/templates/clips/app/routes/invite.$token.tsx +2 -1
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +4 -5
- package/corpus/templates/clips/app/routes/record.tsx +4 -4
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +5 -6
- package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +3 -1
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/content/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/content/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/content/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/content/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/content/app/blocks/SourceComponentBlock.tsx +1 -1
- package/corpus/templates/content/app/blocks/contentBlockRegistry.tsx +1 -1
- package/corpus/templates/content/app/components/EmptyState.tsx +1 -1
- package/corpus/templates/content/app/components/QueryErrorState.tsx +1 -1
- package/corpus/templates/content/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +1 -1
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +3 -1
- package/corpus/templates/content/app/components/editor/ContentReferencePreview.tsx +1 -1
- package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +1 -1
- package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +7 -5
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +3 -6
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +7 -9
- package/corpus/templates/content/app/components/editor/EmojiPicker.tsx +1 -1
- package/corpus/templates/content/app/components/editor/LinkHoverPreview.tsx +1 -1
- package/corpus/templates/content/app/components/editor/NotionConflictBanner.tsx +1 -1
- package/corpus/templates/content/app/components/editor/NotionSyncBar.tsx +1 -1
- package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +2 -1
- package/corpus/templates/content/app/components/editor/TableHoverControls.tsx +1 -1
- package/corpus/templates/content/app/components/editor/VersionHistoryPanel.tsx +2 -1
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +6 -4
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +5 -6
- package/corpus/templates/content/app/components/editor/database/FormView.tsx +1 -1
- package/corpus/templates/content/app/components/editor/database/settings.tsx +2 -2
- package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +1 -1
- package/corpus/templates/content/app/components/editor/extensions/AudioBlock.tsx +2 -1
- package/corpus/templates/content/app/components/editor/extensions/CodeBlockNode.tsx +1 -1
- package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +2 -1
- package/corpus/templates/content/app/components/editor/extensions/LocalMdxComponentNode.tsx +1 -1
- package/corpus/templates/content/app/components/editor/extensions/VideoBlock.tsx +2 -1
- package/corpus/templates/content/app/components/editor/extensions/registryBlocks.ts +1 -1
- package/corpus/templates/content/app/components/editor/image-upload.ts +1 -1
- package/corpus/templates/content/app/components/editor/registrySlashItems.ts +1 -1
- package/corpus/templates/content/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/content/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +9 -9
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +1 -1
- package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +5 -1
- package/corpus/templates/content/app/entry.client.tsx +2 -4
- package/corpus/templates/content/app/hooks/use-comments.ts +4 -1
- package/corpus/templates/content/app/hooks/use-content-database.ts +4 -1
- package/corpus/templates/content/app/hooks/use-content-spaces.ts +4 -1
- package/corpus/templates/content/app/hooks/use-db-sync.ts +1 -1
- package/corpus/templates/content/app/hooks/use-document-properties.ts +4 -1
- package/corpus/templates/content/app/hooks/use-document-versions.ts +4 -1
- package/corpus/templates/content/app/hooks/use-documents.ts +4 -1
- package/corpus/templates/content/app/hooks/use-mention-members.ts +1 -1
- package/corpus/templates/content/app/hooks/use-navigation-state.ts +2 -1
- package/corpus/templates/content/app/hooks/use-notion.ts +2 -2
- package/corpus/templates/content/app/i18n/index.ts +1 -1
- package/corpus/templates/content/app/i18n-data.ts +1 -1
- package/corpus/templates/content/app/lib/local-control-resources.ts +1 -1
- package/corpus/templates/content/app/lib/utils.ts +1 -1
- package/corpus/templates/content/app/root.tsx +15 -9
- package/corpus/templates/content/app/routes/_app.agent.tsx +2 -1
- package/corpus/templates/content/app/routes/_app.local-files.tsx +2 -1
- package/corpus/templates/content/app/routes/_app.page.$id.tsx +1 -1
- package/corpus/templates/content/app/routes/_app.settings.tsx +4 -5
- package/corpus/templates/content/app/routes/p.$id.tsx +2 -1
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/design/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/design/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/design/app/components/QueryErrorState.tsx +1 -1
- package/corpus/templates/design/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/design/app/components/design/AutoLayoutSuggestionDialog.tsx +1 -1
- package/corpus/templates/design/app/components/design/BreakpointBar.tsx +1 -30
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +4 -3
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +4 -4
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +2 -5
- package/corpus/templates/design/app/components/design/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/components/design/EditPanel.tsx +2 -2
- package/corpus/templates/design/app/components/design/FusionAppBanner.tsx +4 -1
- package/corpus/templates/design/app/components/design/KeyboardShortcutsPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design/LocalhostWriteConsentDialog.tsx +1 -1
- package/corpus/templates/design/app/components/design/MotionDock.tsx +1 -19
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +2 -2
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +2 -2
- package/corpus/templates/design/app/components/design/ReadOnlyDesignBanner.tsx +1 -1
- package/corpus/templates/design/app/components/design/ReviewCommentsPanel.tsx +2 -2
- package/corpus/templates/design/app/components/design/ReviewPanel.tsx +1 -22
- package/corpus/templates/design/app/components/design/ReviewStatusControl.tsx +2 -2
- package/corpus/templates/design/app/components/design/StatesPanel.tsx +4 -14
- package/corpus/templates/design/app/components/design/TokensPanel.tsx +2 -17
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbench.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/editor/BufferSync.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/explorer/ExplorerView.tsx +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/workspace/inline-provider.ts +1 -1
- package/corpus/templates/design/app/components/design/code-workbench/workspace/localhost-provider.ts +1 -1
- package/corpus/templates/design/app/components/design/design-canvas/annotation-snapshot.ts +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +2 -2
- package/corpus/templates/design/app/components/design/edit-panel/effects-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/field-primitives.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/fill-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/frame-presets-panel.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/stroke-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/typography-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/inspector/BreakpointOverrideIndicator.tsx +1 -16
- package/corpus/templates/design/app/components/design/inspector/GlslShaderPanel.tsx +2 -34
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +2 -1
- package/corpus/templates/design/app/components/design/inspector/InteractionStatePanel.tsx +1 -25
- package/corpus/templates/design/app/components/design/inspector/MotionKeyframeDiamond.tsx +1 -30
- package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design-system/ProductionDesignSystemShowcase.tsx +1 -1
- package/corpus/templates/design/app/components/editor/FigmaLinkComposerBubble.tsx +1 -1
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -3
- package/corpus/templates/design/app/components/layout/Header.tsx +4 -4
- package/corpus/templates/design/app/components/layout/Layout.tsx +4 -5
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +4 -6
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +1 -1
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +1 -1
- package/corpus/templates/design/app/components/visual-editor/NodeRewriteProposal.tsx +2 -2
- package/corpus/templates/design/app/components/visual-editor/ReviewCanvasPins.tsx +3 -4
- package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +1 -1
- package/corpus/templates/design/app/hooks/use-agent-generating.ts +1 -1
- package/corpus/templates/design/app/hooks/use-design-system.ts +1 -1
- package/corpus/templates/design/app/hooks/use-design-systems.ts +1 -1
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +2 -2
- package/corpus/templates/design/app/hooks/use-question-flow.ts +1 -1
- package/corpus/templates/design/app/i18n/index.ts +1 -1
- package/corpus/templates/design/app/i18n-data.ts +1 -1
- package/corpus/templates/design/app/i18n-keyboard-shortcuts.ts +1 -1
- package/corpus/templates/design/app/lib/agent-chat.ts +1 -1
- package/corpus/templates/design/app/lib/design-save-outbox.ts +1 -1
- package/corpus/templates/design/app/lib/desktop-design-preview.ts +1 -1
- package/corpus/templates/design/app/lib/figma-connection.ts +2 -1
- package/corpus/templates/design/app/lib/figma-svg-copy.ts +1 -1
- package/corpus/templates/design/app/lib/pending-generation.ts +1 -1
- package/corpus/templates/design/app/lib/utils.ts +1 -1
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +4 -6
- package/corpus/templates/design/app/pages/DesignSystems.tsx +4 -4
- package/corpus/templates/design/app/pages/Index.tsx +5 -5
- package/corpus/templates/design/app/pages/NotFound.tsx +3 -5
- package/corpus/templates/design/app/pages/Present.tsx +7 -6
- package/corpus/templates/design/app/pages/Templates.tsx +4 -4
- package/corpus/templates/design/app/pages/VisualEdit.tsx +3 -1
- package/corpus/templates/design/app/pages/design-editor/editor-session.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/generation-prompt-directives.ts +1 -1
- package/corpus/templates/design/app/root.tsx +10 -9
- package/corpus/templates/design/app/routes/agent.tsx +2 -1
- package/corpus/templates/design/app/routes/observability.tsx +1 -1
- package/corpus/templates/design/app/routes/settings.tsx +4 -5
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/dispatch/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/dispatch/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +3 -4
- package/corpus/templates/dispatch/app/i18n/index.ts +1 -1
- package/corpus/templates/dispatch/app/i18n-data.ts +1 -1
- package/corpus/templates/dispatch/app/root.tsx +10 -9
- package/corpus/templates/dispatch/app/routes/agent.tsx +2 -1
- package/corpus/templates/dispatch/app/routes/integrations.tsx +3 -3
- package/corpus/templates/dispatch/app/routes/settings.tsx +4 -5
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/forms/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/forms/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/forms/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/forms/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/forms/app/components/CloudUpgrade.tsx +1 -1
- package/corpus/templates/forms/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/forms/app/components/builder/FieldPropertiesPanel.tsx +1 -1
- package/corpus/templates/forms/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/forms/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +5 -5
- package/corpus/templates/forms/app/hooks/use-db-status.ts +1 -1
- package/corpus/templates/forms/app/hooks/use-forms.ts +2 -2
- package/corpus/templates/forms/app/hooks/use-navigation-state.ts +3 -3
- package/corpus/templates/forms/app/hooks/use-responses.ts +1 -1
- package/corpus/templates/forms/app/i18n/index.ts +1 -1
- package/corpus/templates/forms/app/lib/utils.ts +1 -1
- package/corpus/templates/forms/app/pages/AskPage.tsx +2 -2
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +5 -6
- package/corpus/templates/forms/app/pages/FormFillPage.tsx +2 -1
- package/corpus/templates/forms/app/pages/FormsListPage.tsx +3 -6
- package/corpus/templates/forms/app/pages/ResponseInsightsPage.tsx +1 -1
- package/corpus/templates/forms/app/pages/ResponsesPage.tsx +1 -1
- package/corpus/templates/forms/app/root.tsx +15 -12
- package/corpus/templates/forms/app/routes/_app.agent.tsx +2 -1
- package/corpus/templates/forms/app/routes/_app.settings.tsx +4 -5
- package/corpus/templates/forms/app/routes/_index.tsx +1 -1
- package/corpus/templates/forms/app/routes/form-preview.tsx +5 -1
- package/corpus/templates/macros/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/macros/app/components/AddExerciseDialog.tsx +2 -1
- package/corpus/templates/macros/app/components/AddMealDialog.tsx +2 -1
- package/corpus/templates/macros/app/components/AddWeightDialog.tsx +2 -1
- package/corpus/templates/macros/app/components/DailyProgress.tsx +2 -1
- package/corpus/templates/macros/app/components/ExerciseCard.tsx +1 -1
- package/corpus/templates/macros/app/components/MealCard.tsx +1 -1
- package/corpus/templates/macros/app/components/QueryErrorState.tsx +1 -1
- package/corpus/templates/macros/app/components/VoiceDictation.tsx +2 -1
- package/corpus/templates/macros/app/components/WeeklyCaloriesChart.tsx +1 -1
- package/corpus/templates/macros/app/components/WeightCard.tsx +1 -1
- package/corpus/templates/macros/app/components/WeightTracker.tsx +2 -2
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +5 -8
- package/corpus/templates/macros/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/macros/app/i18n/index.ts +1 -1
- package/corpus/templates/macros/app/lib/api.ts +1 -1
- package/corpus/templates/macros/app/lib/utils.ts +1 -1
- package/corpus/templates/macros/app/root.tsx +10 -9
- package/corpus/templates/macros/app/routes/_index.tsx +2 -2
- package/corpus/templates/macros/app/routes/agent.tsx +2 -1
- package/corpus/templates/macros/app/routes/analytics.tsx +2 -1
- package/corpus/templates/macros/app/routes/settings.tsx +4 -5
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/mail/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/mail/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/mail/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/mail/.agents/skills/storing-data/SKILL.md +1 -1
- package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +3 -3
- package/corpus/templates/mail/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/mail/app/components/agent-engine-picker.tsx +2 -1
- package/corpus/templates/mail/app/components/email/AttachmentStrip.tsx +1 -1
- package/corpus/templates/mail/app/components/email/CodeBlockLangPicker.tsx +1 -1
- package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +1 -1
- package/corpus/templates/mail/app/components/email/ComposeEditor.tsx +1 -1
- package/corpus/templates/mail/app/components/email/ComposeModal.tsx +2 -1
- package/corpus/templates/mail/app/components/email/ComposeSlashMenu.tsx +1 -1
- package/corpus/templates/mail/app/components/email/EmailList.tsx +1 -1
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +1 -1
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +2 -1
- package/corpus/templates/mail/app/components/email/InlineReplyComposer.tsx +2 -1
- package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +2 -1
- package/corpus/templates/mail/app/components/email/MobileActionBar.tsx +1 -1
- package/corpus/templates/mail/app/components/email/RecipientInput.tsx +1 -1
- package/corpus/templates/mail/app/components/email/SendLaterButton.tsx +1 -1
- package/corpus/templates/mail/app/components/email/SnoozeModal.tsx +1 -1
- package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +1 -1
- package/corpus/templates/mail/app/components/email/extensions/ComposeImageBlock.tsx +1 -1
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +6 -6
- package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +2 -1
- package/corpus/templates/mail/app/components/layout/SearchBar.tsx +1 -1
- package/corpus/templates/mail/app/components/settings/GmailFiltersSection.tsx +1 -1
- package/corpus/templates/mail/app/components/settings/SnippetsSection.tsx +1 -1
- package/corpus/templates/mail/app/entry.client.tsx +1 -6
- package/corpus/templates/mail/app/hooks/use-aliases.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-apollo.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-automations.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-compose-state.ts +2 -2
- package/corpus/templates/mail/app/hooks/use-draft-queue.ts +4 -1
- package/corpus/templates/mail/app/hooks/use-emails.ts +3 -1
- package/corpus/templates/mail/app/hooks/use-gmail-filters.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-google-auth.ts +2 -1
- package/corpus/templates/mail/app/hooks/use-integrations.ts +2 -2
- package/corpus/templates/mail/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/mail/app/hooks/use-scheduled-jobs.ts +2 -2
- package/corpus/templates/mail/app/hooks/use-snippets.ts +1 -1
- package/corpus/templates/mail/app/i18n/index.ts +1 -1
- package/corpus/templates/mail/app/lib/agent-generate.ts +1 -1
- package/corpus/templates/mail/app/lib/gmail-mutation-queue.ts +1 -10
- package/corpus/templates/mail/app/lib/mcp-chat-bridge.ts +1 -1
- package/corpus/templates/mail/app/lib/thread-cache.ts +1 -1
- package/corpus/templates/mail/app/lib/upload.ts +1 -1
- package/corpus/templates/mail/app/lib/utils.ts +1 -1
- package/corpus/templates/mail/app/pages/DraftQueuePage.tsx +1 -1
- package/corpus/templates/mail/app/pages/InboxPage.tsx +1 -1
- package/corpus/templates/mail/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/mail/app/pages/SettingsPage.tsx +9 -8
- package/corpus/templates/mail/app/root.tsx +11 -8
- package/corpus/templates/mail/app/routes/agent.tsx +2 -1
- package/corpus/templates/mail/app/routes/email.tsx +5 -1
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/plan/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/templates/plan/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/plan/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/plan/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/plan/app/components/editor/PlanBlockNode.tsx +2 -2
- package/corpus/templates/plan/app/components/editor/PlanDocumentEditor.tsx +3 -3
- package/corpus/templates/plan/app/components/editor/planSlashCommands.ts +1 -1
- package/corpus/templates/plan/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/plan/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +8 -9
- package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +3 -5
- package/corpus/templates/plan/app/components/plan/GuestModeBanner.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/LocalCodebasePicker.tsx +2 -1
- package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +7 -5
- package/corpus/templates/plan/app/components/plan/PlanImageNode.tsx +2 -1
- package/corpus/templates/plan/app/components/plan/PlanImageViewer.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/PlanMarkdownEditor.tsx +3 -3
- package/corpus/templates/plan/app/components/plan/PlanMarkdownReader.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/PlanTableOfContents.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/PrototypeViewer.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/VisualAnswerInline.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/planBlocks.tsx +3 -5
- package/corpus/templates/plan/app/components/plan/wireframe/LegacyRegionWireframe.tsx +1 -1
- package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +1 -1
- package/corpus/templates/plan/app/hooks/use-navigation-state.ts +5 -3
- package/corpus/templates/plan/app/hooks/use-plan-presence.ts +2 -2
- package/corpus/templates/plan/app/hooks/use-plans.ts +4 -1
- package/corpus/templates/plan/app/i18n/ar-SA.ts +4 -0
- package/corpus/templates/plan/app/i18n/de-DE.ts +4 -0
- package/corpus/templates/plan/app/i18n/en-US.ts +4 -0
- package/corpus/templates/plan/app/i18n/es-ES.ts +4 -0
- package/corpus/templates/plan/app/i18n/fr-FR.ts +4 -0
- package/corpus/templates/plan/app/i18n/hi-IN.ts +4 -0
- package/corpus/templates/plan/app/i18n/index.ts +1 -1
- package/corpus/templates/plan/app/i18n/ja-JP.ts +4 -0
- package/corpus/templates/plan/app/i18n/ko-KR.ts +4 -0
- package/corpus/templates/plan/app/i18n/pt-BR.ts +4 -0
- package/corpus/templates/plan/app/i18n/zh-CN.ts +4 -0
- package/corpus/templates/plan/app/i18n/zh-TW.ts +4 -0
- package/corpus/templates/plan/app/lib/local-codebase-context.ts +1 -1
- package/corpus/templates/plan/app/lib/local-control-resources.ts +1 -1
- package/corpus/templates/plan/app/lib/plan-comment-editor-helpers.ts +1 -1
- package/corpus/templates/plan/app/lib/plan-local-bridge.ts +1 -1
- package/corpus/templates/plan/app/lib/register-chat-renderers.tsx +1 -1
- package/corpus/templates/plan/app/lib/utils.ts +1 -1
- package/corpus/templates/plan/app/pages/PlanChatPage.tsx +2 -2
- package/corpus/templates/plan/app/pages/PlansPage.tsx +13 -14
- package/corpus/templates/plan/app/root.tsx +11 -10
- package/corpus/templates/plan/app/routes/agent.tsx +2 -1
- package/corpus/templates/plan/app/routes/settings.tsx +4 -5
- package/corpus/templates/plan/shared/plan-doc.ts +2 -47
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/slides/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/slides/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/slides/app/components/CloudUpgrade.tsx +1 -1
- package/corpus/templates/slides/app/components/ThemeToggle.tsx +1 -1
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +2 -1
- package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +1 -1
- package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -1
- package/corpus/templates/slides/app/components/design-system/DesignSystemPreview.tsx +1 -1
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +5 -5
- package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/AssetLibraryPanel.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/BlockBubbleMenu.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +6 -6
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +6 -8
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/GeneratingOverlay.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/GoogleDocImportHint.tsx +3 -5
- package/corpus/templates/slides/app/components/editor/HistoryPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +3 -1
- package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/ImageOverlay.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/ImageSearchPanel.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/ImportButton.tsx +5 -1
- package/corpus/templates/slides/app/components/editor/LogoSearchPanel.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/MermaidToExcalidrawPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +3 -1
- package/corpus/templates/slides/app/components/editor/QuestionFlow.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/ShareDialog.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/SlideBubbleMenu.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +12 -8
- package/corpus/templates/slides/app/components/editor/SlideInlineEditor.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/SlideSlashMenu.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/TweaksPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +2 -1
- package/corpus/templates/slides/app/components/layout/Header.tsx +2 -1
- package/corpus/templates/slides/app/components/layout/Layout.tsx +2 -1
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +4 -6
- package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +1 -1
- package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +2 -1
- package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +1 -1
- package/corpus/templates/slides/app/components/visual-editor/MultiSelectChip.tsx +1 -1
- package/corpus/templates/slides/app/components/visual-editor/SaveStatusIndicator.tsx +1 -1
- package/corpus/templates/slides/app/context/DeckContext.tsx +5 -3
- package/corpus/templates/slides/app/entry.client.tsx +2 -4
- package/corpus/templates/slides/app/hooks/use-agent-generating.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-db-status.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-deck-design-system.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-deck-presence.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-deck-role.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-deck-versions.ts +4 -1
- package/corpus/templates/slides/app/hooks/use-design-systems.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-navigation-state.ts +1 -1
- package/corpus/templates/slides/app/hooks/use-slide-comments.ts +2 -2
- package/corpus/templates/slides/app/i18n/index.ts +1 -1
- package/corpus/templates/slides/app/lib/utils.ts +1 -1
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +5 -6
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -1
- package/corpus/templates/slides/app/pages/Index.tsx +4 -7
- package/corpus/templates/slides/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/slides/app/pages/Presentation.tsx +1 -1
- package/corpus/templates/slides/app/pages/SharedPresentation.tsx +2 -1
- package/corpus/templates/slides/app/root.tsx +13 -11
- package/corpus/templates/slides/app/routes/agent.tsx +2 -1
- package/corpus/templates/slides/app/routes/settings.tsx +4 -5
- package/corpus/templates/slides/app/routes/slide.tsx +3 -3
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +3 -3
- package/corpus/templates/tasks/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/corpus/templates/tasks/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/corpus/templates/tasks/.agents/skills/feature-flags/SKILL.md +1 -1
- package/corpus/templates/tasks/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/corpus/templates/tasks/app/components/custom-fields/FieldsList.tsx +1 -1
- package/corpus/templates/tasks/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/tasks/app/components/layout/Layout.tsx +4 -1
- package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +2 -1
- package/corpus/templates/tasks/app/components/shared/ListViewHeader.tsx +1 -1
- package/corpus/templates/tasks/app/components/tasks/TaskList.tsx +1 -1
- package/corpus/templates/tasks/app/hooks/use-custom-fields.ts +4 -1
- package/corpus/templates/tasks/app/hooks/use-inbox-items.ts +4 -1
- package/corpus/templates/tasks/app/hooks/use-navigation-state.ts +2 -1
- package/corpus/templates/tasks/app/hooks/use-tasks.ts +4 -1
- package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +4 -1
- package/corpus/templates/tasks/app/lib/utils.ts +1 -1
- package/corpus/templates/tasks/app/root.tsx +9 -7
- package/dist/cli/doctor.d.ts +4 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +57 -5
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/migration-codemod.d.ts +21 -0
- package/dist/cli/migration-codemod.d.ts.map +1 -0
- package/dist/cli/migration-codemod.js +363 -0
- package/dist/cli/migration-codemod.js.map +1 -0
- package/dist/cli/upgrade.d.ts +7 -0
- package/dist/cli/upgrade.d.ts.map +1 -1
- package/dist/cli/upgrade.js +52 -7
- package/dist/cli/upgrade.js.map +1 -1
- package/dist/client/agent-chat/index.d.ts +40 -0
- package/dist/client/agent-chat/index.d.ts.map +1 -0
- package/dist/client/agent-chat/index.js +39 -0
- package/dist/client/agent-chat/index.js.map +1 -0
- package/dist/client/agent-page/AgentContextTab.d.ts.map +1 -1
- package/dist/client/agent-page/AgentContextTab.js +3 -1
- package/dist/client/agent-page/AgentContextTab.js.map +1 -1
- package/dist/client/analytics/index.d.ts +3 -0
- package/dist/client/analytics/index.d.ts.map +1 -0
- package/dist/client/analytics/index.js +3 -0
- package/dist/client/analytics/index.js.map +1 -0
- package/dist/client/api-path.js +2 -2
- package/dist/client/api-path.js.map +1 -1
- package/dist/client/automation/index.d.ts +2 -0
- package/dist/client/automation/index.d.ts.map +1 -0
- package/dist/client/automation/index.js +2 -0
- package/dist/client/automation/index.js.map +1 -0
- package/dist/client/changelog/index.d.ts +2 -0
- package/dist/client/changelog/index.d.ts.map +1 -0
- package/dist/client/changelog/index.js +2 -0
- package/dist/client/changelog/index.js.map +1 -0
- package/dist/client/chat/widgets/InlineExtensionWidget.d.ts +1 -12
- package/dist/client/chat/widgets/InlineExtensionWidget.d.ts.map +1 -1
- package/dist/client/chat/widgets/InlineExtensionWidget.js +2 -66
- package/dist/client/chat/widgets/InlineExtensionWidget.js.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.d.ts.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.js +21 -8
- package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
- package/dist/client/chat/widgets/inline-extension-result.d.ts +14 -0
- package/dist/client/chat/widgets/inline-extension-result.d.ts.map +1 -0
- package/dist/client/chat/widgets/inline-extension-result.js +67 -0
- package/dist/client/chat/widgets/inline-extension-result.js.map +1 -0
- package/dist/client/client-bootstrap.d.ts +2 -0
- package/dist/client/client-bootstrap.d.ts.map +1 -0
- package/dist/client/client-bootstrap.js +7 -0
- package/dist/client/client-bootstrap.js.map +1 -0
- package/dist/client/context-xray/ContextXRayPanel.js +1 -1
- package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
- package/dist/client/hooks/index.d.ts +13 -0
- package/dist/client/hooks/index.d.ts.map +1 -0
- package/dist/client/hooks/index.js +13 -0
- package/dist/client/hooks/index.js.map +1 -0
- package/dist/client/host/index.d.ts +20 -0
- package/dist/client/host/index.d.ts.map +1 -0
- package/dist/client/host/index.js +18 -0
- package/dist/client/host/index.js.map +1 -0
- package/dist/client/index.d.ts +19 -100
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +19 -106
- package/dist/client/index.js.map +1 -1
- package/dist/client/navigation/index.d.ts +6 -0
- package/dist/client/navigation/index.d.ts.map +1 -0
- package/dist/client/navigation/index.js +6 -0
- package/dist/client/navigation/index.js.map +1 -0
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +2 -1
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/resources/index.d.ts +2 -1
- package/dist/client/resources/index.d.ts.map +1 -1
- package/dist/client/resources/index.js +1 -0
- package/dist/client/resources/index.js.map +1 -1
- package/dist/client/resources/use-resources.d.ts +0 -1
- package/dist/client/resources/use-resources.d.ts.map +1 -1
- package/dist/client/resources/use-resources.js +0 -17
- package/dist/client/resources/use-resources.js.map +1 -1
- package/dist/client/route-chunk-recovery/index.d.ts +2 -0
- package/dist/client/route-chunk-recovery/index.d.ts.map +1 -0
- package/dist/client/route-chunk-recovery/index.js +2 -0
- package/dist/client/route-chunk-recovery/index.js.map +1 -0
- package/dist/client/ui/index.d.ts +18 -0
- package/dist/client/ui/index.d.ts.map +1 -0
- package/dist/client/ui/index.js +18 -0
- package/dist/client/ui/index.js.map +1 -0
- package/dist/client/uploads/index.d.ts +2 -0
- package/dist/client/uploads/index.d.ts.map +1 -0
- package/dist/client/uploads/index.js +2 -0
- package/dist/client/uploads/index.js.map +1 -0
- package/dist/client/uploads/use-upload-resource.d.ts +3 -0
- package/dist/client/uploads/use-upload-resource.d.ts.map +1 -0
- package/dist/client/uploads/use-upload-resource.js +20 -0
- package/dist/client/uploads/use-upload-resource.js.map +1 -0
- package/dist/client/widgets/index.d.ts +3 -0
- package/dist/client/widgets/index.d.ts.map +1 -0
- package/dist/client/widgets/index.js +3 -0
- package/dist/client/widgets/index.js.map +1 -0
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/localization/default-messages.d.ts +2 -1
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +2 -1
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +1 -1
- package/dist/package-lifecycle/deprecated-imports.d.ts +15 -0
- package/dist/package-lifecycle/deprecated-imports.d.ts.map +1 -0
- package/dist/package-lifecycle/deprecated-imports.js +141 -0
- package/dist/package-lifecycle/deprecated-imports.js.map +1 -0
- package/dist/package-lifecycle/index.d.ts +5 -0
- package/dist/package-lifecycle/index.d.ts.map +1 -1
- package/dist/package-lifecycle/index.js +5 -0
- package/dist/package-lifecycle/index.js.map +1 -1
- package/dist/package-lifecycle/migration-manifest.d.ts +28 -0
- package/dist/package-lifecycle/migration-manifest.d.ts.map +1 -0
- package/dist/package-lifecycle/migration-manifest.js +102 -0
- package/dist/package-lifecycle/migration-manifest.js.map +1 -0
- package/dist/package-lifecycle/migration-message.d.ts +3 -0
- package/dist/package-lifecycle/migration-message.d.ts.map +1 -0
- package/dist/package-lifecycle/migration-message.js +5 -0
- package/dist/package-lifecycle/migration-message.js.map +1 -0
- package/dist/package-lifecycle/tombstone.d.ts +10 -0
- package/dist/package-lifecycle/tombstone.d.ts.map +1 -0
- package/dist/package-lifecycle/tombstone.js +23 -0
- package/dist/package-lifecycle/tombstone.js.map +1 -0
- package/dist/package-lifecycle/upgrade-error.d.ts +11 -0
- package/dist/package-lifecycle/upgrade-error.d.ts.map +1 -0
- package/dist/package-lifecycle/upgrade-error.js +11 -0
- package/dist/package-lifecycle/upgrade-error.js.map +1 -0
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +3 -3
- package/dist/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/dist/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/dist/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
- package/dist/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/dist/templates/chat/app/components/layout/Header.tsx +2 -1
- package/dist/templates/chat/app/components/layout/Layout.tsx +2 -2
- package/dist/templates/chat/app/components/layout/Sidebar.tsx +4 -4
- package/dist/templates/chat/app/hooks/use-navigation-state.ts +3 -4
- package/dist/templates/chat/app/i18n/index.ts +1 -1
- package/dist/templates/chat/app/i18n-data.ts +1 -1
- package/dist/templates/chat/app/lib/utils.ts +1 -1
- package/dist/templates/chat/app/root.tsx +10 -9
- package/dist/templates/chat/app/routes/_index.tsx +2 -2
- package/dist/templates/chat/app/routes/agent.tsx +10 -3
- package/dist/templates/chat/app/routes/database.tsx +1 -1
- package/dist/templates/chat/app/routes/observability.tsx +2 -1
- package/dist/templates/chat/app/routes/settings.tsx +4 -5
- package/dist/templates/default/.agents/skills/actions/SKILL.md +3 -3
- package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/dist/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/dist/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
- package/dist/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/dist/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
- package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/dist/templates/default/app/hooks/use-navigation-state.ts +2 -5
- package/dist/templates/default/app/i18n/index.ts +1 -1
- package/dist/templates/default/app/lib/utils.ts +1 -1
- package/dist/templates/default/app/root.tsx +8 -6
- package/dist/templates/default/app/routes/_index.tsx +2 -1
- package/dist/templates/default/app/routes/agent.tsx +2 -1
- package/dist/templates/default/app/routes/settings.tsx +2 -3
- package/dist/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
- package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
- package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
- package/dist/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/dist/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
- package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/dist/vite/action-types-plugin.d.ts.map +1 -1
- package/dist/vite/action-types-plugin.js +4 -0
- package/dist/vite/action-types-plugin.js.map +1 -1
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +35 -64
- package/dist/vite/client.js.map +1 -1
- package/docs/content/actions.mdx +2 -4
- package/docs/content/agent-surfaces.mdx +2 -4
- package/docs/content/audit-log.mdx +1 -2
- package/docs/content/authentication.mdx +3 -2
- package/docs/content/client.mdx +19 -18
- package/docs/content/components.mdx +1 -1
- package/docs/content/context-awareness.mdx +4 -7
- package/docs/content/creating-templates.mdx +7 -5
- package/docs/content/doctor.mdx +27 -6
- package/docs/content/drop-in-agent.mdx +6 -11
- package/docs/content/embedding-sdk.mdx +8 -10
- package/docs/content/getting-started.mdx +4 -2
- package/docs/content/internationalization.mdx +9 -6
- package/docs/content/key-concepts.mdx +2 -4
- package/docs/content/locales/ar-SA/actions.mdx +2 -4
- package/docs/content/locales/ar-SA/agent-surfaces.mdx +2 -4
- package/docs/content/locales/ar-SA/audit-log.mdx +1 -2
- package/docs/content/locales/ar-SA/authentication.mdx +3 -2
- package/docs/content/locales/ar-SA/client.mdx +19 -18
- package/docs/content/locales/ar-SA/components.mdx +1 -1
- package/docs/content/locales/ar-SA/context-awareness.mdx +4 -7
- package/docs/content/locales/ar-SA/creating-templates.mdx +7 -5
- package/docs/content/locales/ar-SA/doctor.mdx +10 -0
- package/docs/content/locales/ar-SA/drop-in-agent.mdx +6 -11
- package/docs/content/locales/ar-SA/embedding-sdk.mdx +8 -10
- package/docs/content/locales/ar-SA/internationalization.mdx +9 -6
- package/docs/content/locales/ar-SA/key-concepts.mdx +2 -4
- package/docs/content/locales/ar-SA/observability.mdx +1 -2
- package/docs/content/locales/ar-SA/package-lifecycle.mdx +6 -0
- package/docs/content/locales/ar-SA/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/ar-SA/sharing.mdx +1 -2
- package/docs/content/locales/ar-SA/template-chat.mdx +1 -2
- package/docs/content/locales/ar-SA/tracking.mdx +2 -4
- package/docs/content/locales/ar-SA/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/de-DE/actions.mdx +2 -4
- package/docs/content/locales/de-DE/agent-surfaces.mdx +2 -4
- package/docs/content/locales/de-DE/audit-log.mdx +1 -2
- package/docs/content/locales/de-DE/authentication.mdx +3 -2
- package/docs/content/locales/de-DE/client.mdx +19 -18
- package/docs/content/locales/de-DE/components.mdx +1 -1
- package/docs/content/locales/de-DE/context-awareness.mdx +4 -7
- package/docs/content/locales/de-DE/creating-templates.mdx +7 -5
- package/docs/content/locales/de-DE/doctor.mdx +10 -0
- package/docs/content/locales/de-DE/drop-in-agent.mdx +6 -11
- package/docs/content/locales/de-DE/embedding-sdk.mdx +8 -10
- package/docs/content/locales/de-DE/internationalization.mdx +9 -6
- package/docs/content/locales/de-DE/key-concepts.mdx +2 -4
- package/docs/content/locales/de-DE/observability.mdx +1 -2
- package/docs/content/locales/de-DE/package-lifecycle.mdx +6 -0
- package/docs/content/locales/de-DE/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/de-DE/sharing.mdx +1 -2
- package/docs/content/locales/de-DE/template-chat.mdx +1 -2
- package/docs/content/locales/de-DE/tracking.mdx +2 -4
- package/docs/content/locales/de-DE/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/es-ES/actions.mdx +2 -4
- package/docs/content/locales/es-ES/agent-surfaces.mdx +2 -4
- package/docs/content/locales/es-ES/audit-log.mdx +1 -2
- package/docs/content/locales/es-ES/authentication.mdx +3 -2
- package/docs/content/locales/es-ES/client.mdx +19 -18
- package/docs/content/locales/es-ES/components.mdx +1 -1
- package/docs/content/locales/es-ES/context-awareness.mdx +4 -7
- package/docs/content/locales/es-ES/creating-templates.mdx +7 -5
- package/docs/content/locales/es-ES/doctor.mdx +10 -0
- package/docs/content/locales/es-ES/drop-in-agent.mdx +6 -11
- package/docs/content/locales/es-ES/embedding-sdk.mdx +8 -10
- package/docs/content/locales/es-ES/internationalization.mdx +9 -6
- package/docs/content/locales/es-ES/key-concepts.mdx +2 -4
- package/docs/content/locales/es-ES/observability.mdx +1 -2
- package/docs/content/locales/es-ES/package-lifecycle.mdx +6 -0
- package/docs/content/locales/es-ES/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/es-ES/sharing.mdx +1 -2
- package/docs/content/locales/es-ES/template-chat.mdx +1 -2
- package/docs/content/locales/es-ES/tracking.mdx +2 -4
- package/docs/content/locales/es-ES/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/fr-FR/actions.mdx +2 -4
- package/docs/content/locales/fr-FR/agent-surfaces.mdx +2 -4
- package/docs/content/locales/fr-FR/audit-log.mdx +1 -2
- package/docs/content/locales/fr-FR/authentication.mdx +3 -2
- package/docs/content/locales/fr-FR/client.mdx +19 -18
- package/docs/content/locales/fr-FR/components.mdx +1 -1
- package/docs/content/locales/fr-FR/context-awareness.mdx +4 -7
- package/docs/content/locales/fr-FR/creating-templates.mdx +7 -5
- package/docs/content/locales/fr-FR/doctor.mdx +10 -0
- package/docs/content/locales/fr-FR/drop-in-agent.mdx +6 -11
- package/docs/content/locales/fr-FR/embedding-sdk.mdx +8 -10
- package/docs/content/locales/fr-FR/internationalization.mdx +9 -6
- package/docs/content/locales/fr-FR/key-concepts.mdx +2 -4
- package/docs/content/locales/fr-FR/observability.mdx +1 -2
- package/docs/content/locales/fr-FR/package-lifecycle.mdx +6 -0
- package/docs/content/locales/fr-FR/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/fr-FR/sharing.mdx +1 -2
- package/docs/content/locales/fr-FR/template-chat.mdx +1 -2
- package/docs/content/locales/fr-FR/tracking.mdx +2 -4
- package/docs/content/locales/fr-FR/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/hi-IN/actions.mdx +2 -4
- package/docs/content/locales/hi-IN/agent-surfaces.mdx +2 -4
- package/docs/content/locales/hi-IN/audit-log.mdx +1 -2
- package/docs/content/locales/hi-IN/authentication.mdx +3 -2
- package/docs/content/locales/hi-IN/client.mdx +19 -18
- package/docs/content/locales/hi-IN/components.mdx +1 -1
- package/docs/content/locales/hi-IN/context-awareness.mdx +4 -7
- package/docs/content/locales/hi-IN/creating-templates.mdx +7 -5
- package/docs/content/locales/hi-IN/doctor.mdx +10 -0
- package/docs/content/locales/hi-IN/drop-in-agent.mdx +6 -11
- package/docs/content/locales/hi-IN/embedding-sdk.mdx +8 -10
- package/docs/content/locales/hi-IN/internationalization.mdx +9 -6
- package/docs/content/locales/hi-IN/key-concepts.mdx +2 -4
- package/docs/content/locales/hi-IN/observability.mdx +1 -2
- package/docs/content/locales/hi-IN/package-lifecycle.mdx +6 -0
- package/docs/content/locales/hi-IN/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/hi-IN/sharing.mdx +1 -2
- package/docs/content/locales/hi-IN/template-chat.mdx +1 -2
- package/docs/content/locales/hi-IN/tracking.mdx +2 -4
- package/docs/content/locales/hi-IN/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/ja-JP/actions.mdx +2 -4
- package/docs/content/locales/ja-JP/agent-surfaces.mdx +2 -4
- package/docs/content/locales/ja-JP/audit-log.mdx +1 -2
- package/docs/content/locales/ja-JP/authentication.mdx +3 -2
- package/docs/content/locales/ja-JP/client.mdx +19 -18
- package/docs/content/locales/ja-JP/components.mdx +1 -1
- package/docs/content/locales/ja-JP/context-awareness.mdx +4 -7
- package/docs/content/locales/ja-JP/creating-templates.mdx +7 -5
- package/docs/content/locales/ja-JP/doctor.mdx +10 -0
- package/docs/content/locales/ja-JP/drop-in-agent.mdx +6 -11
- package/docs/content/locales/ja-JP/embedding-sdk.mdx +8 -10
- package/docs/content/locales/ja-JP/internationalization.mdx +9 -6
- package/docs/content/locales/ja-JP/key-concepts.mdx +2 -4
- package/docs/content/locales/ja-JP/observability.mdx +1 -2
- package/docs/content/locales/ja-JP/package-lifecycle.mdx +6 -0
- package/docs/content/locales/ja-JP/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/ja-JP/sharing.mdx +1 -2
- package/docs/content/locales/ja-JP/template-chat.mdx +1 -2
- package/docs/content/locales/ja-JP/tracking.mdx +2 -4
- package/docs/content/locales/ja-JP/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/ko-KR/actions.mdx +2 -4
- package/docs/content/locales/ko-KR/agent-surfaces.mdx +2 -4
- package/docs/content/locales/ko-KR/audit-log.mdx +1 -2
- package/docs/content/locales/ko-KR/authentication.mdx +3 -2
- package/docs/content/locales/ko-KR/client.mdx +19 -18
- package/docs/content/locales/ko-KR/components.mdx +1 -1
- package/docs/content/locales/ko-KR/context-awareness.mdx +4 -7
- package/docs/content/locales/ko-KR/creating-templates.mdx +7 -5
- package/docs/content/locales/ko-KR/doctor.mdx +10 -0
- package/docs/content/locales/ko-KR/drop-in-agent.mdx +6 -11
- package/docs/content/locales/ko-KR/embedding-sdk.mdx +8 -10
- package/docs/content/locales/ko-KR/internationalization.mdx +9 -6
- package/docs/content/locales/ko-KR/key-concepts.mdx +2 -4
- package/docs/content/locales/ko-KR/observability.mdx +1 -2
- package/docs/content/locales/ko-KR/package-lifecycle.mdx +6 -0
- package/docs/content/locales/ko-KR/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/ko-KR/sharing.mdx +1 -2
- package/docs/content/locales/ko-KR/template-chat.mdx +1 -2
- package/docs/content/locales/ko-KR/tracking.mdx +2 -4
- package/docs/content/locales/ko-KR/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/pt-BR/actions.mdx +2 -4
- package/docs/content/locales/pt-BR/agent-surfaces.mdx +2 -4
- package/docs/content/locales/pt-BR/audit-log.mdx +1 -2
- package/docs/content/locales/pt-BR/authentication.mdx +3 -2
- package/docs/content/locales/pt-BR/client.mdx +19 -18
- package/docs/content/locales/pt-BR/components.mdx +1 -1
- package/docs/content/locales/pt-BR/context-awareness.mdx +4 -7
- package/docs/content/locales/pt-BR/creating-templates.mdx +7 -5
- package/docs/content/locales/pt-BR/doctor.mdx +10 -0
- package/docs/content/locales/pt-BR/drop-in-agent.mdx +6 -11
- package/docs/content/locales/pt-BR/embedding-sdk.mdx +8 -10
- package/docs/content/locales/pt-BR/internationalization.mdx +9 -6
- package/docs/content/locales/pt-BR/key-concepts.mdx +2 -4
- package/docs/content/locales/pt-BR/observability.mdx +1 -2
- package/docs/content/locales/pt-BR/package-lifecycle.mdx +6 -0
- package/docs/content/locales/pt-BR/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/pt-BR/sharing.mdx +1 -2
- package/docs/content/locales/pt-BR/template-chat.mdx +1 -2
- package/docs/content/locales/pt-BR/tracking.mdx +2 -4
- package/docs/content/locales/pt-BR/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/zh-CN/actions.mdx +2 -4
- package/docs/content/locales/zh-CN/agent-surfaces.mdx +2 -4
- package/docs/content/locales/zh-CN/audit-log.mdx +1 -2
- package/docs/content/locales/zh-CN/authentication.mdx +3 -2
- package/docs/content/locales/zh-CN/client.mdx +19 -18
- package/docs/content/locales/zh-CN/components.mdx +1 -1
- package/docs/content/locales/zh-CN/context-awareness.mdx +4 -7
- package/docs/content/locales/zh-CN/creating-templates.mdx +7 -5
- package/docs/content/locales/zh-CN/doctor.mdx +10 -0
- package/docs/content/locales/zh-CN/drop-in-agent.mdx +6 -11
- package/docs/content/locales/zh-CN/embedding-sdk.mdx +8 -10
- package/docs/content/locales/zh-CN/internationalization.mdx +9 -6
- package/docs/content/locales/zh-CN/key-concepts.mdx +2 -4
- package/docs/content/locales/zh-CN/observability.mdx +1 -2
- package/docs/content/locales/zh-CN/package-lifecycle.mdx +6 -0
- package/docs/content/locales/zh-CN/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/zh-CN/sharing.mdx +1 -2
- package/docs/content/locales/zh-CN/template-chat.mdx +1 -2
- package/docs/content/locales/zh-CN/tracking.mdx +2 -4
- package/docs/content/locales/zh-CN/what-is-agent-native.mdx +1 -2
- package/docs/content/locales/zh-TW/actions.mdx +2 -4
- package/docs/content/locales/zh-TW/agent-surfaces.mdx +2 -4
- package/docs/content/locales/zh-TW/audit-log.mdx +1 -2
- package/docs/content/locales/zh-TW/authentication.mdx +3 -2
- package/docs/content/locales/zh-TW/client.mdx +19 -18
- package/docs/content/locales/zh-TW/components.mdx +1 -1
- package/docs/content/locales/zh-TW/context-awareness.mdx +4 -7
- package/docs/content/locales/zh-TW/creating-templates.mdx +7 -5
- package/docs/content/locales/zh-TW/doctor.mdx +10 -0
- package/docs/content/locales/zh-TW/drop-in-agent.mdx +6 -11
- package/docs/content/locales/zh-TW/embedding-sdk.mdx +8 -10
- package/docs/content/locales/zh-TW/internationalization.mdx +9 -6
- package/docs/content/locales/zh-TW/key-concepts.mdx +2 -4
- package/docs/content/locales/zh-TW/observability.mdx +1 -2
- package/docs/content/locales/zh-TW/package-lifecycle.mdx +6 -0
- package/docs/content/locales/zh-TW/real-time-collaboration.mdx +4 -7
- package/docs/content/locales/zh-TW/sharing.mdx +1 -2
- package/docs/content/locales/zh-TW/template-chat.mdx +1 -2
- package/docs/content/locales/zh-TW/tracking.mdx +2 -4
- package/docs/content/locales/zh-TW/what-is-agent-native.mdx +1 -2
- package/docs/content/observability.mdx +1 -2
- package/docs/content/package-lifecycle.mdx +29 -0
- package/docs/content/real-time-collaboration.mdx +8 -7
- package/docs/content/sharing.mdx +1 -2
- package/docs/content/template-chat.mdx +1 -2
- package/docs/content/toolkit-agent-ux.mdx +3 -2
- package/docs/content/toolkit-observability.mdx +1 -2
- package/docs/content/toolkit-settings.mdx +2 -2
- package/docs/content/toolkit-sharing.mdx +5 -2
- package/docs/content/tracking.mdx +2 -4
- package/docs/content/what-is-agent-native.mdx +1 -2
- package/migration-manifest.json +1492 -0
- package/package.json +23 -5
- package/src/templates/chat/.agents/skills/actions/SKILL.md +3 -3
- package/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/src/templates/chat/.agents/skills/feature-flags/SKILL.md +1 -1
- package/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/src/templates/chat/app/components/layout/Header.tsx +2 -1
- package/src/templates/chat/app/components/layout/Layout.tsx +2 -2
- package/src/templates/chat/app/components/layout/Sidebar.tsx +4 -4
- package/src/templates/chat/app/hooks/use-navigation-state.ts +3 -4
- package/src/templates/chat/app/i18n/index.ts +1 -1
- package/src/templates/chat/app/i18n-data.ts +1 -1
- package/src/templates/chat/app/lib/utils.ts +1 -1
- package/src/templates/chat/app/root.tsx +10 -9
- package/src/templates/chat/app/routes/_index.tsx +2 -2
- package/src/templates/chat/app/routes/agent.tsx +10 -3
- package/src/templates/chat/app/routes/database.tsx +1 -1
- package/src/templates/chat/app/routes/observability.tsx +2 -1
- package/src/templates/chat/app/routes/settings.tsx +4 -5
- package/src/templates/default/.agents/skills/actions/SKILL.md +3 -3
- package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/src/templates/default/.agents/skills/feature-flags/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/src/templates/default/.agents/skills/storing-data/SKILL.md +1 -1
- package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/src/templates/default/app/hooks/use-navigation-state.ts +2 -5
- package/src/templates/default/app/i18n/index.ts +1 -1
- package/src/templates/default/app/lib/utils.ts +1 -1
- package/src/templates/default/app/root.tsx +8 -6
- package/src/templates/default/app/routes/_index.tsx +2 -1
- package/src/templates/default/app/routes/agent.tsx +2 -1
- package/src/templates/default/app/routes/settings.tsx +2 -3
- package/src/templates/headless/.agents/skills/feature-flags/SKILL.md +1 -1
- package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +3 -3
- package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/client-methods/SKILL.md +10 -10
- package/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/src/templates/workspace-core/.agents/skills/feature-flags/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +4 -4
- package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +4 -4
- package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +1 -1
- package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +12 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/agent-chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,GAEhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,qBA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EACxB,mCAAmC,EACnC,4BAA4B,EAC5B,+BAA+B,GAIhC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,uBAAuB,EACvB,4BAA4B,GAG7B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,6BAA6B,GAI9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,kCAAkC,EAClC,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,kCAAkC,EAClC,oCAAoC,EACpC,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,GAOpB,MAAM,iCAAiC,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC","sourcesContent":["export {\n AgentAskPopover,\n type AgentAskPopoverProps,\n} from \"../AgentAskPopover.js\";\nexport {\n addContextToAgentChat,\n appendAgentChatContextToMessage,\n clearAgentChatContext,\n formatAgentChatContextItemsForPrompt,\n insertAgentComposerReference,\n listAgentChatContext,\n normalizeAgentComposerReference,\n refreshAgentChatContext,\n removeAgentChatContextItem,\n requestAgentChatThreadOpen,\n requestAgentTaskOpen,\n sendToAgentChat,\n sendToAgentChatAndConfirm,\n reportAgentChatSubmitResult,\n AGENT_CHAT_SUBMIT_RESULT_EVENT,\n parseSubmitChatMessage,\n setAgentChatContextItem,\n setContextToAgentChat,\n generateTabId,\n type ParsedSubmitChat,\n type AgentChatOpenTaskRequest,\n type AgentChatOpenThreadRequest,\n type AgentChatContextItem,\n type AgentChatContextMessage,\n type AgentChatContextMutationOptions,\n type AgentChatContextRemoveOptions,\n type AgentChatContextSetOptions,\n type AgentChatContextState,\n type AgentChatMessage,\n type AgentChatSubmitResult,\n type SendToAgentChatAndConfirmResult,\n type AgentComposerReference,\n type AgentComposerReferenceInsertOptions,\n type AgentComposerReferenceInsertPayload,\n} from \"../agent-chat.js\";\nexport {\n saveAgentEngineApiKey,\n saveAgentEngineProviderSettings,\n type AgentEngineProvider,\n type SaveAgentEngineApiKeyOptions,\n type SaveAgentEngineProviderSettingsOptions,\n} from \"../agent-engine-key.js\";\nexport { useAgentChatGenerating } from \"../use-agent-chat.js\";\nexport {\n useAgentChatContext,\n type UseAgentChatContextResult,\n} from \"../use-agent-chat-context.js\";\nexport { useCodeMode, useDevMode } from \"../use-dev-mode.js\";\nexport {\n codeAgentTranscriptEventsToContent,\n codeAgentTranscriptHasPendingApproval,\n createCodeAgentChatAdapter,\n type CodeAgentChatController,\n type CodeAgentChatControlResult,\n type CodeAgentChatFollowUpMode,\n type CodeAgentChatTranscriptEvent,\n type CreateCodeAgentChatAdapterOptions,\n} from \"../code-agent-chat-adapter.js\";\nexport {\n buildRepositoryFromCodeAgentTranscript,\n type BuildRepositoryFromCodeAgentTranscriptOptions,\n type CodeAgentThreadTranscriptEvent,\n} from \"../../agent/thread-data-builder.js\";\nexport {\n compareCodeAgentTranscriptEvents,\n getCodeAgentTranscriptSeq,\n isCodeAgentRunActive,\n mergeCodeAgentTranscriptEvents,\n type CodeAgentRunStateLike,\n type CodeAgentTranscriptOrderEvent,\n} from \"../../code-agents/transcript-order.js\";\nexport {\n CREDENTIAL_GAP_SIGNAL,\n isCredentialGapCodeAgentEvent,\n} from \"../../code-agents/transcript-normalizer.js\";\nexport { useSendToAgentChat } from \"../use-send-to-agent-chat.js\";\nexport {\n useChatModels,\n type UseChatModelsResult,\n type EngineModelGroup,\n} from \"../use-chat-models.js\";\nexport {\n CodeRequiredDialog,\n type CodeRequiredDialogProps,\n} from \"../components/CodeRequiredDialog.js\";\nexport {\n useAgentEngineConfigured,\n type AgentEngineConfiguredState,\n type UseAgentEngineConfiguredResult,\n} from \"../use-agent-engine-configured.js\";\nexport { BuilderSetupCard } from \"../chat/run-recovery.js\";\nexport {\n AgentConversation,\n AgentConversationMessageView,\n normalizeCodeAgentTranscriptForConversation,\n useNearBottomAutoscroll,\n type CodeAgentConversationTranscriptEvent,\n type CodeAgentConversationTranscriptEventType,\n type NormalizeCodeAgentTranscriptOptions,\n type AgentConversationArtifact,\n type AgentConversationAttachment,\n type AgentConversationMessage,\n type AgentConversationMessagePart,\n type AgentConversationMessageRole,\n type AgentConversationNotice,\n type AgentConversationNoticeTone,\n type AgentConversationToolCall,\n type AgentConversationToolState,\n} from \"../conversation/index.js\";\nexport { McpAppRenderer } from \"../mcp-apps/McpAppRenderer.js\";\nexport {\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n sendMcpAppHostMessage,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostChatMessage,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n} from \"../mcp-app-host.js\";\nexport {\n CodeAgentIndicator,\n type CodeAgentIndicatorProps,\n} from \"../components/CodeAgentIndicator.js\";\nexport {\n buildDynamicAgentSuggestions,\n dedupeSuggestions,\n mergeAgentSuggestions,\n normalizeAgentDynamicSuggestionsConfig,\n useAgentDynamicSuggestions,\n type AgentDynamicSuggestionContext,\n type AgentDynamicSuggestionsConfig,\n type AgentDynamicSuggestionsOption,\n} from \"../dynamic-suggestions.js\";\nexport {\n AssistantChat,\n clearChatStorage,\n type AssistantChatProps,\n type AssistantChatHandle,\n type AssistantChatAdapterContext,\n} from \"../AssistantChat.js\";\nexport {\n MultiTabAssistantChat,\n type MultiTabAssistantChatProps,\n type MultiTabAssistantChatHeaderProps,\n} from \"../MultiTabAssistantChat.js\";\nexport { RunStuckBanner, type RunStuckBannerProps } from \"../RunStuckBanner.js\";\nexport {\n KeepTabOpenNotice,\n type KeepTabOpenNoticeProps,\n} from \"../KeepTabOpenNotice.js\";\nexport {\n useRunStuckDetection,\n useAbortRun,\n type RunStuckState,\n type UseRunStuckDetectionOptions,\n} from \"../use-run-stuck-detection.js\";\nexport {\n createAgentChatAdapter,\n type AgentChatSurfaceKind,\n type CreateAgentChatAdapterOptions,\n} from \"../agent-chat-adapter.js\";\nexport {\n GuidedQuestionFlow,\n useGuidedQuestionFlow,\n askUserQuestion,\n formatGuidedAnswerValue,\n formatGuidedAnswersForAgent,\n getOtherGuidedAnswerText,\n hasGuidedAnswer,\n isOtherGuidedAnswer,\n makeOtherGuidedAnswer,\n normalizeGuidedAnswers,\n type AskUserQuestionInput,\n type AskUserQuestionOption,\n type AskUserQuestionResult,\n type GuidedQuestion,\n type GuidedQuestionAnswers,\n type GuidedQuestionFlowProps,\n type GuidedQuestionOption,\n type GuidedQuestionPayload,\n type GuidedQuestionType,\n type UseGuidedQuestionFlowOptions,\n} from \"../guided-questions.js\";\nexport {\n useChatThreads,\n type ChatThreadScope,\n type ChatThreadSnapshot,\n type ChatThreadSummary,\n type ChatThreadData,\n type ChatThreadShareLink,\n type ChatThreadShareState,\n type UseChatThreadsOptions,\n} from \"../use-chat-threads.js\";\nexport {\n ChatHistoryList,\n type ChatHistoryItem,\n type ChatHistorySection,\n type ChatHistoryListProps,\n} from \"../chat/ChatHistoryList.js\";\nexport { AgentChatHome, type AgentChatHomeProps } from \"../AgentChatHome.js\";\nexport {\n AgentChatSurface,\n AgentPanel,\n AgentSidebar,\n AgentToggleButton,\n focusAgentChat,\n type AgentChatSurfaceMode,\n type AgentChatSurfaceProps,\n type AgentPanelProps,\n type AgentSidebarProps,\n} from \"../AgentPanel.js\";\nexport {\n AgentTabsPage,\n type AgentPageExtraTabContext,\n type AgentPageExtraTabFactory,\n type AgentTabsPageProps,\n} from \"../agent-page/AgentTabsPage.js\";\nexport type { AgentPageScope, AgentPageTabProps } from \"../agent-page/types.js\";\nexport {\n AGENT_CHAT_HOME_HANDOFF_TTL_MS,\n AGENT_CHAT_VIEW_TRANSITION_CLASS,\n AGENT_CHAT_VIEW_TRANSITION_NAME,\n consumeAgentChatHomeHandoff,\n getAgentChatViewTransitionStyle,\n isAgentChatHomeHandoffActive,\n markAgentChatHomeHandoff,\n navigateWithAgentChatViewTransition,\n startAgentChatViewTransition,\n supportsAgentChatViewTransition,\n type AgentChatHomeHandoffOptions,\n type AgentChatViewTransition,\n type AgentChatViewTransitionOptions,\n} from \"../chat-view-transition.js\";\nexport {\n useAgentChatHomeHandoff,\n useAgentChatHomeHandoffLinks,\n type UseAgentChatHomeHandoffLinksOptions,\n type UseAgentChatHomeHandoffOptions,\n} from \"../use-agent-chat-home-handoff.js\";\nexport {\n requestAgentSidebarOpen,\n SIDEBAR_STATE_CHANGE_EVENT,\n setAgentSidebarOpenPreference,\n type AgentSidebarStateChangeDetail,\n type AgentSidebarStateMode,\n type AgentSidebarStateSource,\n} from \"../agent-sidebar-state.js\";\nexport {\n clearReservedToolRenderersForTests,\n clearToolRenderersForTests,\n registerActionChatRenderer,\n registerFallbackToolRenderer,\n registerReservedActionChatRenderer,\n registerReservedFallbackToolRenderer,\n registerReservedToolRenderer,\n registerToolRenderer,\n resolveToolRenderer,\n type ActionChatRendererRegistration,\n type ToolRendererComponent,\n type ToolRendererContext,\n type ToolRendererMatch,\n type ToolRendererProps,\n type ToolRendererRegistration,\n} from \"../chat/tool-render-registry.js\";\nexport * from \"../chat/connectors.js\";\nexport * from \"../chat/runtime.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentContextTab.d.ts","sourceRoot":"","sources":["../../../src/client/agent-page/AgentContextTab.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AASpD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,iBAAiB,EAAE,GAC3B,iBAAiB,GAAG,SAAS,CAM/B;AAkRD,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,+
|
|
1
|
+
{"version":3,"file":"AgentContextTab.d.ts","sourceRoot":"","sources":["../../../src/client/agent-page/AgentContextTab.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AASpD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,iBAAiB,EAAE,GAC3B,iBAAiB,GAAG,SAAS,CAM/B;AAkRD,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,+BA6K3D"}
|
|
@@ -169,7 +169,9 @@ export function AgentContextTab({ scope }) {
|
|
|
169
169
|
const preview = previewQuery.data;
|
|
170
170
|
const previewManifest = preview ? previewAsManifest(preview) : null;
|
|
171
171
|
const budget = resolveContextWindow(preview?.model);
|
|
172
|
-
const title = t("contextXray.
|
|
172
|
+
const title = t("contextXray.snapshotsTitle", {
|
|
173
|
+
defaultValue: "Snapshots",
|
|
174
|
+
});
|
|
173
175
|
const description = t("contextXray.headerDescription", {
|
|
174
176
|
defaultValue: "Inspect the latest combined snapshot of what the agent loaded and why.",
|
|
175
177
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentContextTab.js","sourceRoot":"","sources":["../../../src/client/agent-page/AgentContextTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAO1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAA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C,+BAA+B,aAC3C,YAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,oBAAW,GAAG,EAC9D,YAAY,CAAC,EAAE,IACZ,IACF,EACN,KAAC,YAAY,IAAC,QAAQ,EAAE,YAAY,CAAC,EAAE,GAAI,IACvC,EACN,KAAC,cAAc,IACb,QAAQ,EAAE,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EACzC,cAAc,EAAE,iBAAiB,CAAC,IAAI,CAAC,cAAc,GACrD,IACE,CACP,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,6FAA6F,YACzG,CAAC,CAAC,0BAA0B,EAAE;gCAC7B,YAAY,EAAE,2CAA2C;6BAC1D,CAAC,GACE,CACP,IACO,EAEV,mBAAS,SAAS,EAAC,2CAA2C,aAC5D,KAAC,cAAc,IAAC,SAAS,EAAC,8CAA8C,GAAG,EAC3E,eAAK,SAAS,EAAC,yCAAyC,aACtD,YAAG,SAAS,EAAC,6BAA6B,YACvC,CAAC,CAAC,gCAAgC,EAAE;wCACnC,YAAY,EACV,qDAAqD;qCACxD,CAAC,GACA,EACJ,sBACG,CAAC,CAAC,sCAAsC,EAAE;wCACzC,YAAY,EACV,mWAAmW;qCACtW,CAAC,GACA,IACA,IACE,IACN,GACQ,CACjB,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconChartTreemap,\n IconInfoCircle,\n IconList,\n IconLock,\n} from \"@tabler/icons-react\";\nimport { useMemo, useState } from \"react\";\n\nimport type {\n ContextManifest,\n ContextManifestSystemSection,\n ContextPreview,\n} from \"../../shared/context-xray.js\";\nimport { manifestConversationTokens } from \"../../shared/context-xray.js\";\nimport { ContextMeter } from \"../context-xray/ContextMeter.js\";\nimport { ContextTreemap } from \"../context-xray/ContextTreemap.js\";\nimport { formatTokens, resolveContextWindow } from \"../context-xray/format.js\";\nimport { useT } from \"../i18n.js\";\nimport { useActionQuery } from \"../use-action.js\";\nimport { useChatThreads, type ChatThreadSummary } from \"../use-chat-threads.js\";\nimport { cn } from \"../utils.js\";\nimport { AgentTabFrame } from \"./AgentTabFrame.js\";\nimport type { AgentPageTabProps } from \"./types.js\";\n\ntype PreviewQuery = {\n data?: ContextPreview;\n isLoading?: boolean;\n error?: unknown;\n};\ntype ManifestQuery = { data?: ContextManifest; isLoading?: boolean };\n\nexport function mostRecentlyUpdatedThread(\n threads: ChatThreadSummary[],\n): ChatThreadSummary | undefined {\n return threads.reduce<ChatThreadSummary | undefined>(\n (latest, thread) =>\n !latest || thread.updatedAt > latest.updatedAt ? thread : latest,\n undefined,\n );\n}\n\nconst PROVENANCE_ORDER = [\n \"framework-core\",\n \"actions-prompt\",\n \"enterprise-workspace-core\",\n \"template\",\n \"sql-workspace\",\n \"legacy-app-default\",\n \"organization\",\n \"personal\",\n \"memory\",\n \"db-schema\",\n \"tools\",\n \"model-overlay\",\n \"runtime-context\",\n] as const;\n\ntype Translate = (key: string, options?: Record<string, unknown>) => string;\n\nfunction provenanceLabel(\n provenance: ContextManifestSystemSection[\"provenance\"],\n t: Translate,\n): string {\n switch (provenance) {\n case \"framework-core\":\n return t(\"contextXray.provenance.frameworkCore\", {\n defaultValue: \"Framework\",\n });\n case \"actions-prompt\":\n return t(\"contextXray.provenance.actionsPrompt\", {\n defaultValue: \"Actions\",\n });\n case \"template\":\n return t(\"contextXray.provenance.template\", {\n defaultValue: \"Template\",\n });\n case \"enterprise-workspace-core\":\n return t(\"contextXray.provenance.enterpriseWorkspaceCore\", {\n defaultValue: \"Enterprise workspace core\",\n });\n case \"sql-workspace\":\n return t(\"contextXray.provenance.sqlWorkspace\", {\n defaultValue: \"Workspace\",\n });\n case \"legacy-app-default\":\n return t(\"contextXray.provenance.legacyAppDefault\", {\n defaultValue: \"App defaults\",\n });\n case \"organization\":\n return t(\"contextXray.provenance.organization\", {\n defaultValue: \"Organization\",\n });\n case \"personal\":\n return t(\"contextXray.provenance.personal\", {\n defaultValue: \"Personal\",\n });\n case \"memory\":\n return t(\"contextXray.provenance.memory\", {\n defaultValue: \"Memory\",\n });\n case \"db-schema\":\n return t(\"contextXray.provenance.dbSchema\", {\n defaultValue: \"SQL schema\",\n });\n case \"tools\":\n return t(\"contextXray.provenance.tools\", { defaultValue: \"Tools\" });\n case \"model-overlay\":\n return t(\"contextXray.provenance.modelOverlay\", {\n defaultValue: \"Model overlay\",\n });\n case \"runtime-context\":\n return t(\"contextXray.provenance.runtimeContext\", {\n defaultValue: \"Runtime context\",\n });\n }\n}\n\nfunction governanceLabel(\n governance: ContextManifestSystemSection[\"governance\"],\n t: Translate,\n): string {\n switch (governance) {\n case \"required\":\n return t(\"contextXray.governance.required\", {\n defaultValue: \"Required\",\n });\n case \"inherited\":\n return t(\"contextXray.governance.inherited\", {\n defaultValue: \"Inherited\",\n });\n case \"user\":\n return t(\"contextXray.governance.user\", {\n defaultValue: \"Your context\",\n });\n }\n}\n\nfunction sourceLabel(section: ContextManifestSystemSection): string {\n return (\n section.sourceRef?.path ??\n section.sourceRef?.resourceId ??\n section.sourceRef?.scope ??\n \"framework\"\n );\n}\n\nfunction previewAsManifest(preview: ContextPreview): ContextManifest {\n return {\n threadId: \"context-preview\",\n computedAt: preview.computedAt,\n ...(preview.model ? { model: preview.model } : {}),\n totalTokens: preview.totalTokens,\n rawTokens: preview.totalTokens,\n reclaimedTokens: 0,\n tokenCountMethod: preview.tokenCountMethod,\n conversationTokens: 0,\n systemTokens: preview.systemTokens,\n source: \"preview\",\n enforceable: false,\n segments: [],\n systemSections: preview.sections,\n };\n}\n\nfunction ContextSplitMeter({\n manifest,\n budget,\n}: {\n manifest: ContextManifest;\n budget: number;\n}) {\n const t = useT();\n const systemTokens = manifest.systemTokens ?? 0;\n const conversationTokens = manifestConversationTokens(manifest);\n const total = Math.max(1, systemTokens + conversationTokens);\n return (\n <div className=\"space-y-2\">\n <div className=\"flex h-2 overflow-hidden rounded-full bg-muted\">\n <div\n className=\"bg-slate-700 dark:bg-slate-400\"\n style={{ width: `${(systemTokens / total) * 100}%` }}\n />\n <div\n className=\"bg-sky-500\"\n style={{ width: `${(conversationTokens / total) * 100}%` }}\n />\n </div>\n <div className=\"flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground\">\n <span>\n <span className=\"mr-1.5 inline-block size-2 rounded-full bg-slate-700 dark:bg-slate-400\" />\n {t(\"contextXray.system\", { defaultValue: \"System\" })}{\" \"}\n {formatTokens(systemTokens)}\n </span>\n <span>\n <span className=\"mr-1.5 inline-block size-2 rounded-full bg-sky-500\" />\n {t(\"contextXray.conversation\", { defaultValue: \"Conversation\" })}{\" \"}\n {formatTokens(conversationTokens)}\n </span>\n <span>\n {formatTokens(Math.max(0, budget - manifest.totalTokens))}{\" \"}\n {t(\"contextXray.free\", { defaultValue: \"free\" })}\n </span>\n </div>\n </div>\n );\n}\n\nfunction SystemSectionList({\n sections,\n totalTokens,\n}: {\n sections: ContextManifestSystemSection[];\n totalTokens: number;\n}) {\n const t = useT();\n const grouped = useMemo(() => {\n const map = new Map<\n ContextManifestSystemSection[\"provenance\"],\n ContextManifestSystemSection[]\n >();\n for (const section of sections) {\n const items = map.get(section.provenance) ?? [];\n items.push(section);\n map.set(section.provenance, items);\n }\n return PROVENANCE_ORDER.flatMap((provenance) => {\n const items = map.get(provenance);\n return items && items.length > 0 ? [{ provenance, items }] : [];\n });\n }, [sections]);\n\n return (\n <div className=\"space-y-4\">\n {grouped.map((group) => {\n const tokens = group.items.reduce(\n (sum, item) => sum + item.tokenCount,\n 0,\n );\n return (\n <section key={group.provenance}>\n <div className=\"mb-1 flex items-center justify-between gap-3\">\n <div className=\"flex min-w-0 items-center gap-2\">\n <span className=\"size-2 rounded-full bg-indigo-500\" />\n <h3 className=\"truncate text-sm font-medium\">\n {provenanceLabel(group.provenance, t)}\n </h3>\n <span className=\"text-[11px] text-muted-foreground\">\n {governanceLabel(\n group.items[0]?.governance ?? \"inherited\",\n t,\n )}\n </span>\n </div>\n <span className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {formatTokens(tokens)} ·{\" \"}\n {totalTokens > 0 ? Math.round((tokens / totalTokens) * 100) : 0}\n %\n </span>\n </div>\n <div className=\"divide-y divide-border/60 border-y border-border/60\">\n {group.items\n .slice()\n .sort((a, b) => b.tokenCount - a.tokenCount)\n .map((section) => (\n <div\n key={section.segmentId}\n className=\"flex gap-3 px-3 py-2.5\"\n >\n <IconLock className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-baseline justify-between gap-3\">\n <div className=\"truncate text-sm font-medium\">\n {section.label}\n </div>\n <div className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {formatTokens(section.tokenCount)} ·{\" \"}\n {totalTokens > 0\n ? Math.round(\n (section.tokenCount / totalTokens) * 100,\n )\n : 0}\n %\n </div>\n </div>\n <div className=\"truncate text-xs text-muted-foreground\">\n {sourceLabel(section)}\n {section.tokenMethod === \"estimate\"\n ? \" · estimated\"\n : \"\"}\n </div>\n {section.preview ? (\n <div className=\"mt-1 line-clamp-2 text-xs text-muted-foreground/80\">\n {section.preview}\n </div>\n ) : null}\n </div>\n </div>\n ))}\n </div>\n </section>\n );\n })}\n {grouped.length === 0 ? (\n <div className=\"rounded-md border border-dashed border-border p-6 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.noSystemContext\", {\n defaultValue: \"No system context is available for this scope yet.\",\n })}\n </div>\n ) : null}\n </div>\n );\n}\n\nexport function AgentContextTab({ scope }: AgentPageTabProps) {\n const t = useT();\n const [view, setView] = useState<\"list\" | \"map\">(\"list\");\n const previewQuery = useActionQuery(\n \"context-preview-get\",\n { scope },\n { staleTime: 5_000 },\n ) as PreviewQuery;\n const threads = useChatThreads(undefined, \"agent-context-page\", null, {\n autoCreate: false,\n restoreActiveThread: false,\n });\n const latestThread = mostRecentlyUpdatedThread(threads.threads);\n const liveManifestQuery = useActionQuery(\n \"context-manifest-get\",\n latestThread ? { threadId: latestThread.id } : undefined,\n { enabled: Boolean(latestThread), staleTime: 1_000 },\n ) as ManifestQuery;\n const preview = previewQuery.data;\n const previewManifest = preview ? previewAsManifest(preview) : null;\n const budget = resolveContextWindow(preview?.model);\n const title = t(\"contextXray.pageTitle\", { defaultValue: \"Snapshots\" });\n const description = t(\"contextXray.headerDescription\", {\n defaultValue:\n \"Inspect the latest combined snapshot of what the agent loaded and why.\",\n });\n\n return (\n <AgentTabFrame\n title={title}\n description={description}\n actions={\n previewManifest ? (\n <ContextMeter manifest={previewManifest} enabled />\n ) : null\n }\n >\n <div className=\"space-y-7\">\n {previewManifest ? (\n <ContextSplitMeter manifest={previewManifest} budget={budget} />\n ) : null}\n\n <section className=\"space-y-4\">\n <div className=\"flex justify-end\">\n <div className=\"inline-flex rounded-md bg-muted/50 p-0.5\">\n <button\n type=\"button\"\n onClick={() => setView(\"list\")}\n className={cn(\n \"flex cursor-pointer items-center gap-1.5 rounded px-2.5 py-1.5 text-xs\",\n view === \"list\"\n ? \"bg-background text-foreground shadow-sm\"\n : \"text-muted-foreground\",\n )}\n >\n <IconList className=\"size-3.5\" />\n {t(\"contextXray.list\", { defaultValue: \"List\" })}\n </button>\n <button\n type=\"button\"\n onClick={() => setView(\"map\")}\n className={cn(\n \"flex cursor-pointer items-center gap-1.5 rounded px-2.5 py-1.5 text-xs\",\n view === \"map\"\n ? \"bg-background text-foreground shadow-sm\"\n : \"text-muted-foreground\",\n )}\n >\n <IconChartTreemap className=\"size-3.5\" />\n {t(\"contextXray.treemap\", { defaultValue: \"Treemap\" })}\n </button>\n </div>\n </div>\n {previewQuery.isLoading ? (\n <div className=\"rounded-md border border-border/60 p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.loadingPreview\", {\n defaultValue: \"Loading recent snapshot…\",\n })}\n </div>\n ) : previewQuery.error ? (\n <div className=\"rounded-md border border-dashed border-border p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.previewUnavailable\", {\n defaultValue: \"A recent snapshot is not available yet.\",\n })}\n </div>\n ) : previewManifest ? (\n view === \"map\" ? (\n <ContextTreemap\n segments={[]}\n systemSections={previewManifest.systemSections}\n />\n ) : (\n <SystemSectionList\n sections={previewManifest.systemSections ?? []}\n totalTokens={previewManifest.totalTokens}\n />\n )\n ) : (\n <div className=\"rounded-md border border-dashed border-border p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.noPreview\", {\n defaultValue:\n \"No recent snapshot is available for this scope yet.\",\n })}\n </div>\n )}\n </section>\n\n <section className=\"space-y-3\">\n <div>\n <h2 className=\"text-lg font-semibold\">\n {t(\"contextXray.liveThread\", { defaultValue: \"Live thread\" })}\n </h2>\n <p className=\"text-sm text-muted-foreground\">\n {t(\"contextXray.liveThreadDescription\", {\n defaultValue:\n \"The latest thread snapshot, when one exists. This is a single current snapshot, not an append-only history.\",\n })}\n </p>\n </div>\n {latestThread && liveManifestQuery.data ? (\n <div className=\"space-y-3 border-y border-border/60 py-4\">\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <div className=\"min-w-0\">\n <div className=\"truncate text-sm font-medium\">\n {latestThread.title ||\n latestThread.preview ||\n t(\"contextXray.latestThread\", {\n defaultValue: \"Latest thread\",\n })}\n </div>\n <div className=\"text-xs text-muted-foreground\">\n {formatTokens(liveManifestQuery.data.totalTokens)} tokens ·{\" \"}\n {latestThread.id}\n </div>\n </div>\n <ContextMeter threadId={latestThread.id} />\n </div>\n <ContextTreemap\n segments={liveManifestQuery.data.segments}\n systemSections={liveManifestQuery.data.systemSections}\n />\n </div>\n ) : (\n <div className=\"rounded-md border border-dashed border-border p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.noLiveThread\", {\n defaultValue: \"No live thread snapshot is available yet.\",\n })}\n </div>\n )}\n </section>\n\n <section className=\"flex gap-3 border-t border-border/70 pt-5\">\n <IconInfoCircle className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n <div className=\"space-y-1 text-sm text-muted-foreground\">\n <p className=\"font-medium text-foreground\">\n {t(\"contextXray.orderedTokensTitle\", {\n defaultValue:\n \"Snapshots show ordered tokens, not weighted tokens.\",\n })}\n </p>\n <p>\n {t(\"contextXray.orderedTokensDescription\", {\n defaultValue:\n \"Required framework and enterprise policy come first, followed by inherited template, workspace, and organization instructions. Personal instructions and memory arrive later and can narrow or override earlier guidance where the prompt permits. These system sections are not evictable; only run-local conversation segments support pin, evict, and restore.\",\n })}\n </p>\n </div>\n </section>\n </div>\n </AgentTabFrame>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AgentContextTab.js","sourceRoot":"","sources":["../../../src/client/agent-page/AgentContextTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAO1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAA0B,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAUnD,MAAM,UAAU,yBAAyB,CACvC,OAA4B;IAE5B,OAAO,OAAO,CAAC,MAAM,CACnB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,CACjB,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAClE,SAAS,CACV,CAAC;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D,CAAC,GACE,CACP,IACO,EAEV,mBAAS,SAAS,EAAC,2CAA2C,aAC5D,KAAC,cAAc,IAAC,SAAS,EAAC,8CAA8C,GAAG,EAC3E,eAAK,SAAS,EAAC,yCAAyC,aACtD,YAAG,SAAS,EAAC,6BAA6B,YACvC,CAAC,CAAC,gCAAgC,EAAE;wCACnC,YAAY,EACV,qDAAqD;qCACxD,CAAC,GACA,EACJ,sBACG,CAAC,CAAC,sCAAsC,EAAE;wCACzC,YAAY,EACV,mWAAmW;qCACtW,CAAC,GACA,IACA,IACE,IACN,GACQ,CACjB,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconChartTreemap,\n IconInfoCircle,\n IconList,\n IconLock,\n} from \"@tabler/icons-react\";\nimport { useMemo, useState } from \"react\";\n\nimport type {\n ContextManifest,\n ContextManifestSystemSection,\n ContextPreview,\n} from \"../../shared/context-xray.js\";\nimport { manifestConversationTokens } from \"../../shared/context-xray.js\";\nimport { ContextMeter } from \"../context-xray/ContextMeter.js\";\nimport { ContextTreemap } from \"../context-xray/ContextTreemap.js\";\nimport { formatTokens, resolveContextWindow } from \"../context-xray/format.js\";\nimport { useT } from \"../i18n.js\";\nimport { useActionQuery } from \"../use-action.js\";\nimport { useChatThreads, type ChatThreadSummary } from \"../use-chat-threads.js\";\nimport { cn } from \"../utils.js\";\nimport { AgentTabFrame } from \"./AgentTabFrame.js\";\nimport type { AgentPageTabProps } from \"./types.js\";\n\ntype PreviewQuery = {\n data?: ContextPreview;\n isLoading?: boolean;\n error?: unknown;\n};\ntype ManifestQuery = { data?: ContextManifest; isLoading?: boolean };\n\nexport function mostRecentlyUpdatedThread(\n threads: ChatThreadSummary[],\n): ChatThreadSummary | undefined {\n return threads.reduce<ChatThreadSummary | undefined>(\n (latest, thread) =>\n !latest || thread.updatedAt > latest.updatedAt ? thread : latest,\n undefined,\n );\n}\n\nconst PROVENANCE_ORDER = [\n \"framework-core\",\n \"actions-prompt\",\n \"enterprise-workspace-core\",\n \"template\",\n \"sql-workspace\",\n \"legacy-app-default\",\n \"organization\",\n \"personal\",\n \"memory\",\n \"db-schema\",\n \"tools\",\n \"model-overlay\",\n \"runtime-context\",\n] as const;\n\ntype Translate = (key: string, options?: Record<string, unknown>) => string;\n\nfunction provenanceLabel(\n provenance: ContextManifestSystemSection[\"provenance\"],\n t: Translate,\n): string {\n switch (provenance) {\n case \"framework-core\":\n return t(\"contextXray.provenance.frameworkCore\", {\n defaultValue: \"Framework\",\n });\n case \"actions-prompt\":\n return t(\"contextXray.provenance.actionsPrompt\", {\n defaultValue: \"Actions\",\n });\n case \"template\":\n return t(\"contextXray.provenance.template\", {\n defaultValue: \"Template\",\n });\n case \"enterprise-workspace-core\":\n return t(\"contextXray.provenance.enterpriseWorkspaceCore\", {\n defaultValue: \"Enterprise workspace core\",\n });\n case \"sql-workspace\":\n return t(\"contextXray.provenance.sqlWorkspace\", {\n defaultValue: \"Workspace\",\n });\n case \"legacy-app-default\":\n return t(\"contextXray.provenance.legacyAppDefault\", {\n defaultValue: \"App defaults\",\n });\n case \"organization\":\n return t(\"contextXray.provenance.organization\", {\n defaultValue: \"Organization\",\n });\n case \"personal\":\n return t(\"contextXray.provenance.personal\", {\n defaultValue: \"Personal\",\n });\n case \"memory\":\n return t(\"contextXray.provenance.memory\", {\n defaultValue: \"Memory\",\n });\n case \"db-schema\":\n return t(\"contextXray.provenance.dbSchema\", {\n defaultValue: \"SQL schema\",\n });\n case \"tools\":\n return t(\"contextXray.provenance.tools\", { defaultValue: \"Tools\" });\n case \"model-overlay\":\n return t(\"contextXray.provenance.modelOverlay\", {\n defaultValue: \"Model overlay\",\n });\n case \"runtime-context\":\n return t(\"contextXray.provenance.runtimeContext\", {\n defaultValue: \"Runtime context\",\n });\n }\n}\n\nfunction governanceLabel(\n governance: ContextManifestSystemSection[\"governance\"],\n t: Translate,\n): string {\n switch (governance) {\n case \"required\":\n return t(\"contextXray.governance.required\", {\n defaultValue: \"Required\",\n });\n case \"inherited\":\n return t(\"contextXray.governance.inherited\", {\n defaultValue: \"Inherited\",\n });\n case \"user\":\n return t(\"contextXray.governance.user\", {\n defaultValue: \"Your context\",\n });\n }\n}\n\nfunction sourceLabel(section: ContextManifestSystemSection): string {\n return (\n section.sourceRef?.path ??\n section.sourceRef?.resourceId ??\n section.sourceRef?.scope ??\n \"framework\"\n );\n}\n\nfunction previewAsManifest(preview: ContextPreview): ContextManifest {\n return {\n threadId: \"context-preview\",\n computedAt: preview.computedAt,\n ...(preview.model ? { model: preview.model } : {}),\n totalTokens: preview.totalTokens,\n rawTokens: preview.totalTokens,\n reclaimedTokens: 0,\n tokenCountMethod: preview.tokenCountMethod,\n conversationTokens: 0,\n systemTokens: preview.systemTokens,\n source: \"preview\",\n enforceable: false,\n segments: [],\n systemSections: preview.sections,\n };\n}\n\nfunction ContextSplitMeter({\n manifest,\n budget,\n}: {\n manifest: ContextManifest;\n budget: number;\n}) {\n const t = useT();\n const systemTokens = manifest.systemTokens ?? 0;\n const conversationTokens = manifestConversationTokens(manifest);\n const total = Math.max(1, systemTokens + conversationTokens);\n return (\n <div className=\"space-y-2\">\n <div className=\"flex h-2 overflow-hidden rounded-full bg-muted\">\n <div\n className=\"bg-slate-700 dark:bg-slate-400\"\n style={{ width: `${(systemTokens / total) * 100}%` }}\n />\n <div\n className=\"bg-sky-500\"\n style={{ width: `${(conversationTokens / total) * 100}%` }}\n />\n </div>\n <div className=\"flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground\">\n <span>\n <span className=\"mr-1.5 inline-block size-2 rounded-full bg-slate-700 dark:bg-slate-400\" />\n {t(\"contextXray.system\", { defaultValue: \"System\" })}{\" \"}\n {formatTokens(systemTokens)}\n </span>\n <span>\n <span className=\"mr-1.5 inline-block size-2 rounded-full bg-sky-500\" />\n {t(\"contextXray.conversation\", { defaultValue: \"Conversation\" })}{\" \"}\n {formatTokens(conversationTokens)}\n </span>\n <span>\n {formatTokens(Math.max(0, budget - manifest.totalTokens))}{\" \"}\n {t(\"contextXray.free\", { defaultValue: \"free\" })}\n </span>\n </div>\n </div>\n );\n}\n\nfunction SystemSectionList({\n sections,\n totalTokens,\n}: {\n sections: ContextManifestSystemSection[];\n totalTokens: number;\n}) {\n const t = useT();\n const grouped = useMemo(() => {\n const map = new Map<\n ContextManifestSystemSection[\"provenance\"],\n ContextManifestSystemSection[]\n >();\n for (const section of sections) {\n const items = map.get(section.provenance) ?? [];\n items.push(section);\n map.set(section.provenance, items);\n }\n return PROVENANCE_ORDER.flatMap((provenance) => {\n const items = map.get(provenance);\n return items && items.length > 0 ? [{ provenance, items }] : [];\n });\n }, [sections]);\n\n return (\n <div className=\"space-y-4\">\n {grouped.map((group) => {\n const tokens = group.items.reduce(\n (sum, item) => sum + item.tokenCount,\n 0,\n );\n return (\n <section key={group.provenance}>\n <div className=\"mb-1 flex items-center justify-between gap-3\">\n <div className=\"flex min-w-0 items-center gap-2\">\n <span className=\"size-2 rounded-full bg-indigo-500\" />\n <h3 className=\"truncate text-sm font-medium\">\n {provenanceLabel(group.provenance, t)}\n </h3>\n <span className=\"text-[11px] text-muted-foreground\">\n {governanceLabel(\n group.items[0]?.governance ?? \"inherited\",\n t,\n )}\n </span>\n </div>\n <span className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {formatTokens(tokens)} ·{\" \"}\n {totalTokens > 0 ? Math.round((tokens / totalTokens) * 100) : 0}\n %\n </span>\n </div>\n <div className=\"divide-y divide-border/60 border-y border-border/60\">\n {group.items\n .slice()\n .sort((a, b) => b.tokenCount - a.tokenCount)\n .map((section) => (\n <div\n key={section.segmentId}\n className=\"flex gap-3 px-3 py-2.5\"\n >\n <IconLock className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-baseline justify-between gap-3\">\n <div className=\"truncate text-sm font-medium\">\n {section.label}\n </div>\n <div className=\"shrink-0 text-xs tabular-nums text-muted-foreground\">\n {formatTokens(section.tokenCount)} ·{\" \"}\n {totalTokens > 0\n ? Math.round(\n (section.tokenCount / totalTokens) * 100,\n )\n : 0}\n %\n </div>\n </div>\n <div className=\"truncate text-xs text-muted-foreground\">\n {sourceLabel(section)}\n {section.tokenMethod === \"estimate\"\n ? \" · estimated\"\n : \"\"}\n </div>\n {section.preview ? (\n <div className=\"mt-1 line-clamp-2 text-xs text-muted-foreground/80\">\n {section.preview}\n </div>\n ) : null}\n </div>\n </div>\n ))}\n </div>\n </section>\n );\n })}\n {grouped.length === 0 ? (\n <div className=\"rounded-md border border-dashed border-border p-6 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.noSystemContext\", {\n defaultValue: \"No system context is available for this scope yet.\",\n })}\n </div>\n ) : null}\n </div>\n );\n}\n\nexport function AgentContextTab({ scope }: AgentPageTabProps) {\n const t = useT();\n const [view, setView] = useState<\"list\" | \"map\">(\"list\");\n const previewQuery = useActionQuery(\n \"context-preview-get\",\n { scope },\n { staleTime: 5_000 },\n ) as PreviewQuery;\n const threads = useChatThreads(undefined, \"agent-context-page\", null, {\n autoCreate: false,\n restoreActiveThread: false,\n });\n const latestThread = mostRecentlyUpdatedThread(threads.threads);\n const liveManifestQuery = useActionQuery(\n \"context-manifest-get\",\n latestThread ? { threadId: latestThread.id } : undefined,\n { enabled: Boolean(latestThread), staleTime: 1_000 },\n ) as ManifestQuery;\n const preview = previewQuery.data;\n const previewManifest = preview ? previewAsManifest(preview) : null;\n const budget = resolveContextWindow(preview?.model);\n const title = t(\"contextXray.snapshotsTitle\", {\n defaultValue: \"Snapshots\",\n });\n const description = t(\"contextXray.headerDescription\", {\n defaultValue:\n \"Inspect the latest combined snapshot of what the agent loaded and why.\",\n });\n\n return (\n <AgentTabFrame\n title={title}\n description={description}\n actions={\n previewManifest ? (\n <ContextMeter manifest={previewManifest} enabled />\n ) : null\n }\n >\n <div className=\"space-y-7\">\n {previewManifest ? (\n <ContextSplitMeter manifest={previewManifest} budget={budget} />\n ) : null}\n\n <section className=\"space-y-4\">\n <div className=\"flex justify-end\">\n <div className=\"inline-flex rounded-md bg-muted/50 p-0.5\">\n <button\n type=\"button\"\n onClick={() => setView(\"list\")}\n className={cn(\n \"flex cursor-pointer items-center gap-1.5 rounded px-2.5 py-1.5 text-xs\",\n view === \"list\"\n ? \"bg-background text-foreground shadow-sm\"\n : \"text-muted-foreground\",\n )}\n >\n <IconList className=\"size-3.5\" />\n {t(\"contextXray.list\", { defaultValue: \"List\" })}\n </button>\n <button\n type=\"button\"\n onClick={() => setView(\"map\")}\n className={cn(\n \"flex cursor-pointer items-center gap-1.5 rounded px-2.5 py-1.5 text-xs\",\n view === \"map\"\n ? \"bg-background text-foreground shadow-sm\"\n : \"text-muted-foreground\",\n )}\n >\n <IconChartTreemap className=\"size-3.5\" />\n {t(\"contextXray.treemap\", { defaultValue: \"Treemap\" })}\n </button>\n </div>\n </div>\n {previewQuery.isLoading ? (\n <div className=\"rounded-md border border-border/60 p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.loadingPreview\", {\n defaultValue: \"Loading recent snapshot…\",\n })}\n </div>\n ) : previewQuery.error ? (\n <div className=\"rounded-md border border-dashed border-border p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.previewUnavailable\", {\n defaultValue: \"A recent snapshot is not available yet.\",\n })}\n </div>\n ) : previewManifest ? (\n view === \"map\" ? (\n <ContextTreemap\n segments={[]}\n systemSections={previewManifest.systemSections}\n />\n ) : (\n <SystemSectionList\n sections={previewManifest.systemSections ?? []}\n totalTokens={previewManifest.totalTokens}\n />\n )\n ) : (\n <div className=\"rounded-md border border-dashed border-border p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.noPreview\", {\n defaultValue:\n \"No recent snapshot is available for this scope yet.\",\n })}\n </div>\n )}\n </section>\n\n <section className=\"space-y-3\">\n <div>\n <h2 className=\"text-lg font-semibold\">\n {t(\"contextXray.liveThread\", { defaultValue: \"Live thread\" })}\n </h2>\n <p className=\"text-sm text-muted-foreground\">\n {t(\"contextXray.liveThreadDescription\", {\n defaultValue:\n \"The latest thread snapshot, when one exists. This is a single current snapshot, not an append-only history.\",\n })}\n </p>\n </div>\n {latestThread && liveManifestQuery.data ? (\n <div className=\"space-y-3 border-y border-border/60 py-4\">\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <div className=\"min-w-0\">\n <div className=\"truncate text-sm font-medium\">\n {latestThread.title ||\n latestThread.preview ||\n t(\"contextXray.latestThread\", {\n defaultValue: \"Latest thread\",\n })}\n </div>\n <div className=\"text-xs text-muted-foreground\">\n {formatTokens(liveManifestQuery.data.totalTokens)} tokens ·{\" \"}\n {latestThread.id}\n </div>\n </div>\n <ContextMeter threadId={latestThread.id} />\n </div>\n <ContextTreemap\n segments={liveManifestQuery.data.segments}\n systemSections={liveManifestQuery.data.systemSections}\n />\n </div>\n ) : (\n <div className=\"rounded-md border border-dashed border-border p-8 text-center text-sm text-muted-foreground\">\n {t(\"contextXray.noLiveThread\", {\n defaultValue: \"No live thread snapshot is available yet.\",\n })}\n </div>\n )}\n </section>\n\n <section className=\"flex gap-3 border-t border-border/70 pt-5\">\n <IconInfoCircle className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\" />\n <div className=\"space-y-1 text-sm text-muted-foreground\">\n <p className=\"font-medium text-foreground\">\n {t(\"contextXray.orderedTokensTitle\", {\n defaultValue:\n \"Snapshots show ordered tokens, not weighted tokens.\",\n })}\n </p>\n <p>\n {t(\"contextXray.orderedTokensDescription\", {\n defaultValue:\n \"Required framework and enterprise policy come first, followed by inherited template, workspace, and organization instructions. Personal instructions and memory arrive later and can narrow or override earlier guidance where the prompt permits. These system sections are not evictable; only run-local conversation segments support pin, evict, and restore.\",\n })}\n </p>\n </div>\n </section>\n </div>\n </AgentTabFrame>\n );\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { AGENT_NATIVE_EXCEPTION_EVENT_NAME, addErrorBreadcrumb, captureClientException, captureError, captureException, captureMessage, configureTracking, getAnalyticsAnonymousId, getAnalyticsSessionId, getFirstTouchAttribution, getSessionReplayContext, getSessionReplayUrl, isErrorCaptureInstalled, maybeStartSessionReplay, setSentryUser, setTrackingContentCaptureEnabled, setTrackingIdentity, startSessionReplay, stopSessionReplay, trackAgentChatLifecycle, trackEvent, trackSessionStatus, type AgentChatLifecycleEvent, type CaptureExceptionContext, type CapturedExceptionEvent, type ClientCaptureContext, type ConfigureTrackingOptions, type ErrorCaptureConfigOptions, type ExceptionBreadcrumb, type ExceptionLevel, type FirstTouchAttribution, type SessionReplayContext, type SessionReplayLinkOptions, type SessionReplayOptions, type SessionReplayStartResult, type SessionReplayUrlMatcher, type TrackingIdentityUser, } from "../analytics.js";
|
|
2
|
+
export { track } from "../track.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/analytics/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,kBAAkB,EAClB,sBAAsB,EACtB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,gCAAgC,EAChC,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,UAAU,EACV,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { AGENT_NATIVE_EXCEPTION_EVENT_NAME, addErrorBreadcrumb, captureClientException, captureError, captureException, captureMessage, configureTracking, getAnalyticsAnonymousId, getAnalyticsSessionId, getFirstTouchAttribution, getSessionReplayContext, getSessionReplayUrl, isErrorCaptureInstalled, maybeStartSessionReplay, setSentryUser, setTrackingContentCaptureEnabled, setTrackingIdentity, startSessionReplay, stopSessionReplay, trackAgentChatLifecycle, trackEvent, trackSessionStatus, } from "../analytics.js";
|
|
2
|
+
export { track } from "../track.js";
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/analytics/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,kBAAkB,EAClB,sBAAsB,EACtB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,gCAAgC,EAChC,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,UAAU,EACV,kBAAkB,GAgBnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export {\n AGENT_NATIVE_EXCEPTION_EVENT_NAME,\n addErrorBreadcrumb,\n captureClientException,\n captureError,\n captureException,\n captureMessage,\n configureTracking,\n getAnalyticsAnonymousId,\n getAnalyticsSessionId,\n getFirstTouchAttribution,\n getSessionReplayContext,\n getSessionReplayUrl,\n isErrorCaptureInstalled,\n maybeStartSessionReplay,\n setSentryUser,\n setTrackingContentCaptureEnabled,\n setTrackingIdentity,\n startSessionReplay,\n stopSessionReplay,\n trackAgentChatLifecycle,\n trackEvent,\n trackSessionStatus,\n type AgentChatLifecycleEvent,\n type CaptureExceptionContext,\n type CapturedExceptionEvent,\n type ClientCaptureContext,\n type ConfigureTrackingOptions,\n type ErrorCaptureConfigOptions,\n type ExceptionBreadcrumb,\n type ExceptionLevel,\n type FirstTouchAttribution,\n type SessionReplayContext,\n type SessionReplayLinkOptions,\n type SessionReplayOptions,\n type SessionReplayStartResult,\n type SessionReplayUrlMatcher,\n type TrackingIdentityUser,\n} from \"../analytics.js\";\nexport { track } from \"../track.js\";\n"]}
|
package/dist/client/api-path.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { initializeAgentNativeClient } from "./client-bootstrap.js";
|
|
2
2
|
const FRAMEWORK_ROUTE_PREFIX = "/_agent-native";
|
|
3
3
|
function normalizeBasePath(value) {
|
|
4
4
|
if (!value || value === "/")
|
|
@@ -71,7 +71,7 @@ function externalEmbedTargetBasePath() {
|
|
|
71
71
|
return "";
|
|
72
72
|
}
|
|
73
73
|
export function appBasePath() {
|
|
74
|
-
|
|
74
|
+
initializeAgentNativeClient();
|
|
75
75
|
const externalEmbed = externalEmbedTargetBasePath();
|
|
76
76
|
if (externalEmbed)
|
|
77
77
|
return externalEmbed;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-path.js","sourceRoot":"","sources":["../../src/client/api-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE
|
|
1
|
+
{"version":3,"file":"api-path.js","sourceRoot":"","sources":["../../src/client/api-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEpE,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAEhD,SAAS,iBAAiB,CAAC,KAAyB;IAClD,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,GAAG;QAAE,OAAO,EAAE,CAAC;IACvC,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;I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AC,UAAU,CAAC,GAAG,QAAQ,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACtE,OAAO,GAAG,QAAQ,GAAG,IAAI,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,MAAM,UAAU,GACd,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QACzC,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;IACzC,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC","sourcesContent":["import { initializeAgentNativeClient } from \"./client-bootstrap.js\";\n\nconst FRAMEWORK_ROUTE_PREFIX = \"/_agent-native\";\n\nfunction normalizeBasePath(value: string | undefined): string {\n if (!value || value === \"/\") return \"\";\n const trimmed = value.trim();\n if (!trimmed || trimmed === \"/\") return \"\";\n return `/${trimmed.replace(/^\\/+/, \"\").replace(/\\/+$/, \"\")}`;\n}\n\nfunction configuredBasePath(): string {\n const env = clientEnv();\n const value = env?.VITE_APP_BASE_PATH ?? env?.APP_BASE_PATH ?? env?.BASE_URL;\n return typeof value === \"string\" ? normalizeBasePath(value) : \"\";\n}\n\nfunction clientEnv(): Record<string, string | boolean | undefined> | undefined {\n const importMetaEnv = (\n import.meta as unknown as {\n env?: Record<string, string | boolean | undefined>;\n }\n ).env;\n const processEnv = (\n globalThis as typeof globalThis & {\n process?: { env?: Record<string, string | boolean | undefined> };\n }\n ).process?.env;\n\n if (importMetaEnv && processEnv) return { ...processEnv, ...importMetaEnv };\n return importMetaEnv ?? processEnv;\n}\n\nfunction pathDerivedBasePath(): string {\n if (typeof window === \"undefined\") return \"\";\n const pathname = window.location.pathname;\n const markerIndex = pathname.indexOf(FRAMEWORK_ROUTE_PREFIX);\n if (markerIndex <= 0) return \"\";\n return normalizeBasePath(pathname.slice(0, markerIndex));\n}\n\nfunction pathMatchesBasePath(pathname: string, basePath: string): boolean {\n return pathname === basePath || pathname.startsWith(`${basePath}/`);\n}\n\nfunction isWorkspaceRuntime(): boolean {\n const env = clientEnv();\n return (\n env?.VITE_AGENT_NATIVE_WORKSPACE === \"1\" ||\n env?.AGENT_NATIVE_WORKSPACE === \"1\" ||\n typeof env?.VITE_AGENT_NATIVE_WORKSPACE_APPS_JSON === \"string\"\n );\n}\n\nfunction workspacePathBasePath(): string {\n if (typeof window === \"undefined\" || !isWorkspaceRuntime()) return \"\";\n const segment = window.location.pathname.split(\"/\").find(Boolean);\n if (!segment || segment === \"_agent-native\" || segment === \"api\") return \"\";\n return normalizeBasePath(segment);\n}\n\nfunction externalEmbedTargetBasePath(): string {\n if (typeof window === \"undefined\") return \"\";\n const target = (\n window as Window & {\n __AGENT_NATIVE_EXTERNAL_EMBED?: { target?: unknown };\n }\n ).__AGENT_NATIVE_EXTERNAL_EMBED?.target;\n if (typeof target !== \"string\" || !target.startsWith(\"/\")) return \"\";\n try {\n const url = new URL(target, \"http://agent-native.invalid\");\n const markerIndex = url.pathname.indexOf(FRAMEWORK_ROUTE_PREFIX);\n if (markerIndex > 0) {\n return normalizeBasePath(url.pathname.slice(0, markerIndex));\n }\n if (isWorkspaceRuntime()) {\n const segment = url.pathname.split(\"/\").find(Boolean);\n if (segment && segment !== \"_agent-native\" && segment !== \"api\") {\n return normalizeBasePath(segment);\n }\n }\n } catch {\n return \"\";\n }\n return \"\";\n}\n\nexport function appBasePath(): string {\n initializeAgentNativeClient();\n const externalEmbed = externalEmbedTargetBasePath();\n if (externalEmbed) return externalEmbed;\n const configured = configuredBasePath();\n const derived = pathDerivedBasePath();\n if (!configured) return derived;\n if (typeof window === \"undefined\") return configured;\n\n const pathname = window.location.pathname;\n if (pathMatchesBasePath(pathname, configured)) return configured;\n\n // In a multi-app workspace, a globally configured base can bleed from one\n // app build into another. Prefer the live mount path when they disagree.\n return derived || workspacePathBasePath() || configured;\n}\n\nexport function appPath(path: string): string {\n if (!path.startsWith(\"/\")) return path;\n const basePath = appBasePath();\n if (!basePath) return path;\n if (path === basePath || path.startsWith(`${basePath}/`)) return path;\n return `${basePath}${path}`;\n}\n\nexport function appApiPath(path: string): string {\n const normalized =\n path === \"/api\" || path.startsWith(\"/api/\")\n ? path\n : `/api/${path.replace(/^\\/+/, \"\")}`;\n return appPath(normalized);\n}\n\nexport function agentNativePath(path: string): string {\n if (!path.startsWith(FRAMEWORK_ROUTE_PREFIX)) return path;\n return appPath(path);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/automation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,KAAK,uCAAuC,GAC7C,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/automation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,GAEnC,MAAM,kBAAkB,CAAC","sourcesContent":["export {\n invokeConfiguredAutomationWorkflow,\n type InvokeConfiguredAutomationWorkflowInput,\n} from \"../automation.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/changelog/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/changelog/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from \"./Changelog.js\";\n"]}
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import type { ToolRendererContext } from "../tool-render-registry.js";
|
|
2
|
-
export
|
|
3
|
-
mode: "transient" | "persisted";
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
content?: string;
|
|
8
|
-
path?: string;
|
|
9
|
-
updatedAt?: string;
|
|
10
|
-
context?: Record<string, unknown>;
|
|
11
|
-
initialHeight?: number;
|
|
12
|
-
}
|
|
13
|
-
export declare function normalizeInlineExtensionToolResult(context: ToolRendererContext): InlineExtensionToolResult | null;
|
|
2
|
+
export { normalizeInlineExtensionToolResult, type InlineExtensionToolResult, } from "./inline-extension-result.js";
|
|
14
3
|
export declare function InlineExtensionWidget({ context, }: {
|
|
15
4
|
context: ToolRendererContext;
|
|
16
5
|
}): import("react").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineExtensionWidget.d.ts","sourceRoot":"","sources":["../../../../src/client/chat/widgets/InlineExtensionWidget.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InlineExtensionWidget.d.ts","sourceRoot":"","sources":["../../../../src/client/chat/widgets/InlineExtensionWidget.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,OAAO,EACL,kCAAkC,EAClC,KAAK,yBAAyB,GAC/B,MAAM,8BAA8B,CAAC;AAEtC,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,GACR,EAAE;IACD,OAAO,EAAE,mBAAmB,CAAC;CAC9B,sCA2CA"}
|
|
@@ -1,73 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { IconExternalLink, IconSparkles } from "@tabler/icons-react";
|
|
3
|
-
import { extensionPath } from "../../../extensions/path.js";
|
|
4
3
|
import { appPath } from "../../api-path.js";
|
|
5
4
|
import { InlineExtensionFrame } from "../../extensions/InlineExtensionFrame.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
function stringValue(value) {
|
|
10
|
-
return typeof value === "string" && value.trim() ? value.trim() : undefined;
|
|
11
|
-
}
|
|
12
|
-
function recordValue(value) {
|
|
13
|
-
return isRecord(value) ? value : undefined;
|
|
14
|
-
}
|
|
15
|
-
function initialHeightValue(value) {
|
|
16
|
-
const height = Number(value);
|
|
17
|
-
if (!Number.isFinite(height) || height <= 0)
|
|
18
|
-
return undefined;
|
|
19
|
-
return Math.min(Math.max(Math.round(height), 120), 1000);
|
|
20
|
-
}
|
|
21
|
-
function normalizeInlineExtension(value) {
|
|
22
|
-
if (!isRecord(value))
|
|
23
|
-
return null;
|
|
24
|
-
const id = stringValue(value.id);
|
|
25
|
-
const name = stringValue(value.name);
|
|
26
|
-
if (!id || !name)
|
|
27
|
-
return null;
|
|
28
|
-
const mode = value.mode === "transient" ? "transient" : "persisted";
|
|
29
|
-
const content = stringValue(value.content);
|
|
30
|
-
if (mode === "transient" && !content)
|
|
31
|
-
return null;
|
|
32
|
-
return {
|
|
33
|
-
mode,
|
|
34
|
-
id,
|
|
35
|
-
name,
|
|
36
|
-
description: stringValue(value.description),
|
|
37
|
-
content,
|
|
38
|
-
path: stringValue(value.path),
|
|
39
|
-
updatedAt: stringValue(value.updatedAt),
|
|
40
|
-
context: recordValue(value.context),
|
|
41
|
-
initialHeight: initialHeightValue(value.initialHeight),
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export function normalizeInlineExtensionToolResult(context) {
|
|
45
|
-
const result = context.resultJson;
|
|
46
|
-
if (!isRecord(result))
|
|
47
|
-
return null;
|
|
48
|
-
const inline = normalizeInlineExtension(result.inlineExtension);
|
|
49
|
-
if (inline)
|
|
50
|
-
return inline;
|
|
51
|
-
if (isRecord(result.extension)) {
|
|
52
|
-
const id = stringValue(result.extension.id);
|
|
53
|
-
const name = stringValue(result.extension.name);
|
|
54
|
-
if (!id || !name)
|
|
55
|
-
return null;
|
|
56
|
-
return {
|
|
57
|
-
mode: "persisted",
|
|
58
|
-
id,
|
|
59
|
-
name,
|
|
60
|
-
description: stringValue(result.extension.description),
|
|
61
|
-
path: stringValue(result.extension.path) ??
|
|
62
|
-
stringValue(result.path) ??
|
|
63
|
-
extensionPath(id, name),
|
|
64
|
-
updatedAt: stringValue(result.extension.updatedAt),
|
|
65
|
-
context: recordValue(result.context),
|
|
66
|
-
initialHeight: initialHeightValue(result.initialHeight),
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
5
|
+
import { normalizeInlineExtensionToolResult } from "./inline-extension-result.js";
|
|
6
|
+
export { normalizeInlineExtensionToolResult, } from "./inline-extension-result.js";
|
|
71
7
|
export function InlineExtensionWidget({ context, }) {
|
|
72
8
|
const result = normalizeInlineExtensionToolResult(context);
|
|
73
9
|
if (!result)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineExtensionWidget.js","sourceRoot":"","sources":["../../../../src/client/chat/widgets/InlineExtensionWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"InlineExtensionWidget.js","sourceRoot":"","sources":["../../../../src/client/chat/widgets/InlineExtensionWidget.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,OAAO,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAElF,OAAO,EACL,kCAAkC,GAEnC,MAAM,8BAA8B,CAAC;AAEtC,MAAM,UAAU,qBAAqB,CAAC,EACpC,OAAO,GAGR;IACC,MAAM,MAAM,GAAG,kCAAkC,CAAC,OAAO,CA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Aa,EAAE,MAAM,CAAC,aAAa,IAAI,GAAG,GAC1C,IACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { IconExternalLink, IconSparkles } from \"@tabler/icons-react\";\n\nimport { appPath } from \"../../api-path.js\";\nimport { InlineExtensionFrame } from \"../../extensions/InlineExtensionFrame.js\";\nimport type { ToolRendererContext } from \"../tool-render-registry.js\";\nimport { normalizeInlineExtensionToolResult } from \"./inline-extension-result.js\";\n\nexport {\n normalizeInlineExtensionToolResult,\n type InlineExtensionToolResult,\n} from \"./inline-extension-result.js\";\n\nexport function InlineExtensionWidget({\n context,\n}: {\n context: ToolRendererContext;\n}) {\n const result = normalizeInlineExtensionToolResult(context);\n if (!result) return null;\n\n const href = result.path ? appPath(result.path) : undefined;\n\n return (\n <div className=\"my-1.5 overflow-hidden rounded-lg border border-border bg-background text-foreground shadow-sm\">\n <div className=\"flex items-center gap-2 border-b border-border px-3 py-2\">\n <IconSparkles className=\"h-4 w-4 shrink-0 text-muted-foreground\" />\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-sm font-medium\">{result.name}</div>\n {result.description ? (\n <div className=\"truncate text-[11px] text-muted-foreground\">\n {result.description}\n </div>\n ) : null}\n </div>\n {href ? (\n <a\n href={href}\n className=\"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-accent-foreground\"\n aria-label=\"Open extension\"\n >\n <IconExternalLink className=\"h-4 w-4\" />\n </a>\n ) : null}\n </div>\n <InlineExtensionFrame\n extensionId={result.mode === \"persisted\" ? result.id : undefined}\n extension={{\n id: result.id,\n name: result.name,\n description: result.description,\n content: result.mode === \"transient\" ? result.content : undefined,\n updatedAt: result.updatedAt,\n mode: result.mode,\n }}\n context={result.context}\n initialHeight={result.initialHeight ?? 260}\n />\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-tool-renderers.d.ts","sourceRoot":"","sources":["../../../../src/client/chat/widgets/builtin-tool-renderers.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builtin-tool-renderers.d.ts","sourceRoot":"","sources":["../../../../src/client/chat/widgets/builtin-tool-renderers.tsx"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC3B,MAAM,4BAA4B,CAAC;AAqIpC,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAQT;AAED,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,mBAAmB,GAC3B,qBAAqB,GAAG,IAAI,CAc9B;AAED,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,mBAAmB,GAC3B,qBAAqB,GAAG,IAAI,CAU9B"}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { lazy, Suspense } from "react";
|
|
2
3
|
import { ACTION_CHAT_UI_DATA_CHART_RENDERER, ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER, ACTION_CHAT_UI_DATA_TABLE_RENDERER, ACTION_CHAT_UI_DATA_WIDGET_RENDERER, ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER, } from "../../../action-ui.js";
|
|
3
4
|
import { registerReservedActionChatRenderer, registerReservedFallbackToolRenderer, } from "../tool-render-registry.js";
|
|
4
5
|
import { DATA_CHART_WIDGET, DATA_INSIGHTS_WIDGET, DATA_TABLE_WIDGET, normalizeDataWidgetKind, normalizeDataWidgetResult, } from "./data-widget-types.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { normalizeInlineExtensionToolResult } from "./inline-extension-result.js";
|
|
7
|
+
const LazyDataChartWidget = lazy(() => import("./DataChartWidget.js").then((module) => ({
|
|
8
|
+
default: module.DataChartWidget,
|
|
9
|
+
})));
|
|
10
|
+
const LazyDataInsightsWidget = lazy(() => import("./DataInsightsWidget.js").then((module) => ({
|
|
11
|
+
default: module.DataInsightsWidget,
|
|
12
|
+
})));
|
|
13
|
+
const LazyDataTableWidget = lazy(() => import("./DataTableWidget.js").then((module) => ({
|
|
14
|
+
default: module.DataTableWidget,
|
|
15
|
+
})));
|
|
16
|
+
const LazyInlineExtensionWidget = lazy(() => import("./InlineExtensionWidget.js").then((module) => ({
|
|
17
|
+
default: module.InlineExtensionWidget,
|
|
18
|
+
})));
|
|
9
19
|
function isRecord(value) {
|
|
10
20
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
11
21
|
}
|
|
@@ -55,18 +65,21 @@ function renderDataWidget(context) {
|
|
|
55
65
|
return null;
|
|
56
66
|
const widget = normalizeDataWidgetKind(result.widget);
|
|
57
67
|
if (widget === DATA_TABLE_WIDGET && result.table) {
|
|
58
|
-
return (_jsx(
|
|
68
|
+
return (_jsx(Suspense, { fallback: _jsx(BuiltinToolRendererSkeleton, {}), children: _jsx(LazyDataTableWidget, { table: result.table, action: result.display?.primaryAction }) }));
|
|
59
69
|
}
|
|
60
70
|
if (widget === DATA_CHART_WIDGET && result.chartSeries) {
|
|
61
|
-
return _jsx(
|
|
71
|
+
return (_jsx(Suspense, { fallback: _jsx(BuiltinToolRendererSkeleton, {}), children: _jsx(LazyDataChartWidget, { chart: result.chartSeries }) }));
|
|
62
72
|
}
|
|
63
73
|
if (widget === DATA_INSIGHTS_WIDGET) {
|
|
64
|
-
return _jsx(
|
|
74
|
+
return (_jsx(Suspense, { fallback: _jsx(BuiltinToolRendererSkeleton, {}), children: _jsx(LazyDataInsightsWidget, { result: result }) }));
|
|
65
75
|
}
|
|
66
76
|
return null;
|
|
67
77
|
}
|
|
78
|
+
function BuiltinToolRendererSkeleton() {
|
|
79
|
+
return (_jsx("div", { "aria-label": "Loading tool result", className: "my-1.5 h-24 animate-pulse rounded-lg border border-border bg-muted/30" }));
|
|
80
|
+
}
|
|
68
81
|
const BuiltinDataWidgetRenderer = ({ context }) => renderDataWidget(context);
|
|
69
|
-
const BuiltinInlineExtensionRenderer = ({ context }) => normalizeInlineExtensionToolResult(context) ? (_jsx(
|
|
82
|
+
const BuiltinInlineExtensionRenderer = ({ context }) => normalizeInlineExtensionToolResult(context) ? (_jsx(Suspense, { fallback: _jsx(BuiltinToolRendererSkeleton, {}), children: _jsx(LazyInlineExtensionWidget, { context: context }) })) : null;
|
|
70
83
|
export function isBuiltinDataWidgetActionRenderer(context) {
|
|
71
84
|
const renderer = context.chatUI?.renderer;
|
|
72
85
|
return (renderer === ACTION_CHAT_UI_DATA_TABLE_RENDERER ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-tool-renderers.js","sourceRoot":"","sources":["../../../../src/client/chat/widgets/builtin-tool-renderers.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,kCAAkC,EAClC,qCAAqC,EACrC,kCAAkC,EAClC,mCAAmC,EACnC,wCAAwC,GACzC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kCAAkC,EAClC,oCAAoC,GAGrC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,GAE1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,qBAAqB,EACrB,kCAAkC,GACnC,MAAM,4BAA4B,CAAC;AAEpC,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,CAAC,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC;AAED,SAAS,+BAA+B,CACtC,OAA4B;IAE5B,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC;IA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AAE,CAAC,+BAA+B,CAAC,OAAO,CAAC,KAAK,IAAI;IACrE,SAAS,EAAE,yBAAyB;CACrC,CAAC,CAAC","sourcesContent":["import {\n ACTION_CHAT_UI_DATA_CHART_RENDERER,\n ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER,\n ACTION_CHAT_UI_DATA_TABLE_RENDERER,\n ACTION_CHAT_UI_DATA_WIDGET_RENDERER,\n ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER,\n} from \"../../../action-ui.js\";\nimport {\n registerReservedActionChatRenderer,\n registerReservedFallbackToolRenderer,\n type ToolRendererContext,\n type ToolRendererComponent,\n} from \"../tool-render-registry.js\";\nimport {\n DATA_CHART_WIDGET,\n DATA_INSIGHTS_WIDGET,\n DATA_TABLE_WIDGET,\n normalizeDataWidgetKind,\n normalizeDataWidgetResult,\n type DataWidgetResult,\n} from \"./data-widget-types.js\";\nimport { DataChartWidget } from \"./DataChartWidget.js\";\nimport { DataInsightsWidget } from \"./DataInsightsWidget.js\";\nimport { DataTableWidget } from \"./DataTableWidget.js\";\nimport {\n InlineExtensionWidget,\n normalizeInlineExtensionToolResult,\n} from \"./InlineExtensionWidget.js\";\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction normalizeActionDataWidgetResult(\n context: ToolRendererContext,\n): DataWidgetResult | null {\n const renderer = context.chatUI?.renderer;\n if (isRecord(context.resultJson)) {\n if (renderer === ACTION_CHAT_UI_DATA_TABLE_RENDERER) {\n return normalizeDataWidgetResult({\n ...context.resultJson,\n widget: DATA_TABLE_WIDGET,\n table: isRecord(context.resultJson.table)\n ? context.resultJson.table\n : context.resultJson,\n });\n }\n if (renderer === ACTION_CHAT_UI_DATA_CHART_RENDERER) {\n return normalizeDataWidgetResult({\n ...context.resultJson,\n widget: DATA_CHART_WIDGET,\n chartSeries: isRecord(context.resultJson.chartSeries)\n ? context.resultJson.chartSeries\n : context.resultJson,\n });\n }\n if (renderer === ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER) {\n return normalizeDataWidgetResult({\n ...context.resultJson,\n widget: DATA_INSIGHTS_WIDGET,\n });\n }\n }\n\n const result = normalizeDataWidgetResult(context.resultJson);\n if (result) return result;\n\n if (\n renderer === ACTION_CHAT_UI_DATA_WIDGET_RENDERER ||\n context.toolName === \"render-data-widget\"\n ) {\n const argsResult = normalizeDataWidgetResult(context.args);\n if (argsResult) return argsResult;\n }\n\n return null;\n}\n\nfunction renderDataWidget(context: ToolRendererContext) {\n const result =\n normalizeActionDataWidgetResult(context) ??\n normalizeDataWidgetResult(context.resultJson);\n if (!result) return null;\n const widget = normalizeDataWidgetKind(result.widget);\n if (widget === DATA_TABLE_WIDGET && result.table) {\n return (\n <DataTableWidget\n table={result.table}\n action={result.display?.primaryAction}\n />\n );\n }\n if (widget === DATA_CHART_WIDGET && result.chartSeries) {\n return <DataChartWidget chart={result.chartSeries} />;\n }\n if (widget === DATA_INSIGHTS_WIDGET) {\n return <DataInsightsWidget result={result} />;\n }\n return null;\n}\n\nconst BuiltinDataWidgetRenderer: ToolRendererComponent = ({ context }) =>\n renderDataWidget(context);\n\nconst BuiltinInlineExtensionRenderer: ToolRendererComponent = ({ context }) =>\n normalizeInlineExtensionToolResult(context) ? (\n <InlineExtensionWidget context={context} />\n ) : null;\n\nexport function isBuiltinDataWidgetActionRenderer(\n context: ToolRendererContext,\n): boolean {\n const renderer = context.chatUI?.renderer;\n return (\n renderer === ACTION_CHAT_UI_DATA_TABLE_RENDERER ||\n renderer === ACTION_CHAT_UI_DATA_CHART_RENDERER ||\n renderer === ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER ||\n renderer === ACTION_CHAT_UI_DATA_WIDGET_RENDERER\n );\n}\n\nexport function resolveBuiltinActionChatRenderer(\n context: ToolRendererContext,\n): ToolRendererComponent | null {\n if (\n context.chatUI?.renderer === ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER &&\n normalizeInlineExtensionToolResult(context)\n ) {\n return BuiltinInlineExtensionRenderer;\n }\n if (\n isBuiltinDataWidgetActionRenderer(context) &&\n normalizeActionDataWidgetResult(context)\n ) {\n return BuiltinDataWidgetRenderer;\n }\n return null;\n}\n\nexport function resolveBuiltinFallbackToolRenderer(\n context: ToolRendererContext,\n): ToolRendererComponent | null {\n if (\n context.chatUI?.renderer === ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER &&\n normalizeInlineExtensionToolResult(context)\n ) {\n return BuiltinInlineExtensionRenderer;\n }\n return normalizeActionDataWidgetResult(context) !== null\n ? BuiltinDataWidgetRenderer\n : null;\n}\n\nfor (const [id, renderer] of [\n [\"core.data-table\", ACTION_CHAT_UI_DATA_TABLE_RENDERER],\n [\"core.data-chart\", ACTION_CHAT_UI_DATA_CHART_RENDERER],\n [\"core.data-insights\", ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER],\n [\"core.data-widget\", ACTION_CHAT_UI_DATA_WIDGET_RENDERER],\n [\"core.inline-extension\", ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER],\n] as const) {\n registerReservedActionChatRenderer({\n id,\n renderer,\n Component:\n renderer === ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER\n ? BuiltinInlineExtensionRenderer\n : BuiltinDataWidgetRenderer,\n });\n}\n\nregisterReservedFallbackToolRenderer({\n id: \"core.data-widgets\",\n match: (context) => normalizeActionDataWidgetResult(context) !== null,\n Component: BuiltinDataWidgetRenderer,\n});\n"]}
|
|
1
|
+
{"version":3,"file":"builtin-tool-renderers.js","sourceRoot":"","sources":["../../../../src/client/chat/widgets/builtin-tool-renderers.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EACL,kCAAkC,EAClC,qCAAqC,EACrC,kCAAkC,EAClC,mCAAmC,EACnC,wCAAwC,GACzC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kCAAkC,EAClC,oCAAoC,GAG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,CAAC,iBAAiB,EAAE,kCAAkC,CAAC;IACvD,CAAC,oBAAoB,EAAE,qCAAqC,CAAC;IAC7D,CAAC,kBAAkB,EAAE,mCAAmC,CAAC;IACzD,CAAC,uBAAuB,EAAE,wCAAwC,CAAC;CAC3D,EAAE,CAAC;IACX,kCAAkC,CAAC;QACjC,EAAE;QACF,QAAQ;QACR,SAAS,EACP,QAAQ,KAAK,wCAAwC;YACnD,CAAC,CAAC,8BAA8B;YAChC,CAAC,CAAC,yBAAyB;KAChC,CAAC,CAAC;AACL,CAAC;AAED,oCAAoC,CAAC;IACnC,EAAE,EAAE,mBAAmB;IACvB,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,+BAA+B,CAAC,OAAO,CAAC,KAAK,IAAI;IACrE,SAAS,EAAE,yBAAyB;CACrC,CAAC,CAAC","sourcesContent":["import { lazy, Suspense } from \"react\";\n\nimport {\n ACTION_CHAT_UI_DATA_CHART_RENDERER,\n ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER,\n ACTION_CHAT_UI_DATA_TABLE_RENDERER,\n ACTION_CHAT_UI_DATA_WIDGET_RENDERER,\n ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER,\n} from \"../../../action-ui.js\";\nimport {\n registerReservedActionChatRenderer,\n registerReservedFallbackToolRenderer,\n type ToolRendererContext,\n type ToolRendererComponent,\n} from \"../tool-render-registry.js\";\nimport {\n DATA_CHART_WIDGET,\n DATA_INSIGHTS_WIDGET,\n DATA_TABLE_WIDGET,\n normalizeDataWidgetKind,\n normalizeDataWidgetResult,\n type DataWidgetResult,\n} from \"./data-widget-types.js\";\nimport { normalizeInlineExtensionToolResult } from \"./inline-extension-result.js\";\n\nconst LazyDataChartWidget = lazy(() =>\n import(\"./DataChartWidget.js\").then((module) => ({\n default: module.DataChartWidget,\n })),\n);\nconst LazyDataInsightsWidget = lazy(() =>\n import(\"./DataInsightsWidget.js\").then((module) => ({\n default: module.DataInsightsWidget,\n })),\n);\nconst LazyDataTableWidget = lazy(() =>\n import(\"./DataTableWidget.js\").then((module) => ({\n default: module.DataTableWidget,\n })),\n);\nconst LazyInlineExtensionWidget = lazy(() =>\n import(\"./InlineExtensionWidget.js\").then((module) => ({\n default: module.InlineExtensionWidget,\n })),\n);\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return !!value && typeof value === \"object\" && !Array.isArray(value);\n}\n\nfunction normalizeActionDataWidgetResult(\n context: ToolRendererContext,\n): DataWidgetResult | null {\n const renderer = context.chatUI?.renderer;\n if (isRecord(context.resultJson)) {\n if (renderer === ACTION_CHAT_UI_DATA_TABLE_RENDERER) {\n return normalizeDataWidgetResult({\n ...context.resultJson,\n widget: DATA_TABLE_WIDGET,\n table: isRecord(context.resultJson.table)\n ? context.resultJson.table\n : context.resultJson,\n });\n }\n if (renderer === ACTION_CHAT_UI_DATA_CHART_RENDERER) {\n return normalizeDataWidgetResult({\n ...context.resultJson,\n widget: DATA_CHART_WIDGET,\n chartSeries: isRecord(context.resultJson.chartSeries)\n ? context.resultJson.chartSeries\n : context.resultJson,\n });\n }\n if (renderer === ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER) {\n return normalizeDataWidgetResult({\n ...context.resultJson,\n widget: DATA_INSIGHTS_WIDGET,\n });\n }\n }\n\n const result = normalizeDataWidgetResult(context.resultJson);\n if (result) return result;\n\n if (\n renderer === ACTION_CHAT_UI_DATA_WIDGET_RENDERER ||\n context.toolName === \"render-data-widget\"\n ) {\n const argsResult = normalizeDataWidgetResult(context.args);\n if (argsResult) return argsResult;\n }\n\n return null;\n}\n\nfunction renderDataWidget(context: ToolRendererContext) {\n const result =\n normalizeActionDataWidgetResult(context) ??\n normalizeDataWidgetResult(context.resultJson);\n if (!result) return null;\n const widget = normalizeDataWidgetKind(result.widget);\n if (widget === DATA_TABLE_WIDGET && result.table) {\n return (\n <Suspense fallback={<BuiltinToolRendererSkeleton />}>\n <LazyDataTableWidget\n table={result.table}\n action={result.display?.primaryAction}\n />\n </Suspense>\n );\n }\n if (widget === DATA_CHART_WIDGET && result.chartSeries) {\n return (\n <Suspense fallback={<BuiltinToolRendererSkeleton />}>\n <LazyDataChartWidget chart={result.chartSeries} />\n </Suspense>\n );\n }\n if (widget === DATA_INSIGHTS_WIDGET) {\n return (\n <Suspense fallback={<BuiltinToolRendererSkeleton />}>\n <LazyDataInsightsWidget result={result} />\n </Suspense>\n );\n }\n return null;\n}\n\nfunction BuiltinToolRendererSkeleton() {\n return (\n <div\n aria-label=\"Loading tool result\"\n className=\"my-1.5 h-24 animate-pulse rounded-lg border border-border bg-muted/30\"\n />\n );\n}\n\nconst BuiltinDataWidgetRenderer: ToolRendererComponent = ({ context }) =>\n renderDataWidget(context);\n\nconst BuiltinInlineExtensionRenderer: ToolRendererComponent = ({ context }) =>\n normalizeInlineExtensionToolResult(context) ? (\n <Suspense fallback={<BuiltinToolRendererSkeleton />}>\n <LazyInlineExtensionWidget context={context} />\n </Suspense>\n ) : null;\n\nexport function isBuiltinDataWidgetActionRenderer(\n context: ToolRendererContext,\n): boolean {\n const renderer = context.chatUI?.renderer;\n return (\n renderer === ACTION_CHAT_UI_DATA_TABLE_RENDERER ||\n renderer === ACTION_CHAT_UI_DATA_CHART_RENDERER ||\n renderer === ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER ||\n renderer === ACTION_CHAT_UI_DATA_WIDGET_RENDERER\n );\n}\n\nexport function resolveBuiltinActionChatRenderer(\n context: ToolRendererContext,\n): ToolRendererComponent | null {\n if (\n context.chatUI?.renderer === ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER &&\n normalizeInlineExtensionToolResult(context)\n ) {\n return BuiltinInlineExtensionRenderer;\n }\n if (\n isBuiltinDataWidgetActionRenderer(context) &&\n normalizeActionDataWidgetResult(context)\n ) {\n return BuiltinDataWidgetRenderer;\n }\n return null;\n}\n\nexport function resolveBuiltinFallbackToolRenderer(\n context: ToolRendererContext,\n): ToolRendererComponent | null {\n if (\n context.chatUI?.renderer === ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER &&\n normalizeInlineExtensionToolResult(context)\n ) {\n return BuiltinInlineExtensionRenderer;\n }\n return normalizeActionDataWidgetResult(context) !== null\n ? BuiltinDataWidgetRenderer\n : null;\n}\n\nfor (const [id, renderer] of [\n [\"core.data-table\", ACTION_CHAT_UI_DATA_TABLE_RENDERER],\n [\"core.data-chart\", ACTION_CHAT_UI_DATA_CHART_RENDERER],\n [\"core.data-insights\", ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER],\n [\"core.data-widget\", ACTION_CHAT_UI_DATA_WIDGET_RENDERER],\n [\"core.inline-extension\", ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER],\n] as const) {\n registerReservedActionChatRenderer({\n id,\n renderer,\n Component:\n renderer === ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER\n ? BuiltinInlineExtensionRenderer\n : BuiltinDataWidgetRenderer,\n });\n}\n\nregisterReservedFallbackToolRenderer({\n id: \"core.data-widgets\",\n match: (context) => normalizeActionDataWidgetResult(context) !== null,\n Component: BuiltinDataWidgetRenderer,\n});\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ToolRendererContext } from "../tool-render-registry.js";
|
|
2
|
+
export interface InlineExtensionToolResult {
|
|
3
|
+
mode: "transient" | "persisted";
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
content?: string;
|
|
8
|
+
path?: string;
|
|
9
|
+
updatedAt?: string;
|
|
10
|
+
context?: Record<string, unknown>;
|
|
11
|
+
initialHeight?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function normalizeInlineExtensionToolResult(context: ToolRendererContext): InlineExtensionToolResult | null;
|
|
14
|
+
//# sourceMappingURL=inline-extension-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-extension-result.d.ts","sourceRoot":"","sources":["../../../../src/client/chat/widgets/inline-extension-result.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,WAAW,GAAG,WAAW,CAAC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA2CD,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,mBAAmB,GAC3B,yBAAyB,GAAG,IAAI,CA2BlC"}
|