AgentforceDimensions

open class AgentforceDimensions : Dimensions

Agentforce dimensions extend Salesforce SharedUI Dimensions and use the existing dimensions slot on createCustomAgentforceThemeManager(...) and AgentforceThemeOverrides.

All theming types live in the package com.salesforce.android.agentforcesdk.components.theme.

The SDK-specific token is AgentforceSizing.messageTextMaximumWidth, which caps the width of agent-authored plain text, Markdown, and rich text.

TypeExtendsPurpose
AgentforceDimensionsSharedUI DimensionsPass this as the dimensions value.
AgentforceSizingSharedUI SizingHolds messageTextMaximumWidth.

SharedUI exposes dimensions.sizing as the base type. Use agentforceSizing when you need to read messageTextMaximumWidth.

The dimensions parameter stays typed as SharedUI Dimensions so existing integrations remain source- and binary-compatible. Construct an AgentforceDimensions and pass it in.

Prefer a sparse AgentforceThemeOverrides bag. Leave dimensions unset to keep agent text unbounded.

For Java callers:

messageTextMaximumWidth is an optional sizing token. Rendering behavior is unchanged when you omit it.

BehaviorDetail
Defaultnull (unbounded)
What it limitsAgent-authored plain text, Markdown, and rich text
What it doesn’t limitUser-authored messages
Invalid valuesnull, 0.dp or less, NaN, and infinities are treated as unbounded
Larger than the parentThe parent still wins; the token is an upper bound, not a stretch

messageTextMaximumWidthDp is the Java-friendly Float? form of the same token.