feat: refine UI, improve UX, optimize the analysis pipeline, and add character standing positions

This commit is contained in:
saturn
2026-04-02 17:39:16 +08:00
parent c3e74c228a
commit 9703714b69
153 changed files with 4472 additions and 1088 deletions

View File

@@ -0,0 +1,33 @@
import { describe, expect, it } from 'vitest'
import { buildInsertPanelLocationsDescription } from '@/lib/novel-promotion/insert-panel-prompt-context'
describe('insert panel prompt context', () => {
it('injects available slots for related selected location images', () => {
const text = buildInsertPanelLocationsDescription(
[
{
name: '餐厅',
images: [
{
isSelected: true,
description: '长方形饭桌位于画面中央',
availableSlots: JSON.stringify([
'饭桌左侧靠桌边的位置',
]),
},
],
},
{
name: '客厅',
images: [{ isSelected: true, description: '不会被选中' }],
},
],
['餐厅'],
)
expect(text).toContain('餐厅: 长方形饭桌位于画面中央')
expect(text).toContain('可站位置:')
expect(text).toContain('饭桌左侧靠桌边的位置')
expect(text).not.toContain('客厅')
})
})