Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions docs/docs/presets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,17 @@ The following configuration keys are available for use in presets:
| display:name | string | the name to use when displaying the preset in a menu (required) |
| display:order | float | the order in which the preset should be displayed in a menu (optional) |

:::info

Configs in a preset are applied in order to override the default config values, which will persist for the remainder of the tab or block's lifetime. Setting `bg:*` or `ai:*` to `"true"` will clear the values of any previously overridden Background or AI configurations, respectively, setting them back to their defaults. You almost always want to add these keys to your presets in order to create a clean slate and prevent previously set values from leaking in.

:::

#### AI configurations

| Key Name | Type | Function |
| ------------- | ------ | -------------------------------------------------------------------------------------------------- |
| ai:\* | bool | reset all existing ai keys |
| ai:preset | string | the default AI preset to use |
| ai:baseurl | string | Set the AI Base Url (must be OpenAI compatible) |
| ai:apitoken | string | your AI api token |
Expand All @@ -103,15 +110,12 @@ The following configuration keys are available for use in presets:

| Key Name | Type | Function |
| -------------------- | ------ | ----------------------------------------------------------------------------------------------- |
| bg:\* | bool | reset all existing bg keys |
| bg:opacity | float | the opacity of the background |
| bg:blendmode | string | the [blend mode](https://developer.mozilla.org/en-US/docs/Web/CSS/blend-mode) of the background |
| bg:bordercolor | string | the color of the border |
| bg:activebordercolor | string | the color of the border when a block is active |

#### Clear key

Configs in a preset are applied in order to override the default config values, which will persist for the remainder of the tab or block's lifetime. Setting `bg:*` or `ai:*` to `"true"` will clear the values of any previously overridden Background or AI configurations, respectively, setting them back to their defaults.

#### Unset a default value

To unset a default value in a preset, add an override that sets it to an empty string, like `""`.