mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 03:09:50 +08:00
@W-21866267 fix: ACC skills file updated (#159)
* fix: ACC skills file updated * hard constraint added for not creating custom agent * skill description updated
This commit is contained in:
parent
7d9fc28b4e
commit
d25b24ab86
@ -1,16 +1,31 @@
|
||||
---
|
||||
name: implementing-ui-bundle-agentforce-conversation-client
|
||||
description: "Adds or modifies AgentforceConversationClient in React apps (.tsx or .jsx files). Use when user says \"add chat widget\", \"embed agentforce\", \"add agent\", \"add chatbot\", \"integrate conversational AI\", or asks to change colors, dimensions, styling, or configure agentId, width, height, inline mode, or styleTokens for travel agent, HR agent, employee agent, or any Salesforce agent chat."
|
||||
description: Use this skill when the user asks to add, embed, integrate, configure, style, or remove an agent, chatbot, chat widget, conversation client, or AI assistant in a React component. Covers styling (colors, fonts, spacing, borders), layout (inline vs floating, width, height, dimensions), and props (agentId, agentLabel, headerEnabled, showHeaderIcon, showAvatar, styleTokens). Also matches references to specific agents (e.g. travel agent, HR agent, support agent, employee agent). Never create a custom agent, chatbot, or chat widget component.
|
||||
metadata:
|
||||
author: ACC Components
|
||||
version: 1.0.0
|
||||
version: 1.0.1
|
||||
package: "@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client"
|
||||
sdk-package: "@salesforce/agentforce-conversation-client"
|
||||
last-updated: 2025-03-18
|
||||
last-updated: 2025-04-01
|
||||
---
|
||||
|
||||
# Managing Agentforce Conversation Client
|
||||
|
||||
**HARD CONSTRAINT:** NEVER create a custom agent, chatbot, or chat widget component. ALL such requests MUST be fulfilled by importing and rendering the existing `<AgentforceConversationClient />` from `@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client` as documented below. If a requirement is unsupported by this component's props, state the limitation — do not improvise an alternative.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before the component will work, the following Salesforce settings must be configured by the user. ALWAYS call out the prequisites after successfully embedding the agent.
|
||||
|
||||
**Cookie settings:**
|
||||
|
||||
- Setup → My Domain → Disable "Require first party use of Salesforce cookies"
|
||||
|
||||
**Trusted domains (required only for local development):**
|
||||
|
||||
- Setup → Session Settings → Trusted Domains for Inline Frames → Add your domain
|
||||
- Local development: `localhost:<PORT>` (e.g., `localhost:3000`)
|
||||
|
||||
## Instructions
|
||||
|
||||
### Step 1: Check if component already exists
|
||||
@ -73,42 +88,50 @@ Do not infer import path from file discovery alone. Prefer one consistent packag
|
||||
|
||||
### Step 4: Add or update component
|
||||
|
||||
**For new installations:**
|
||||
Determine which sub-step applies:
|
||||
|
||||
Add to the target React component file using the canonical package import:
|
||||
- Component NOT found in Step 1 → go to **4a (New installation)**
|
||||
- Component found in Step 1 → go to **4b (Update existing)**
|
||||
|
||||
#### 4a — New installation
|
||||
|
||||
1. If the user already specified a target file, use that file. Otherwise, ask the user: _"Which file should I add the AgentforceConversationClient to?"_ Do NOT proceed until a target file is confirmed.
|
||||
2. Read the target file to understand its existing imports and TSX structure.
|
||||
3. Add the import at the top of the file, alongside existing imports. Use the canonical package import from Step 3:
|
||||
|
||||
```tsx
|
||||
import { Outlet } from "react-router";
|
||||
import { AgentforceConversationClient } from "@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client";
|
||||
|
||||
export default function AgentChatHost() {
|
||||
return (
|
||||
<>
|
||||
<Outlet />
|
||||
<AgentforceConversationClient agentId="0Xx..." />
|
||||
</>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
**Fallback note:** Use a local relative import only when the user explicitly requests patched/local component usage in that app.
|
||||
|
||||
**For updates:**
|
||||
|
||||
Read the file where component is used and modify only the props that need to change. Preserve all other props. Never delete and recreate.
|
||||
|
||||
**Replacing placeholder values:**
|
||||
|
||||
If the component has a placeholder agentId (e.g., `agentId="Placeholder"` or `agentId="0Xx..."`), replace it with the real agent ID:
|
||||
|
||||
4. Insert the `<AgentforceConversationClient />` TSX into the component's return block. Place it as a sibling of existing content — do NOT wrap or restructure existing TSX. Use the real `agentId` obtained in Step 2:
|
||||
**Example:**
|
||||
```tsx
|
||||
// Before (template with placeholder)
|
||||
<AgentforceConversationClient agentId="Placeholder" />
|
||||
|
||||
// After (with real agent ID)
|
||||
<AgentforceConversationClient agentId="0Xx8X00000001AbCDE" />
|
||||
```
|
||||
|
||||
5. Do NOT add any other code (wrappers, layout components, new functions) unless the user explicitly requests it.
|
||||
|
||||
#### 4b — Update existing
|
||||
|
||||
1. Read the file identified in Step 1.
|
||||
2. Locate the existing `<AgentforceConversationClient ... />` TSX element.
|
||||
3. Apply **only** the changes the user requested. Rules:
|
||||
- **Add** new props that the user asked for.
|
||||
- **Change** prop values the user asked to update.
|
||||
- **Preserve** every prop and value the user did NOT mention — do not remove, reorder, or reformat them.
|
||||
- **Never** delete the component and recreate it.
|
||||
4. If the current `agentId` is a placeholder (failed validation in Step 1) and a real agent ID was obtained in Step 2, replace the placeholder value:
|
||||
|
||||
```tsx
|
||||
// Before
|
||||
<AgentforceConversationClient agentId="Placeholder" />
|
||||
|
||||
// After
|
||||
<AgentforceConversationClient agentId="0Xx8X00000001AbCDE" />
|
||||
```
|
||||
|
||||
5. If the current `agentId` is already valid and the user did not ask to change it, leave it as-is.
|
||||
|
||||
### Step 5: Configure props
|
||||
|
||||
**Available props (use directly on component):**
|
||||
@ -121,6 +144,7 @@ If the component has a placeholder agentId (e.g., `agentId="Placeholder"` or `ag
|
||||
- `styleTokens` (object) - For all styling (colors, fonts, spacing)
|
||||
- `salesforceOrigin` (string) - Auto-resolved
|
||||
- `frontdoorUrl` (string) - Auto-resolved
|
||||
- `agentLabel` (string) - header title for agent
|
||||
|
||||
**Examples:**
|
||||
|
||||
@ -136,6 +160,175 @@ Inline mode with dimensions:
|
||||
<AgentforceConversationClient agentId="0Xx..." inline width="420px" height="600px" />
|
||||
```
|
||||
|
||||
Adding or updating agent label:
|
||||
|
||||
```tsx
|
||||
<AgentforceConversationClient agentId="0Xx..." agentLabel="<dummy-agent-label>" />
|
||||
```
|
||||
|
||||
**Styling rules (mandatory):**
|
||||
|
||||
- ALL visual customization (colors, fonts, spacing, borders, radii, shadows) MUST go through the `styleTokens` prop. There are no exceptions.
|
||||
- ONLY use token names listed in the tables below. Do NOT invent custom token names.
|
||||
- NEVER apply styling via CSS files, `style` attributes, `className`, or wrapper elements. These approaches will not work and will be ignored by the component.
|
||||
- If the user requests a visual change that does not map to a token below, inform them that the change is not supported by the current token set.
|
||||
|
||||
### Container
|
||||
|
||||
| Token name | UI area themed |
|
||||
| --------------------- | --------------------------- |
|
||||
| `fabBackground` | FAB button background color |
|
||||
| `containerBackground` | Chat container background |
|
||||
| `headerBackground` | Header background |
|
||||
| `containerWidth` | Chat container width |
|
||||
| `chatBorderRadius` | Chat border radius |
|
||||
| `layoutMaxWidth` | Layout max width |
|
||||
|
||||
### Agentforce Header
|
||||
|
||||
| Token name | UI area themed |
|
||||
| ------------------------------- | ---------------------------------- |
|
||||
| `headerBlockBackground` | Header block background |
|
||||
| `headerBlockBorderBottomWidth` | Header border bottom width |
|
||||
| `headerBlockBorderBottomStyle` | Header border bottom style |
|
||||
| `headerBlockBorderBottomColor` | Header border bottom color |
|
||||
| `headerBlockBorderRadius` | Header corner radius |
|
||||
| `headerBlockPaddingBlock` | Header block padding (vertical) |
|
||||
| `headerBlockPaddingInline` | Header inline padding (horizontal) |
|
||||
| `headerBlockMinHeight` | Header minimum height |
|
||||
| `headerBlockBrandingGap` | Header branding area gap |
|
||||
| `headerBlockFontFamily` | Header font family |
|
||||
| `headerBlockFontWeight` | Header title font weight |
|
||||
| `headerBlockFontSize` | Header title font size |
|
||||
| `headerBlockLineHeight` | Header title line height |
|
||||
| `headerBlockTextColor` | Header text color |
|
||||
| `headerBlockIconDisplay` | Header icon display |
|
||||
| `headerBlockIconMargin` | Header icon margin |
|
||||
| `headerBlockIconColor` | Header icon color |
|
||||
| `headerBlockIconWidth` | Header icon width |
|
||||
| `headerBlockIconHeight` | Header icon height |
|
||||
| `headerBlockLogoMaxHeight` | Header logo max height |
|
||||
| `headerBlockLogoMaxWidth` | Header logo max width |
|
||||
| `headerBlockLogoMinWidth` | Header logo min width |
|
||||
| `headerBlockButtonHeight` | Header action button height |
|
||||
| `headerBlockButtonWidth` | Header action button width |
|
||||
| `headerBlockButtonPadding` | Header action button padding |
|
||||
| `headerBlockButtonBorderRadius` | Header action button border radius |
|
||||
| `headerBlockHoverBackground` | Header hover background |
|
||||
| `headerBlockActiveBackground` | Header active background |
|
||||
| `headerBlockFocusBorder` | Header focus border |
|
||||
|
||||
### Agentforce Welcome Block
|
||||
|
||||
| Token name | UI area themed |
|
||||
| ----------------------------------- | -------------------------------- |
|
||||
| `welcomeBlockTextContainerWidth` | Welcome text container width |
|
||||
| `welcomeBlockFontFamily` | Welcome block font family |
|
||||
| `welcomeBlockFontSize` | Welcome block font size |
|
||||
| `welcomeBlockFontWeight` | Welcome block font weight |
|
||||
| `welcomeBlockLineHeight` | Welcome block line height |
|
||||
| `welcomeBlockLetterSpacing` | Welcome block letter spacing |
|
||||
| `welcomeBlockTextColor` | Welcome block text color |
|
||||
| `welcomeBlockPaddingVertical` | Welcome block vertical padding |
|
||||
| `welcomeBlockPaddingHorizontal` | Welcome block horizontal padding |
|
||||
| `welcomeBlockTextAnimationDuration` | Welcome text animation duration |
|
||||
|
||||
### Agentforce Messages
|
||||
|
||||
| Token name | UI area themed |
|
||||
| -------------------------------- | ------------------------------------------------------- |
|
||||
| `messageBlockBorderRadius` | Message block border radius |
|
||||
| `avatarDisplay` | Avatar display property (e.g. `block`, `none`) |
|
||||
| `hideMessageActions` | Message actions display (e.g. `block`, `none` to hide) |
|
||||
| `hideCopyAction` | Copy action button display (e.g. `inline-flex`, `none`) |
|
||||
| `messageBlockPaddingContainer` | Message block container padding |
|
||||
| `messageBlockFontSize` | Message block font size |
|
||||
| `messageBlockBackgroundColor` | Message block background (base) |
|
||||
| `messageBlockInboundBorder` | Inbound message border |
|
||||
| `messageBlockOutboundBorder` | Outbound message border |
|
||||
| `messageBlockBodyWidth` | Message block body width |
|
||||
| `messageBlockPadding` | Message block padding |
|
||||
| `messageBlockContainerMarginTop` | Message block container top margin |
|
||||
| `messageBlockLineHeight` | Message block line height |
|
||||
|
||||
### Avatar visibility (behavioral config)
|
||||
|
||||
Use `renderingConfig.showAvatar` to control whether avatars are rendered in message rows.
|
||||
|
||||
- `showAvatar: true` (default) renders avatars.
|
||||
- `showAvatar: false` hides avatars by removing them from the DOM.
|
||||
|
||||
### Inbound message (agent → customer)
|
||||
|
||||
| Token name | UI area themed |
|
||||
| ----------------------------------------- | --------------------------------- |
|
||||
| `inboundMessgeTextColor` | Inbound message text color (base) |
|
||||
| `messageBlockInboundBorderRadius` | Inbound message border radius |
|
||||
| `messageBlockInboundBackgroundColor` | Inbound message background |
|
||||
| `messageBlockInboundTextColor` | Inbound message text color |
|
||||
| `messageBlockInboundWidth` | Inbound message width |
|
||||
| `messageBlockInboundTextAlign` | Inbound message text alignment |
|
||||
| `messageBlockInboundHoverBackgroundColor` | Inbound message hover background |
|
||||
|
||||
### Outbound message (customer → agent)
|
||||
|
||||
| Token name | UI area themed |
|
||||
| ------------------------------------- | ------------------------------- |
|
||||
| `messageBlockOutboundBorderRadius` | Outbound message border radius |
|
||||
| `messageBlockOutboundBackgroundColor` | Outbound message background |
|
||||
| `messageBlockOutboundTextColor` | Outbound message text color |
|
||||
| `messageBlockOutboundWidth` | Outbound message width |
|
||||
| `messageBlockOutboundMarginLeft` | Outbound message left margin |
|
||||
| `messageBlockOutboundTextAlign` | Outbound message text alignment |
|
||||
|
||||
### Agentforce Input
|
||||
|
||||
| Token name | UI area themed |
|
||||
| ------------------------------------------ | ---------------------------------------------- |
|
||||
| `messageInputPadding` | Message input container padding |
|
||||
| `messageInputFooterBorderColor` | Message input footer border color |
|
||||
| `messageInputBorderRadius` | Message input border radius |
|
||||
| `messageInputBorderTransitionDuration` | Message input border transition duration |
|
||||
| `messageInputBorderTransitionEasing` | Message input border transition easing |
|
||||
| `messageInputTextColor` | Message input text color |
|
||||
| `messageInputTextBackgroundColor` | Message input text background color |
|
||||
| `messageInputFooterBorderFocusColor` | Message input footer focus border color |
|
||||
| `messageInputFocusShadow` | Message input focus shadow |
|
||||
| `messageInputMaxHeight` | Message input max height |
|
||||
| `messageInputLineHeight` | Message input line height |
|
||||
| `messageInputTextPadding` | Message input text padding |
|
||||
| `messageInputFontWeight` | Message input font weight |
|
||||
| `messageInputFontSize` | Message input font size |
|
||||
| `messageInputOverflowY` | Message input overflow Y |
|
||||
| `messageInputScrollbarWidth` | Message input scrollbar width |
|
||||
| `messageInputScrollbarColor` | Message input scrollbar color |
|
||||
| `messageInputActionsWidth` | Message input actions width |
|
||||
| `messageInputActionsPaddingRight` | Message input actions right padding |
|
||||
| `messageInputFooterPlaceholderText` | Message input placeholder text color |
|
||||
| `messageInputPlaceholderFontWeight` | Placeholder font weight |
|
||||
| `messageInputErrorTextColor` | Message input error text color |
|
||||
| `messageInputActionsGap` | Message input actions gap |
|
||||
| `messageInputActionsPadding` | Message input actions padding |
|
||||
| `messageInputActionButtonSize` | Message input action button size |
|
||||
| `messageInputActionButtonRadius` | Message input action button radius |
|
||||
| `messageInputFooterSendButton` | Message input send button color |
|
||||
| `messageInputSendButtonDisabledColor` | Message input send button disabled color |
|
||||
| `messageInputActionButtonFocusBorder` | Message input action button focus border |
|
||||
| `messageInputActionButtonActiveIconColor` | Message input action button active icon color |
|
||||
| `messageInputActionButtonActiveBackground` | Message input action button active background |
|
||||
| `messageInputSendButtonIconColor` | Message input send button icon color |
|
||||
| `messageInputFooterSendButtonHoverColor` | Message input send button hover color |
|
||||
| `messageInputActionButtonHoverShadow` | Message input action button hover shadow |
|
||||
| `messageInputFilePreviewPadding` | Message input file preview padding |
|
||||
| `messageInputTextareaMaxHeight` | Message input textarea max height |
|
||||
| `messageInputTextareaWithImageMaxHeight` | Message input textarea max height (with image) |
|
||||
|
||||
### Agentforce Error Block
|
||||
|
||||
| Token name | UI area themed |
|
||||
| ---------------------- | ---------------------------- |
|
||||
| `errorBlockBackground` | Error block background color |
|
||||
|
||||
Styling with styleTokens:
|
||||
|
||||
```tsx
|
||||
@ -156,7 +349,6 @@ Styling with styleTokens:
|
||||
- Inline without header, calculated dimensions
|
||||
- Complete host component examples
|
||||
|
||||
**For styling:** For ANY color, font, or spacing changes, use `styleTokens` prop only. See `references/style-tokens.md` for complete token list and examples.
|
||||
|
||||
**Common mistakes to avoid:** Consult `references/constraints.md` for:
|
||||
|
||||
@ -171,16 +363,3 @@ If component doesn't appear or authentication fails, see `references/troubleshoo
|
||||
- Agent activation and deployment
|
||||
- Localhost trusted domains
|
||||
- Cookie restriction settings
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before the component will work, the following Salesforce settings must be configured by the user:
|
||||
|
||||
**Cookie settings:**
|
||||
|
||||
- Setup → My Domain → Disable "Require first party use of Salesforce cookies"
|
||||
|
||||
**Trusted domains (required only for local development):**
|
||||
|
||||
- Setup → Session Settings → Trusted Domains for Inline Frames → Add your domain
|
||||
- Local development: `localhost:<PORT>` (e.g., `localhost:3000`)
|
||||
|
||||
@ -8,21 +8,179 @@ The `styleTokens` prop is the **ONLY** way to customize the appearance of the Ag
|
||||
|
||||
## Source of Truth
|
||||
|
||||
For the complete and always up-to-date list of all 60+ style tokens, see:
|
||||
For the complete and always up-to-date list of all style tokens, see the tables below:
|
||||
|
||||
**[@salesforce/agentforce-conversation-client on npm](https://www.npmjs.com/package/@salesforce/agentforce-conversation-client)**
|
||||
- ALL visual customization (colors, fonts, spacing, borders, radii, shadows) MUST go through the `styleTokens` prop. There are no exceptions.
|
||||
- ONLY use token names listed in the tables below. Do NOT invent custom token names.
|
||||
- NEVER apply styling via CSS files, `style` attributes, `className`, or wrapper elements. These approaches will not work and will be ignored by the component.
|
||||
- If the user requests a visual change that does not map to a token below, inform them that the change is not supported by the current token set.
|
||||
|
||||
The npm package README contains the definitive documentation with all available style tokens.
|
||||
### Container
|
||||
|
||||
| Token name | UI area themed |
|
||||
| --------------------- | --------------------------- |
|
||||
| `fabBackground` | FAB button background color |
|
||||
| `containerBackground` | Chat container background |
|
||||
| `headerBackground` | Header background |
|
||||
| `containerWidth` | Chat container width |
|
||||
| `chatBorderRadius` | Chat border radius |
|
||||
| `layoutMaxWidth` | Layout max width |
|
||||
|
||||
### Agentforce Header
|
||||
|
||||
| Token name | UI area themed |
|
||||
| ------------------------------- | ---------------------------------- |
|
||||
| `headerBlockBackground` | Header block background |
|
||||
| `headerBlockBorderBottomWidth` | Header border bottom width |
|
||||
| `headerBlockBorderBottomStyle` | Header border bottom style |
|
||||
| `headerBlockBorderBottomColor` | Header border bottom color |
|
||||
| `headerBlockBorderRadius` | Header corner radius |
|
||||
| `headerBlockPaddingBlock` | Header block padding (vertical) |
|
||||
| `headerBlockPaddingInline` | Header inline padding (horizontal) |
|
||||
| `headerBlockMinHeight` | Header minimum height |
|
||||
| `headerBlockBrandingGap` | Header branding area gap |
|
||||
| `headerBlockFontFamily` | Header font family |
|
||||
| `headerBlockFontWeight` | Header title font weight |
|
||||
| `headerBlockFontSize` | Header title font size |
|
||||
| `headerBlockLineHeight` | Header title line height |
|
||||
| `headerBlockTextColor` | Header text color |
|
||||
| `headerBlockIconDisplay` | Header icon display |
|
||||
| `headerBlockIconMargin` | Header icon margin |
|
||||
| `headerBlockIconColor` | Header icon color |
|
||||
| `headerBlockIconWidth` | Header icon width |
|
||||
| `headerBlockIconHeight` | Header icon height |
|
||||
| `headerBlockLogoMaxHeight` | Header logo max height |
|
||||
| `headerBlockLogoMaxWidth` | Header logo max width |
|
||||
| `headerBlockLogoMinWidth` | Header logo min width |
|
||||
| `headerBlockButtonHeight` | Header action button height |
|
||||
| `headerBlockButtonWidth` | Header action button width |
|
||||
| `headerBlockButtonPadding` | Header action button padding |
|
||||
| `headerBlockButtonBorderRadius` | Header action button border radius |
|
||||
| `headerBlockHoverBackground` | Header hover background |
|
||||
| `headerBlockActiveBackground` | Header active background |
|
||||
| `headerBlockFocusBorder` | Header focus border |
|
||||
|
||||
### Agentforce Welcome Block
|
||||
|
||||
| Token name | UI area themed |
|
||||
| ----------------------------------- | -------------------------------- |
|
||||
| `welcomeBlockTextContainerWidth` | Welcome text container width |
|
||||
| `welcomeBlockFontFamily` | Welcome block font family |
|
||||
| `welcomeBlockFontSize` | Welcome block font size |
|
||||
| `welcomeBlockFontWeight` | Welcome block font weight |
|
||||
| `welcomeBlockLineHeight` | Welcome block line height |
|
||||
| `welcomeBlockLetterSpacing` | Welcome block letter spacing |
|
||||
| `welcomeBlockTextColor` | Welcome block text color |
|
||||
| `welcomeBlockPaddingVertical` | Welcome block vertical padding |
|
||||
| `welcomeBlockPaddingHorizontal` | Welcome block horizontal padding |
|
||||
| `welcomeBlockTextAnimationDuration` | Welcome text animation duration |
|
||||
|
||||
### Agentforce Messages
|
||||
|
||||
| Token name | UI area themed |
|
||||
| -------------------------------- | ------------------------------------------------------- |
|
||||
| `messageBlockBorderRadius` | Message block border radius |
|
||||
| `avatarDisplay` | Avatar display property (e.g. `block`, `none`) |
|
||||
| `hideMessageActions` | Message actions display (e.g. `block`, `none` to hide) |
|
||||
| `hideCopyAction` | Copy action button display (e.g. `inline-flex`, `none`) |
|
||||
| `messageBlockPaddingContainer` | Message block container padding |
|
||||
| `messageBlockFontSize` | Message block font size |
|
||||
| `messageBlockBackgroundColor` | Message block background (base) |
|
||||
| `messageBlockInboundBorder` | Inbound message border |
|
||||
| `messageBlockOutboundBorder` | Outbound message border |
|
||||
| `messageBlockBodyWidth` | Message block body width |
|
||||
| `messageBlockPadding` | Message block padding |
|
||||
| `messageBlockContainerMarginTop` | Message block container top margin |
|
||||
| `messageBlockLineHeight` | Message block line height |
|
||||
|
||||
### Avatar visibility (behavioral config)
|
||||
|
||||
Use `renderingConfig.showAvatar` to control whether avatars are rendered in message rows.
|
||||
|
||||
- `showAvatar: true` (default) renders avatars.
|
||||
- `showAvatar: false` hides avatars by removing them from the DOM.
|
||||
|
||||
### Inbound message (agent → customer)
|
||||
|
||||
| Token name | UI area themed |
|
||||
| ----------------------------------------- | --------------------------------- |
|
||||
| `inboundMessgeTextColor` | Inbound message text color (base) |
|
||||
| `messageBlockInboundBorderRadius` | Inbound message border radius |
|
||||
| `messageBlockInboundBackgroundColor` | Inbound message background |
|
||||
| `messageBlockInboundTextColor` | Inbound message text color |
|
||||
| `messageBlockInboundWidth` | Inbound message width |
|
||||
| `messageBlockInboundTextAlign` | Inbound message text alignment |
|
||||
| `messageBlockInboundHoverBackgroundColor` | Inbound message hover background |
|
||||
|
||||
### Outbound message (customer → agent)
|
||||
|
||||
| Token name | UI area themed |
|
||||
| ------------------------------------- | ------------------------------- |
|
||||
| `messageBlockOutboundBorderRadius` | Outbound message border radius |
|
||||
| `messageBlockOutboundBackgroundColor` | Outbound message background |
|
||||
| `messageBlockOutboundTextColor` | Outbound message text color |
|
||||
| `messageBlockOutboundWidth` | Outbound message width |
|
||||
| `messageBlockOutboundMarginLeft` | Outbound message left margin |
|
||||
| `messageBlockOutboundTextAlign` | Outbound message text alignment |
|
||||
|
||||
### Agentforce Input
|
||||
|
||||
| Token name | UI area themed |
|
||||
| ------------------------------------------ | ---------------------------------------------- |
|
||||
| `messageInputPadding` | Message input container padding |
|
||||
| `messageInputFooterBorderColor` | Message input footer border color |
|
||||
| `messageInputBorderRadius` | Message input border radius |
|
||||
| `messageInputBorderTransitionDuration` | Message input border transition duration |
|
||||
| `messageInputBorderTransitionEasing` | Message input border transition easing |
|
||||
| `messageInputTextColor` | Message input text color |
|
||||
| `messageInputTextBackgroundColor` | Message input text background color |
|
||||
| `messageInputFooterBorderFocusColor` | Message input footer focus border color |
|
||||
| `messageInputFocusShadow` | Message input focus shadow |
|
||||
| `messageInputMaxHeight` | Message input max height |
|
||||
| `messageInputLineHeight` | Message input line height |
|
||||
| `messageInputTextPadding` | Message input text padding |
|
||||
| `messageInputFontWeight` | Message input font weight |
|
||||
| `messageInputFontSize` | Message input font size |
|
||||
| `messageInputOverflowY` | Message input overflow Y |
|
||||
| `messageInputScrollbarWidth` | Message input scrollbar width |
|
||||
| `messageInputScrollbarColor` | Message input scrollbar color |
|
||||
| `messageInputActionsWidth` | Message input actions width |
|
||||
| `messageInputActionsPaddingRight` | Message input actions right padding |
|
||||
| `messageInputFooterPlaceholderText` | Message input placeholder text color |
|
||||
| `messageInputPlaceholderFontWeight` | Placeholder font weight |
|
||||
| `messageInputErrorTextColor` | Message input error text color |
|
||||
| `messageInputActionsGap` | Message input actions gap |
|
||||
| `messageInputActionsPadding` | Message input actions padding |
|
||||
| `messageInputActionButtonSize` | Message input action button size |
|
||||
| `messageInputActionButtonRadius` | Message input action button radius |
|
||||
| `messageInputFooterSendButton` | Message input send button color |
|
||||
| `messageInputSendButtonDisabledColor` | Message input send button disabled color |
|
||||
| `messageInputActionButtonFocusBorder` | Message input action button focus border |
|
||||
| `messageInputActionButtonActiveIconColor` | Message input action button active icon color |
|
||||
| `messageInputActionButtonActiveBackground` | Message input action button active background |
|
||||
| `messageInputSendButtonIconColor` | Message input send button icon color |
|
||||
| `messageInputFooterSendButtonHoverColor` | Message input send button hover color |
|
||||
| `messageInputActionButtonHoverShadow` | Message input action button hover shadow |
|
||||
| `messageInputFilePreviewPadding` | Message input file preview padding |
|
||||
| `messageInputTextareaMaxHeight` | Message input textarea max height |
|
||||
| `messageInputTextareaWithImageMaxHeight` | Message input textarea max height (with image) |
|
||||
|
||||
### Agentforce Error Block
|
||||
|
||||
| Token name | UI area themed |
|
||||
| ---------------------- | ---------------------------- |
|
||||
| `errorBlockBackground` | Error block background color |
|
||||
|
||||
## Token Categories
|
||||
|
||||
Style tokens are organized by UI area:
|
||||
|
||||
- **Header** (7 tokens): background, text color, hover, active, focus, border, font family
|
||||
- **Messages** (10 tokens): colors, padding, margins, border radius, fonts, body width
|
||||
- **Inbound messages** (5 tokens): background, text color, width, alignment, hover
|
||||
- **Outbound messages** (5 tokens): background, text color, width, alignment, margin
|
||||
- **Input** (33 tokens): colors, borders, fonts, padding, buttons, scrollbar, textarea, actions
|
||||
- **Header** : background, text color, hover, active, focus, border, font family
|
||||
- **Messages** : colors, padding, margins, border radius, fonts, body width
|
||||
- **Inbound messages** : background, text color, width, alignment, hover
|
||||
- **Outbound messages** : background, text color, width, alignment, margin
|
||||
- **Input** : colors, borders, fonts, padding, buttons, scrollbar, textarea, actions
|
||||
- **Error Component** : background
|
||||
|
||||
## Common Use Cases
|
||||
|
||||
@ -82,17 +240,6 @@ Style tokens are organized by UI area:
|
||||
/>
|
||||
```
|
||||
|
||||
## How to Find Token Names
|
||||
|
||||
1. Check the [@salesforce/agentforce-conversation-client npm package](https://www.npmjs.com/package/@salesforce/agentforce-conversation-client) for the complete list of all tokens
|
||||
|
||||
2. Token names follow a pattern:
|
||||
- `headerBlock*` - Header area
|
||||
- `messageBlock*` - Message bubbles
|
||||
- `messageBlockInbound*` - Messages from customer to agent
|
||||
- `messageBlockOutbound*` - Messages from agent to customer
|
||||
- `messageInput*` - Input field and send button
|
||||
|
||||
## Important Notes
|
||||
|
||||
- You do NOT need to provide all tokens - only override the ones you want to change
|
||||
|
||||
Loading…
Reference in New Issue
Block a user