feat(desktop): sync knowledge, recordings and shared settings; play any recording
Knowledge documents travel as source-text chunks; each surface embeds them with its own model, the server index is requested through embed-chunks, and documents from the phone are stored without a file and indexed from their chunks. Chunk text is now kept when local embedding fails, so reindexing no longer needs the original file. Recordings upload to the mobile storage contract (audio bucket under the user's folder plus an audio_files row, 50 MiB cap, a Settings > Cloud toggle) and are removed with their record. The history card gains a play button that uses the local file or, for phone recordings, a signed URL. Language (ko/en), system/light/dark theme, auto-polish and the active user command follow the phone's user_settings with its revision rule; changes that arrive from the phone reach the open window.
This commit is contained in:
parent
cee4ab9317
commit
9a8f7e6aa6
34 changed files with 1405 additions and 64 deletions
|
|
@ -9,7 +9,7 @@
|
|||
import { useState, useEffect, useMemo, useRef } from 'react'
|
||||
import { ThemeProvider, CssBaseline, useMediaQuery } from '@mui/material'
|
||||
import { getTheme } from '@d3ro/ui/theme'
|
||||
import { I18nProvider, type I18nStorage, type Locale } from '@d3ro/i18n'
|
||||
import { I18nProvider, useI18n, type I18nStorage, type Locale } from '@d3ro/i18n'
|
||||
import { AppLayout } from './components/AppLayout'
|
||||
import { UpgradePromptModal } from './components/UpgradePromptModal'
|
||||
import { startSystemAudioCapture, stopSystemAudioCapture } from './utils/systemAudioCapture'
|
||||
|
|
@ -26,6 +26,21 @@ const electronI18nStorage: I18nStorage = {
|
|||
}
|
||||
}
|
||||
|
||||
/** 다른 기기(모바일)에서 바꾼 언어가 동기화로 들어오면 화면 언어도 바꾼다. */
|
||||
function SyncedLocale(): null {
|
||||
const { locale, setLocale } = useI18n()
|
||||
useEffect(
|
||||
() =>
|
||||
window.electronAPI.config.onChanged((e: ConfigChangedEvent) => {
|
||||
if (e.key === 'language' && typeof e.value === 'string' && e.value !== locale) {
|
||||
setLocale(e.value as Locale)
|
||||
}
|
||||
}),
|
||||
[locale, setLocale],
|
||||
)
|
||||
return null
|
||||
}
|
||||
|
||||
export function App(): React.ReactElement {
|
||||
const [themeMode, setThemeMode] = useState<ThemeMode>('auto')
|
||||
const prefersDark = useMediaQuery('(prefers-color-scheme: dark)')
|
||||
|
|
@ -76,6 +91,7 @@ export function App(): React.ReactElement {
|
|||
|
||||
return (
|
||||
<I18nProvider storage={electronI18nStorage}>
|
||||
<SyncedLocale />
|
||||
<ThemeProvider theme={theme}>
|
||||
<CssBaseline />
|
||||
<AppLayout />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue