@agent-native/core 0.80.8 → 0.80.9
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 +2 -2
- package/corpus/core/CHANGELOG.md +12 -0
- package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +6 -0
- package/corpus/core/docs/content/locales/de-DE/template-design.mdx +8 -0
- package/corpus/core/docs/content/locales/es-ES/template-design.mdx +10 -2
- package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +10 -2
- package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +7 -0
- package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +7 -0
- package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +7 -0
- package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +9 -2
- package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +6 -0
- package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +6 -0
- package/corpus/core/docs/content/template-design.mdx +9 -2
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/cli/mcp.ts +10 -0
- package/corpus/core/src/cli/skills.ts +58 -12
- package/corpus/core/src/client/error-format.ts +25 -0
- package/corpus/core/src/client/extensions/ExtensionViewer.tsx +13 -11
- package/corpus/core/src/client/guided-questions.tsx +32 -4
- package/corpus/core/src/client/onboarding/OnboardingPanel.tsx +33 -1
- package/corpus/core/src/client/resources/BuiltinCapabilityDetail.tsx +8 -0
- package/corpus/core/src/client/resources/use-builtin-capabilities.ts +4 -2
- package/corpus/core/src/client/session-replay.ts +34 -0
- package/corpus/core/src/client/sharing/ShareButton.tsx +106 -21
- package/corpus/core/src/coding-tools/index.ts +1 -1
- package/corpus/core/src/mcp/index.ts +2 -0
- package/corpus/core/src/mcp/screen-memory-stdio.ts +290 -0
- package/corpus/core/src/mcp-client/builtin-capabilities.ts +13 -1
- package/corpus/core/src/mcp-client/index.ts +9 -0
- package/corpus/core/src/mcp-client/screen-memory-local.ts +461 -0
- package/corpus/core/src/onboarding/types.ts +7 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +25 -0
- package/corpus/core/src/server/agents-bundle.ts +35 -7
- package/corpus/core/src/styles/agent-native.css +5 -0
- package/corpus/core/src/templates/default/app/global.css +35 -35
- package/corpus/templates/analytics/AGENTS.md +6 -0
- package/corpus/templates/analytics/actions/github-repo-files.ts +9 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +4 -4
- package/corpus/templates/analytics/app/global.css +144 -40
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +1 -1
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +4 -4
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +9 -9
- package/corpus/templates/analytics/changelog/2026-06-29-agents-can-search-and-read-connected-github-repositories-whe.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-29-sessions-and-explorer-layouts-adapt-when-the-agent-sidebar-is.md +6 -0
- package/corpus/templates/assets/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/assets/app/components/library/LibraryPresetGrid.tsx +1 -1
- package/corpus/templates/assets/app/global.css +99 -35
- package/corpus/templates/assets/app/routes/asset.$id.tsx +2 -2
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +4 -4
- package/corpus/templates/assets/app/routes/library.tsx +4 -4
- package/corpus/templates/assets/changelog/2026-06-29-asset-library-and-detail-layouts-adapt-when-the-agent-sidebar.md +6 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/brain/app/global.css +63 -35
- package/corpus/templates/brain/app/routes/search.tsx +1 -1
- package/corpus/templates/brain/app/routes/settings.tsx +1 -1
- package/corpus/templates/brain/app/routes/sources.tsx +2 -2
- package/corpus/templates/brain/changelog/2026-06-29-search-settings-and-source-layouts-adapt-when-the-agent-sidebar.md +6 -0
- package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +4 -4
- package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +3 -2
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +4 -2
- package/corpus/templates/calendar/app/global.css +69 -35
- package/corpus/templates/calendar/changelog/2026-06-29-event-and-find-time-layouts-adapt-when-the-agent-sidebar-is.md +6 -0
- package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/chat/app/global.css +35 -35
- package/corpus/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/clips/AGENTS.md +13 -0
- package/corpus/templates/clips/actions/get-screen-memory-status.ts +12 -0
- package/corpus/templates/clips/actions/query-screen-memory-context.ts +29 -0
- package/corpus/templates/clips/actions/view-screen.ts +2 -2
- package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
- package/corpus/templates/clips/app/global.css +47 -35
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +3 -3
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +45 -18
- package/corpus/templates/clips/changelog/2026-06-29-meeting-detail-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-29-screen-memory-keeps-a-local-rolling-screen-buffer-for-agent-context.md +5 -0
- package/corpus/templates/clips/changelog/2026-06-29-video-chat-is-easier-to-find-on-recording-pages-and-s3-setup.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/styles.css +39 -39
- package/corpus/templates/clips/desktop/src/app.tsx +290 -1
- package/corpus/templates/clips/desktop/src/shared/config.ts +83 -0
- package/corpus/templates/clips/desktop/src/styles.css +67 -52
- package/corpus/templates/clips/desktop/src-tauri/src/config.rs +50 -0
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +17 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +13 -13
- package/corpus/templates/clips/desktop/src-tauri/src/screen_memory.rs +990 -0
- package/corpus/templates/clips/server/plugins/onboarding.ts +2 -0
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +3 -3
- package/corpus/templates/content/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/content/app/global.css +29 -15
- package/corpus/templates/content/changelog/2026-06-29-database-gallery-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +25 -20
- package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +8 -0
- package/corpus/templates/design/.agents/skills/export-handoff/SKILL.md +8 -0
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +13 -0
- package/corpus/templates/design/AGENTS.md +20 -12
- package/corpus/templates/design/CODE_NATIVE_DESIGN_STUDIO_IMPLEMENTATION_PLAN.md +1054 -0
- package/corpus/templates/design/actions/apply-visual-edit.ts +24 -4
- package/corpus/templates/design/actions/export-coding-handoff.ts +12 -4
- package/corpus/templates/design/actions/generate-design.ts +6 -21
- package/corpus/templates/design/actions/generate-screens.ts +43 -2
- package/corpus/templates/design/actions/get-design.ts +1 -0
- package/corpus/templates/design/actions/present-design-variants.ts +355 -30
- package/corpus/templates/design/actions/view-screen.ts +75 -31
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +329 -69
- package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +1 -1
- package/corpus/templates/design/app/components/design/EditPanel.tsx +479 -77
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +380 -216
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +1050 -196
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +83 -206
- package/corpus/templates/design/app/components/design/TweaksPanel.tsx +1 -1
- package/corpus/templates/design/app/components/design/index.ts +0 -1
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +225 -133
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +122 -11
- package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +24 -5
- package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +57 -1
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +37 -12
- package/corpus/templates/design/app/components/design/inspector/index.ts +1 -0
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +12 -5
- package/corpus/templates/design/app/components/design/types.ts +9 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +23 -5
- package/corpus/templates/design/app/global.css +77 -49
- package/corpus/templates/design/app/hooks/use-question-flow.ts +2 -2
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +8 -1
- package/corpus/templates/design/app/i18n/zh-TW.ts +3 -0
- package/corpus/templates/design/app/i18n-data.ts +45 -3
- package/corpus/templates/design/app/pages/DesignEditor.tsx +2602 -657
- package/corpus/templates/design/app/root.tsx +1 -1
- package/corpus/templates/design/changelog/2026-06-29-containers-no-longer-block-selecting-nested-elements-and-nor.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-agents-now-generate-and-refine-variants-from-stronger.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-inspector-controls-now-match-figmas-softer-dark-chrome.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-questions-now-appear-as-a-cleaner-canvas-intake-with-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-design-variant-directions-now-appear-as-board-screens-with-chat-buttons.md +5 -0
- package/corpus/templates/design/changelog/2026-06-29-element-selection-no-longer-snaps-back-to-the-previous-layer.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-frame-resize-measurements-now-stay-beside-the-cursor-while-d.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-inspector-number-fields-have-cleaner-tooltips-and-draggable-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-locking-layer-nesting-generated-question-intake-and-im.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-names-in-the-sidebar-can-scroll-horizontally-instead-o.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layer-nesting-in-the-sidebar-now-uses-tighter-spacing-so-nam.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-layers-no-longer-repeat-document-wrapper-rows-when-a-screen-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-overview-previews-now-keep-element-hover-and-selection-tied-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-pressing-escape-now-cancels-a-stuck-screen-drag-in-the-overv.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-is-easier-to-find-and-named-screens-open-dir.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-only-highlights-screens-when-the-frame-or-ti.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-previews-now-resize-to-match-the-selected-de.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-selection-now-uses-a-pointer-cursor-instead-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-selection-outlines-now-stay-locked-to-the-se.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-zoom-now-reports-real-screen-scale-separatel.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-zooming-feels-smoother-and-selection-outline.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-screen-overview-zooming-now-stays-on-the-overview-canvas-ins.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-selecting-a-nested-layer-from-all-screens-now-keeps-you-in-a.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-share-now-groups-link-sharing-exports-and-agent-handoff.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-design-editor-loading-skeleton-now-uses-a-softer-charcoa.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-device-preview-menu-now-sits-next-to-the-preview-button-.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-inspector-stays-read-only-while-an-empty-design-is-still.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-missing-design-view-now-matches-the-rest-of-the-editor-c.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-the-pen-tool-icon-and-tool-option-menus-better-match-the-edi.md +6 -0
- package/corpus/templates/design/changelog/2026-06-29-typography-controls-now-keep-the-font-name-visible-and-move-.md +6 -0
- package/corpus/templates/design/e2e/README.md +3 -3
- package/corpus/templates/design/e2e/global-setup.ts +11 -22
- package/corpus/templates/design/e2e/helpers.ts +122 -11
- package/corpus/templates/design/playwright.config.ts +9 -3
- package/corpus/templates/design/server/lib/coding-handoff.ts +126 -2
- package/corpus/templates/design/server/plugins/core-routes.ts +1 -2
- package/corpus/templates/design/server/routes/api/design-handoff/[id].zip.get.ts +86 -0
- package/corpus/templates/design/shared/code-layer.ts +125 -22
- package/corpus/templates/design/shared/generation-session.ts +41 -0
- package/corpus/templates/dispatch/app/global.css +79 -35
- package/corpus/templates/dispatch/app/routes/integrations.tsx +8 -7
- package/corpus/templates/dispatch/changelog/2026-06-29-integration-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/forms/app/components/layout/Layout.tsx +6 -2
- package/corpus/templates/forms/app/global.css +64 -35
- package/corpus/templates/forms/app/pages/FormsListPage.tsx +2 -2
- package/corpus/templates/forms/app/pages/ResponseInsightsPage.tsx +3 -3
- package/corpus/templates/forms/changelog/2026-06-29-form-list-and-insight-layouts-adapt-when-the-agent-sidebar.md +6 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +3 -1
- package/corpus/templates/macros/app/global.css +25 -9
- package/corpus/templates/macros/changelog/2026-06-29-macro-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +6 -2
- package/corpus/templates/mail/app/global.css +42 -36
- package/corpus/templates/mail/app/pages/InboxPage.tsx +1 -1
- package/corpus/templates/mail/changelog/2026-06-29-the-contact-panel-now-adapts-to-the-available-mail-pane-width.md +6 -0
- package/corpus/templates/plan/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +6 -7
- package/corpus/templates/plan/app/global.css +74 -42
- package/corpus/templates/plan/changelog/2026-06-29-plan-document-blocks-adapt-to-the-available-document-width.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-29-plan-titles-and-summaries-can-be-edited-inline-without-focus.md +6 -0
- package/corpus/templates/slides/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/slides/app/global.css +49 -33
- package/corpus/templates/slides/changelog/2026-06-29-slide-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/templates/videos/app/components/layout/Layout.tsx +3 -1
- package/corpus/templates/videos/app/global.css +35 -35
- package/corpus/templates/videos/changelog/2026-06-29-video-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/dist/cli/mcp.d.ts.map +1 -1
- package/dist/cli/mcp.js +10 -0
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +58 -12
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/error-format.d.ts.map +1 -1
- package/dist/client/error-format.js +17 -0
- package/dist/client/error-format.js.map +1 -1
- package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionViewer.js +3 -4
- package/dist/client/extensions/ExtensionViewer.js.map +1 -1
- package/dist/client/guided-questions.d.ts +4 -0
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +16 -7
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/onboarding/OnboardingPanel.js +26 -1
- package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
- package/dist/client/resources/BuiltinCapabilityDetail.d.ts.map +1 -1
- package/dist/client/resources/BuiltinCapabilityDetail.js +1 -1
- package/dist/client/resources/BuiltinCapabilityDetail.js.map +1 -1
- package/dist/client/resources/use-builtin-capabilities.d.ts +1 -1
- package/dist/client/resources/use-builtin-capabilities.d.ts.map +1 -1
- package/dist/client/resources/use-builtin-capabilities.js +2 -1
- package/dist/client/resources/use-builtin-capabilities.js.map +1 -1
- package/dist/client/session-replay.d.ts.map +1 -1
- package/dist/client/session-replay.js +31 -0
- package/dist/client/session-replay.js.map +1 -1
- package/dist/client/sharing/ShareButton.d.ts +14 -0
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +36 -7
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/coding-tools/index.js +1 -1
- package/dist/coding-tools/index.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +2 -2
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +6 -0
- package/dist/mcp/screen-memory-stdio.d.ts.map +1 -0
- package/dist/mcp/screen-memory-stdio.js +213 -0
- package/dist/mcp/screen-memory-stdio.js.map +1 -0
- package/dist/mcp-client/builtin-capabilities.d.ts +1 -1
- package/dist/mcp-client/builtin-capabilities.d.ts.map +1 -1
- package/dist/mcp-client/builtin-capabilities.js +10 -0
- package/dist/mcp-client/builtin-capabilities.js.map +1 -1
- package/dist/mcp-client/index.d.ts +1 -0
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +1 -0
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/mcp-client/screen-memory-local.d.ts +61 -0
- package/dist/mcp-client/screen-memory-local.d.ts.map +1 -0
- package/dist/mcp-client/screen-memory-local.js +336 -0
- package/dist/mcp-client/screen-memory-local.js.map +1 -0
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +8 -8
- package/dist/onboarding/types.d.ts +7 -0
- package/dist/onboarding/types.d.ts.map +1 -1
- package/dist/onboarding/types.js.map +1 -1
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +26 -0
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agents-bundle.d.ts.map +1 -1
- package/dist/server/agents-bundle.js +22 -7
- package/dist/server/agents-bundle.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/styles/agent-native.css +5 -0
- package/dist/templates/default/app/global.css +35 -35
- package/docs/content/locales/ar-SA/template-design.mdx +6 -0
- package/docs/content/locales/de-DE/template-design.mdx +8 -0
- package/docs/content/locales/es-ES/template-design.mdx +10 -2
- package/docs/content/locales/fr-FR/template-design.mdx +10 -2
- package/docs/content/locales/hi-IN/template-design.mdx +7 -0
- package/docs/content/locales/ja-JP/template-design.mdx +7 -0
- package/docs/content/locales/ko-KR/template-design.mdx +7 -0
- package/docs/content/locales/pt-BR/template-design.mdx +9 -2
- package/docs/content/locales/zh-CN/template-design.mdx +6 -0
- package/docs/content/locales/zh-TW/template-design.mdx +6 -0
- package/docs/content/template-design.mdx +9 -2
- package/package.json +1 -1
- package/src/templates/default/app/global.css +35 -35
- package/corpus/templates/design/app/components/design/VariantGrid.tsx +0 -189
- package/corpus/templates/design/app/components/design/VariantHandoffCard.tsx +0 -115
- package/corpus/templates/design/app/hooks/use-variant-flow.ts +0 -342
|
@@ -79,7 +79,11 @@ import {
|
|
|
79
79
|
type VoiceProvider,
|
|
80
80
|
type VoiceShortcutPreference,
|
|
81
81
|
} from "./lib/voice-dictation";
|
|
82
|
-
import {
|
|
82
|
+
import {
|
|
83
|
+
useFeatureConfig,
|
|
84
|
+
type LocalRecordingMode,
|
|
85
|
+
type ScreenMemoryStatus,
|
|
86
|
+
} from "./shared/config";
|
|
83
87
|
|
|
84
88
|
interface RecordingSummary {
|
|
85
89
|
id: string;
|
|
@@ -114,6 +118,16 @@ interface LocalRecordingNotice {
|
|
|
114
118
|
files: LocalExportedFile[];
|
|
115
119
|
}
|
|
116
120
|
|
|
121
|
+
interface ScreenMemoryExportResult {
|
|
122
|
+
folderPath: string;
|
|
123
|
+
files: Array<{
|
|
124
|
+
path: string;
|
|
125
|
+
fileName: string;
|
|
126
|
+
bytes: number;
|
|
127
|
+
mimeType: string;
|
|
128
|
+
}>;
|
|
129
|
+
}
|
|
130
|
+
|
|
117
131
|
type MeetingTranscriptionMode = "manual" | "ask" | "auto";
|
|
118
132
|
|
|
119
133
|
type CaptureMode = "screen" | "screen-camera" | "camera";
|
|
@@ -123,6 +137,14 @@ const STORAGE_SETUP_HELP_TEXT =
|
|
|
123
137
|
"Clips is 100% free and open source, so you need to hook up a way to store your clips. Connect storage with Builder.io for free-tier storage and AI, or use S3-compatible object storage and your own LLM keys.";
|
|
124
138
|
const STORAGE_SETUP_FAILURE_RE =
|
|
125
139
|
/video storage is not connected|no video storage configured|file upload provider|storage provider|connect builder|s3-compatible/i;
|
|
140
|
+
const DEFAULT_SCREEN_MEMORY_CONFIG = {
|
|
141
|
+
enabled: false,
|
|
142
|
+
paused: false,
|
|
143
|
+
retentionHours: 24,
|
|
144
|
+
maxBytes: 20 * 1024 * 1024 * 1024,
|
|
145
|
+
segmentSeconds: 5 * 60,
|
|
146
|
+
sampleIntervalSeconds: 10,
|
|
147
|
+
};
|
|
126
148
|
|
|
127
149
|
function isStorageSetupFailureMessage(message: string | null | undefined) {
|
|
128
150
|
return STORAGE_SETUP_FAILURE_RE.test(message ?? "");
|
|
@@ -3022,6 +3044,14 @@ function labelForByokProvider(provider: ByokVoiceProvider): string {
|
|
|
3022
3044
|
}[provider];
|
|
3023
3045
|
}
|
|
3024
3046
|
|
|
3047
|
+
function formatStorageBytes(bytes: number): string {
|
|
3048
|
+
if (!Number.isFinite(bytes) || bytes <= 0) return "0 MB";
|
|
3049
|
+
const gb = bytes / (1024 * 1024 * 1024);
|
|
3050
|
+
if (gb >= 1) return `${gb.toFixed(gb >= 10 ? 0 : 1)} GB`;
|
|
3051
|
+
const mb = bytes / (1024 * 1024);
|
|
3052
|
+
return `${Math.max(1, Math.round(mb))} MB`;
|
|
3053
|
+
}
|
|
3054
|
+
|
|
3025
3055
|
function Setup({
|
|
3026
3056
|
initial,
|
|
3027
3057
|
serverUrl,
|
|
@@ -3073,6 +3103,8 @@ function Setup({
|
|
|
3073
3103
|
const autoHidePopoverEnabled = featureConfig?.autoHidePopoverEnabled === true;
|
|
3074
3104
|
const showInScreenCapture = featureConfig?.showInScreenCapture === true;
|
|
3075
3105
|
const localRecordingMode = featureConfig?.localRecordingMode ?? "off";
|
|
3106
|
+
const screenMemory =
|
|
3107
|
+
featureConfig?.screenMemory ?? DEFAULT_SCREEN_MEMORY_CONFIG;
|
|
3076
3108
|
const regionGuides = featureConfig?.regionGuides ?? {
|
|
3077
3109
|
enabled: false,
|
|
3078
3110
|
rects: [],
|
|
@@ -3096,6 +3128,19 @@ function Setup({
|
|
|
3096
3128
|
const [whisperStatus, setWhisperStatus] = useState<WhisperModelStatus | null>(
|
|
3097
3129
|
null,
|
|
3098
3130
|
);
|
|
3131
|
+
const [screenMemoryStatus, setScreenMemoryStatus] =
|
|
3132
|
+
useState<ScreenMemoryStatus | null>(null);
|
|
3133
|
+
const [screenMemoryMessage, setScreenMemoryMessage] = useState<{
|
|
3134
|
+
kind: "ok" | "error";
|
|
3135
|
+
text: string;
|
|
3136
|
+
} | null>(null);
|
|
3137
|
+
const [screenMemoryBusy, setScreenMemoryBusy] = useState(false);
|
|
3138
|
+
const screenMemorySegments = screenMemoryStatus?.recentSegments ?? [];
|
|
3139
|
+
const screenMemoryTotalBytes = screenMemorySegments.reduce(
|
|
3140
|
+
(sum, segment) => sum + segment.bytes,
|
|
3141
|
+
0,
|
|
3142
|
+
);
|
|
3143
|
+
const screenMemoryRecording = screenMemoryStatus?.state === "recording";
|
|
3099
3144
|
|
|
3100
3145
|
const [providerStatus, setProviderStatus] =
|
|
3101
3146
|
useState<VoiceProviderStatus | null>(null);
|
|
@@ -3170,6 +3215,86 @@ function Setup({
|
|
|
3170
3215
|
);
|
|
3171
3216
|
}
|
|
3172
3217
|
|
|
3218
|
+
function setScreenMemoryConfig(
|
|
3219
|
+
patch: Partial<typeof DEFAULT_SCREEN_MEMORY_CONFIG>,
|
|
3220
|
+
) {
|
|
3221
|
+
if (!featureConfig) return;
|
|
3222
|
+
setScreenMemoryMessage(null);
|
|
3223
|
+
invoke("set_feature_config", {
|
|
3224
|
+
config: {
|
|
3225
|
+
...featureConfig,
|
|
3226
|
+
screenMemory: {
|
|
3227
|
+
...DEFAULT_SCREEN_MEMORY_CONFIG,
|
|
3228
|
+
...screenMemory,
|
|
3229
|
+
...patch,
|
|
3230
|
+
},
|
|
3231
|
+
},
|
|
3232
|
+
}).catch((err) => {
|
|
3233
|
+
console.error("[settings] set_feature_config failed", err);
|
|
3234
|
+
setScreenMemoryMessage({
|
|
3235
|
+
kind: "error",
|
|
3236
|
+
text: (err as Error)?.message ?? "Could not update Screen Memory.",
|
|
3237
|
+
});
|
|
3238
|
+
});
|
|
3239
|
+
}
|
|
3240
|
+
|
|
3241
|
+
function refreshScreenMemoryStatus() {
|
|
3242
|
+
invoke<ScreenMemoryStatus>("screen_memory_status")
|
|
3243
|
+
.then(setScreenMemoryStatus)
|
|
3244
|
+
.catch(() => {});
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
async function exportScreenMemoryRecent() {
|
|
3248
|
+
setScreenMemoryBusy(true);
|
|
3249
|
+
setScreenMemoryMessage(null);
|
|
3250
|
+
try {
|
|
3251
|
+
const result = await invoke<ScreenMemoryExportResult>(
|
|
3252
|
+
"screen_memory_export_recent",
|
|
3253
|
+
{ minutes: 5 },
|
|
3254
|
+
);
|
|
3255
|
+
setScreenMemoryMessage({
|
|
3256
|
+
kind: "ok",
|
|
3257
|
+
text: `Saved ${result.files.length} segment${result.files.length === 1 ? "" : "s"} to ${result.folderPath}.`,
|
|
3258
|
+
});
|
|
3259
|
+
} catch (err) {
|
|
3260
|
+
setScreenMemoryMessage({
|
|
3261
|
+
kind: "error",
|
|
3262
|
+
text: (err as Error)?.message ?? "Could not export Screen Memory.",
|
|
3263
|
+
});
|
|
3264
|
+
} finally {
|
|
3265
|
+
setScreenMemoryBusy(false);
|
|
3266
|
+
refreshScreenMemoryStatus();
|
|
3267
|
+
}
|
|
3268
|
+
}
|
|
3269
|
+
|
|
3270
|
+
async function clearScreenMemory() {
|
|
3271
|
+
setScreenMemoryBusy(true);
|
|
3272
|
+
setScreenMemoryMessage(null);
|
|
3273
|
+
try {
|
|
3274
|
+
const status = await invoke<ScreenMemoryStatus>(
|
|
3275
|
+
"screen_memory_delete_all",
|
|
3276
|
+
);
|
|
3277
|
+
setScreenMemoryStatus(status);
|
|
3278
|
+
setScreenMemoryMessage({ kind: "ok", text: "Screen Memory cleared." });
|
|
3279
|
+
} catch (err) {
|
|
3280
|
+
setScreenMemoryMessage({
|
|
3281
|
+
kind: "error",
|
|
3282
|
+
text: (err as Error)?.message ?? "Could not clear Screen Memory.",
|
|
3283
|
+
});
|
|
3284
|
+
} finally {
|
|
3285
|
+
setScreenMemoryBusy(false);
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
|
|
3289
|
+
function openScreenMemoryFolder() {
|
|
3290
|
+
invoke("screen_memory_open_folder").catch((err) => {
|
|
3291
|
+
setScreenMemoryMessage({
|
|
3292
|
+
kind: "error",
|
|
3293
|
+
text: (err as Error)?.message ?? "Could not open Screen Memory folder.",
|
|
3294
|
+
});
|
|
3295
|
+
});
|
|
3296
|
+
}
|
|
3297
|
+
|
|
3173
3298
|
function openRegionGuideEditor() {
|
|
3174
3299
|
invoke("show_region_guide_editor").catch((err) =>
|
|
3175
3300
|
console.error("[settings] show_region_guide_editor failed", err),
|
|
@@ -3274,6 +3399,43 @@ function Setup({
|
|
|
3274
3399
|
inputRef.current?.focus();
|
|
3275
3400
|
}, []);
|
|
3276
3401
|
|
|
3402
|
+
useEffect(() => {
|
|
3403
|
+
let cancelled = false;
|
|
3404
|
+
const refresh = () => {
|
|
3405
|
+
invoke<ScreenMemoryStatus>("screen_memory_status")
|
|
3406
|
+
.then((status) => {
|
|
3407
|
+
if (!cancelled) setScreenMemoryStatus(status);
|
|
3408
|
+
})
|
|
3409
|
+
.catch(() => {});
|
|
3410
|
+
};
|
|
3411
|
+
refresh();
|
|
3412
|
+
const unlistens: Array<() => void> = [];
|
|
3413
|
+
const track = (p: Promise<() => void>) => {
|
|
3414
|
+
p.then((u) => {
|
|
3415
|
+
if (cancelled) {
|
|
3416
|
+
try {
|
|
3417
|
+
u();
|
|
3418
|
+
} catch {
|
|
3419
|
+
/* ignore */
|
|
3420
|
+
}
|
|
3421
|
+
return;
|
|
3422
|
+
}
|
|
3423
|
+
unlistens.push(u);
|
|
3424
|
+
}).catch(() => {});
|
|
3425
|
+
};
|
|
3426
|
+
track(listen("clips:screen-memory-changed", refresh));
|
|
3427
|
+
return () => {
|
|
3428
|
+
cancelled = true;
|
|
3429
|
+
unlistens.forEach((u) => {
|
|
3430
|
+
try {
|
|
3431
|
+
u();
|
|
3432
|
+
} catch {
|
|
3433
|
+
/* ignore */
|
|
3434
|
+
}
|
|
3435
|
+
});
|
|
3436
|
+
};
|
|
3437
|
+
}, []);
|
|
3438
|
+
|
|
3277
3439
|
// Load model status on mount and keep it current via events.
|
|
3278
3440
|
useEffect(() => {
|
|
3279
3441
|
let cancelled = false;
|
|
@@ -3596,6 +3758,133 @@ function Setup({
|
|
|
3596
3758
|
|
|
3597
3759
|
<div className="setup-section-heading">Recording</div>
|
|
3598
3760
|
|
|
3761
|
+
<div className="setup-section">
|
|
3762
|
+
<div className="setup-toggle-row">
|
|
3763
|
+
<SettingLabel
|
|
3764
|
+
label="Screen Memory"
|
|
3765
|
+
hint="Keep a rolling local screen buffer and recent app/window context for local agents. Stored only on this Mac."
|
|
3766
|
+
/>
|
|
3767
|
+
<Switch
|
|
3768
|
+
on={screenMemory.enabled}
|
|
3769
|
+
onChange={(enabled) =>
|
|
3770
|
+
setScreenMemoryConfig({ enabled, paused: false })
|
|
3771
|
+
}
|
|
3772
|
+
label="Enable Screen Memory"
|
|
3773
|
+
/>
|
|
3774
|
+
</div>
|
|
3775
|
+
{screenMemory.enabled ? (
|
|
3776
|
+
<>
|
|
3777
|
+
<div className="setup-toggle-row">
|
|
3778
|
+
<SettingLabel
|
|
3779
|
+
label="Pause capture"
|
|
3780
|
+
hint="Stop recording new Screen Memory segments without clearing the local history."
|
|
3781
|
+
/>
|
|
3782
|
+
<Switch
|
|
3783
|
+
on={screenMemory.paused}
|
|
3784
|
+
onChange={(paused) => setScreenMemoryConfig({ paused })}
|
|
3785
|
+
label="Pause Screen Memory"
|
|
3786
|
+
/>
|
|
3787
|
+
</div>
|
|
3788
|
+
<div className="setup-grid">
|
|
3789
|
+
<label className="setup-mini-field">
|
|
3790
|
+
<span>Retention</span>
|
|
3791
|
+
<select
|
|
3792
|
+
className="setup-select"
|
|
3793
|
+
value={screenMemory.retentionHours}
|
|
3794
|
+
onChange={(event) =>
|
|
3795
|
+
setScreenMemoryConfig({
|
|
3796
|
+
retentionHours: Number(event.target.value),
|
|
3797
|
+
})
|
|
3798
|
+
}
|
|
3799
|
+
>
|
|
3800
|
+
<option value={8}>8 hours</option>
|
|
3801
|
+
<option value={24}>24 hours</option>
|
|
3802
|
+
<option value={72}>72 hours</option>
|
|
3803
|
+
</select>
|
|
3804
|
+
</label>
|
|
3805
|
+
<label className="setup-mini-field">
|
|
3806
|
+
<span>Disk cap</span>
|
|
3807
|
+
<select
|
|
3808
|
+
className="setup-select"
|
|
3809
|
+
value={screenMemory.maxBytes}
|
|
3810
|
+
onChange={(event) =>
|
|
3811
|
+
setScreenMemoryConfig({
|
|
3812
|
+
maxBytes: Number(event.target.value),
|
|
3813
|
+
})
|
|
3814
|
+
}
|
|
3815
|
+
>
|
|
3816
|
+
<option value={5 * 1024 * 1024 * 1024}>5 GB</option>
|
|
3817
|
+
<option value={20 * 1024 * 1024 * 1024}>20 GB</option>
|
|
3818
|
+
<option value={50 * 1024 * 1024 * 1024}>50 GB</option>
|
|
3819
|
+
</select>
|
|
3820
|
+
</label>
|
|
3821
|
+
</div>
|
|
3822
|
+
<div className="whisper-status">
|
|
3823
|
+
{screenMemoryRecording ? (
|
|
3824
|
+
<IconCircleCheck size={13} className="whisper-status-icon" />
|
|
3825
|
+
) : (
|
|
3826
|
+
<IconAlertTriangle size={13} className="whisper-status-icon" />
|
|
3827
|
+
)}
|
|
3828
|
+
<span>
|
|
3829
|
+
{screenMemoryRecording
|
|
3830
|
+
? `Recording locally - ${screenMemorySegments.length} segment${screenMemorySegments.length === 1 ? "" : "s"}, ${formatStorageBytes(screenMemoryTotalBytes)}.`
|
|
3831
|
+
: screenMemory.paused
|
|
3832
|
+
? "Paused. Existing local history is still available."
|
|
3833
|
+
: screenMemoryStatus?.lastError
|
|
3834
|
+
? screenMemoryStatus.lastError
|
|
3835
|
+
: "Starting when screen recording permission is available."}
|
|
3836
|
+
</span>
|
|
3837
|
+
</div>
|
|
3838
|
+
{screenMemorySegments[0] ? (
|
|
3839
|
+
<p className="setup-hint">
|
|
3840
|
+
Latest segment:{" "}
|
|
3841
|
+
{new Date(screenMemorySegments[0].endedAt).toLocaleTimeString()}
|
|
3842
|
+
.
|
|
3843
|
+
</p>
|
|
3844
|
+
) : null}
|
|
3845
|
+
<div className="setup-button-row">
|
|
3846
|
+
<button
|
|
3847
|
+
type="button"
|
|
3848
|
+
className="secondary"
|
|
3849
|
+
onClick={exportScreenMemoryRecent}
|
|
3850
|
+
disabled={screenMemoryBusy || screenMemorySegments.length === 0}
|
|
3851
|
+
>
|
|
3852
|
+
<IconDownload size={15} stroke={1.9} />
|
|
3853
|
+
Export 5 min
|
|
3854
|
+
</button>
|
|
3855
|
+
<button
|
|
3856
|
+
type="button"
|
|
3857
|
+
className="secondary"
|
|
3858
|
+
onClick={openScreenMemoryFolder}
|
|
3859
|
+
>
|
|
3860
|
+
<IconFolderOpen size={15} stroke={1.9} />
|
|
3861
|
+
Open folder
|
|
3862
|
+
</button>
|
|
3863
|
+
<button
|
|
3864
|
+
type="button"
|
|
3865
|
+
className="secondary"
|
|
3866
|
+
onClick={clearScreenMemory}
|
|
3867
|
+
disabled={screenMemoryBusy || screenMemorySegments.length === 0}
|
|
3868
|
+
>
|
|
3869
|
+
<IconTrash size={15} stroke={1.9} />
|
|
3870
|
+
Clear
|
|
3871
|
+
</button>
|
|
3872
|
+
</div>
|
|
3873
|
+
{screenMemoryMessage ? (
|
|
3874
|
+
<p
|
|
3875
|
+
className={
|
|
3876
|
+
screenMemoryMessage.kind === "ok"
|
|
3877
|
+
? "setup-success"
|
|
3878
|
+
: "setup-warning"
|
|
3879
|
+
}
|
|
3880
|
+
>
|
|
3881
|
+
{screenMemoryMessage.text}
|
|
3882
|
+
</p>
|
|
3883
|
+
) : null}
|
|
3884
|
+
</>
|
|
3885
|
+
) : null}
|
|
3886
|
+
</div>
|
|
3887
|
+
|
|
3599
3888
|
<details className="setup-advanced">
|
|
3600
3889
|
<summary className="setup-advanced-summary">Advanced recording</summary>
|
|
3601
3890
|
<div className="setup-advanced-body">
|
|
@@ -18,6 +18,88 @@ export interface RegionGuidesConfig {
|
|
|
18
18
|
alwaysVisible?: boolean;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
export interface ScreenMemoryConfig {
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
paused: boolean;
|
|
24
|
+
retentionHours: number;
|
|
25
|
+
maxBytes: number;
|
|
26
|
+
segmentSeconds: number;
|
|
27
|
+
sampleIntervalSeconds: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type ScreenMemoryRuntimeState =
|
|
31
|
+
| "disabled"
|
|
32
|
+
| "idle"
|
|
33
|
+
| "recording"
|
|
34
|
+
| "paused";
|
|
35
|
+
|
|
36
|
+
export interface ScreenMemorySegmentMetadata {
|
|
37
|
+
id: string;
|
|
38
|
+
path: string;
|
|
39
|
+
fileName: string;
|
|
40
|
+
mimeType: string;
|
|
41
|
+
startedAt: string;
|
|
42
|
+
endedAt: string;
|
|
43
|
+
durationMs: number;
|
|
44
|
+
width?: number | null;
|
|
45
|
+
height?: number | null;
|
|
46
|
+
bytes: number;
|
|
47
|
+
corrupt: boolean;
|
|
48
|
+
error?: string | null;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ScreenMemoryActiveSegment {
|
|
52
|
+
id: string;
|
|
53
|
+
path: string;
|
|
54
|
+
mimeType: string;
|
|
55
|
+
startedAt: string;
|
|
56
|
+
durationMs: number;
|
|
57
|
+
width?: number | null;
|
|
58
|
+
height?: number | null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface ScreenMemoryStatus {
|
|
62
|
+
available: boolean;
|
|
63
|
+
state: ScreenMemoryRuntimeState;
|
|
64
|
+
config: ScreenMemoryConfig;
|
|
65
|
+
storageDir: string;
|
|
66
|
+
activeSegment?: ScreenMemoryActiveSegment | null;
|
|
67
|
+
recentSegments: ScreenMemorySegmentMetadata[];
|
|
68
|
+
lastError?: string | null;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface ScreenMemoryDeleteResult {
|
|
72
|
+
deletedSegments: number;
|
|
73
|
+
deletedBytes: number;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface ScreenMemoryEvent {
|
|
77
|
+
capturedAt: string;
|
|
78
|
+
appName?: string | null;
|
|
79
|
+
windowTitle?: string | null;
|
|
80
|
+
bundleId?: string | null;
|
|
81
|
+
source: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface ScreenMemoryQueryResult {
|
|
85
|
+
query?: string | null;
|
|
86
|
+
minutes: number;
|
|
87
|
+
events: ScreenMemoryEvent[];
|
|
88
|
+
segments: ScreenMemorySegmentMetadata[];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface ScreenMemoryExportFile {
|
|
92
|
+
path: string;
|
|
93
|
+
fileName: string;
|
|
94
|
+
bytes: number;
|
|
95
|
+
mimeType: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface ScreenMemoryExportResult {
|
|
99
|
+
folderPath: string;
|
|
100
|
+
files: ScreenMemoryExportFile[];
|
|
101
|
+
}
|
|
102
|
+
|
|
21
103
|
export interface FeatureConfig {
|
|
22
104
|
clipsEnabled: boolean;
|
|
23
105
|
meetingsEnabled: boolean;
|
|
@@ -29,6 +111,7 @@ export interface FeatureConfig {
|
|
|
29
111
|
showMeetingWidgetEnabled: boolean;
|
|
30
112
|
showInScreenCapture: boolean;
|
|
31
113
|
regionGuides: RegionGuidesConfig;
|
|
114
|
+
screenMemory: ScreenMemoryConfig;
|
|
32
115
|
onboardingComplete: boolean;
|
|
33
116
|
whisperModelEnabled: boolean;
|
|
34
117
|
}
|