Skip to contents

Configures sidebar content for the home view or a chat_nav_panel() in page_chat(). A page-chat sidebar behaves like a compact bslib::sidebar() beside the chat and can include the chat's conversation history selector.

Usage

chat_sidebar(..., history = NULL, width = 280, open = "auto", resizable = TRUE)

Arguments

...

UI content to display in the sidebar.

history

Whether to display the chat history selector in the sidebar. When NULL, page_chat() defaults to TRUE and chat_nav_panel() defaults to FALSE.

width

The initial sidebar width. Positive numbers are converted to pixels; character values must be valid CSS lengths.

open

The initial sidebar state. One of "auto", "open", "closed", or "always". Logical values are aliases for "open" and "closed".

resizable

Whether the sidebar can be resized on desktop.

Value

A configuration object for use with page_chat() or chat_nav_panel().

Examples

ui <- page_chat(
  "Assistant",
  sidebar = chat_sidebar(
    shiny::tags$p("Workspace"),
    history = TRUE,
    open = "open"
  )
)