chore: 初始化文档站仓库

This commit is contained in:
2026-09-21 13:38:20 +08:00
commit a4ae7ac979
58 changed files with 4622 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
// 最小验证脚本:确认 Playwright + Chromium 能访问应用并截图。
import { launchBrowser, newContext } from './browser.js'
import { BASE_URL } from './config.js'
const OUT = '/tmp/opencode/ts-browser-test.png'
async function main(): Promise<void> {
const browser = await launchBrowser()
const context = await newContext(browser, { width: 1440, height: 900 })
const page = await context.newPage()
try {
await page.goto(BASE_URL)
await page.waitForTimeout(4000)
const title = await page.title()
await page.screenshot({ path: OUT })
console.log('OK title=', title, 'saved=', OUT)
} finally {
await context.close()
await browser.close()
}
}
main().catch((err) => {
console.error('FAIL', err)
process.exit(1)
})