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

@@ -12,6 +12,7 @@
#include "absl/time/time.h"
#include "app/gui/modules/text_editor.h"
#include "cli/service/agent/conversational_agent_service.h"
#include "core/project.h"
namespace yaze {
@@ -176,6 +177,10 @@ public:
// Agent configuration accessors
const AgentConfigState& GetAgentConfig() const { return agent_config_; }
void UpdateAgentConfig(const AgentConfigState& config);
// Load agent settings from project
void LoadAgentSettingsFromProject(const core::YazeProject& project);
void SaveAgentSettingsToProject(core::YazeProject& project);
// Collaboration history management (public so EditorManager can call them)
void SwitchToSharedHistory(const std::string& session_id);