> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sidenet.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Text Copy

> Customize the empty-state greeting, placeholder, and suggestion cards.

The empty-state greeting, composer placeholder, and suggestion cards are loaded from the backend's `sdk_ui.text`. You can override any of these via `initSidenet({ sdkUi })` or at runtime via `updateSidenetStyledConfig({ text })`. Suggestion cards can also bind a specific agent for one-shot routing on click.

```typescript theme={null}
await initSidenet({
  orgId: 'org-123',
  copilotId: 'copilot-456',
  sdkUi: {
    text: {
      greeting: { title: 'Hello!', subtitle: 'Pick a quick action below.' },
      placeholder: 'Ask anything…',
      suggestions: [
        // agentSlug matches on the part before the first underscore — both
        // 'le-closer' and 'le-closer_v1_1' resolve to the same agent. The SDK
        // always picks the highest-versioned matching subagent at send time.
        { title: 'Refunds this week', subtitle: '', agentSlug: 'le-comptable' },
        // Looser editTolerance — user can rewrite up to 40% before the binding drops.
        { title: 'Top selling hotel', subtitle: 'today', agentSlug: 'le-closer', editTolerance: 0.4 },
        // System prompt only — biases the assistant for this one send (no agent binding).
        { title: 'Translate to French', subtitle: 'next message', prompt: 'Respond in concise French regardless of input language.' },
        // No agentSlug → routes through the default (dropdown selection or auto).
        { title: 'Free-form question', subtitle: 'no agent bound' },
      ],
    },
  },
});

// Or at runtime — partial updates merge into the existing config:
updateSidenetStyledConfig({
  text: {
    suggestions: [
      { title: 'New idea', subtitle: '', agentSlug: 'le-closer' },
    ],
  },
});
```

## Per-suggestion bindings

A suggestion can attach two pieces of intent to the next user send:

* **`agentSlug`** — adds an `X-Agent-Id` header pointing at the resolved agent version. Matching is **version-tolerant**: both `'le-closer'` and `'le-closer_v1_1'` are accepted. The SDK splits on the first underscore on both sides and picks the highest-versioned matching subagent at send time, so you don't need to update your suggestions config when an agent ships a new version. If `agentSlug` doesn't match any loaded subagent at click time, the binding is dropped silently (a `console.warn` appears when `debug: true`).
* **`prompt`** — prepends a `system` message to the `messages` array sent for that single send (standard AI SDK pattern). Use it to bias the assistant for the suggestion's intent — persona, output format, language, etc. The backend sees a turn that starts with the system message and ends with the user's message.

Both are gated by **edit tolerance**: if the user edits the prefilled prompt before sending, the SDK computes the Levenshtein distance against the original suggestion text. If `distance > editTolerance × originalLength` (default `editTolerance: 0.25`, with an absolute floor of 6 characters), both bindings are dropped and the request goes through with the dropdown's defaults.

`agentSlug` and `prompt` are independent — a suggestion can have either, both, or neither.
