make defaultPrompt an array, keep backcompat (#14649)

make plugins' `defaultPrompt` an array, but keep backcompat for strings.

the array is limited by app-server to 3 entries of up to 128 chars
(drops extra entries, `None`s-out ones that are too long) without
erroring if those invariants are violating.

added tests, tested locally.
This commit is contained in:
sayan-oai
2026-03-13 23:13:51 -07:00
committed by GitHub
parent 8ca358a13c
commit e389091042
9 changed files with 409 additions and 11 deletions

View File

@@ -3355,7 +3355,9 @@ pub struct PluginInterface {
pub website_url: Option<String>,
pub privacy_policy_url: Option<String>,
pub terms_of_service_url: Option<String>,
pub default_prompt: Option<String>,
/// Starter prompts for the plugin. Capped at 3 entries with a maximum of
/// 128 characters per entry.
pub default_prompt: Option<Vec<String>>,
pub brand_color: Option<String>,
pub composer_icon: Option<AbsolutePathBuf>,
pub logo: Option<AbsolutePathBuf>,