feat: Enhance AgentChatWidget with system prompt management and project settings

- Updated system prompt loading functionality to support both version 1 and version 2 prompts, allowing users to load built-in prompts directly.
- Implemented custom system prompt loading and saving capabilities, enabling users to manage their prompts more effectively.
- Added methods to load and save agent settings from/to project files, including AI provider configurations and custom prompts.
- Improved user feedback with toast notifications for successful and failed operations related to system prompts and settings.
This commit is contained in:
scawful
2025-10-04 21:37:56 -04:00
parent dec8314a55
commit 9b51cd09f6
8 changed files with 227 additions and 53 deletions

View File

@@ -514,7 +514,7 @@ void EditorManager::Initialize(const std::string& filename) {
context_.shortcut_manager.GetKeys("Open"),
context_.shortcut_manager.GetCallback("Open")},
{absl::StrCat(ICON_MD_HISTORY, " Open Recent"), "", []() {},
[]() { return !manager.GetRecentFiles().empty(); }, recent_files},
[&manager]() { return !manager.GetRecentFiles().empty(); }, recent_files},
{absl::StrCat(ICON_MD_FILE_DOWNLOAD, " Save"),
context_.shortcut_manager.GetKeys("Save"),
context_.shortcut_manager.GetCallback("Save")},