Skip to content

Add system prompt copy button to dev mode dropdown #1642

Description

@zhanba

Please describe the feature you want

In dev mode, the DevModeButton dropdown (hammer icon in the chat toolbar) already provides options to copy messages, core messages, checkpoint command, and todos for debugging purposes. However, there is no way to copy the system prompt that is sent to the LLM.

The system prompt is constructed in packages/livekit/src/chat/flexible-chat-transport.ts via prompts.system(), which assembles:

  • The agent/Pochi system prompt body
  • Task management rules
  • User custom rules
  • MCP instructions
  • Auto memory static prompt

Being able to copy the full system prompt in dev mode would help developers debug prompt engineering issues, verify custom rules are applied correctly, inspect auto-memory injection, and compare system prompts across different configurations.

Proposed Solution

Add a new "Copy System Prompt" CopyMenuItem in packages/vscode-webui/src/components/dev-mode-button.tsx (alongside the existing copy options).

To surface the system prompt to the webui, one approach would be:

  1. Expose the system prompt via a new vscode host bridge method (following the pattern in packages/common/src/vscode-webui-bridge/webview.ts)
  2. Or pass it down through the DevModeButton component props from the chat toolbar

Additional context


Please reply with a 👍 if you want this feature.


🤖 Generated with Pochi

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions