

























@@ -135,13 +135,19 @@ const DEFAULT_USER_DRIVER = "scripts/e2e/telegram-user-driver.py";
135135const DEFAULT_OUTPUT_ROOT = ".artifacts/qa-e2e/telegram-user-crabbox";
136136const REMOTE_ROOT = "/tmp/openclaw-telegram-user-crabbox";
137137const CREDENTIAL_SCRIPT = fileURLToPath(new URL("./telegram-user-credential.ts", import.meta.url));
138-const TELEGRAM_PROOF_VIEW = {
139-cropWidth: 520,
138+const TELEGRAM_PROOF_WINDOW = {
140139height: 1000,
141140width: 650,
142141x: 635,
143142y: 40,
144143};
144+const TELEGRAM_PROOF_CROP = {
145+cropWidth: 430,
146+height: TELEGRAM_PROOF_WINDOW.height,
147+width: 430,
148+x: TELEGRAM_PROOF_WINDOW.x + 220,
149+y: TELEGRAM_PROOF_WINDOW.y,
150+};
145151146152function usageText() {
147153return [
@@ -165,7 +171,7 @@ function usageText() {
165171" --output-dir <path> Artifact directory under the repo.",
166172" --message-id <id> Telegram message id for proof-view deep link.",
167173" --preview-crop telegram-window Create a side-by-side friendly Telegram-window GIF.",
168-" --preview-crop-width <pixels> Cropped preview GIF width. Default: 520.",
174+" --preview-crop-width <pixels> Cropped preview GIF width. Default: 430.",
169175" --preview-fps <fps> Motion GIF frames per second. Default: 24.",
170176" --preview-width <pixels> Motion GIF width. Default: 1920.",
171177" --pr <number> Pull request number for publish.",
@@ -237,7 +243,7 @@ function parseArgs(argv: string[]): Options {
237243mockResponseText: "OPENCLAW_E2E_OK",
238244mockPort: 19_882,
239245outputDir: path.join(DEFAULT_OUTPUT_ROOT, stamp),
240-previewCropWidth: TELEGRAM_PROOF_VIEW.cropWidth,
246+previewCropWidth: TELEGRAM_PROOF_CROP.cropWidth,
241247previewFps: 24,
242248previewWidth: 1920,
243249provider: process.env.OPENCLAW_TELEGRAM_USER_CRABBOX_PROVIDER?.trim() || "aws",
@@ -939,12 +945,12 @@ async function createMotionPreview(params: {
939945940946function previewCrop(opts: Options) {
941947return opts.previewCrop === "telegram-window"
942- ? { ...TELEGRAM_PROOF_VIEW, cropWidth: opts.previewCropWidth }
948+ ? { ...TELEGRAM_PROOF_CROP, cropWidth: opts.previewCropWidth }
943949 : undefined;
944950}
945951946952async function createCroppedMotionPreview(params: {
947- crop: typeof TELEGRAM_PROOF_VIEW;
953+ crop: typeof TELEGRAM_PROOF_CROP;
948954 croppedGifPath: string;
949955 croppedVideoPath: string;
950956 opts: Options;
@@ -1811,7 +1817,7 @@ if [ -z "$win" ]; then
18111817exit 1
18121818fi
18131819wmctrl -ir "$win" -b remove,maximized_vert,maximized_horz,fullscreen
1814-wmctrl -ir "$win" -e 0,${TELEGRAM_PROOF_VIEW.x},${TELEGRAM_PROOF_VIEW.y},${TELEGRAM_PROOF_VIEW.width},${TELEGRAM_PROOF_VIEW.height}
1820+wmctrl -ir "$win" -e 0,${TELEGRAM_PROOF_WINDOW.x},${TELEGRAM_PROOF_WINDOW.y},${TELEGRAM_PROOF_WINDOW.width},${TELEGRAM_PROOF_WINDOW.height}
18151821telegram="$root/Telegram/Telegram"
18161822test -x "$telegram"
18171823set +e
@@ -1839,7 +1845,8 @@ async function viewSession(root: string, opts: Options, outputDir: string) {
18391845 );
18401846 fs.writeFileSync(logPath, `${result.stdout}${result.stderr}`);
18411847 return {
1842- geometry: TELEGRAM_PROOF_VIEW,
1848+ crop: TELEGRAM_PROOF_CROP,
1849+ geometry: TELEGRAM_PROOF_WINDOW,
18431850 link,
18441851 log: path.relative(root, logPath),
18451852 status: "pass",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。