feat: complete release preparation, 10+ ad mediation, CI/CD, and docker deployment
Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped
Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped
This commit is contained in:
parent
5cd1de6859
commit
708e20f747
406 changed files with 42464 additions and 6199 deletions
59
apps/desktop/src/main/voice-session-persist.ts
Normal file
59
apps/desktop/src/main/voice-session-persist.ts
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
// VoiceMode session-completed → History 저장. bootstrap과 테스트가 같은 함수를 호출한다.
|
||||
|
||||
import { join } from 'path'
|
||||
import { app } from 'electron'
|
||||
import { D3ROError, ErrorCode } from '@d3ro/core/errors'
|
||||
import { getHistoryService } from './services/HistoryService'
|
||||
import { getLogger } from './services/LoggerService'
|
||||
import type { HistoryEntry } from '@d3ro/core/types'
|
||||
|
||||
const logger = getLogger('voice-persist')
|
||||
|
||||
export interface PersistableVoiceSession {
|
||||
id: string
|
||||
transcription: string
|
||||
processedText: string | null
|
||||
mode: string
|
||||
startedAt: number
|
||||
}
|
||||
|
||||
export function persistCompletedVoiceSession(
|
||||
session: PersistableVoiceSession,
|
||||
finalText: string,
|
||||
): HistoryEntry {
|
||||
const wordCount = finalText.split(/\s+/).filter((w) => w.length > 0).length
|
||||
const audioPath = join(app.getPath('userData'), 'recordings', `${session.id}.wav`)
|
||||
const mode = session.mode === 'hands-free' ? 'dictation' : session.mode
|
||||
|
||||
return getHistoryService().create({
|
||||
originalText: session.transcription || finalText,
|
||||
polishedText: session.processedText,
|
||||
mode: mode as HistoryEntry['mode'],
|
||||
status: 'completed',
|
||||
duration: (Date.now() - session.startedAt) / 1000,
|
||||
wordCount,
|
||||
audioLocalPath: audioPath,
|
||||
appVersion: typeof app.getVersion === 'function' ? app.getVersion() : '1.0.0',
|
||||
})
|
||||
}
|
||||
|
||||
export function persistCompletedVoiceSessionSafe(
|
||||
emitError: (error: D3ROError, session: PersistableVoiceSession) => void,
|
||||
session: PersistableVoiceSession,
|
||||
finalText: string,
|
||||
): HistoryEntry | null {
|
||||
try {
|
||||
return persistCompletedVoiceSession(session, finalText)
|
||||
} catch (error) {
|
||||
const d3ro =
|
||||
error instanceof D3ROError
|
||||
? error
|
||||
: new D3ROError(
|
||||
ErrorCode.DBWriteFailed,
|
||||
`Failed to save history: ${error instanceof Error ? error.message : String(error)}`,
|
||||
)
|
||||
logger.error(d3ro.message)
|
||||
emitError(d3ro, session)
|
||||
return null
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue