fix(desktop): harden session, meeting, caption and LLM lifecycles; route LLM calls through the gateway
This commit is contained in:
parent
3a46437f28
commit
ddc78546f0
62 changed files with 4786 additions and 648 deletions
|
|
@ -10,7 +10,7 @@ import { memoTags, history } from '../db/schema'
|
|||
import type { MemoTagRow } from '../db/schema'
|
||||
import { getLogger } from './LoggerService'
|
||||
import { getCloudSyncService } from './CloudSyncService'
|
||||
import { memoTagKey, normalizeMemoTag } from './sync/memo-tag-sync'
|
||||
import { MEMO_TAG_MAX_LENGTH, memoTagKey, normalizeMemoTag, validateMemoTag } from '@d3ro/core/memo-tag-policy'
|
||||
import { buildMemoExportFileName } from './memo/memo-export-file-name'
|
||||
import { D3ROError, ErrorCode } from '@d3ro/core/errors'
|
||||
import type {
|
||||
|
|
@ -47,9 +47,18 @@ class MemoService {
|
|||
addTag(historyId: string, tag: string): MemoTag {
|
||||
const db = getDatabase()
|
||||
const normalizedTag = normalizeMemoTag(tag)
|
||||
if (!normalizedTag) {
|
||||
const problem = validateMemoTag(tag)
|
||||
if (problem === 'empty') {
|
||||
throw new D3ROError(ErrorCode.ConfigInvalidValue, 'Memo tag is empty')
|
||||
}
|
||||
if (problem === 'too-long') {
|
||||
// 서버 CHECK(1~80자)를 넘는 태그는 저장하지 않는다 — 올라가지 못하고 outbox 에 영구 보관됐다.
|
||||
throw new D3ROError(
|
||||
ErrorCode.ConfigInvalidValue,
|
||||
`Memo tag is too long (max ${MEMO_TAG_MAX_LENGTH} characters)`,
|
||||
{ field: 'tag', max: MEMO_TAG_MAX_LENGTH }
|
||||
)
|
||||
}
|
||||
|
||||
// 중복 검사
|
||||
const existing = db
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue