import { readFile } from 'node:fs/promises'; import path from 'node:path'; import { describe, expect, it } from 'vitest'; describe('bundled game asset Agent prompt', () => { it('searches Works Square before external asset sites with Agent-controlled paging', async () => { const prompt = await readFile(path.resolve('.opencode/agent/assets.md'), 'utf8'); const worksSquareIndex = prompt.indexOf('https://square.nianxx.cn/api/assets'); const kenneyIndex = prompt.indexOf('Kenney'); expect(worksSquareIndex).toBeGreaterThanOrEqual(0); expect(kenneyIndex).toBeGreaterThan(worksSquareIndex); expect(prompt).toContain('limit'); expect(prompt).toContain('offset'); }); });