chore(integration): snapshot local main worktree
This commit is contained in:
1 parent
48a9189939
commit
33fb31fb28
116 files changed
+8108
-3026
No files matched your search
@@ -5,7 +5,7 @@ import { join } from 'node:path';
|
||||
import type { IncomingMessage, ServerResponse } from 'node:http';
|
||||
import { afterEach, describe, expect, it } from 'vitest';
|
||||
import { handleFileRoutes } from '@electron/api/routes/files';
|
||||
import { createProjectConfig } from '../../shared/project-config';
|
||||
import { createCodingProjectConfigV2 } from '@electron/coding-projects/project-config';
|
||||
|
||||
const temporaryDirectories: string[] = [];
|
||||
|
||||
@@ -36,14 +36,13 @@ function createRequest(method: string, body?: unknown): IncomingMessage {
|
||||
}
|
||||
|
||||
async function createGameProject() {
|
||||
const projectPath = await mkdtemp(join(tmpdir(), 'niancode-asset-review-route-'));
|
||||
const projectPath = await mkdtemp(join(tmpdir(), 'makelore-asset-review-route-'));
|
||||
temporaryDirectories.push(projectPath);
|
||||
await mkdir(join(projectPath, '.niancode'), { recursive: true });
|
||||
await mkdir(join(projectPath, '.makelore'), { recursive: true });
|
||||
await mkdir(join(projectPath, 'assets'), { recursive: true });
|
||||
const config = createProjectConfig('2026-07-12T00:00:00.000Z');
|
||||
const config = createCodingProjectConfigV2('2026-07-12T00:00:00.000Z');
|
||||
config.initialized = true;
|
||||
config.agents.forEach((agent, index) => { agent.name = `测试伙伴${index + 1}`; });
|
||||
await writeFile(join(projectPath, '.niancode', 'project.json'), `${JSON.stringify(config, null, 2)}\n`, 'utf8');
|
||||
await writeFile(join(projectPath, '.makelore', 'project.json'), `${JSON.stringify(config, null, 2)}\n`, 'utf8');
|
||||
await writeFile(join(projectPath, 'assets', 'hero.png'), Buffer.from([0x89, 0x50, 0x4e, 0x47]));
|
||||
await writeFile(join(projectPath, 'ASSET_PLAN.md'), `# 素材计划\n\n\`\`\`json\n${JSON.stringify({ assets: [
|
||||
{ id: 'hero', name: '主角', category: 'visual', status: 'candidate', purpose: '玩家角色', source: 'Kenney', license: 'CC0', localPath: 'assets/hero.png' },
|
||||
|
||||
Reference in new issue
Block a user