# SmartPaste (@salmonui/chat/smart-paste)

> The SmartPaste interface of @salmonui/chat/smart-paste.

Canonical: https://salmonui.dev/docs/reference/chat/smart-paste/SmartPaste

```ts
import type { SmartPaste } from '@salmonui/chat/smart-paste';
```

Entry index: https://salmonui.dev/docs/reference/chat/smart-paste (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/chat/smart-paste.md).

## Reference

Kind: interface

```ts
interface SmartPaste {
    readonly paste: (text?: string) => Promise<SmartPasteResult>;
    readonly pending: boolean;
}
```

Members (2):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `paste` | `readonly paste: (text?: string) => Promise<SmartPasteResult>;` |  | Without an argument reads `navigator.clipboard.readText()` (call it from the click handler, inside the user gesture); with `text` uses that text. Rejects with the adapter's error, the clipboard error, or an `AbortError` when a newer paste or unmount aborted it. |
| `pending` | `readonly pending: boolean;` |  | True while a paste waits for the clipboard or the adapter. |
