Skip to content
ChartForgeX
Command

New-ImageStoryReplay

Module imageplayground
Inputs
System.Management.Automation.PSObject[]
Outputs
ChartForgeX.Stories.StoryReplay

Converts ordered capture records into a resolved replay without executing commands.

Syntax

New-ImageStoryReplay [-CustomPrompt <String>] [-Dialect <TerminalDialect>] -DurationSeconds <Double> -InputObject <PSObject[]> [-Title <String>] [-WorkingDirectory <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Each event supplies TimestampSeconds and Kind. Command, Output, ReplaceLine, Directory and Marker use Text. OpenTab uses TabId, Title, Dialect, WorkingDirectory and CustomPrompt; SelectTab uses TabId. Output and ReplaceLine can supply Tone. Capture scripts remain a separate, explicit caller action.

Examples

Authored help example

Prepare recorded output for playback

$events = @(
    @{ TimestampSeconds = 1; Kind = 'Command'; Text = './Test-Project.ps1' }
    @{ TimestampSeconds = 12; Kind = 'Output'; Text = '24 checks passed'; Tone = 'Success' }
)
$replay = New-ImageStoryReplay -DurationSeconds 15 -Events $events
$replay.CompressPauses([TimeSpan]::FromSeconds(2))

Parameters

-CustomPrompt String optional
Prompt required by the Custom dialect.
-Dialect TerminalDialect optional
Initial prompt dialect.
Possible values: PowerShell, Bash, CommandPrompt, Python, CSharp, Custom
-DurationSeconds Double required
Recorded endpoint, including idle time.
-InputObject PSObject[] requiredpipeline: True (ByValue)aliases: Events
Ordered dictionaries or objects, including objects read with ConvertFrom-Json.
-Title String optional
Initial session title.
-WorkingDirectory String optional
Initial prompt directory.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.