settings: Migration for fixing duplicated agent keys (#30237)

As a byproduct, this fixes bug where it's impossible to change Agent
profile

Closes #30000 

Release Notes:

- N/A
This commit is contained in:
Oleksiy Syvokon 2025-05-08 15:38:19 +03:00 committed by GitHub
parent 9f6809a28d
commit 3cc8850a58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 91 additions and 2 deletions

View file

@ -93,3 +93,18 @@ pub const SETTINGS_EDIT_PREDICTIONS_ASSISTANT_PATTERN: &str = r#"(document
(#eq? @edit_predictions "edit_predictions")
(#eq? @enabled_in_assistant "enabled_in_assistant")
)"#;
pub const SETTINGS_DUPLICATED_AGENT_PATTERN: &str = r#"(document
(object
(pair
key: (string (string_content) @agent1)
value: (_)
) @pair1
(pair
key: (string (string_content) @agent2)
value: (_)
)
)
(#eq? @agent1 "agent")
(#eq? @agent2 "agent")
)"#;