Файли
Arnaud Ritti 905a672bad feat(plugins): add declarative multi-page settings (#2074)
Closes #1720

Plugins can declare searchable multi-page settings (API 1.3): pages under the plugin in Settings, groups, string lists, editable tables and command buttons, while single-schema plugins keep working. A command button applies pending edits first and runs against the selected Global/Project layer (also remotely); Reset keeps other pages' edits, and invalid table/list edits never replace saved rows. Field and page order come from the schema without changing serde_json's map ordering elsewhere in the app.

Co-authored-by: arnaud-ritti <[email protected]>
2026-11-08 08:38:42 +08:00

18 рядки
995 B
Markdown
Неформатований Постійне посилання Анотація Історія

Цей файл містить неоднозначні символи Юнікоду
Цей файл містить символи Юнікоду, які можна сплутати з іншими символами. Якщо ви вважаєте, що це зроблено навмисно, можете сміливо ігнорувати це попередження. Щоб показати їх, скористайтеся кнопкою Escape.
# Multi-page settings example (API 1.3)
Two IDE-rendered pages demonstrate grouped string lists and an editable model
profile table. `Test` first applies pending settings, then runs the declared
`test` command. With no profiles it returns an inline error; after adding a row
it reads the saved JSON array and reports success through a notification.
This fixture checks the settings/action flow; it does not contact a provider.
Build with `plugins/build.sh crates/ide-plugin/tests/fixtures/settings-pages`.
Install or link this directory with `openidea-plugin link` and open
Settings › Plugins › Model Profiles. Edit without Apply and Cancel to discard;
Apply or OK saves. Running Test also saves pending edits before the command,
so Cancel after Test does not undo those already-applied edits.
API keys belong in `[[contributes.secrets]]`, never table cells. A real Test
connection command can use `host::fetch` with the appropriate declared network
capability and secret-backed headers.