Panel View Button

Add the Copilot button to the Panel view for easy access to the prompt dialog.

Kirby Copilot v2.5.0 introduces a new Panel view button that allows you to open the prompt dialog from anywhere in the Panel. This is particularly useful if you want to generate content for multiple fields at once.

Setting Up the View Button

To add the copilot button to a particular Panel view, set the buttons option in the corresponding blueprint. The following example shows how to reference the default buttons and add the copilot button to the site, pages, and files views:

buttons:
  - copilot # Re-order the button as needed
  - preview
  - languages

This way, you can reference the default buttons and decide where to place the copilot button. It will look something like this:

Copilot Panel view button

Using the View Button

Clicking the button opens the Copilot prompt dialog, which allows you to generate content for the fields in the current view. You can select multiple fields at once, making it easy to generate content for multiple fields in one go.

Kirby Copilot fields selection in prompt dialog

Button Configuration

The Copilot view button can be customized with various configuration options to control its behavior and appearance. You can configure the button using props in your blueprint or set global defaults in your config.php file.

Basic Configuration

Instead of just adding the button name, you can configure it with specific options:

pages/default.yml
buttons:
  copilot:
    label: AI Assistant
    userPrompt: "Create engaging content for this page about {title}"
    theme: blue-icon
    logLevel: info
  preview: true
  settings: true
  languages: true
  status: true

Available Options

The view button supports the following configuration options:

  • label – Custom button label (default: "Copilot")
  • userPrompt – Pre-filled prompt text that users can edit
  • systemPrompt – Hidden system instructions for the AI
  • theme – Visual appearance (blue-icon, positive, etc.)
  • logLevel – Debug level (error, warn, info, debug)
For detailed information about all available configuration options, see the Global Configuration and View Button & Section Configuration pages.

Configuration Inheritance

Button configurations follow a hierarchy where more specific settings override general ones:

  1. Global configuration (in config.php)
  2. Button props (in blueprint)

For example, if you set a global system prompt, individual buttons can override it:

config.php
return [
    'johannschopplich.copilot' => [
        'systemPrompt' => 'You are a professional content writer.',
        'theme' => 'blue-icon'
    ]
];
Blueprint Override
buttons:
  copilot:
    systemPrompt: You are a technical documentation expert. # Overrides global
    # theme: blue-icon inherited from global config

Prompt History

The prompt history is saved in the browser's local storage. You can access the prompt history with the keyboard arrow keys when the prompt dialog is open.

Use the up key to navigate to the previous prompt and the down key to navigate to the next prompt.