mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 04:00:36 +00:00
Add ability to capture multiple screenshots at intervals during long-running terminal output (e.g., progress bars). Optionally generates animated GIFs from captured frames using ffmpeg. Features: - Streaming capture at configurable intervals - Early stop when output stabilizes (3 consecutive unchanged frames) - Duplicate frame skipping - Animated GIF generation via ffmpeg concat demuxer - Auto-cleanup of output directory before each run - Configurable delay before starting captures Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
24 lines
822 B
TypeScript
24 lines
822 B
TypeScript
import type { ScenarioConfig } from '../scenario-runner.js';
|
|
|
|
/**
|
|
* Demonstrates streaming shell execution output with PTY enabled by default.
|
|
* Tests the render throttle behavior and progress bar handling.
|
|
* Captures multiple screenshots during execution to show real-time output.
|
|
*/
|
|
export default {
|
|
name: 'streaming-shell',
|
|
spawn: ['node', 'dist/cli.js', '--yolo'],
|
|
terminal: { title: 'qwen-code', cwd: '../../..' },
|
|
flow: [
|
|
{
|
|
type: 'Run this command: bash integration-tests/terminal-capture/scenarios/progress.sh',
|
|
// Capture 20 screenshots at 500ms intervals during execution
|
|
// The progress.sh script takes ~10 seconds (20 iterations * 0.5s each)
|
|
streaming: {
|
|
delayMs: 7000,
|
|
intervalMs: 500,
|
|
count: 20,
|
|
},
|
|
},
|
|
],
|
|
} satisfies ScenarioConfig;
|