diff --git a/src/lib/components/chat/ContentRenderer/FloatingButtons.svelte b/src/lib/components/chat/ContentRenderer/FloatingButtons.svelte index e36781e090..49dfb383ee 100644 --- a/src/lib/components/chat/ContentRenderer/FloatingButtons.svelte +++ b/src/lib/components/chat/ContentRenderer/FloatingButtons.svelte @@ -61,12 +61,12 @@ prompt = prompt.replace(toolIdPattern, ''); if (prompt.includes('{{INPUT_CONTENT}}') && floatingInput) { - prompt = prompt.replace('{{INPUT_CONTENT}}', floatingInputValue); + prompt = prompt.replace('{{INPUT_CONTENT}}', () => floatingInputValue); floatingInputValue = ''; } - prompt = prompt.replace('{{CONTENT}}', selectedText); - prompt = prompt.replace('{{SELECTED_CONTENT}}', selectedContent); + prompt = prompt.replace('{{CONTENT}}', () => selectedText); + prompt = prompt.replace('{{SELECTED_CONTENT}}', () => selectedContent); // Prepopulate the main chat input instead of inline streaming onSetInputText(prompt);