Skip to content
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

Bug Report: Code Snippet Persistence/Caching Issue #2512

Open
whistlerbrad opened this issue Dec 23, 2024 · 0 comments
Open

Bug Report: Code Snippet Persistence/Caching Issue #2512

whistlerbrad opened this issue Dec 23, 2024 · 0 comments

Comments

@whistlerbrad
Copy link

Bug Report: Code Snippet Persistence/Caching Issue
Description:
The AI assistant is unable to update code snippets in responses. Despite attempting to show different code, it repeatedly displays the same outdated code snippet from an earlier part of the conversation.
Reproduction Steps:

  1. Start a conversation about modifying code
    Initial code shown included multiple icon options and basic transform:
{
    label: "Ruler",
    // Option 1: Regular ruler (horizontal)
    icon: "far fa-ruler",
    // Option 2...5 [multiple icon options]
    style: {
        transform: 'scale(1.5)',
        display: 'inline-block'
    }
}

  1. Attempt to show updated code with rotation transform
  2. Despite different explanatory text, the old code keeps appearing

Expected Behavior:

  • AI should be able to show new/modified code snippets
  • Code blocks should match the accompanying explanatory text

Actual Behavior:

  • Same initial code snippet persists
  • Code blocks don't match AI's explanatory text
  • Multiple attempts to show different code fail
  • AI appears aware it's showing wrong code but cannot correct it

Impact:

  • Makes it impossible to effectively communicate code changes
  • Creates confusion between explanation and code examples
  • Reduces trust in the AI's responses
  • Makes debugging sessions ineffective

Additional Notes:

  • Issue persisted across 20+ attempts to show updated code
  • AI was aware of the issue but unable to break the loop
  • Problem appears to be with code block handling specifically, as regular text updates normally

This is the code snippet that was in loop, kept repeating after numerous attempts to request the correct or updated code (comments outside of the snippet were updating but not the code):

var winterTabsEvening = [
    // ... other tabs ...
    {
        label: "Ruler",
        // Option 1: Regular ruler (horizontal)
        icon: "far fa-ruler",
        
        // Option 2: Ruler combined
        icon: "far fa-ruler-combined",
        
        // Option 3: Ruler triangle
        icon: "far fa-ruler-triangle",
        
        // Option 4: Try solid version instead of regular
        icon: "fas fa-ruler-vertical",
        
        // Option 5: Measuring tape icon
        icon: "fas fa-tape",
        
        style: {
            transform: 'scale(1.5)', // Try CSS transform instead of font-size
            display: 'inline-block'  // Needed for transform to work
        },
        url: "https://whistlerpeak.com/snow/story/headless.php"
    }
];
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

No branches or pull requests

1 participant