feat: 对齐后端能力并补齐形态提示词与生产诊断
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { computed, ref } from 'vue'
|
||||
import { vi } from 'vitest'
|
||||
import type { ProjectDetail } from '../features/projects/types'
|
||||
import type { Checkpoint } from '../features/workflows/types'
|
||||
import type { useProjectData } from '../features/projects/context'
|
||||
|
||||
/** 模拟正式项目上下文,测试不连接真实模型或数据库。 */
|
||||
export function testProjectContext(id = 'capability-test'): ReturnType<typeof useProjectData> {
|
||||
const project: ProjectDetail = {
|
||||
id,
|
||||
title: '测试剧本',
|
||||
topic: '测试',
|
||||
style: '写实',
|
||||
status: 'completed',
|
||||
createdAt: '2026-09-01T00:00:00Z',
|
||||
updatedAt: '2026-09-01T00:00:00Z',
|
||||
episodes: [{ episode: 1, title: '第一集', content: '内容' }],
|
||||
characters: [],
|
||||
world: null,
|
||||
reviews: [],
|
||||
tasks: []
|
||||
}
|
||||
const data = ref({ project, checkpoints: [] as Checkpoint[] })
|
||||
return {
|
||||
data,
|
||||
project: computed(() => data.value.project),
|
||||
checkpoints: computed(() => data.value.checkpoints),
|
||||
loading: ref(false),
|
||||
error: ref(''),
|
||||
updatedAt: ref(''),
|
||||
refresh: vi.fn<() => Promise<void>>().mockResolvedValue()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user