chore: update plan automation and chat status UI
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import process from 'node:process';
|
||||
import { chromium } from 'playwright';
|
||||
import { createCaptureContext, getCaptureRuntimeConfig } from './capture-auth-utils.mjs';
|
||||
import { ensureDirectory, getKstDate, resolveCapturePaths, updateWorklogCaptureSection } from './worklog-capture-utils.mjs';
|
||||
|
||||
const cwd = process.cwd();
|
||||
const menuGroup = process.argv[2] ?? 'docs';
|
||||
const captureDate = process.argv[3] ?? getKstDate();
|
||||
const baseUrl = process.env.CAPTURE_BASE_URL ?? 'http://127.0.0.1:5174';
|
||||
const { baseUrl } = getCaptureRuntimeConfig(cwd);
|
||||
|
||||
const supportedMenuGroups = new Set(['docs', 'plans']);
|
||||
|
||||
@@ -22,10 +23,11 @@ const { screenshotDir, screenshotPath, worklogPath, markdownImagePath } = resolv
|
||||
});
|
||||
|
||||
const browser = await chromium.launch({ headless: true });
|
||||
const page = await browser.newPage({
|
||||
const context = await createCaptureContext(browser, {
|
||||
viewport: { width: 1600, height: 1200 },
|
||||
deviceScaleFactor: 2,
|
||||
});
|
||||
const page = await context.newPage();
|
||||
|
||||
try {
|
||||
await ensureDirectory(screenshotDir);
|
||||
@@ -57,5 +59,6 @@ try {
|
||||
console.log(`Saved: ${screenshotPath}`);
|
||||
console.log(`Linked in: ${worklogPath}`);
|
||||
} finally {
|
||||
await context.close();
|
||||
await browser.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user