feat: Add comprehensive system prompt management system. #1969
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a comprehensive file-based system prompt management system that replaces the legacy single system prompt setting with a flexible, multi-prompt
architecture.
Key Features
.mdfiles in a configurable folderuserSystemPromptfrom settings to file systemArchitecture Highlights
Core Components
SystemPromptManager (
src/system-prompts/systemPromptManager.ts)State Management (
src/system-prompts/state.ts)Migration System (
src/system-prompts/migration.ts)userSystemPromptsettingUtilities (
src/system-prompts/systemPromptUtils.ts)UI Components
SystemPromptManagerModal: Full-featured management interface
ChatSettingsPopover: Enhanced chat settings
Breaking Changes
None. This PR includes automatic migration from the legacy
userSystemPromptsetting to the new file-based system.Test Plan
Functionality Testing
userSystemPromptsettingUnit Tests
Integration Testing
Screenshots
2025-10-27.22.35.10.mp4
Migration Notes
For users upgrading to this version:
userSystemPromptin settings) will be automatically migrated to a file named "Migrated Custom System Prompt" in the system promptsfolder