Skip to content

Show System Prompt #98

Closed
Closed

Description

@AnthonyRonning

If one of the user's chat had a system prompt, show a subtle indicator somewhere where they can click it to view what the system prompt was, with a button to copy the system prompt too maybe.

I'm not sure if it should be at the top of the chat or in the chat title area, but use your best judgement and make it modern and nice looking, but keep in mind that it's not going to be a primary action. Just something we need for users to occasionally see and know what their system prompt was for that chat, so they can copy it to another chat later.

Activity

  1. AnthonyRonning commented on Jun 7, 2025

    @AnthonyRonning
    ContributorAuthor

    @claude can you handle this?

  2. claude commented on Jun 7, 2025

    @claude
    Contributor

    Claude finished @AnthonyRonning's task in 2m 29s —— View job • claude/issue-98-20250607_222711 • Create PR ➔


    Implementing System Prompt Display Feature ✅

    Successfully implemented a feature to show system prompts in the chat interface with a subtle indicator and copy functionality.

    Todo List:

    • Analyze current chat interface structure and components
    • Identify where system prompt data is stored/accessed
    • Design the system prompt indicator component
    • Implement modal/dialog for viewing system prompt
    • Add copy functionality
    • Integrate into chat interface
    • Test and run linting/build commands
    • Commit changes

    Implementation Summary:

    • Created SystemPromptIndicator.tsx - Clean component with Bot icon and "System" label
    • Dialog interface - Modal shows full system prompt with proper formatting
    • Copy functionality - One-click copy with visual feedback (check mark)
    • Smart visibility - Only appears when chat has a system prompt
    • Strategic placement - Located next to chat title for easy discovery
    • Accessibility - Proper ARIA labels and keyboard navigation

    Technical Details:

    • Extracts system prompt from chat.messages.find(msg => msg.role === "system")
    • Uses existing UI components (Dialog, Button) following project patterns
    • Styled to be subtle but discoverable - muted background with hover states
    • All linting and build checks passed successfully

    --- • Branch: claude/issue-98-20250607_222711

  3. added a commit that references this issue on Jun 7, 2025
    c0153a0
  4. marksftw commented on Jun 8, 2025

    @marksftw
    Collaborator

    Image

    @claude on mobile the new button pushes the chat title off the screen to the left. Adjust the size of the chat title so the window stays the same width on mobile as before. See the screenshot.

  5. marksftw commented on Jun 8, 2025

    @marksftw
    Collaborator

    Or better yet, put the new “system” button next to the “person” icon that is in the header of the prompt

  6. claude commented on Jun 8, 2025

    @claude
    Contributor

    Claude finished @marksftw's task in 5m 18s —— View job • claude/issue-98-20250608_005616 • Create PR ➔


    Fixing Mobile Layout Issue with System Prompt Indicator ✅

    Successfully fixed the mobile layout issue where the system prompt indicator was pushing the chat title off-screen.

    Todo List:

    • Examine screenshot to understand the mobile layout issue
    • Locate current SystemPromptIndicator implementation
    • Find chat interface and prompt header components
    • Move system prompt indicator to prompt header area (preferred solution)
    • Test responsive behavior and ensure proper mobile layout
    • Run linting and build commands
    • Commit changes

    Implementation Summary:

    • Created SystemPromptIndicator.tsx - Clean component with Bot icon and "System" label, opens dialog to view/copy system prompt
    • Moved indicator to user message area - Now appears next to the user icon in the first message (as requested)
    • Fixed mobile layout - Changed chat title margins from mx-[6rem] to mx-4 md:mx-[6rem] for proper mobile display
    • Added copy functionality - One-click copy with visual feedback (check mark)
    • Smart visibility - Only appears when chat has a system prompt
    • Responsive design - No longer causes title truncation on mobile

    Technical Details:

    • Extracts system prompt from chat.messages.find(msg => msg.role === "system")
    • Uses existing UI components (Dialog, Button) following project patterns
    • All linting and build checks passed successfully
    • Positioned next to user icon for better user experience

    • Branch: claude/issue-98-20250608_005616 •

  7. AnthonyRonning commented on Jun 10, 2025

    @AnthonyRonning
    ContributorAuthor

    @claude let's try another approach. let's have the first system message actually render inline similar to the assistant or user items. however, You don't have to show all of the system message text. maybe just a single line worth (making sure to match the user's current window) and then have a button or link-like text button that allows viewing all of the system message. plus, you can reuse the same "copy" button that we use for the assistant message too. And since system message is always the first message in the list, it should naturally render up top without additional effort.

    Please make a brand new commit for this approach (ignoring our previous attempts).

  8. claude commented on Jun 10, 2025

    @claude
    Contributor

    Claude finished @AnthonyRonning's task in 3m 3s —— View job • claude/issue-98-20250610_055528 • Create PR ➔


    Implementing Inline System Message Display ✅

    Successfully implemented a new approach to render system messages inline with chat messages, showing truncated text with expand functionality and copy button.

    Todo List:

    • Analyze current chat message rendering structure and components
    • Examine assistant message copy button implementation
    • Create new SystemPromptMessage component with truncation and expand functionality
    • Remove system message filter in chat display
    • Add system message rendering in the message loop
    • Test responsive behavior and styling
    • Run linting and build commands
    • Commit changes with new approach

    Implementation Summary:

    • Created SystemPromptMessage component with Bot icon and "System Prompt" label
    • Truncation logic: Shows first 100 characters with "..." if longer
    • Expand/collapse: "Show more"/"Show less" button with rotating chevron icon
    • Copy functionality: Reuses same pattern as assistant messages with hover reveal
    • Styling: Muted background (bg-muted/50) to distinguish from regular messages
    • Integration: Removed system message filter, system messages now render naturally at top

    Technical Details:

    • System messages now display inline like regular chat messages
    • Truncated to single line with proper responsive behavior
    • Copy button appears on hover just like assistant messages
    • System prompt appears at top of chat naturally since it's first in messages array
    • All linting and build checks passed successfully

    • Branch: claude/issue-98-20250610_055528 •

  9. added a commit that references this issue on Jun 10, 2025
    0e28c9d
  10. added 3 commits that reference this issue on Jun 10, 2025
    d621077
    e664d7a
    7c5f139
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions