Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 8, 2025

Users can now override the default system prompt at runtime via Settings panel. Custom prompt persists in localStorage and takes precedence over default prompts/system_prompt.md, but MCP prompts still override both.

Changes

Frontend

  • Added textarea in SettingsPanel for custom system prompt with clear button
  • Pass custom_system_prompt through WebSocket to backend
  • Added to DEFAULT_SETTINGS in useSettings hook

Backend

  • Thread custom_system_prompt through WebSocket handler → ChatService → ChatOrchestrator → MessageBuilder
  • MessageBuilder uses custom prompt when provided, falls back to default when empty/None

Tests

  • Added 4 tests covering custom prompt usage, fallback behavior, and LLM integration

Priority Order

  1. MCP prompts (selected_prompts)
  2. Custom system prompt (Settings)
  3. Default system prompt (file-based)

Example

# MessageBuilder now accepts optional custom_system_prompt
messages = await message_builder.build_messages(
    session=session,
    include_system_prompt=True,
    custom_system_prompt="You are a specialized coding assistant."  # Overrides default
)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: /usr/bin/curl curl -LsSf REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>allow users to set a custom system prompt at run time.</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

🔒 Security Scan Results

Security Scan Summary

Scan Results

Python SAST (Bandit)

⚠️ Security issues found in Python code

Recommendations

  • Review all SARIF files uploaded to GitHub Security tab
  • Address high and critical severity vulnerabilities immediately
  • Run npm audit fix and pip-audit locally to fix dependencies
  • Consider implementing additional security controls

Copilot AI changed the title [WIP] Add feature for users to set custom system prompt at runtime Add runtime custom system prompt override Dec 8, 2025
Copilot AI requested a review from garland3 December 8, 2025 02:42
@github-actions
Copy link

🔒 Security Scan Results

Security Scan Summary

Scan Results

Python SAST (Bandit)

⚠️ Security issues found in Python code

Recommendations

  • Review all SARIF files uploaded to GitHub Security tab
  • Address high and critical severity vulnerabilities immediately
  • Run npm audit fix and pip-audit locally to fix dependencies
  • Consider implementing additional security controls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow users to set a custom system prompt at run time.

2 participants