> For the complete documentation index, see [llms.txt](https://grp-development.gitbook.io/solid-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://grp-development.gitbook.io/solid-scripts/resources/solid-chat/exports-and-events/client-exports.md).

# Client exports

Exports you can call from client scripts.

#### Chat window

**isChatVisible**

Whether the chat is on screen, including while messages fade out.

```lua
---@return boolean
local visible = exports['solid-chat']:isChatVisible()
```

**open**

Opens the chat input, as if the player pressed the open key.

```lua
exports['solid-chat']:open()
```

#### Messages

**addMessage**

Shows a message to this player only. It takes the same fields as the [server export](https://grp-development.gitbook.io/solid-scripts/resources/solid-chat/exports-and-events/server-exports#addmessage).

```lua
---@param message string|table
exports['solid-chat']:addMessage({
    args = { 'GPS', 'Waypoint set.' },
})
```

**clear**

```lua
exports['solid-chat']:clear()
```

#### Suggestions and templates

**addSuggestion**

```lua
---@param name string
---@param help string
---@param params? table
exports['solid-chat']:addSuggestion('/gps', 'Set a waypoint', {
    { name = 'place', help = 'Where to go' },
})
```

**addSuggestions**

```lua
---@param suggestions table[]
exports['solid-chat']:addSuggestions({
    { name = '/gps', help = 'Set a waypoint' },
    { name = '/map', help = 'Open the map' },
})
```

**removeSuggestion**

```lua
---@param name string
exports['solid-chat']:removeSuggestion('/gps')
```

**addTemplate**

```lua
---@param id string
---@param html string
exports['solid-chat']:addTemplate('gps', '<div class="chat-message system">{0}</div>')
```

{% hint style="info" %}
`addMode` and `removeMode` also exist on the client for scripts written for the default chat. For new scripts, use the server export [registerMode](https://grp-development.gitbook.io/solid-scripts/resources/solid-chat/exports-and-events/server-exports#registermode), which also handles the messages.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://grp-development.gitbook.io/solid-scripts/resources/solid-chat/exports-and-events/client-exports.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
