Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c867f70
feat(prompts): Add prompt templates with a card-based Prompts page an…
amir-ghasemi Oct 29, 2025
d083984
feat(prompts): Add category multiselect filter to Prompts page
amir-ghasemi Oct 29, 2025
7667ceb
feat(prompts): Add feature flags for Prompts library
amir-ghasemi Oct 29, 2025
2e50c08
feat(prompts): Add automated tests for Prompts feature and fix migration
amir-ghasemi Oct 29, 2025
d011293
fix(prompts): minor UI enhancements to prompt cards
amir-ghasemi Oct 30, 2025
0e39f0d
feat: show long text pasted into chat input area as clickable badges
amir-ghasemi Oct 31, 2025
7e9515c
feat(webui): add enhanced paste UX with artifact save option
amir-ghasemi Oct 31, 2025
f366877
Merge branch 'main' of https://github.com/SolaceLabs/solace-agent-mes…
amir-ghasemi Oct 31, 2025
e27fc7f
fix(prompts): show specific error messages and improve notification v…
amir-ghasemi Oct 31, 2025
37fdf28
fix: update artifact upload to use new /upload endpoint for paste fea…
amir-ghasemi Oct 31, 2025
070107e
feat: add description field and overwrite protection to paste artifac…
amir-ghasemi Oct 31, 2025
391f0ab
Merge branch 'main' of github.com:SolaceLabs/solace-agent-mesh into a…
amir-ghasemi Nov 3, 2025
1753dfe
feat: add text selection context menu for AI responses
amir-ghasemi Nov 3, 2025
0ebb702
feat: streamline large text paste to auto-create artifacts with badges
amir-ghasemi Nov 3, 2025
bea7fb5
Merge branch 'main' of github.com:SolaceLabs/solace-agent-mesh into a…
amir-ghasemi Nov 3, 2025
9fb8f73
Merge branch 'amir/feat-paste-input' into amir/feat-text-select
amir-ghasemi Nov 3, 2025
ebd9d48
feat(webui): add click handler to view pasted artifact badges
amir-ghasemi Nov 3, 2025
eddcf50
Merge branch 'main' of github.com:SolaceLabs/solace-agent-mesh into a…
amir-ghasemi Nov 4, 2025
de9a0ae
fix(projects): add nav breadcrumbto project page
amir-ghasemi Nov 4, 2025
6fffa87
Merge branch 'main' of github.com:SolaceLabs/solace-agent-mesh into a…
amir-ghasemi Nov 4, 2025
a3b4d40
Merge branch 'amir/fix-projects2' into amir/feat-text-select
amir-ghasemi Nov 4, 2025
0a25feb
Merge branch 'main' of github.com:SolaceLabs/solace-agent-mesh into a…
amir-ghasemi Nov 4, 2025
aa03971
feat(prompts): enhance prompt builder UX with full-page AI builder an…
amir-ghasemi Nov 4, 2025
70f9b78
fix(prompts): remove chat timestamps, do not render preview until the…
amir-ghasemi Nov 4, 2025
a0560a8
fix: prevent text overflow in selection menu custom query input
amir-ghasemi Nov 4, 2025
31f012d
fix(prompts): UX restyle
amir-ghasemi Nov 5, 2025
5a62b04
chore(prompts): update bg of version page in dark mode
amir-ghasemi Nov 5, 2025
53aec70
feat(prompts): add /create-template command to create prompts from ch…
amir-ghasemi Nov 5, 2025
0066af3
fix(prompts): add /create-template command and fix UI issues
amir-ghasemi Nov 5, 2025
9131e56
feat(prompts): add a button to allow using prompt templates from prom…
amir-ghasemi Nov 5, 2025
0f434e7
fix(prompts): do not disable "Insert Prompt" button even with empty p…
amir-ghasemi Nov 5, 2025
0932800
fix(prompts): in Edit page, Save button was not saving correctly
amir-ghasemi Nov 5, 2025
4f05a35
Merge branch 'main' of github.com:SolaceLabs/solace-agent-mesh into a…
amir-ghasemi Nov 6, 2025
2088349
fix(prompts): UX review and fixes
amir-ghasemi Nov 6, 2025
6f6e4f9
Merge branch 'main' of github.com:SolaceLabs/solace-agent-mesh into a…
amir-ghasemi Nov 6, 2025
8cda3f3
feat(prompts): ability to pin/unpin prompt cards
amir-ghasemi Nov 6, 2025
1bf0d94
Delete client/webui/frontend/src/lib/components/chat/selection/README.md
amir-ghasemi Nov 6, 2025
bddbfd0
Delete client/webui/frontend/src/lib/components/chat/paste/README.md
amir-ghasemi Nov 6, 2025
9fb7adc
fix(text-selection): show selected text for custom query option
amir-ghasemi Nov 7, 2025
ea40145
Merge branch 'main' of github.com:SolaceLabs/solace-agent-mesh into a…
amir-ghasemi Nov 7, 2025
1fb5333
Merge branch 'amir/prompt-library' of github.com:SolaceLabs/solace-ag…
amir-ghasemi Nov 7, 2025
7ff3001
fix(prompts): simplify create prompt card
amir-ghasemi Nov 7, 2025
10ce36c
fix(prompts): final UX fixes
amir-ghasemi Nov 7, 2025
a9f1d49
fix(prompts): system prompt hardening
amir-ghasemi Nov 7, 2025
12a2c54
feat(prompts): RBAC for prompt sharing and integration tests. Also sq…
amir-ghasemi Nov 8, 2025
8436955
fix: use config system for LLM settings instead of direct env vars
amir-ghasemi Nov 10, 2025
ba99c8f
- Add model config reference to webui template and config (model: *ge…
amir-ghasemi Nov 10, 2025
5838c24
Merge branch 'main' of github.com:SolaceLabs/solace-agent-mesh into a…
amir-ghasemi Nov 10, 2025
fa3176e
fix(feat-prompts): Migrate prompts tests from YAML to modern API test…
amir-ghasemi Nov 10, 2025
9c6d253
fix(prompts): linting errors fixed
amir-ghasemi Nov 10, 2025
c191d86
fix(prompts): remove legacy test
amir-ghasemi Nov 10, 2025
f13998e
fix(prompts): UI enhancements
amir-ghasemi Nov 10, 2025
ca8fc15
fix(prompt): active badge style update
amir-ghasemi Nov 10, 2025
fa418da
fix(prompts): Fixed bug in AI Template Builder causing duplicate resp…
amir-ghasemi Nov 10, 2025
cd55c4a
feat(prompts): frontend storybook tests
amir-ghasemi Nov 11, 2025
7f97ea2
feat(prompts): added automated storybook tests for front end to the C…
amir-ghasemi Nov 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""
Prompt SQLAlchemy models for prompt library feature.
Adapted for SAM fork with epoch millisecond timestamps and String IDs.
"""

from enum import Enum
Expand All @@ -19,7 +18,7 @@ class PromptGroupRole(str, Enum):


class PromptGroupModel(Base):
"""SQLAlchemy model for prompt groups - adapted for SAM fork."""
"""SQLAlchemy model for prompt groups"""

__tablename__ = "prompt_groups"

Expand Down Expand Up @@ -81,7 +80,7 @@ def __repr__(self):


class PromptModel(Base):
"""SQLAlchemy model for individual prompt versions - adapted for SAM fork."""
"""SQLAlchemy model for individual prompt versions"""

__tablename__ = "prompts"

Expand Down
16 changes: 13 additions & 3 deletions src/solace_agent_mesh/gateway/http_sse/routers/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,25 @@ async def get_app_config(
ai_assisted_enabled = ai_assisted_config.get("enabled", True)

if ai_assisted_enabled:
# Verify LLM is configured
llm_model = os.getenv("LLM_SERVICE_GENERAL_MODEL_NAME")
# Verify LLM is configured through the model config
model_config = component.get_config("model", {})

# Handle both dict and direct model config structures
llm_model = None
if isinstance(model_config, dict):
general_model = model_config.get("general", {})
if isinstance(general_model, dict):
llm_model = general_model.get("model")
if not llm_model:
llm_model = model_config.get("model")

if llm_model:
feature_enablement["promptAIAssisted"] = True
log.debug("%s promptAIAssisted feature flag is enabled.", log_prefix)
else:
feature_enablement["promptAIAssisted"] = False
log.warning(
"%s AI-assisted prompts disabled: LLM_SERVICE_GENERAL_MODEL_NAME not configured",
"%s AI-assisted prompts disabled: general_model not configured",
log_prefix
)
else:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""
Pydantic models for prompt library API.
Adapted for SAM fork with epoch millisecond timestamps.
"""

from typing import Any, Dict, List, Optional
Expand Down
13 changes: 9 additions & 4 deletions src/solace_agent_mesh/gateway/http_sse/routers/prompts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""
Prompts API router for prompt library feature.
Adapted for SAM fork.
"""

import uuid
Expand Down Expand Up @@ -967,9 +966,11 @@ async def delete_prompt(
@router.get("/chat/init")
async def init_prompt_builder_chat(
db: Session = Depends(get_db),
component: "WebUIBackendComponent" = Depends(get_sac_component),
):
"""Initialize the prompt template builder chat"""
assistant = PromptBuilderAssistant(db=db)
model_config = component.get_config("model", {})
assistant = PromptBuilderAssistant(db=db, model_config=model_config)
greeting = assistant.get_initial_greeting()
return {
"message": greeting.message,
Expand All @@ -982,6 +983,7 @@ async def prompt_builder_chat(
request: PromptBuilderChatRequest,
db: Session = Depends(get_db),
user_id: str = Depends(get_user_id),
component: "WebUIBackendComponent" = Depends(get_sac_component),
_: None = Depends(check_prompts_enabled),
):
"""
Expand All @@ -995,8 +997,11 @@ async def prompt_builder_chat(
5. Avoid command conflicts with existing prompts
"""
try:
# Initialize the assistant with database session
assistant = PromptBuilderAssistant(db=db)
# Get model configuration from component
model_config = component.get_config("model", {})

# Initialize the assistant with database session and model config
assistant = PromptBuilderAssistant(db=db, model_config=model_config)

# Process the message using real LLM with conflict checking
response = await assistant.process_message(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,28 @@ class PromptBuilderAssistant:
- Set ready_to_save to true when template is complete
"""

def __init__(self, db: Optional[Session] = None):
"""Initialize the assistant."""
def __init__(self, db: Optional[Session] = None, model_config: Optional[Dict[str, Any]] = None):
"""Initialize the assistant with model configuration from component config."""
self.system_prompt = self.SYSTEM_PROMPT
self.db = db

# Get LLM configuration from environment
self.model = os.getenv("LLM_SERVICE_GENERAL_MODEL_NAME", "gpt-4.1")
self.api_base = os.getenv("LLM_SERVICE_ENDPOINT")
self.api_key = os.getenv("LLM_SERVICE_API_KEY", "dummy")
# Get LLM configuration from provided config
if not model_config or not isinstance(model_config, dict):
raise ValueError("model_config is required and must be a dictionary")

# Try nested structure first (model.general)
general_model = model_config.get("general", {})
if isinstance(general_model, dict) and general_model.get("model"):
self.model = general_model.get("model")
self.api_base = general_model.get("api_base")
self.api_key = general_model.get("api_key", "dummy")
# Try direct structure (model.model)
elif model_config.get("model"):
self.model = model_config.get("model")
self.api_base = model_config.get("api_base")
self.api_key = model_config.get("api_key", "dummy")
else:
raise ValueError("model_config must contain either 'general.model' or 'model' key")

def _get_existing_commands(self, user_id: str) -> List[str]:
"""Get list of existing command shortcuts to avoid conflicts."""
Expand Down
2 changes: 2 additions & 0 deletions templates/webui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ apps:
namespace: ${NAMESPACE}
session_secret_key: "${SESSION_SECRET_KEY}"

model:
general: *general_model
artifact_service: *default_artifact_service
session_service: __SESSION_SERVICE__
gateway_id: ${WEBUI_GATEWAY_ID}
Expand Down
Loading