-
Notifications
You must be signed in to change notification settings - Fork 58
feat: DATAGO-116432 prompt library #517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…d AI-assisted prompt template builder. Also supports prompt version historyand ability to restore older prompts.
- Implement AI-assisted prompt builder using LLM for template generation (uses liteLLM and LLM_SERVICE_GENERAL_MODEL_NAME env variable)
- Add version history with restore functionality
- Support variable placeholders ({{variable_name}}) in prompts
- Enable prompt editing with automatic version creation
- Include search functionality and empty states
- Add VariableDialog for filling prompt variables before use
Backend:
- Add PromptBuilderAssistant service with LiteLLM integration
- Update PATCH endpoint to create new versions on prompt text changes
- Add version management endpoints (list, restore)
- Update DTOs to support prompt text updates
- Add category filter dropdown next to search bar with Filter icon - Support multiselect with checkboxes for multiple categories - Show selected count badge and "Clear all" button - Filter prompts by both search query AND selected categories
- Add promptLibrary flag (requires SQL persistence, defaults to true) - Add promptAIAssisted flag (requires LLM config, auto-disabled if missing) - Add promptVersionHistory flag (defaults to true) - Add promptSharing placeholder flag in the backend (future feature, defaults to false) - Conditionally show Prompts navigation based on promptLibrary flag - Disable AI-Assisted button when LLM not configured - Hide version history buttons when feature disabled - Auto-disable prompts if session_service is not SQL - Explicitly set false values for disabled features Backend: config.py checks SQL requirement and LLM availability Frontend: App.tsx, CreatePromptCard, PromptDisplayCard respect flags
- Add 10 declarative YAML tests for prompts endpoints (all passing) - Fix Alembic migration for SQLite/PostgreSQL compatibility - Use batch_alter_table for cross-database foreign key support - Add pytest markers: prompts, versioning, search, projects, crud, validation, error Tests cover: - CRUD operations (create, read, update, delete) - Version management (version creation) - Validation (duplicate command rejection) - Search and filtering (search, category filter) - Error handling (404 responses) Migration fix: - Create prompts table first (no circular dependency) - Use batch_alter_table for adding foreign keys (SQLite-safe) - Compatible with SQLite (copy-move) and PostgreSQL (ALTER TABLE) Run tests: python -m pytest tests/integration/scenarios_declarative/ -m prompts -v
- Add two-option dialog for large text pastes (≥300 chars or ≥10 lines) - Implement "Paste as Text" to create numbered badges in chat input - Implement "Save as Artifact" to upload text as session artifact - Add auto-detection for file types (Python, JS, TS, JSON, YAML, etc.) - Add dynamic title generation based on detected file type - Support session creation on artifact upload for new chats - Add PastedTextBadge component with preview and view dialog - Add PasteActionDialog with file type selector and content preview - Update ChatInputArea to handle paste interception and artifact upload
…into amir/feat-paste-input
…isibility - Fix HTTP exception handler to pass through specific error details - Replace alert() with addNotification() in PromptsPage for consistency - Update error handling to support both EventErrorDTO and legacy formats - Add success notifications for create, update, and restore operations Fixes duplicate command error showing generic "Failed to create prompt" instead of "Command already exists"
…t dialog Added optional description field for artifact metadata Implemented two-step overwrite confirmation for duplicate filenames Button text changes: "Confirm Overwrite" → "Overwrite & Save" Confirmation resets when filename changes
…mir/feat-paste-input
- Add text selection detection for AI messages only - Implement context menu with Summarize, Explain, Custom, and Copy actions - Auto-submit quick actions (Summarize/Explain) with selected text as context - Add inline custom question input with auto-submit
- Skip paste choice dialog, go directly to artifact creation form - Auto-generate filename with detected extension and concise description - Prevent text selection on filename input focus - Display badge for created artifacts in chat input area - Fix badge persistence when session is created from artifact upload - Shorten auto-generated description preview to 50 chars
…mir/feat-paste-input
Enable clicking pasted artifact badges to open and preview the artifact in the Files panel.
…mir/feat-text-select
…mir/fix-projects2
…mir/feat-text-select
…d improved onboarding
- Convert AI builder from dialog to full-page view with left/right panel layout
- Add intermediate "Generate a prompt" dialog for initial task description
- Center empty state prompt card and hide search when library is empty
- Update button text to active language ("Build with AI", "Create Manually")
- Remove Bot/User avatars from chat and match main chat styling
- Add clear variable explanation with user-friendly wording
- Increase highlight duration for updated sections (3s → 5s)
- Remove presumptive "Ready to Save" indicators
- Reduce spacing between card headers and content
- Align headers between chat and preview panels
…re is some content
- Remove max-width constraint when custom input is shown - Move submit button inside input field as inline icon
…at sessions - Add reserved /create-template command in chat slash menu - Capture and format session history when command is invoked - Navigate to AI prompt builder with conversation context - Auto-submit conversation to AI for template analysis - Increase backend message limit to 200k chars for long conversations - Auto-scroll to bottom when loading conversation history
- Only show command when session has user messages
Signed-off-by: Amir Ghasemi <amir.ghasemi@solace.com>
Signed-off-by: Amir Ghasemi <amir.ghasemi@solace.com>
…mir/prompt-library
…ent-mesh into amir/prompt-library
…uashed all of prompt db migrations
RohanSreelesh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the backend
src/solace_agent_mesh/gateway/http_sse/repository/models/prompt_model.py
Outdated
Show resolved
Hide resolved
src/solace_agent_mesh/gateway/http_sse/repository/models/prompt_model.py
Outdated
Show resolved
Hide resolved
src/solace_agent_mesh/gateway/http_sse/services/prompt_builder_assistant.py
Outdated
Show resolved
Hide resolved
- Add model config reference to webui gateway config - Update config.py to retrieve LLM settings from component.get_config() - Update PromptBuilderAssistant to require model_config parameter - Update prompt router endpoints to pass model config - Remove environment variable fallbacks in favor of config-only approach
RohanSreelesh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backend looks good just one more additional change is needed for the template.
src/solace_agent_mesh/gateway/http_sse/services/prompt_builder_assistant.py
Outdated
Show resolved
Hide resolved
…mir/prompt-library
WhiteSource Policy Violation Summary✅︎ No Blocking Whitesource Policy Violations found in solaceai/solace-agent-mesh-ui-pr-517! |
…onses by adding null safety check to detectVariables() call
|


No description provided.