# New-ImageStoryReplay

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

 Command  

**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>]
```

 [#](#method-new-imagestoryreplay-string-terminaldialect-double-psobject-string-string) 

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

### Prepare recorded output for playback

```powershell
$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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:DD38067BDD50DD1C082C6023F9EBAF05AE88679EBB75F613635F5D751F42ED91 -->
