Table of Contents

Class FooterStateProvider

Namespace
JD.AI.Rendering
Assembly
JD.AI.dll

Collects and manages the mutable state used to build an immutable FooterState snapshot. All mutations are thread-safe; the class is safe to call from both the main thread and background refresh tasks.

public sealed class FooterStateProvider
Inheritance
FooterStateProvider
Inherited Members

Constructors

FooterStateProvider(string)

Initialises a new FooterStateProvider bound to the given working directory.

public FooterStateProvider(string workingDirectory)

Parameters

workingDirectory string

The current working directory to display in the footer.

Properties

CurrentState

Builds and returns an immutable snapshot of the current footer state.

public FooterState CurrentState { get; }

Property Value

FooterState

Methods

AddPluginSegment(string, string, int)

Adds or replaces a plugin-provided segment identified by key. If a segment with the same key already exists it is removed before the new one is added (upsert semantics).

public void AddPluginSegment(string key, string value, int priority = 0)

Parameters

key string
value string
priority int

SetGitInfo(string?, string?)

Updates the git branch and optional PR link. Pass null to clear either value.

public void SetGitInfo(string? branch, string? prLink)

Parameters

branch string
prLink string

Update(string, string, long, long, int, PermissionMode, double)

Updates all session-level footer data in a single, atomic operation.

public void Update(string provider, string model, long tokensUsed, long contextWindow, int turnCount, PermissionMode mode, double warnThresholdPercent)

Parameters

provider string
model string
tokensUsed long
contextWindow long
turnCount int
mode PermissionMode
warnThresholdPercent double