feat(commands): multi-select ordered command pipeline with step reordering and single-pass composition (AI-05, AI-07)
This commit is contained in:
parent
f49acf0105
commit
10af20a0ad
157 changed files with 29455 additions and 913 deletions
|
|
@ -40,6 +40,7 @@ import {
|
|||
computeMemoTimestamp,
|
||||
createMeetingCreationIdempotencyKey,
|
||||
createMeetingWorkspaceWithMetadata,
|
||||
findActiveTranscriptSegmentId,
|
||||
getMeetingRecordingLanguage,
|
||||
MeetingServiceError,
|
||||
normalizeDocumentDraft,
|
||||
|
|
@ -48,11 +49,17 @@ import {
|
|||
normalizeMeetingLanguage,
|
||||
normalizeMeetingTitle,
|
||||
normalizeMemoContent,
|
||||
parseTimestampTokenToMs,
|
||||
parseTranscriptSeekSegments,
|
||||
sanitizeMeetingSearch,
|
||||
subscribeToMeetingDetail,
|
||||
updateMeetingMemoConflictSafe,
|
||||
updateMeetingTitleRevisionSafe,
|
||||
} from '../src/features/meetings/meetings-service'
|
||||
import {
|
||||
findActiveWebTranscriptSegmentId,
|
||||
parseFallbackTranscriptRows,
|
||||
} from '../../web/src/components/meetings/live-transcript-list'
|
||||
|
||||
const USER_ID = '11111111-1111-4111-8111-111111111111'
|
||||
const MEETING_ID = '22222222-2222-4222-8222-222222222222'
|
||||
|
|
@ -307,6 +314,53 @@ describe('meeting transcript selection', () => {
|
|||
expect(buildMeetingTranscriptView(meeting(), []))
|
||||
.toEqual({ source: 'empty', text: '' })
|
||||
})
|
||||
|
||||
test('parses [MM:SS] timestamps and resolves active segment for audio seek sync', () => {
|
||||
expect(parseTimestampTokenToMs('[01:25]')).toBe(85_000)
|
||||
expect(parseTimestampTokenToMs('02:05')).toBe(125_000)
|
||||
expect(parseTimestampTokenToMs('[01:02:03]')).toBe(3_723_000)
|
||||
expect(parseTimestampTokenToMs('invalid')).toBeNull()
|
||||
|
||||
const fromRows = parseTranscriptSeekSegments(meeting(), [
|
||||
transcript('seg-2', 2, '두 번째 발언', '화자 2'),
|
||||
transcript('seg-1', 1, '첫 번째 발언', '화자 1'),
|
||||
])
|
||||
expect(fromRows.map((item) => ({ id: item.id, timestampMs: item.timestampMs }))).toEqual([
|
||||
{ id: 'seg-1', timestampMs: 1_000 },
|
||||
{ id: 'seg-2', timestampMs: 2_000 },
|
||||
])
|
||||
expect(findActiveTranscriptSegmentId(fromRows, 500)).toBeNull()
|
||||
expect(findActiveTranscriptSegmentId(fromRows, 1_500)).toBe('seg-1')
|
||||
expect(findActiveTranscriptSegmentId(fromRows, 2_500)).toBe('seg-2')
|
||||
|
||||
const fromFallback = parseTranscriptSeekSegments(
|
||||
meeting({ raw_transcript: '[00:05] [화자 A] 안건 소개\n[00:20] 일정 논의' }),
|
||||
[],
|
||||
)
|
||||
expect(fromFallback).toEqual([
|
||||
expect.objectContaining({
|
||||
id: 'line-0',
|
||||
timestampMs: 5_000,
|
||||
speaker: '화자 A',
|
||||
text: '안건 소개',
|
||||
timed: true,
|
||||
}),
|
||||
expect.objectContaining({
|
||||
id: 'line-1',
|
||||
timestampMs: 20_000,
|
||||
speaker: null,
|
||||
text: '일정 논의',
|
||||
timed: true,
|
||||
}),
|
||||
])
|
||||
expect(findActiveTranscriptSegmentId(fromFallback, 12_000)).toBe('line-0')
|
||||
expect(findActiveTranscriptSegmentId(fromFallback, 25_000)).toBe('line-1')
|
||||
|
||||
const webRows = parseFallbackTranscriptRows('[00:10] [윤찬] 첫 구간\n[00:40] 둘째 구간')
|
||||
expect(webRows).toHaveLength(2)
|
||||
expect(findActiveWebTranscriptSegmentId(webRows, 15_000)).toBe('fallback-line-0')
|
||||
expect(findActiveWebTranscriptSegmentId(webRows, 45_000)).toBe('fallback-line-1')
|
||||
})
|
||||
})
|
||||
|
||||
describe('meeting mutation safety', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue