# StoryReplay

Bounded, resolved terminal events supplied by a capture host or an author.

 Class  

`ChartForgeX.Stories`

**Namespace**

`ChartForgeX.Stories`

**Assembly**

`ChartForgeX.Stories`

**Source**

[StoryReplay.cs:27](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L27)

**Modifiers**

sealed

Bounded, resolved terminal events supplied by a capture host or an author.

## Inheritance

- object
- StoryReplay

## Remarks

Commands are submitted observations rather than simulated keystrokes. ANSI controls are stripped; hosts resolve screen operations into explicit events.

## Usage

 Explore 14 API references to this type 

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 13

- Method [StoryReplay.ChangeDirectory](/api/chartforgex-stories-storyreplay/#method-changedirectory-timespan-string)
- Method [StoryReplay.Clear](/api/chartforgex-stories-storyreplay/#method-clear-timespan)
- Method [StoryReplay.Command](/api/chartforgex-stories-storyreplay/#method-command-timespan-string)
- Method [StoryReplay.CompressPauses](/api/chartforgex-stories-storyreplay/#method-compresspauses-timespan)
- Method [StoryReplay.Create](/api/chartforgex-stories-storyreplay/#method-create-timespan-chartforgex-terminal-terminaldialect-string-string-string)
- Method [StoryReplay.Explain](/api/chartforgex-stories-storyreplay/#method-explain-timespan-string)
- Method [StoryReplay.Marker](/api/chartforgex-stories-storyreplay/#method-marker-timespan-string)
- Method [StoryReplay.OpenTab](/api/chartforgex-stories-storyreplay/#method-opentab-timespan-string-string-chartforgex-terminal-terminaldialect-string-string)
- Method [StoryReplay.Output](/api/chartforgex-stories-storyreplay/#method-output-timespan-string-nullable-chartforgex-tone)
- Method [StoryReplay.ReplaceLine](/api/chartforgex-stories-storyreplay/#method-replaceline-timespan-string-nullable-chartforgex-tone)
- Method [StoryReplay.SelectTab](/api/chartforgex-stories-storyreplay/#method-selecttab-timespan-string)
- Method [StoryReplay.Trim](/api/chartforgex-stories-storyreplay/#method-trim-timespan-timespan)
- Property [VisualStoryReplaySurface.Replay](/api/chartforgex-stories-visualstoryreplaysurface/#property-replay)

### Accepted by parameters 1

- Constructor [VisualStoryReplaySurface.VisualStoryReplaySurface](/api/chartforgex-stories-visualstoryreplaysurface/#constructor-ctor-chartforgex-stories-storyreplay-string-chartforgex-stories-visualstoryterminaloptions-chartforgex-themes-visualtheme-chartforgex-thememode-chartforgex-terminal-terminalstyleoptions) parameter `replay`

 Filter members   

    Show inherited   

 

## Methods

 `public StoryReplay ChangeDirectory(TimeSpan at, string directory)` [#](#method-changedirectory-timespan-string) 

[StoryReplay.cs:62](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L62)

Changes the active tab's prompt directory.

Parameters

**at System.TimeSpan required**

**directory string required**

Returns

 `StoryReplay` 

 `public StoryReplay Clear(TimeSpan at)` [#](#method-clear-timespan) 

[StoryReplay.cs:58](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L58)

Clears displayed lines in the active tab without discarding recorded transcript events.

Parameters

**at System.TimeSpan required**

Returns

 `StoryReplay` 

 `public StoryReplay Command(TimeSpan at, string command)` [#](#method-command-timespan-string) 

[StoryReplay.cs:45](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L45)

Adds a submitted command at its recorded timestamp.

Parameters

**at System.TimeSpan required**

**command string required**

Returns

 `StoryReplay` 

 `public StoryReplay CompressPauses(TimeSpan maximumGap)` [#](#method-compresspauses-timespan) 

[StoryReplay.cs:103](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L103)

Returns a detached presentation with every idle gap, including leading and trailing gaps, capped explicitly.

Parameters

**maximumGap System.TimeSpan required**

Returns

 `StoryReplay` 

 `public static StoryReplay Create(TimeSpan duration, TerminalDialect dialect = PowerShell, string workingDirectory = ".", string title = "PowerShell", string? customPrompt = null)` [#](#method-create-timespan-chartforgex-terminal-terminaldialect-string-string-string) 

[StoryReplay.cs:27](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L27)

Creates a recording with an explicit endpoint and initial session.

Parameters

**duration System.TimeSpan required**

**dialect ChartForgeX.Terminal.TerminalDialect = PowerShell optional**

**workingDirectory string = "." optional**

**title string = "PowerShell" optional**

**customPrompt string? = null optional**

Returns

 `StoryReplay` 

 `public StoryReplay Explain(TimeSpan at, string label)` [#](#method-explain-timespan-string) 

[StoryReplay.cs:81](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L81)

Returns a detached replay with an explanation inserted on the presentation clock, without inventing a recorded timestamp.

Parameters

**at System.TimeSpan required**

**label string required**

Returns

 `StoryReplay` 

 `public StoryReplay Marker(TimeSpan at, string label)` [#](#method-marker-timespan-string) 

[StoryReplay.cs:60](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L60)

Adds an explanation or chapter marker at a recorded timestamp.

Parameters

**at System.TimeSpan required**

**label string required**

Returns

 `StoryReplay` 

 `public StoryReplay OpenTab(TimeSpan at, string id, string title, TerminalDialect dialect = PowerShell, string workingDirectory = ".", string? customPrompt = null)` [#](#method-opentab-timespan-string-string-chartforgex-terminal-terminaldialect-string-string) 

[StoryReplay.cs:66](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L66)

Opens and activates a persistent session.

Parameters

**at System.TimeSpan required**

**id string required**

**title string required**

**dialect ChartForgeX.Terminal.TerminalDialect = PowerShell optional**

**workingDirectory string = "." optional**

**customPrompt string? = null optional**

Returns

 `StoryReplay` 

 `public StoryReplay Output(TimeSpan at, string text, Tone? tone = null)` [#](#method-output-timespan-string-nullable-chartforgex-tone) 

[StoryReplay.cs:48](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L48)

Adds completed, newline-separated output. Use ReplaceLine for a carriage-return update.

Parameters

**at System.TimeSpan required**

**text string required**

**tone ChartForgeX.Tone? = null optional**

Returns

 `StoryReplay` 

 `public StoryReplay ReplaceLine(TimeSpan at, string text, Tone? tone = null)` [#](#method-replaceline-timespan-string-nullable-chartforgex-tone) 

[StoryReplay.cs:55](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L55)

Replaces the active tab's last line with resolved progress text.

Parameters

**at System.TimeSpan required**

**text string required**

**tone ChartForgeX.Tone? = null optional**

Returns

 `StoryReplay` 

 `public StoryReplay SelectTab(TimeSpan at, string id)` [#](#method-selecttab-timespan-string) 

[StoryReplay.cs:75](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L75)

Activates a previously opened session.

Parameters

**at System.TimeSpan required**

**id string required**

Returns

 `StoryReplay` 

 `public string ToTranscript()` [#](#method-totranscript) 

[StoryReplay.Transcript.cs:10](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.Transcript.cs#L10)

Gets sanitized chronological output, including cleared lines and both timestamps.

Returns

 `string` 

Exceptions

- `InvalidOperationException` – The expanded transcript exceeds 16 Mi UTF-16 characters.

 `public StoryReplay Trim(TimeSpan start, TimeSpan end)` [#](#method-trim-timespan-timespan) 

[StoryReplay.cs:92](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L92)

Returns a detached presentation interval. Earlier events are retained at zero to reconstruct tab and screen state.

Parameters

**start System.TimeSpan required**

**end System.TimeSpan required**

Returns

 `StoryReplay` 

## Inherited Methods

 `public virtual bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from object

Parameters

**obj object? required**

Returns

 `bool` 

 `public virtual int GetHashCode()` [#](#method-gethashcode) 

Inherited from object

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public virtual string? ToString()` [#](#method-tostring) 

Inherited from object

Returns

 `string?` 

## Properties

 `public TimeSpan Duration { get; private set; }` [#](#property-duration) 

[StoryReplay.cs:29](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L29)

Gets the presentation duration, including recorded idle time.

 `public TimeSpan OriginalDuration { get; private set; }` [#](#property-originalduration) 

[StoryReplay.cs:31](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L31)

Gets the original duration before trimming or pause compression.

 `public TerminalDialect Dialect { get; }` [#](#property-dialect) 

[StoryReplay.cs:33](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L33)

Gets the initial recording dialect.

 `public string Title { get; }` [#](#property-title) 

[StoryReplay.cs:35](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L35)

Gets the initial tab title.

 `public string WorkingDirectory { get; }` [#](#property-workingdirectory) 

[StoryReplay.cs:37](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L37)

Gets the initial prompt directory.

 `public string CustomPrompt { get; }` [#](#property-customprompt) 

[StoryReplay.cs:39](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L39)

Gets the initial custom prompt.

 `public IReadOnlyList<StoryReplayEvent> Events { get; }` [#](#property-events) 

[StoryReplay.cs:41](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/StoryReplay.cs#L41)

Gets immutable events in stable timestamp order.

<!-- PowerForge markdown artifact sha256:0F17F368AA428CA82484CC9B6B8D7E62B77CE8E4EBBBD2AAF63D73FF1A1316CF -->
