@crievo/omni 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +41 -0
- package/README.md +2 -2
- package/bin/omni.mjs +14 -0
- package/docs/onboarding/clone-voice.png +0 -0
- package/docs/onboarding/getting-started.png +0 -0
- package/docs/onboarding/new-video.png +0 -0
- package/docs/onboarding/providers.png +0 -0
- package/docs/onboarding/publish.png +0 -0
- package/docs/onboarding/references.png +0 -0
- package/docs/onboarding.md +212 -0
- package/omnivideo.config.example.json +437 -0
- package/package.json +40 -4
- package/reference/captions.md +156 -0
- package/reference/carousel-contract.md +91 -0
- package/reference/cloud.md +96 -0
- package/reference/learnings.md +792 -0
- package/reference/omnichat.md +305 -0
- package/reference/premiere-mcp.md +91 -0
- package/reference/publish.md +305 -0
- package/reference/scenes-contract.md +109 -0
- package/reference/studio.md +666 -0
- package/reference/voicestudio.md +81 -0
- package/reference/writing-for-voice.md +67 -0
- package/requirements.txt +3 -0
- package/studio/api/app.ts +87 -0
- package/studio/api/lib/errors.ts +33 -0
- package/studio/api/lib/files.ts +41 -0
- package/studio/api/lib/hono.ts +9 -0
- package/studio/api/lib/result.ts +14 -0
- package/studio/api/lib/validate.ts +31 -0
- package/studio/api/lib/video.ts +10 -0
- package/studio/api/middleware/json-charset.ts +11 -0
- package/studio/api/middleware/local-only.ts +32 -0
- package/studio/api/middleware/no-timeout.ts +10 -0
- package/studio/api/routes/admin.ts +18 -0
- package/studio/api/routes/agent-cascade.ts +100 -0
- package/studio/api/routes/agent-history.ts +23 -0
- package/studio/api/routes/agent.ts +162 -0
- package/studio/api/routes/analytics.ts +31 -0
- package/studio/api/routes/approval.ts +60 -0
- package/studio/api/routes/archive.ts +12 -0
- package/studio/api/routes/captions.ts +28 -0
- package/studio/api/routes/carousel.ts +38 -0
- package/studio/api/routes/clone.ts +27 -0
- package/studio/api/routes/create.ts +19 -0
- package/studio/api/routes/events.ts +11 -0
- package/studio/api/routes/export.ts +14 -0
- package/studio/api/routes/media.ts +30 -0
- package/studio/api/routes/omnichat.ts +113 -0
- package/studio/api/routes/onboarding.ts +14 -0
- package/studio/api/routes/publish.ts +40 -0
- package/studio/api/routes/queue.ts +14 -0
- package/studio/api/routes/references.ts +40 -0
- package/studio/api/routes/runner.ts +17 -0
- package/studio/api/routes/schedule.ts +47 -0
- package/studio/api/routes/services.ts +11 -0
- package/studio/api/routes/sessions.ts +27 -0
- package/studio/api/routes/settings.ts +102 -0
- package/studio/api/routes/sound.ts +45 -0
- package/studio/api/routes/thumbnail.ts +18 -0
- package/studio/api/routes/usage.ts +13 -0
- package/studio/api/routes/videos.ts +41 -0
- package/studio/api/routes/voices.ts +71 -0
- package/studio/api/services/admin.ts +113 -0
- package/studio/api/services/agent-cascade.ts +975 -0
- package/studio/api/services/agent-claude.ts +47 -0
- package/studio/api/services/agent-history.ts +103 -0
- package/studio/api/services/agent-persona.ts +77 -0
- package/studio/api/services/agent-tools.ts +2237 -0
- package/studio/api/services/agent-ui-tools.ts +259 -0
- package/studio/api/services/agent-wait.ts +32 -0
- package/studio/api/services/agent.ts +553 -0
- package/studio/api/services/analytics.ts +92 -0
- package/studio/api/services/approval.ts +134 -0
- package/studio/api/services/archive.ts +38 -0
- package/studio/api/services/captions.ts +268 -0
- package/studio/api/services/carousel.ts +206 -0
- package/studio/api/services/classify.ts +196 -0
- package/studio/api/services/clone-phrases.ts +75 -0
- package/studio/api/services/clone.ts +722 -0
- package/studio/api/services/create.ts +421 -0
- package/studio/api/services/events.ts +215 -0
- package/studio/api/services/media.ts +32 -0
- package/studio/api/services/omnichat.ts +624 -0
- package/studio/api/services/onboarding.ts +77 -0
- package/studio/api/services/publish.ts +287 -0
- package/studio/api/services/queue.ts +150 -0
- package/studio/api/services/references.ts +269 -0
- package/studio/api/services/root.ts +60 -0
- package/studio/api/services/services.ts +114 -0
- package/studio/api/services/sessions.ts +1007 -0
- package/studio/api/services/settings.ts +983 -0
- package/studio/api/services/sound.ts +311 -0
- package/studio/api/services/thumbnail.ts +133 -0
- package/studio/api/services/usage.ts +27 -0
- package/studio/api/services/videos.ts +418 -0
- package/studio/api/services/voice-pause.ts +98 -0
- package/studio/api/services/voices.ts +324 -0
- package/studio/runner/runner.ts +244 -0
- package/studio/shared/omni-actions.ts +68 -0
- package/studio/shared/omni-admin.ts +52 -0
- package/studio/shared/omni-farewell.ts +48 -0
- package/studio/shared/omni-hotword.ts +20 -0
- package/studio/shared/omni-screens.ts +228 -0
- package/studio/shared/schemas/admin.ts +15 -0
- package/studio/shared/schemas/agent-cascade.ts +58 -0
- package/studio/shared/schemas/agent-history.ts +73 -0
- package/studio/shared/schemas/agent.ts +50 -0
- package/studio/shared/schemas/analytics.ts +6 -0
- package/studio/shared/schemas/approval.ts +22 -0
- package/studio/shared/schemas/captions.ts +19 -0
- package/studio/shared/schemas/carousel.ts +26 -0
- package/studio/shared/schemas/clone.ts +40 -0
- package/studio/shared/schemas/common.ts +16 -0
- package/studio/shared/schemas/omnichat.ts +54 -0
- package/studio/shared/schemas/onboarding.ts +5 -0
- package/studio/shared/schemas/publish.ts +45 -0
- package/studio/shared/schemas/references.ts +20 -0
- package/studio/shared/schemas/settings.ts +82 -0
- package/studio/shared/schemas/sound.ts +22 -0
- package/studio/shared/schemas/videos.ts +38 -0
- package/studio/shared/schemas/voices.ts +23 -0
- package/studio/shared/types/api.ts +1290 -0
- package/studio/studio.ts +148 -0
- package/studio/tsconfig.json +15 -0
- package/studio/web/assets/logos/cartesia.svg +4 -0
- package/studio/web/assets/logos/elevenlabs.svg +12 -0
- package/studio/web/assets/logos/fish.svg +24 -0
- package/studio/web/assets/logos/omni-black.png +0 -0
- package/studio/web/assets/logos/omni-white.png +0 -0
- package/studio/web/assets/logos/voicestudio.svg +21 -0
- package/studio/web/components/AgentMark.tsx +7 -0
- package/studio/web/components/AgentWalking.tsx +11 -0
- package/studio/web/components/ApiKeyField.tsx +104 -0
- package/studio/web/components/AppShell.tsx +64 -0
- package/studio/web/components/ApprovalNotice.tsx +65 -0
- package/studio/web/components/AvatarGroupIcon.tsx +22 -0
- package/studio/web/components/AvatarNameField.tsx +86 -0
- package/studio/web/components/AvatarPicker.tsx +84 -0
- package/studio/web/components/BrandLogo.tsx +16 -0
- package/studio/web/components/CartesiaPlanSetting.tsx +90 -0
- package/studio/web/components/ClaudeWalking.tsx +32 -0
- package/studio/web/components/CloneVoiceDialog/GuidedScript.tsx +39 -0
- package/studio/web/components/CloneVoiceDialog/LanguageBar.tsx +37 -0
- package/studio/web/components/CloneVoiceDialog/LevelMeter.tsx +31 -0
- package/studio/web/components/CloneVoiceDialog/ProviderChoice.tsx +81 -0
- package/studio/web/components/CloneVoiceDialog/QualityPanel.tsx +62 -0
- package/studio/web/components/CloneVoiceDialog/RecordStep.tsx +50 -0
- package/studio/web/components/CloneVoiceDialog/RecorderBar.tsx +79 -0
- package/studio/web/components/CloneVoiceDialog/RedoSummary.tsx +54 -0
- package/studio/web/components/CloneVoiceDialog/SaveStep.tsx +91 -0
- package/studio/web/components/CloneVoiceDialog/SourceBar.tsx +30 -0
- package/studio/web/components/CloneVoiceDialog/index.tsx +141 -0
- package/studio/web/components/CloneVoiceDialog/types.ts +28 -0
- package/studio/web/components/CloneVoiceDialog/useCloneVoice.ts +528 -0
- package/studio/web/components/ConnectionSignals.tsx +51 -0
- package/studio/web/components/EditVoiceDialog/EditVoiceFooter.tsx +72 -0
- package/studio/web/components/EditVoiceDialog/ProviderCards.tsx +81 -0
- package/studio/web/components/EditVoiceDialog/index.tsx +256 -0
- package/studio/web/components/ErrorBanner.tsx +115 -0
- package/studio/web/components/FinishedTask.tsx +41 -0
- package/studio/web/components/FishModelSetting.tsx +69 -0
- package/studio/web/components/FishPriceSetting.tsx +44 -0
- package/studio/web/components/HumanBanner.tsx +64 -0
- package/studio/web/components/Lightbox.tsx +41 -0
- package/studio/web/components/LogStream.tsx +42 -0
- package/studio/web/components/Markdown.tsx +21 -0
- package/studio/web/components/MissingDmsPanel/BatchSend.tsx +137 -0
- package/studio/web/components/MissingDmsPanel/CommentCard.tsx +168 -0
- package/studio/web/components/MissingDmsPanel/CommentFeed.tsx +45 -0
- package/studio/web/components/MissingDmsPanel/DmBubble.tsx +38 -0
- package/studio/web/components/MissingDmsPanel/ReplyComposer.tsx +63 -0
- package/studio/web/components/MissingDmsPanel/index.tsx +98 -0
- package/studio/web/components/NotFound.tsx +48 -0
- package/studio/web/components/Omni/OmniAvatarPicker.tsx +92 -0
- package/studio/web/components/Omni/OmniCards.tsx +202 -0
- package/studio/web/components/Omni/OmniGlow.tsx +183 -0
- package/studio/web/components/Omni/OmniHistory.tsx +119 -0
- package/studio/web/components/Omni/OmniHotword.tsx +40 -0
- package/studio/web/components/Omni/OmniMicSelect.tsx +92 -0
- package/studio/web/components/Omni/OmniVoiceSample.tsx +81 -0
- package/studio/web/components/Omni/OmniWidget.tsx +743 -0
- package/studio/web/components/Omni/PendingActions.tsx +200 -0
- package/studio/web/components/Omni/Transcript.tsx +127 -0
- package/studio/web/components/OmnichatAccountStatus.tsx +87 -0
- package/studio/web/components/OmnichatRulePanel/RuleConfig.tsx +150 -0
- package/studio/web/components/OmnichatRulePanel/RuleDryRun.tsx +15 -0
- package/studio/web/components/OmnichatRulePanel/RuleEnableConfirm.tsx +42 -0
- package/studio/web/components/OmnichatRulePanel/RuleSkeleton.tsx +18 -0
- package/studio/web/components/OmnichatRulePanel/RuleStatus.tsx +55 -0
- package/studio/web/components/OmnichatRulePanel/index.tsx +115 -0
- package/studio/web/components/OmnichatRulePanel/rule-steps.ts +67 -0
- package/studio/web/components/OmnichatRulePanel/steps/MessageStep.tsx +91 -0
- package/studio/web/components/OmnichatRulePanel/steps/RepliesStep.tsx +201 -0
- package/studio/web/components/OmnichatRulePanel/steps/TriggerStep.tsx +76 -0
- package/studio/web/components/OmnichatRulePanel/steps/types.ts +11 -0
- package/studio/web/components/Palette.tsx +17 -0
- package/studio/web/components/PlatformCard.tsx +109 -0
- package/studio/web/components/PlatformIcon.tsx +19 -0
- package/studio/web/components/ProviderCard.tsx +80 -0
- package/studio/web/components/ProviderDetail.tsx +367 -0
- package/studio/web/components/ProviderLogo.tsx +20 -0
- package/studio/web/components/QueuePanel.tsx +77 -0
- package/studio/web/components/ReferenceActions.tsx +89 -0
- package/studio/web/components/ReferencePicker.tsx +136 -0
- package/studio/web/components/ResultMessage.tsx +7 -0
- package/studio/web/components/RuleForm.tsx +138 -0
- package/studio/web/components/RuleLog.tsx +151 -0
- package/studio/web/components/RunningTask.tsx +23 -0
- package/studio/web/components/SampleList.tsx +55 -0
- package/studio/web/components/SessionPanel.tsx +352 -0
- package/studio/web/components/SettingRow.tsx +14 -0
- package/studio/web/components/SettingsCategorySkeleton.tsx +25 -0
- package/studio/web/components/SidePanel.tsx +77 -0
- package/studio/web/components/Sidebar.tsx +289 -0
- package/studio/web/components/StageStepper.tsx +87 -0
- package/studio/web/components/StudioOffline.tsx +80 -0
- package/studio/web/components/TaskName.tsx +17 -0
- package/studio/web/components/TopBanners.tsx +30 -0
- package/studio/web/components/VideoOmnichatPanel.tsx +287 -0
- package/studio/web/components/VoiceAvatar.tsx +33 -0
- package/studio/web/components/VoiceCarousel.tsx +196 -0
- package/studio/web/components/VoiceCategory.tsx +9 -0
- package/studio/web/components/VoiceModal.tsx +39 -0
- package/studio/web/components/VoiceProfileCard.tsx +75 -0
- package/studio/web/components/VoiceProfilePicker.tsx +107 -0
- package/studio/web/components/VoiceProfilesSettings.tsx +150 -0
- package/studio/web/components/VoiceProviderCard.tsx +118 -0
- package/studio/web/components/VoiceProvidersCard.tsx +26 -0
- package/studio/web/components/WaitList.tsx +21 -0
- package/studio/web/components/icons.tsx +247 -0
- package/studio/web/components/ui/accordion.tsx +47 -0
- package/studio/web/components/ui/badge.tsx +18 -0
- package/studio/web/components/ui/calendar.tsx +43 -0
- package/studio/web/components/ui/chart.tsx +229 -0
- package/studio/web/components/ui/checkbox.tsx +26 -0
- package/studio/web/components/ui/cx.ts +2 -0
- package/studio/web/components/ui/date-time-picker.tsx +84 -0
- package/studio/web/components/ui/panel.tsx +23 -0
- package/studio/web/components/ui/picker.tsx +58 -0
- package/studio/web/components/ui/popover.tsx +24 -0
- package/studio/web/components/ui/select.tsx +89 -0
- package/studio/web/components/ui/skeleton.tsx +10 -0
- package/studio/web/components/ui/slider.tsx +68 -0
- package/studio/web/components/ui/switch.tsx +13 -0
- package/studio/web/components/ui/tooltip.test.tsx +30 -0
- package/studio/web/components/ui/tooltip.tsx +59 -0
- package/studio/web/hooks/useAccounts.ts +27 -0
- package/studio/web/hooks/useAdmin.ts +12 -0
- package/studio/web/hooks/useAnalytics.ts +21 -0
- package/studio/web/hooks/useAvatarAudioReactive.ts +87 -0
- package/studio/web/hooks/useBrowserConnect.ts +48 -0
- package/studio/web/hooks/useClonePlan.ts +14 -0
- package/studio/web/hooks/useConnected.ts +7 -0
- package/studio/web/hooks/useLiveQuery.ts +29 -0
- package/studio/web/hooks/useMenuCollapsed.ts +32 -0
- package/studio/web/hooks/useMicDevices.ts +53 -0
- package/studio/web/hooks/useMissingDms.ts +211 -0
- package/studio/web/hooks/useMissingSetupSteps.ts +26 -0
- package/studio/web/hooks/useNow.ts +11 -0
- package/studio/web/hooks/useOmniAgent.ts +278 -0
- package/studio/web/hooks/useOmniClaude.ts +124 -0
- package/studio/web/hooks/useOmniDock.ts +142 -0
- package/studio/web/hooks/useOmniGreeting.ts +60 -0
- package/studio/web/hooks/useOmniHotword.ts +128 -0
- package/studio/web/hooks/useOmnichat.ts +26 -0
- package/studio/web/hooks/useOnboarding.ts +27 -0
- package/studio/web/hooks/usePost.ts +23 -0
- package/studio/web/hooks/useQueue.ts +10 -0
- package/studio/web/hooks/useReferences.ts +20 -0
- package/studio/web/hooks/useRuleEditor.ts +101 -0
- package/studio/web/hooks/useRunner.ts +24 -0
- package/studio/web/hooks/useSaveAction.ts +23 -0
- package/studio/web/hooks/useSchedule.ts +11 -0
- package/studio/web/hooks/useServices.ts +10 -0
- package/studio/web/hooks/useSessions.ts +15 -0
- package/studio/web/hooks/useSettings.ts +11 -0
- package/studio/web/hooks/useSettingsSection.ts +30 -0
- package/studio/web/hooks/useSidePanel.ts +23 -0
- package/studio/web/hooks/useSound.ts +30 -0
- package/studio/web/hooks/useUsage.ts +11 -0
- package/studio/web/hooks/useVideoVoice.ts +36 -0
- package/studio/web/hooks/useVideos.ts +21 -0
- package/studio/web/hooks/useVoiceProfilePreview.ts +52 -0
- package/studio/web/hooks/useVoiceProfiles.ts +7 -0
- package/studio/web/hooks/useVoiceRunning.ts +10 -0
- package/studio/web/hooks/useVoiceStudioClosed.ts +8 -0
- package/studio/web/index.html +19 -0
- package/studio/web/lib/agent.ts +7 -0
- package/studio/web/lib/alerts.ts +210 -0
- package/studio/web/lib/analytics-metrics.ts +351 -0
- package/studio/web/lib/api.ts +70 -0
- package/studio/web/lib/audio.ts +39 -0
- package/studio/web/lib/avatars.ts +41 -0
- package/studio/web/lib/calendar.ts +218 -0
- package/studio/web/lib/caption-position.ts +249 -0
- package/studio/web/lib/carousel.ts +24 -0
- package/studio/web/lib/chime.ts +42 -0
- package/studio/web/lib/clone-voice.ts +55 -0
- package/studio/web/lib/export.ts +11 -0
- package/studio/web/lib/files.ts +8 -0
- package/studio/web/lib/format.ts +93 -0
- package/studio/web/lib/media.ts +29 -0
- package/studio/web/lib/mic-device.ts +72 -0
- package/studio/web/lib/missing-dms.ts +70 -0
- package/studio/web/lib/omni-cards.ts +42 -0
- package/studio/web/lib/omni-cascade.ts +1067 -0
- package/studio/web/lib/omni-greeting-audio.ts +24 -0
- package/studio/web/lib/omni-hotword.ts +231 -0
- package/studio/web/lib/omni-panel.ts +67 -0
- package/studio/web/lib/omni-realtime.ts +811 -0
- package/studio/web/lib/omni-ui.ts +402 -0
- package/studio/web/lib/omni-wait.ts +174 -0
- package/studio/web/lib/omnichat-api.ts +44 -0
- package/studio/web/lib/orb.ts +270 -0
- package/studio/web/lib/pcm-recorder.ts +115 -0
- package/studio/web/lib/platforms.ts +17 -0
- package/studio/web/lib/providers.ts +27 -0
- package/studio/web/lib/publish-draft.ts +52 -0
- package/studio/web/lib/publish-settings.ts +81 -0
- package/studio/web/lib/query-client.ts +122 -0
- package/studio/web/lib/references.ts +13 -0
- package/studio/web/lib/services.ts +40 -0
- package/studio/web/lib/sessions.ts +103 -0
- package/studio/web/lib/settings-categories.ts +58 -0
- package/studio/web/lib/sound-audio.ts +33 -0
- package/studio/web/lib/sound-timeline.ts +291 -0
- package/studio/web/lib/sse.ts +86 -0
- package/studio/web/lib/stage-history.ts +141 -0
- package/studio/web/lib/stages.ts +344 -0
- package/studio/web/lib/studio-offline.ts +60 -0
- package/studio/web/lib/upload.ts +24 -0
- package/studio/web/lib/video-tabs.ts +118 -0
- package/studio/web/lib/voice-profile-draft.ts +34 -0
- package/studio/web/lib/voice-profiles.ts +3 -0
- package/studio/web/main.tsx +14 -0
- package/studio/web/pages/AdminPage/index.tsx +123 -0
- package/studio/web/pages/AgentPage/components/Measurements.tsx +102 -0
- package/studio/web/pages/AgentPage/index.tsx +28 -0
- package/studio/web/pages/AnalyticsPage/components/About.tsx +52 -0
- package/studio/web/pages/AnalyticsPage/components/ChannelCards.tsx +106 -0
- package/studio/web/pages/AnalyticsPage/components/ChannelView.tsx +137 -0
- package/studio/web/pages/AnalyticsPage/components/CollectionStatus.tsx +46 -0
- package/studio/web/pages/AnalyticsPage/components/Comparison.tsx +68 -0
- package/studio/web/pages/AnalyticsPage/components/Diagnosis.tsx +50 -0
- package/studio/web/pages/AnalyticsPage/components/Highlights.tsx +49 -0
- package/studio/web/pages/AnalyticsPage/components/Hint.tsx +11 -0
- package/studio/web/pages/AnalyticsPage/components/HookVsBody.tsx +100 -0
- package/studio/web/pages/AnalyticsPage/components/HourlyWave.tsx +133 -0
- package/studio/web/pages/AnalyticsPage/components/Insights.tsx +70 -0
- package/studio/web/pages/AnalyticsPage/components/MetricCard.tsx +46 -0
- package/studio/web/pages/AnalyticsPage/components/PlanSection.tsx +40 -0
- package/studio/web/pages/AnalyticsPage/components/ProgressionChart.tsx +155 -0
- package/studio/web/pages/AnalyticsPage/components/ReelBarsChart.tsx +154 -0
- package/studio/web/pages/AnalyticsPage/components/ReelThumb.tsx +19 -0
- package/studio/web/pages/AnalyticsPage/components/ReelView.tsx +290 -0
- package/studio/web/pages/AnalyticsPage/components/ReelsTable.tsx +269 -0
- package/studio/web/pages/AnalyticsPage/components/RequestWithFocus.tsx +38 -0
- package/studio/web/pages/AnalyticsPage/components/SegmentedControl.tsx +35 -0
- package/studio/web/pages/AnalyticsPage/components/VsMedian.tsx +31 -0
- package/studio/web/pages/AnalyticsPage/index.tsx +17 -0
- package/studio/web/pages/GettingStartedPage/index.tsx +174 -0
- package/studio/web/pages/NewVideoPage/components/DeliverablesPicker.tsx +62 -0
- package/studio/web/pages/NewVideoPage/components/FormatPicker.tsx +33 -0
- package/studio/web/pages/NewVideoPage/index.tsx +133 -0
- package/studio/web/pages/NotFoundPage/index.tsx +9 -0
- package/studio/web/pages/OmnichatPage/components/NewFromLink.tsx +59 -0
- package/studio/web/pages/OmnichatPage/components/RuleListItem.tsx +64 -0
- package/studio/web/pages/OmnichatPage/components/RulePreview.tsx +14 -0
- package/studio/web/pages/OmnichatPage/components/RuleView.tsx +88 -0
- package/studio/web/pages/OmnichatPage/index.tsx +153 -0
- package/studio/web/pages/QueuePage/index.tsx +22 -0
- package/studio/web/pages/ReferencePage/components/ReferenceTexts.tsx +131 -0
- package/studio/web/pages/ReferencePage/index.tsx +216 -0
- package/studio/web/pages/ReferencesPage/components/NewReferenceForm.tsx +150 -0
- package/studio/web/pages/ReferencesPage/components/ReferenceCard.tsx +42 -0
- package/studio/web/pages/ReferencesPage/components/ReferenceGridSkeleton.tsx +31 -0
- package/studio/web/pages/ReferencesPage/index.tsx +67 -0
- package/studio/web/pages/SchedulePage/components/CalendarSkeleton.tsx +18 -0
- package/studio/web/pages/SchedulePage/components/DayView.tsx +177 -0
- package/studio/web/pages/SchedulePage/components/HourPicker.tsx +103 -0
- package/studio/web/pages/SchedulePage/components/MonthDayCell.tsx +111 -0
- package/studio/web/pages/SchedulePage/components/MonthView.tsx +47 -0
- package/studio/web/pages/SchedulePage/components/PlatformIcons.tsx +12 -0
- package/studio/web/pages/SchedulePage/components/PostThumb.tsx +15 -0
- package/studio/web/pages/SchedulePage/components/WeekColumn.tsx +75 -0
- package/studio/web/pages/SchedulePage/components/WeekView.tsx +35 -0
- package/studio/web/pages/SchedulePage/index.tsx +285 -0
- package/studio/web/pages/SettingsPage/components/AgentAccounts.tsx +263 -0
- package/studio/web/pages/SettingsPage/components/AgentCategory.tsx +20 -0
- package/studio/web/pages/SettingsPage/components/ModelPicker.tsx +49 -0
- package/studio/web/pages/SettingsPage/components/ModelsSettings.tsx +138 -0
- package/studio/web/pages/SettingsPage/components/PlatformsCategory.tsx +23 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/AccountStatus.tsx +29 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/AutoPublishPanel.tsx +90 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/BrowserConnect.tsx +62 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/CheckField.tsx +19 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/InstagramPanel.tsx +113 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/OmnichatSettingsPanel.tsx +146 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/SaveBar.tsx +33 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/SchedulePanel.tsx +132 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/SettingsCard.tsx +47 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/SettingsCardGroup.tsx +19 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/TextPanel.tsx +55 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/TiktokPanel.tsx +123 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/YoutubePanel.tsx +100 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/badges.tsx +15 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/index.tsx +40 -0
- package/studio/web/pages/SettingsPage/components/PublishingCategory/types.ts +10 -0
- package/studio/web/pages/SettingsPage/components/UsageCategory.tsx +389 -0
- package/studio/web/pages/SettingsPage/components/VoiceProvidersCategory.tsx +97 -0
- package/studio/web/pages/SettingsPage/index.tsx +85 -0
- package/studio/web/pages/VideoPage/components/AudioPlayer.tsx +113 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/AxisField.tsx +50 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/CaptionList.tsx +56 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/CaptionListItem.tsx +92 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/CaptionMargins.tsx +57 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/CaptionStyleFields.tsx +70 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/CaptionTextForm.tsx +87 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/ColorField.tsx +37 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/MarginField.tsx +59 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/NumberField.tsx +57 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/PositionControls.tsx +140 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/captionEditor.ts +215 -0
- package/studio/web/pages/VideoPage/components/CaptionPositionEditor/useCaptionPosition.ts +154 -0
- package/studio/web/pages/VideoPage/components/CarouselChangeRequest.tsx +72 -0
- package/studio/web/pages/VideoPage/components/CarouselCompositionStage.tsx +80 -0
- package/studio/web/pages/VideoPage/components/CarouselCreate.tsx +63 -0
- package/studio/web/pages/VideoPage/components/CarouselMissing.tsx +19 -0
- package/studio/web/pages/VideoPage/components/CarouselPublishStage.tsx +173 -0
- package/studio/web/pages/VideoPage/components/CarouselScriptStage.tsx +82 -0
- package/studio/web/pages/VideoPage/components/CarouselSlideCard.tsx +49 -0
- package/studio/web/pages/VideoPage/components/CarouselViewer.tsx +55 -0
- package/studio/web/pages/VideoPage/components/ChangedVoices.tsx +53 -0
- package/studio/web/pages/VideoPage/components/CompositionStage.tsx +78 -0
- package/studio/web/pages/VideoPage/components/CoverPicker.tsx +32 -0
- package/studio/web/pages/VideoPage/components/EditorStage.tsx +53 -0
- package/studio/web/pages/VideoPage/components/LineTakes.tsx +160 -0
- package/studio/web/pages/VideoPage/components/LineTextEditor.tsx +124 -0
- package/studio/web/pages/VideoPage/components/LineVoicePicker.tsx +37 -0
- package/studio/web/pages/VideoPage/components/MediaImage.tsx +25 -0
- package/studio/web/pages/VideoPage/components/MotionScriptStage.tsx +39 -0
- package/studio/web/pages/VideoPage/components/NarrationStage.tsx +70 -0
- package/studio/web/pages/VideoPage/components/PublishForm.tsx +387 -0
- package/studio/web/pages/VideoPage/components/PublishStage.tsx +76 -0
- package/studio/web/pages/VideoPage/components/PublishText.tsx +149 -0
- package/studio/web/pages/VideoPage/components/ScenesApprovalPanel.tsx +278 -0
- package/studio/web/pages/VideoPage/components/ScheduledInfo.tsx +72 -0
- package/studio/web/pages/VideoPage/components/ScriptApprovalPanel.tsx +189 -0
- package/studio/web/pages/VideoPage/components/ScriptStage.tsx +17 -0
- package/studio/web/pages/VideoPage/components/SequencePlayer.tsx +146 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/AddSound.tsx +117 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/AreaSelection.tsx +74 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/BedPanel.tsx +94 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/BedRow.tsx +45 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/CaptionOverlay.tsx +44 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/CaptionSaveBar.tsx +32 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/CaptionsPanel.tsx +22 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/ClipBlock.tsx +111 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/ClipPanel.tsx +76 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/CutsPanel.tsx +44 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/EditorTabBar.tsx +73 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/EffectChoice.tsx +46 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/EffectItem.tsx +89 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/EffectPanel.tsx +232 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/EffectsRow.tsx +21 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/Lane.tsx +39 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/MarkerRow.tsx +40 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/MuteButton.tsx +36 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/NumberInput.tsx +37 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/PlanWarnings.tsx +19 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/PlayerResizeHandle.tsx +50 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/PreviewControls.tsx +51 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/SceneRow.tsx +54 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/SettingsPanel.tsx +65 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/SoundLibrary.tsx +99 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/SoundPreview.tsx +82 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/SpeedPanel.tsx +128 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/TimelineDock.tsx +56 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/TimelineFooter.tsx +26 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/TimelineSkeleton.tsx +21 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/TimelineToolbar.tsx +160 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/TimelineTracks.tsx +121 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/TrackSidebar.tsx +30 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/VoiceRow.tsx +53 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/Waveform.tsx +97 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/clipActions.ts +50 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/effectActions.ts +161 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/index.tsx +161 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/timelineGeometry.ts +45 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/types.ts +43 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useAutosave.ts +107 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useEditorShortcuts.ts +168 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useFitHeight.ts +40 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useFollowPlayhead.ts +21 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useListenMix.ts +43 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/usePlayback.ts +231 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/usePlayerWidth.ts +27 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useSoundData.ts +124 -0
- package/studio/web/pages/VideoPage/components/SoundTimeline/useSoundTimeline.ts +511 -0
- package/studio/web/pages/VideoPage/components/StageDrawer/CompareVersions.tsx +111 -0
- package/studio/web/pages/VideoPage/components/StageDrawer/VersionCard.tsx +81 -0
- package/studio/web/pages/VideoPage/components/StageDrawer/VersionMedia.tsx +24 -0
- package/studio/web/pages/VideoPage/components/StageDrawer/VersionText.tsx +15 -0
- package/studio/web/pages/VideoPage/components/StageDrawer/index.tsx +109 -0
- package/studio/web/pages/VideoPage/components/StageProcess.tsx +126 -0
- package/studio/web/pages/VideoPage/components/StageResult.tsx +69 -0
- package/studio/web/pages/VideoPage/components/SwapReference.tsx +92 -0
- package/studio/web/pages/VideoPage/components/ThumbnailPanel.tsx +252 -0
- package/studio/web/pages/VideoPage/components/TimingPanel.tsx +89 -0
- package/studio/web/pages/VideoPage/components/VideoPlayer.tsx +18 -0
- package/studio/web/pages/VideoPage/components/VideoSkeleton.tsx +50 -0
- package/studio/web/pages/VideoPage/components/VideoVoiceInfo.tsx +33 -0
- package/studio/web/pages/VideoPage/components/VideoVoicePicker.tsx +165 -0
- package/studio/web/pages/VideoPage/components/VoicePauseBanner.tsx +56 -0
- package/studio/web/pages/VideoPage/components/WithLogo.tsx +10 -0
- package/studio/web/pages/VideoPage/index.tsx +295 -0
- package/studio/web/pages/VideosPage/components/PublishedOn.tsx +85 -0
- package/studio/web/pages/VideosPage/components/ServicesPanel.tsx +81 -0
- package/studio/web/pages/VideosPage/components/SessionsPanel.tsx +62 -0
- package/studio/web/pages/VideosPage/components/VideoListSkeleton.tsx +25 -0
- package/studio/web/pages/VideosPage/components/VideoRow.tsx +122 -0
- package/studio/web/pages/VideosPage/index.tsx +134 -0
- package/studio/web/pages/VoicePage/index.tsx +28 -0
- package/studio/web/router.tsx +201 -0
- package/studio/web/styles/base/elements.css +55 -0
- package/studio/web/styles/base/utilities.css +25 -0
- package/studio/web/styles/components/badge.css +33 -0
- package/studio/web/styles/components/claude-running.css +27 -0
- package/studio/web/styles/components/claude-session.css +212 -0
- package/studio/web/styles/components/claude-walking.css +92 -0
- package/studio/web/styles/components/clone-voice-save.css +136 -0
- package/studio/web/styles/components/clone-voice.css +379 -0
- package/studio/web/styles/components/controls.css +70 -0
- package/studio/web/styles/components/data-and-image.css +54 -0
- package/studio/web/styles/components/forms.css +132 -0
- package/studio/web/styles/components/human-banner.css +99 -0
- package/studio/web/styles/components/lightbox.css +50 -0
- package/studio/web/styles/components/markdown.css +68 -0
- package/studio/web/styles/components/modal.css +70 -0
- package/studio/web/styles/components/omni-cards.css +105 -0
- package/studio/web/styles/components/omni.css +859 -0
- package/studio/web/styles/components/omnichat.css +538 -0
- package/studio/web/styles/components/panel.css +115 -0
- package/studio/web/styles/components/platform-card.css +140 -0
- package/studio/web/styles/components/provider-card.css +132 -0
- package/studio/web/styles/components/queue.css +185 -0
- package/studio/web/styles/components/reference-actions.css +133 -0
- package/studio/web/styles/components/reference-picker.css +146 -0
- package/studio/web/styles/components/results-drawer.css +224 -0
- package/studio/web/styles/components/segmented.css +115 -0
- package/studio/web/styles/components/side-panel-tab.css +23 -0
- package/studio/web/styles/components/status-signals.css +66 -0
- package/studio/web/styles/components/stepper.css +208 -0
- package/studio/web/styles/components/table.css +19 -0
- package/studio/web/styles/components/tabs.css +24 -0
- package/studio/web/styles/components/ui/accordion.css +71 -0
- package/studio/web/styles/components/ui/chart.css +162 -0
- package/studio/web/styles/components/ui/checkbox.css +37 -0
- package/studio/web/styles/components/ui/date-picker.css +153 -0
- package/studio/web/styles/components/ui/select.css +110 -0
- package/studio/web/styles/components/ui/skeleton.css +25 -0
- package/studio/web/styles/components/ui/slider.css +81 -0
- package/studio/web/styles/components/ui/switch.css +41 -0
- package/studio/web/styles/components/ui/tooltip.css +24 -0
- package/studio/web/styles/components/voice-carousel.css +255 -0
- package/studio/web/styles/components/voice-editor.css +179 -0
- package/studio/web/styles/components/voice-grid.css +56 -0
- package/studio/web/styles/components/voice-profiles.css +192 -0
- package/studio/web/styles/design-system.md +136 -0
- package/studio/web/styles/index.css +116 -0
- package/studio/web/styles/layout/page.css +41 -0
- package/studio/web/styles/layout/sidebar-groups.css +39 -0
- package/studio/web/styles/layout/sidebar.css +111 -0
- package/studio/web/styles/pages/agent.css +26 -0
- package/studio/web/styles/pages/analytics/dashboard.css +614 -0
- package/studio/web/styles/pages/analytics/insights.css +48 -0
- package/studio/web/styles/pages/getting-started.css +166 -0
- package/studio/web/styles/pages/new-video/form.css +32 -0
- package/studio/web/styles/pages/not-found.css +59 -0
- package/studio/web/styles/pages/references.css +204 -0
- package/studio/web/styles/pages/schedule/calendar.css +541 -0
- package/studio/web/styles/pages/schedule/chip-states.css +60 -0
- package/studio/web/styles/pages/settings/models.css +72 -0
- package/studio/web/styles/pages/settings/shell.css +361 -0
- package/studio/web/styles/pages/settings/usage.css +63 -0
- package/studio/web/styles/pages/studio-offline.css +105 -0
- package/studio/web/styles/pages/video/caption-controls.css +194 -0
- package/studio/web/styles/pages/video/captions-grid.css +70 -0
- package/studio/web/styles/pages/video/captions.css +79 -0
- package/studio/web/styles/pages/video/editor-chat.css +103 -0
- package/studio/web/styles/pages/video/export.css +50 -0
- package/studio/web/styles/pages/video/frames.css +29 -0
- package/studio/web/styles/pages/video/fullscreen-stage.css +400 -0
- package/studio/web/styles/pages/video/instagram-carousel.css +309 -0
- package/studio/web/styles/pages/video/layout.css +285 -0
- package/studio/web/styles/pages/video/narration.css +138 -0
- package/studio/web/styles/pages/video/preview-overview.css +11 -0
- package/studio/web/styles/pages/video/processing-notice.css +34 -0
- package/studio/web/styles/pages/video/publish-when.css +76 -0
- package/studio/web/styles/pages/video/publish.css +97 -0
- package/studio/web/styles/pages/video/result.css +96 -0
- package/studio/web/styles/pages/video/scenes.css +167 -0
- package/studio/web/styles/pages/video/sound-timeline.css +672 -0
- package/studio/web/styles/pages/video/sound-toolbar.css +149 -0
- package/studio/web/styles/pages/video/take-player.css +100 -0
- package/studio/web/styles/pages/video/thumbnail.css +157 -0
- package/studio/web/styles/pages/video/timeline.css +117 -0
- package/studio/web/styles/pages/video/voice-picker.css +14 -0
- package/studio/web/styles/pages/video-list/active-row.css +27 -0
- package/studio/web/styles/pages/video-list/card-link.css +49 -0
- package/studio/web/styles/pages/video-list/list.css +86 -0
- package/studio/web/styles/theme/identity/details.css +204 -0
- package/studio/web/styles/theme/identity/shell.css +249 -0
- package/studio/web/styles/theme/identity/surfaces.css +183 -0
- package/studio/web/styles/theme/identity/titles-and-buttons.css +120 -0
- package/studio/web/styles/theme/no-borders/blocks.css +208 -0
- package/studio/web/styles/theme/no-borders/controls.css +256 -0
- package/studio/web/styles/tokens.css +245 -0
- package/studio/web/types/api.ts +2 -0
- package/studio/web/types/assets.d.ts +9 -0
- package/templates/brief.md +27 -0
- package/templates/captions.html +204 -0
- package/templates/carousel-composition.md +47 -0
- package/templates/carousel-script.md +60 -0
- package/templates/components/voiceavatar/README.md +87 -0
- package/templates/components/voiceavatar/demo.html +50 -0
- package/templates/components/voiceavatar/voiceavatar.js +415 -0
- package/templates/motion.md +80 -0
- package/templates/playbook.md +43 -0
- package/templates/reference.md +123 -0
- package/templates/scene.html +112 -0
- package/templates/scenes.example.json +96 -0
- package/templates/script.md +63 -0
- package/templates/slide.html +71 -0
- package/templates/wireframe.html +91 -0
- package/tools/analysis.mjs +300 -0
- package/tools/approval.mjs +442 -0
- package/tools/assemble.mjs +942 -0
- package/tools/build-motion.mjs +437 -0
- package/tools/captions.mjs +246 -0
- package/tools/carousel.mjs +558 -0
- package/tools/compose.mjs +307 -0
- package/tools/cuts.mjs +74 -0
- package/tools/editor.mjs +419 -0
- package/tools/epidemic-capture.js +54 -0
- package/tools/fanout.mjs +69 -0
- package/tools/history.mjs +70 -0
- package/tools/history.py +61 -0
- package/tools/job-queue.mjs +180 -0
- package/tools/job_queue.py +430 -0
- package/tools/lib/agents.mjs +412 -0
- package/tools/lib/channel.mjs +399 -0
- package/tools/lib/claude-settings.mjs +67 -0
- package/tools/lib/cli.mjs +9 -0
- package/tools/lib/fanout.mjs +234 -0
- package/tools/lib/http.mjs +94 -0
- package/tools/lib/index.js +14 -0
- package/tools/lib/mcp-server.mjs +69 -0
- package/tools/lib/metrics/metrics.mjs +204 -0
- package/tools/lib/narration.mjs +15 -0
- package/tools/lib/oauth-client.mjs +295 -0
- package/tools/lib/omnichat/config.mjs +139 -0
- package/tools/lib/omnichat/errors.mjs +42 -0
- package/tools/lib/omnichat/extract.mjs +82 -0
- package/tools/lib/omnichat/gate.mjs +151 -0
- package/tools/lib/omnichat/manual.mjs +166 -0
- package/tools/lib/omnichat/match.mjs +78 -0
- package/tools/lib/omnichat/pass.mjs +393 -0
- package/tools/lib/omnichat/record.mjs +208 -0
- package/tools/lib/omnichat/text.mjs +315 -0
- package/tools/lib/omnichat/webhook.mjs +166 -0
- package/tools/lib/pairing.mjs +99 -0
- package/tools/lib/paths.mjs +41 -0
- package/tools/lib/platforms/instagram.mjs +469 -0
- package/tools/lib/platforms/tiktok.mjs +343 -0
- package/tools/lib/platforms/youtube.mjs +228 -0
- package/tools/lib/publish/publish.mjs +244 -0
- package/tools/lib/schedule/schedule.mjs +191 -0
- package/tools/lib/service.mjs +134 -0
- package/tools/lib/skill-client.mjs +126 -0
- package/tools/lib/skills-release.mjs +196 -0
- package/tools/lib/testing.mjs +52 -0
- package/tools/lib/up.mjs +187 -0
- package/tools/metrics.mjs +415 -0
- package/tools/models.mjs +134 -0
- package/tools/narrate.mjs +257 -0
- package/tools/omni.mjs +298 -0
- package/tools/omni_paths.py +12 -0
- package/tools/omnichat.mjs +1577 -0
- package/tools/omnivideo.py +1122 -0
- package/tools/package.mjs +130 -0
- package/tools/platforms.mjs +236 -0
- package/tools/premiere.mjs +533 -0
- package/tools/publish.mjs +1496 -0
- package/tools/reference.mjs +1408 -0
- package/tools/render.mjs +426 -0
- package/tools/runner.mjs +156 -0
- package/tools/setup.mjs +466 -0
- package/tools/skills-release.mjs +93 -0
- package/tools/sound.mjs +1323 -0
- package/tools/soundtrack.mjs +217 -0
- package/tools/thumbnail.mjs +271 -0
- package/tools/timing.mjs +108 -0
- package/tools/usage.py +628 -0
- package/tools/voice-envelope.mjs +185 -0
- package/tools/voice.py +448 -0
- package/tools/voice_sample.py +75 -0
- package/tools/wireframe.mjs +230 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* The "not found" screen: a route that doesn't exist, a video or reference that is not in videos/
|
|
2
|
+
nor in the library. It lives inside <main>, with the menu beside it, so the way back is the menu
|
|
3
|
+
itself plus two buttons: the primary goes to the Dashboard, the secondary to the list the person
|
|
4
|
+
was probably looking for. */
|
|
5
|
+
|
|
6
|
+
import { useEffect } from "react";
|
|
7
|
+
import { Link, useNavigate } from "@tanstack/react-router";
|
|
8
|
+
import { ArrowLeft } from "./icons";
|
|
9
|
+
|
|
10
|
+
export function NotFound({
|
|
11
|
+
path,
|
|
12
|
+
title = "Página não encontrada",
|
|
13
|
+
text,
|
|
14
|
+
back = { to: "/videos", name: "Conteúdos" },
|
|
15
|
+
}: {
|
|
16
|
+
/* what was asked for: the pathname, or the slug/name that doesn't exist */
|
|
17
|
+
path?: string;
|
|
18
|
+
title?: string;
|
|
19
|
+
text?: string;
|
|
20
|
+
/* the list where the person probably wants to land (a route path from router.tsx) */
|
|
21
|
+
back?: { to: "/videos" | "/styles" | "/analytics" | "/omnichat" | "/settings"; name: string };
|
|
22
|
+
}) {
|
|
23
|
+
const navigate = useNavigate();
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
document.title = `${title} · Omni`;
|
|
26
|
+
}, [title]);
|
|
27
|
+
return (
|
|
28
|
+
<div className="page not-found" role="alert">
|
|
29
|
+
<span className="not-found-code" aria-hidden="true">
|
|
30
|
+
404
|
|
31
|
+
</span>
|
|
32
|
+
<h1>{title}</h1>
|
|
33
|
+
<p className="not-found-text">
|
|
34
|
+
{text ??
|
|
35
|
+
"O endereço não existe neste studio. Pode ter sido digitado errado, ou o vídeo foi arquivado ou apagado."}
|
|
36
|
+
</p>
|
|
37
|
+
{path && <code className="not-found-path">{path}</code>}
|
|
38
|
+
<div className="actions not-found-actions">
|
|
39
|
+
<button type="button" className="button primary" onClick={() => navigate({ to: "/" })}>
|
|
40
|
+
<ArrowLeft className="ic" aria-hidden="true" /> Ir para o Dashboard
|
|
41
|
+
</button>
|
|
42
|
+
<Link to={back.to} className="button">
|
|
43
|
+
{back.name}
|
|
44
|
+
</Link>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* Omni's face, in the gear's settings: the same carousel as the voice creation ("Gerar outros" and the
|
|
2
|
+
compact AvatarPicker), with the voice's play, outlined, on the left of the same line. The first avatar is the current one, the other nine are drawn. Moving
|
|
3
|
+
the carousel chooses; the choice is saved a moment after it stops, like the voice's. */
|
|
4
|
+
|
|
5
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
|
+
import { useAvatarAudioReactive } from "../../hooks/useAvatarAudioReactive";
|
|
7
|
+
import { shuffleAvatars } from "../../lib/avatars";
|
|
8
|
+
import { api, send } from "../../lib/api";
|
|
9
|
+
import { invalidate, queryKeys } from "../../lib/query-client";
|
|
10
|
+
import { AvatarPicker } from "../AvatarPicker";
|
|
11
|
+
import { ArrowClockwise } from "../icons";
|
|
12
|
+
import type { AgentGender } from "../../types/api";
|
|
13
|
+
import { OmniVoiceSample } from "./OmniVoiceSample";
|
|
14
|
+
|
|
15
|
+
const SAVE_AFTER_MS = 400;
|
|
16
|
+
const drawn = (current: string) => [current, ...shuffleAvatars().slice(0, 9)];
|
|
17
|
+
|
|
18
|
+
export function OmniAvatarPicker({
|
|
19
|
+
avatar,
|
|
20
|
+
gender,
|
|
21
|
+
disabled,
|
|
22
|
+
}: {
|
|
23
|
+
avatar: string;
|
|
24
|
+
/* the voice the avatar plays on hover */
|
|
25
|
+
gender: AgentGender;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}) {
|
|
28
|
+
const [options, setOptions] = useState(() => drawn(avatar));
|
|
29
|
+
const [index, setIndex] = useState(0);
|
|
30
|
+
const [error, setError] = useState<string | null>(null);
|
|
31
|
+
/* while the sample plays, the avatar in the center reacts to the voice */
|
|
32
|
+
const [playing, setPlaying] = useState(false);
|
|
33
|
+
const analyser = useRef<AnalyserNode | null>(null);
|
|
34
|
+
const root = useRef<HTMLDivElement>(null);
|
|
35
|
+
useAvatarAudioReactive(playing, root, analyser, r =>
|
|
36
|
+
Array.from(r.querySelectorAll<HTMLCanvasElement>(".carousel-item.d0 .voice-avatar")),
|
|
37
|
+
);
|
|
38
|
+
/* what the config holds right now: the carousel only saves when it lands somewhere else */
|
|
39
|
+
const saved = useRef(avatar);
|
|
40
|
+
|
|
41
|
+
/* the config changed from outside (another tab): start over from it */
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (avatar === saved.current) return;
|
|
44
|
+
saved.current = avatar;
|
|
45
|
+
setOptions(drawn(avatar));
|
|
46
|
+
setIndex(0);
|
|
47
|
+
}, [avatar]);
|
|
48
|
+
|
|
49
|
+
const chosen = options[index];
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (!chosen || chosen === saved.current) return;
|
|
52
|
+
const timer = setTimeout(async () => {
|
|
53
|
+
setError(null);
|
|
54
|
+
const r = await send(api.agent.avatar.$post({ json: { avatar: chosen } }));
|
|
55
|
+
if (r.ok) {
|
|
56
|
+
saved.current = chosen;
|
|
57
|
+
await invalidate(queryKeys.agent);
|
|
58
|
+
} else {
|
|
59
|
+
setError(r.error ?? "não deu para trocar o avatar");
|
|
60
|
+
setIndex(Math.max(0, options.indexOf(saved.current)));
|
|
61
|
+
}
|
|
62
|
+
}, SAVE_AFTER_MS);
|
|
63
|
+
return () => clearTimeout(timer);
|
|
64
|
+
}, [chosen, options]);
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<div className="omni-avatar-field">
|
|
68
|
+
<div className="omni-avatar-head">
|
|
69
|
+
<OmniVoiceSample
|
|
70
|
+
gender={gender}
|
|
71
|
+
disabled={disabled}
|
|
72
|
+
onError={setError}
|
|
73
|
+
analyser={analyser}
|
|
74
|
+
onPlayingChange={setPlaying}
|
|
75
|
+
/>
|
|
76
|
+
<button
|
|
77
|
+
type="button"
|
|
78
|
+
className="button small"
|
|
79
|
+
disabled={disabled}
|
|
80
|
+
onClick={() => {
|
|
81
|
+
setOptions(drawn(saved.current));
|
|
82
|
+
setIndex(0);
|
|
83
|
+
}}
|
|
84
|
+
>
|
|
85
|
+
<ArrowClockwise className="ic" /> Gerar outros
|
|
86
|
+
</button>
|
|
87
|
+
</div>
|
|
88
|
+
<AvatarPicker options={options} index={index} onChange={setIndex} disabled={disabled} rootRef={root} />
|
|
89
|
+
{error && <p className="response error">{error}</p>}
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/* The cards Omni shows in its panel (lib/omni-cards: the show_card UI tool). Each card reads the
|
|
2
|
+
studio's own data (the same hooks as the pages) and links to the screen it comes from. */
|
|
3
|
+
|
|
4
|
+
import { Link } from "@tanstack/react-router";
|
|
5
|
+
import { useReel } from "../../hooks/useAnalytics";
|
|
6
|
+
import { useReference } from "../../hooks/useReferences";
|
|
7
|
+
import { useVideo } from "../../hooks/useVideos";
|
|
8
|
+
import { dismissCard, type OmniCard, useOmniCards } from "../../lib/omni-cards";
|
|
9
|
+
import { aspectRatio, chosenCover, findFile, mediaUrl, referenceFileUrl } from "../../lib/media";
|
|
10
|
+
import type { FileEntry, VideoDetail } from "../../types/api";
|
|
11
|
+
import { ArrowUpRight, X } from "../icons";
|
|
12
|
+
|
|
13
|
+
export function OmniCards() {
|
|
14
|
+
const cards = useOmniCards();
|
|
15
|
+
if (!cards.length) return null;
|
|
16
|
+
return (
|
|
17
|
+
<div className="omni-cards">
|
|
18
|
+
{cards.map(c => (
|
|
19
|
+
<article key={c.id} className={`omni-card kind-${c.kind}`}>
|
|
20
|
+
<button className="omni-card-close" aria-label="Fechar o card" onClick={() => dismissCard(c.id)}>
|
|
21
|
+
<X />
|
|
22
|
+
</button>
|
|
23
|
+
{c.kind === "reference" ? <ReferenceCard name={c.name ?? ""} /> : <VideoCards card={c} />}
|
|
24
|
+
</article>
|
|
25
|
+
))}
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const count = (n: number | null | undefined) => (n == null ? "—" : n.toLocaleString("pt-BR"));
|
|
31
|
+
const PLATFORM = { youtube: "YouTube", instagram: "Instagram", tiktok: "TikTok" } as const;
|
|
32
|
+
|
|
33
|
+
function VideoCards({ card }: { card: OmniCard }) {
|
|
34
|
+
const { video, error } = useVideo(card.slug ?? "");
|
|
35
|
+
if (error) return <p className="hint">Não achei o conteúdo {card.slug}.</p>;
|
|
36
|
+
if (!video) return <p className="hint">Carregando…</p>;
|
|
37
|
+
const head = (
|
|
38
|
+
<header className="omni-card-head">
|
|
39
|
+
<b>{video.title}</b>
|
|
40
|
+
<Link to="/videos/$slug" params={{ slug: video.slug }} className="link">
|
|
41
|
+
Abrir <ArrowUpRight className="ic" />
|
|
42
|
+
</Link>
|
|
43
|
+
</header>
|
|
44
|
+
);
|
|
45
|
+
switch (card.kind) {
|
|
46
|
+
case "video":
|
|
47
|
+
return (
|
|
48
|
+
<>
|
|
49
|
+
{head}
|
|
50
|
+
<Still video={video} file={chosenCover(video) ?? video.cover} />
|
|
51
|
+
<p className="omni-card-meta">
|
|
52
|
+
{video.status?.stages?.find(s => !s.ok)?.name
|
|
53
|
+
? `Próxima etapa: ${video.status.stages.find(s => !s.ok)!.name}`
|
|
54
|
+
: "Pronto"}
|
|
55
|
+
{(["youtube", "instagram", "tiktok"] as const)
|
|
56
|
+
.filter(p => video.publication?.[p]?.url)
|
|
57
|
+
.map(p => (
|
|
58
|
+
<a key={p} href={video.publication![p]!.url!} target="_blank" rel="noreferrer" className="link">
|
|
59
|
+
{PLATFORM[p]}
|
|
60
|
+
</a>
|
|
61
|
+
))}
|
|
62
|
+
</p>
|
|
63
|
+
</>
|
|
64
|
+
);
|
|
65
|
+
case "thumbnails": {
|
|
66
|
+
const versions = video.thumbnail?.versions ?? [];
|
|
67
|
+
return (
|
|
68
|
+
<>
|
|
69
|
+
{head}
|
|
70
|
+
{versions.length ? (
|
|
71
|
+
<div className="omni-card-grid">
|
|
72
|
+
{versions.map(v => (
|
|
73
|
+
<figure key={v.id} className={video.thumbnail?.selected === v.id ? "selected" : ""}>
|
|
74
|
+
<Still video={video} file={findFile(video, `thumbnail/${v.id}.png`)} />
|
|
75
|
+
<figcaption>
|
|
76
|
+
{v.id}
|
|
77
|
+
{video.thumbnail?.selected === v.id ? " · na publicação" : ""}
|
|
78
|
+
</figcaption>
|
|
79
|
+
</figure>
|
|
80
|
+
))}
|
|
81
|
+
</div>
|
|
82
|
+
) : (
|
|
83
|
+
<p className="hint">Este vídeo ainda não tem thumbnails.</p>
|
|
84
|
+
)}
|
|
85
|
+
</>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
case "export": {
|
|
89
|
+
const file =
|
|
90
|
+
findFile(video, `export/${video.slug}.mp4`) ??
|
|
91
|
+
video.files.find(f => /^export\/.+\.mp4$/.test(f.path) && !/-speed-\d+\.mp4$/.test(f.path)) ??
|
|
92
|
+
null;
|
|
93
|
+
return (
|
|
94
|
+
<>
|
|
95
|
+
{head}
|
|
96
|
+
{file ? (
|
|
97
|
+
<video
|
|
98
|
+
className="omni-card-media"
|
|
99
|
+
style={{ aspectRatio: aspectRatio(video) }}
|
|
100
|
+
src={mediaUrl(video, file)!}
|
|
101
|
+
controls
|
|
102
|
+
playsInline
|
|
103
|
+
preload="metadata"
|
|
104
|
+
/>
|
|
105
|
+
) : (
|
|
106
|
+
<p className="hint">O vídeo ainda não foi exportado.</p>
|
|
107
|
+
)}
|
|
108
|
+
</>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
case "scene":
|
|
112
|
+
return (
|
|
113
|
+
<>
|
|
114
|
+
{head}
|
|
115
|
+
<Still video={video} file={findFile(video, `motion/stills/${card.scene}.png`)} />
|
|
116
|
+
<p className="omni-card-meta">Cena {card.scene}</p>
|
|
117
|
+
</>
|
|
118
|
+
);
|
|
119
|
+
case "carousel": {
|
|
120
|
+
const jpgs = video.carousel?.export?.jpgs ?? [];
|
|
121
|
+
return (
|
|
122
|
+
<>
|
|
123
|
+
{head}
|
|
124
|
+
{jpgs.length ? (
|
|
125
|
+
<div className="omni-card-strip">
|
|
126
|
+
{jpgs.map(f => (
|
|
127
|
+
<img key={f.path} src={mediaUrl(video, f)!} alt="" loading="lazy" />
|
|
128
|
+
))}
|
|
129
|
+
</div>
|
|
130
|
+
) : (
|
|
131
|
+
<p className="hint">O carrossel ainda não foi exportado.</p>
|
|
132
|
+
)}
|
|
133
|
+
</>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
case "metrics":
|
|
137
|
+
return (
|
|
138
|
+
<>
|
|
139
|
+
{head}
|
|
140
|
+
<ReelNumbers slug={video.slug} />
|
|
141
|
+
</>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function Still({ video, file }: { video: VideoDetail; file: FileEntry | null }) {
|
|
148
|
+
if (!file) return <p className="hint">Sem imagem ainda.</p>;
|
|
149
|
+
return (
|
|
150
|
+
<img
|
|
151
|
+
className="omni-card-media"
|
|
152
|
+
style={{ aspectRatio: aspectRatio(video) }}
|
|
153
|
+
src={mediaUrl(video, file)!}
|
|
154
|
+
alt=""
|
|
155
|
+
loading="lazy"
|
|
156
|
+
/>
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function ReelNumbers({ slug }: { slug: string }) {
|
|
161
|
+
const { reel } = useReel(slug);
|
|
162
|
+
if (!reel) return <p className="hint">Carregando…</p>;
|
|
163
|
+
if (!("current" in reel) || !reel.current) return <p className="hint">Este Reel ainda não tem números.</p>;
|
|
164
|
+
const m = reel.current;
|
|
165
|
+
const rows: [string, string][] = [
|
|
166
|
+
["Views", count(m.views)],
|
|
167
|
+
["Assistido", m.watched_pct == null ? "—" : `${m.watched_pct}%`],
|
|
168
|
+
["Pulam nos 3 s", m.skip_3s_pct == null ? "—" : `${m.skip_3s_pct}%`],
|
|
169
|
+
["Salvamentos", count(m.saves)],
|
|
170
|
+
["Compartilhamentos", count(m.shares)],
|
|
171
|
+
["Comentários", count(m.comments)],
|
|
172
|
+
];
|
|
173
|
+
return (
|
|
174
|
+
<dl className="omni-card-numbers">
|
|
175
|
+
{rows.map(([k, v]) => (
|
|
176
|
+
<div key={k}>
|
|
177
|
+
<dt>{k}</dt>
|
|
178
|
+
<dd>{v}</dd>
|
|
179
|
+
</div>
|
|
180
|
+
))}
|
|
181
|
+
</dl>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function ReferenceCard({ name }: { name: string }) {
|
|
186
|
+
const { reference: r, error } = useReference(name);
|
|
187
|
+
if (error) return <p className="hint">Não achei o estilo visual {name}.</p>;
|
|
188
|
+
if (!r) return <p className="hint">Carregando…</p>;
|
|
189
|
+
const frame = referenceFileUrl(name, r.frame);
|
|
190
|
+
return (
|
|
191
|
+
<>
|
|
192
|
+
<header className="omni-card-head">
|
|
193
|
+
<b>{r.title}</b>
|
|
194
|
+
<Link to="/styles/$name" params={{ name }} className="link">
|
|
195
|
+
Abrir <ArrowUpRight className="ic" />
|
|
196
|
+
</Link>
|
|
197
|
+
</header>
|
|
198
|
+
{frame && <img className="omni-card-media" src={frame} alt="" loading="lazy" />}
|
|
199
|
+
{r.essence && <p className="omni-card-meta">{r.essence}</p>}
|
|
200
|
+
</>
|
|
201
|
+
);
|
|
202
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/* The light around Omni's cards (the dock and the sidebar button), from two libraries.dev libraries (MIT):
|
|
2
|
+
border-beam while Omni listens (a mono line along the bottom: black on the light theme) or thinks (a
|
|
3
|
+
mono beam turning around the whole border), and voice-glow while it speaks, in the colors of the
|
|
4
|
+
avatar the user chose, rising with Omni's voice. Both wrappers are always there and only switch on and
|
|
5
|
+
off, so the card inside never remounts (the transcript and the text field keep their state). */
|
|
6
|
+
|
|
7
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
8
|
+
import { useMemo } from "react";
|
|
9
|
+
import { BorderBeam } from "border-beam";
|
|
10
|
+
import { VoiceBeam } from "voice-glow";
|
|
11
|
+
import { orbPalette } from "../../lib/avatars";
|
|
12
|
+
|
|
13
|
+
export type OmniGlowState = "off" | "listening" | "thinking" | "speaking";
|
|
14
|
+
|
|
15
|
+
/* "hsl(h s% l%)" (orbPalette) → "#rrggbb": voice-glow only reads hex and rgb() */
|
|
16
|
+
function hslHex(color: string): string {
|
|
17
|
+
const m = /hsl\((\d+(?:\.\d+)?)\s+(\d+(?:\.\d+)?)%\s+(\d+(?:\.\d+)?)%\)/.exec(color);
|
|
18
|
+
if (!m) return color;
|
|
19
|
+
const h = Number(m[1]);
|
|
20
|
+
const s = Number(m[2]) / 100;
|
|
21
|
+
const l = Number(m[3]) / 100;
|
|
22
|
+
const k = (n: number) => (n + h / 30) % 12;
|
|
23
|
+
const a = s * Math.min(l, 1 - l);
|
|
24
|
+
const f = (n: number) => l - a * Math.max(-1, Math.min(k(n) - 3, Math.min(9 - k(n), 1)));
|
|
25
|
+
return `#${[0, 8, 4]
|
|
26
|
+
.map(n =>
|
|
27
|
+
Math.round(f(n) * 255)
|
|
28
|
+
.toString(16)
|
|
29
|
+
.padStart(2, "0"),
|
|
30
|
+
)
|
|
31
|
+
.join("")}`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* the avatar's three colors as voice-glow's seven lobes (the center, then pairs outward) and its band */
|
|
35
|
+
function voiceColors(face: string) {
|
|
36
|
+
const [main, light, deep] = orbPalette(face).map(hslHex);
|
|
37
|
+
return {
|
|
38
|
+
lobes: [main, light, deep, main, light, deep, main],
|
|
39
|
+
band: { core: main, above: light, mid: main, below: deep },
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* The library's mono variant is barely there on a white card (alphas of 0.14 and less, by design), so the
|
|
44
|
+
beam is its colorful variant, which carries real alpha, turned to one tone by a filter on its layers:
|
|
45
|
+
black while Omni listens, gray while it thinks. `!important` wins over the library's hue-shift
|
|
46
|
+
animations, which run on the same `filter`; the bloom keeps its blur. Its opacity hooks (they
|
|
47
|
+
multiply each layer) lift it a little. */
|
|
48
|
+
const TONE = { listening: "grayscale(1) brightness(0)", thinking: "grayscale(1) brightness(0.55)" } as const;
|
|
49
|
+
const toneCss = (tone: string, bloomBlur: number) => `
|
|
50
|
+
[data-beam="{id}"][data-active]::after, [data-beam="{id}"][data-active]::before,
|
|
51
|
+
[data-beam="{id}"][data-fading]::after, [data-beam="{id}"][data-fading]::before { filter: ${tone} !important; }
|
|
52
|
+
[data-beam="{id}"] [data-beam-bloom] { filter: blur(${bloomBlur}px) ${tone} !important; }`;
|
|
53
|
+
const BEAM_BOOST: Record<"listening" | "thinking", CSSProperties> = {
|
|
54
|
+
listening: { "--beam-stroke-opacity": 4, "--beam-inner-opacity": 3, "--beam-bloom-opacity": 3 } as CSSProperties,
|
|
55
|
+
thinking: { "--beam-stroke-opacity": 5, "--beam-inner-opacity": 3, "--beam-bloom-opacity": 2 } as CSSProperties,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/* the border beam around a card: a black line sliding along the bottom while Omni listens, a gray beam
|
|
59
|
+
turning around the whole border while it thinks */
|
|
60
|
+
export function OmniBeamFrame({
|
|
61
|
+
state,
|
|
62
|
+
radius,
|
|
63
|
+
compact = false,
|
|
64
|
+
className,
|
|
65
|
+
style,
|
|
66
|
+
children,
|
|
67
|
+
}: {
|
|
68
|
+
state: OmniGlowState;
|
|
69
|
+
radius: number;
|
|
70
|
+
/* the sidebar button: the smaller turning beam */
|
|
71
|
+
compact?: boolean;
|
|
72
|
+
className?: string;
|
|
73
|
+
style?: CSSProperties;
|
|
74
|
+
children: ReactNode;
|
|
75
|
+
}) {
|
|
76
|
+
const tone = state === "thinking" ? "thinking" : "listening";
|
|
77
|
+
return (
|
|
78
|
+
<BorderBeam
|
|
79
|
+
className={className}
|
|
80
|
+
style={{ ...BEAM_BOOST[tone], ...style }}
|
|
81
|
+
size={state === "thinking" ? (compact ? "sm" : "md") : "line"}
|
|
82
|
+
colorVariant="colorful"
|
|
83
|
+
staticColors
|
|
84
|
+
theme="auto"
|
|
85
|
+
css={toneCss(TONE[tone], tone === "thinking" ? 8 : 6)}
|
|
86
|
+
borderRadius={radius}
|
|
87
|
+
active={state === "listening" || state === "thinking"}
|
|
88
|
+
>
|
|
89
|
+
{children}
|
|
90
|
+
</BorderBeam>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* The voice glow, in the avatar's colors: it rises from the bottom edge of what it wraps with Omni's voice.
|
|
95
|
+
Tuned livelier than the library's defaults: it answers a syllable in about 60 ms and lets go in 250, goes
|
|
96
|
+
higher and wider, flows faster and bends and warps more, so the sound wave reads in it. On the dock
|
|
97
|
+
(not compact) it is kept low, and `frost` lays a pane of frosted glass over it: the page's background at
|
|
98
|
+
10 % with an extra-small blur, so the wave reads softer, like light behind glass. */
|
|
99
|
+
export function OmniVoice({
|
|
100
|
+
active,
|
|
101
|
+
face,
|
|
102
|
+
level,
|
|
103
|
+
radius,
|
|
104
|
+
compact = false,
|
|
105
|
+
frost = false,
|
|
106
|
+
className,
|
|
107
|
+
style,
|
|
108
|
+
children,
|
|
109
|
+
}: {
|
|
110
|
+
active: boolean;
|
|
111
|
+
face: string;
|
|
112
|
+
/* Omni's voice, 0–1, read every frame */
|
|
113
|
+
level: () => number;
|
|
114
|
+
radius: number;
|
|
115
|
+
/* the sidebar button: voice-glow's pill geometry */
|
|
116
|
+
compact?: boolean;
|
|
117
|
+
/* the frosted pane over the wave (the dock) */
|
|
118
|
+
frost?: boolean;
|
|
119
|
+
className?: string;
|
|
120
|
+
style?: CSSProperties;
|
|
121
|
+
children: ReactNode;
|
|
122
|
+
}) {
|
|
123
|
+
const colors = useMemo(() => voiceColors(face), [face]);
|
|
124
|
+
return (
|
|
125
|
+
<VoiceBeam
|
|
126
|
+
className={className}
|
|
127
|
+
style={style}
|
|
128
|
+
type={compact ? "pill" : "default"}
|
|
129
|
+
level={level}
|
|
130
|
+
colors={colors.lobes}
|
|
131
|
+
bandColors={colors.band}
|
|
132
|
+
theme="auto"
|
|
133
|
+
borderRadius={radius}
|
|
134
|
+
active={active}
|
|
135
|
+
attack={0.06}
|
|
136
|
+
release={0.25}
|
|
137
|
+
idle={0.1}
|
|
138
|
+
reach={compact ? 2.2 : 1.1}
|
|
139
|
+
spread={compact ? 1.4 : 1.6}
|
|
140
|
+
flow={compact ? 140 : 120}
|
|
141
|
+
bend={compact ? 40 : 90}
|
|
142
|
+
distortion={0.9}
|
|
143
|
+
bandStrength={1.9}
|
|
144
|
+
coreSize={1.3}
|
|
145
|
+
coreLight={0.4}
|
|
146
|
+
saturation={2}
|
|
147
|
+
innerOpacity={1.5}
|
|
148
|
+
innerHeight={compact ? 1 : 0.55}
|
|
149
|
+
>
|
|
150
|
+
{children}
|
|
151
|
+
{frost && <div className="omni-voice-frost" aria-hidden="true" />}
|
|
152
|
+
</VoiceBeam>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* both around one element: the sidebar button */
|
|
157
|
+
export function OmniGlow({
|
|
158
|
+
state,
|
|
159
|
+
face,
|
|
160
|
+
level,
|
|
161
|
+
radius,
|
|
162
|
+
compact = false,
|
|
163
|
+
className,
|
|
164
|
+
style,
|
|
165
|
+
children,
|
|
166
|
+
}: {
|
|
167
|
+
state: OmniGlowState;
|
|
168
|
+
face: string;
|
|
169
|
+
level: () => number;
|
|
170
|
+
radius: number;
|
|
171
|
+
compact?: boolean;
|
|
172
|
+
className?: string;
|
|
173
|
+
style?: CSSProperties;
|
|
174
|
+
children: ReactNode;
|
|
175
|
+
}) {
|
|
176
|
+
return (
|
|
177
|
+
<OmniBeamFrame state={state} radius={radius} compact={compact} className={className} style={style}>
|
|
178
|
+
<OmniVoice active={state === "speaking"} face={face} level={level} radius={radius} compact={compact}>
|
|
179
|
+
{children}
|
|
180
|
+
</OmniVoice>
|
|
181
|
+
</OmniBeamFrame>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* Conversas: Omni's earlier conversations (api/services/agent-history.ts), the ones that had a
|
|
2
|
+
genuine request. The list, newest first; one opened reads as it was (transcript, tools and what
|
|
3
|
+
became of each card) with "Continuar", which starts a call carrying that history, and "Apagar". */
|
|
4
|
+
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { api, enc, read, send } from "../../lib/api";
|
|
7
|
+
import { invalidate, queryKeys } from "../../lib/query-client";
|
|
8
|
+
import { useLiveQuery } from "../../hooks/useLiveQuery";
|
|
9
|
+
import type { OmniEntry } from "../../lib/omni-realtime";
|
|
10
|
+
import type { Conversation, ConversationSummary } from "../../../shared/schemas/agent-history";
|
|
11
|
+
import { Transcript } from "./Transcript";
|
|
12
|
+
|
|
13
|
+
const when = (iso: string) =>
|
|
14
|
+
new Date(iso).toLocaleString("pt-BR", { day: "2-digit", month: "short", hour: "2-digit", minute: "2-digit" });
|
|
15
|
+
|
|
16
|
+
const MODE_LABEL: Record<Conversation["mode"], string> = { grok: "Grok", stream: "Streaming", chunks: "Trechos" };
|
|
17
|
+
|
|
18
|
+
const ACTION_STATE: Record<Conversation["actions"][number]["state"], string> = {
|
|
19
|
+
staged: "Ficou esperando Confirmar",
|
|
20
|
+
confirmed: "Confirmado",
|
|
21
|
+
failed: "Falhou",
|
|
22
|
+
canceled: "Cancelado",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function OmniHistory({
|
|
26
|
+
canContinue,
|
|
27
|
+
onContinue,
|
|
28
|
+
}: {
|
|
29
|
+
/* false while a call is live: one conversation at a time */
|
|
30
|
+
canContinue: boolean;
|
|
31
|
+
onContinue: (c: Conversation) => void;
|
|
32
|
+
}) {
|
|
33
|
+
const { data, error } = useLiveQuery(queryKeys.agentConversations, () => api.agent.conversations.$get());
|
|
34
|
+
const list: ConversationSummary[] | null = data;
|
|
35
|
+
const [open, setOpen] = useState<Conversation | null>(null);
|
|
36
|
+
const [busy, setBusy] = useState(false);
|
|
37
|
+
const [message, setMessage] = useState<string | null>(null);
|
|
38
|
+
|
|
39
|
+
const openOne = async (id: string) => {
|
|
40
|
+
setMessage(null);
|
|
41
|
+
try {
|
|
42
|
+
setOpen((await read(api.agent.conversations[":id"].$get({ param: { id: enc(id) } }))) as Conversation);
|
|
43
|
+
} catch (e) {
|
|
44
|
+
setMessage(String((e as Error)?.message ?? e));
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const remove = async (id: string) => {
|
|
48
|
+
setBusy(true);
|
|
49
|
+
const r = await send(api.agent.conversations[":id"].delete.$post({ param: { id: enc(id) }, json: {} }));
|
|
50
|
+
setBusy(false);
|
|
51
|
+
if (!r.ok) return setMessage(r.error ?? "não deu para apagar");
|
|
52
|
+
setOpen(null);
|
|
53
|
+
void invalidate(queryKeys.agentConversations);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
if (open)
|
|
57
|
+
return (
|
|
58
|
+
<div className="omni-history-one">
|
|
59
|
+
<header>
|
|
60
|
+
<button type="button" className="subtle-link" onClick={() => setOpen(null)}>
|
|
61
|
+
Todas as conversas
|
|
62
|
+
</button>
|
|
63
|
+
<b>{open.title}</b>
|
|
64
|
+
<small className="subtle">
|
|
65
|
+
{when(open.updated_at)} · {MODE_LABEL[open.mode]}
|
|
66
|
+
</small>
|
|
67
|
+
</header>
|
|
68
|
+
{!!open.actions.length && (
|
|
69
|
+
<ul className="omni-history-actions">
|
|
70
|
+
{open.actions.map(a => (
|
|
71
|
+
<li key={a.id} className={a.state}>
|
|
72
|
+
<span>{a.summary}</span>
|
|
73
|
+
<small>{ACTION_STATE[a.state]}</small>
|
|
74
|
+
</li>
|
|
75
|
+
))}
|
|
76
|
+
</ul>
|
|
77
|
+
)}
|
|
78
|
+
<Transcript entries={open.entries as OmniEntry[]} onFeedback={() => {}} />
|
|
79
|
+
<div className="omni-history-buttons">
|
|
80
|
+
<button type="button" className="button small danger" disabled={busy} onClick={() => void remove(open.id)}>
|
|
81
|
+
Apagar
|
|
82
|
+
</button>
|
|
83
|
+
<button
|
|
84
|
+
type="button"
|
|
85
|
+
className="button small primary"
|
|
86
|
+
disabled={!canContinue || busy}
|
|
87
|
+
title={canContinue ? "Começa uma conversa com esta história" : "Encerre a conversa de agora primeiro"}
|
|
88
|
+
onClick={() => onContinue(open)}
|
|
89
|
+
>
|
|
90
|
+
Continuar
|
|
91
|
+
</button>
|
|
92
|
+
</div>
|
|
93
|
+
{message && <p className="response error">{message}</p>}
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<div className="omni-history">
|
|
99
|
+
{error && <p className="response error">{error}</p>}
|
|
100
|
+
{list && !list.length && (
|
|
101
|
+
<p className="subtle omni-history-empty">
|
|
102
|
+
Nenhuma conversa guardada ainda. Uma conversa entra aqui quando tem um pedido de verdade.
|
|
103
|
+
</p>
|
|
104
|
+
)}
|
|
105
|
+
{list?.map(c => (
|
|
106
|
+
<button key={c.id} type="button" className="omni-history-row" onClick={() => void openOne(c.id)}>
|
|
107
|
+
<b>{c.title}</b>
|
|
108
|
+
<small className="subtle">
|
|
109
|
+
{when(c.updated_at)} · {MODE_LABEL[c.mode]}
|
|
110
|
+
{c.actions
|
|
111
|
+
? ` · ${c.confirmed} de ${c.actions} ${c.actions === 1 ? "pedido confirmado" : "pedidos confirmados"}`
|
|
112
|
+
: ""}
|
|
113
|
+
</small>
|
|
114
|
+
</button>
|
|
115
|
+
))}
|
|
116
|
+
{message && <p className="response error">{message}</p>}
|
|
117
|
+
</div>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* The "Oi, Omni" switch in Omni's settings (hooks/useOmniHotword): on, the microphone stays open in one
|
|
2
|
+
studio tab and saying "Oi, Omni", "Ei, Omni" or "Omni" opens the panel and starts the conversation.
|
|
3
|
+
Under it, what the listener is doing now. */
|
|
4
|
+
|
|
5
|
+
import type { HotwordStatus } from "../../hooks/useOmniHotword";
|
|
6
|
+
import { Switch } from "../ui/switch";
|
|
7
|
+
|
|
8
|
+
const STATUS: Record<HotwordStatus, string> = {
|
|
9
|
+
off: "O microfone fica aberto e só o começo de cada fala vai para a transcrição.",
|
|
10
|
+
starting: "Abrindo o microfone…",
|
|
11
|
+
listening: "Ouvindo. É só dizer “Oi, Omni”.",
|
|
12
|
+
blocked: "Clique em qualquer lugar do estúdio para começar a ouvir.",
|
|
13
|
+
paused: "Pausado durante a conversa.",
|
|
14
|
+
elsewhere: "Ouvindo em outra aba do estúdio.",
|
|
15
|
+
limit: "",
|
|
16
|
+
error: "",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export function OmniHotword({
|
|
20
|
+
on,
|
|
21
|
+
onChange,
|
|
22
|
+
status,
|
|
23
|
+
error,
|
|
24
|
+
}: {
|
|
25
|
+
on: boolean;
|
|
26
|
+
onChange: (on: boolean) => void;
|
|
27
|
+
status: HotwordStatus;
|
|
28
|
+
error: string | null;
|
|
29
|
+
}) {
|
|
30
|
+
const line = error ?? STATUS[status];
|
|
31
|
+
return (
|
|
32
|
+
<div className="omni-hotword">
|
|
33
|
+
<label className="toggle-switch">
|
|
34
|
+
<Switch checked={on} onCheckedChange={onChange} />
|
|
35
|
+
<span>Chamar com “Oi, Omni”</span>
|
|
36
|
+
</label>
|
|
37
|
+
{line && <p className={status === "error" || status === "limit" ? "response error" : "subtle"}>{line}</p>}
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|