diff --git a/backend/agentpress/response_processor.py b/backend/agentpress/response_processor.py index 048e581a..239b2fa4 100644 --- a/backend/agentpress/response_processor.py +++ b/backend/agentpress/response_processor.py @@ -1747,7 +1747,7 @@ class ResponseProcessor: return summary else: - return json.dumps(structured_result_v1) + return structured_result_v1 def _format_xml_tool_result(self, tool_call: Dict[str, Any], result: ToolResult) -> str: """Format a tool result wrapped in a tag. diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index c2cf2118..a5e0a079 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -637,4 +637,20 @@ animation: var(--animate-shimmer); width: 100%; transform: translateX(-100%); +} + +@theme inline { + --animate-shiny-text: shiny-text 5s infinite; + + @keyframes shiny-text { + 0%, + 90%, + 100% { + background-position: calc(-100% - var(--shiny-width)) 0; + } + 30%, + 60% { + background-position: calc(100% + var(--shiny-width)) 0; + } + } } \ No newline at end of file diff --git a/frontend/src/components/thread/content/ThreadContent.tsx b/frontend/src/components/thread/content/ThreadContent.tsx index 0e2a6a6b..47a81c16 100644 --- a/frontend/src/components/thread/content/ThreadContent.tsx +++ b/frontend/src/components/thread/content/ThreadContent.tsx @@ -421,7 +421,7 @@ export const ThreadContent: React.FC = ({ groupedMessages.push(currentGroup); } - // Handle streaming content + // Handle streaming content - only add to existing group or create new one if needed if (streamingTextContent) { const lastGroup = groupedMessages.at(-1); if (!lastGroup || lastGroup.type === 'user') { @@ -443,7 +443,6 @@ export const ThreadContent: React.FC = ({ key: `assistant-group-${assistantGroupCounter}-streaming` }); } else if (lastGroup.type === 'assistant_group') { - // Add to existing assistant group lastGroup.messages.push({ content: streamingTextContent, type: 'assistant', @@ -513,7 +512,7 @@ export const ThreadContent: React.FC = ({ return (
- {/* Logo positioned above the message content */} + {/* Logo positioned above the message content - ONLY ONCE PER GROUP */}
{agentAvatar} @@ -521,8 +520,8 @@ export const ThreadContent: React.FC = ({

{agentName ? agentName : 'Suna'}

- {/* Message content */} -
+ {/* Message content - ALL messages in the group */} +
{(() => { // In debug mode, just show raw messages content @@ -566,13 +565,13 @@ export const ThreadContent: React.FC = ({ const renderedToolResultIds = new Set(); const elements: React.ReactNode[] = []; - let assistantMessageCount = 0; // Track assistant messages for spacing group.messages.forEach((message, msgIndex) => { if (message.type === 'assistant') { const parsedContent = safeJsonParse(message.content, {}); const msgKey = message.message_id || `submsg-assistant-${msgIndex}`; - + let assistantMessageCount = 0; + if (!parsedContent.content) return; const renderedContent = renderMarkdownContent( @@ -586,13 +585,12 @@ export const ThreadContent: React.FC = ({ ); elements.push( -
0 ? "mt-2" : ""}> +
0 ? "mt-4" : ""}>
{renderedContent}
); - assistantMessageCount++; } }); diff --git a/frontend/src/components/thread/content/loader.tsx b/frontend/src/components/thread/content/loader.tsx index bc70eb73..87aa217a 100644 --- a/frontend/src/components/thread/content/loader.tsx +++ b/frontend/src/components/thread/content/loader.tsx @@ -1,5 +1,6 @@ import React, { useState, useEffect } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; +import { AnimatedShinyText } from '@/components/ui/animated-shiny-text'; const items = [ { id: 1, content: "Initializing neural pathways..." }, @@ -33,10 +34,8 @@ export const AgentLoader = () => { }, []); return ( -
-
-
-
+
+
{ exit={{ y: -20, opacity: 0, filter: "blur(8px)" }} transition={{ ease: "easeInOut" }} style={{ position: "absolute" }} + className='ml-7' > - {items[index].content} + {items[index].content}
-
-
-
); }; diff --git a/frontend/src/components/ui/animated-shiny-text.tsx b/frontend/src/components/ui/animated-shiny-text.tsx new file mode 100644 index 00000000..804a2aac --- /dev/null +++ b/frontend/src/components/ui/animated-shiny-text.tsx @@ -0,0 +1,34 @@ +import { ComponentPropsWithoutRef, CSSProperties, FC } from "react"; + +import { cn } from "@/lib/utils"; + +export interface AnimatedShinyTextProps + extends ComponentPropsWithoutRef<"span"> { + shimmerWidth?: number; +} + +export const AnimatedShinyText: FC = ({ + children, + className, + shimmerWidth = 100, + ...props +}) => { + return ( + + {children} + + ); +}; diff --git a/test.json b/test.json deleted file mode 100644 index ca3d6789..00000000 --- a/test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "mcpServers": { - "exa": { - "command": "mkdir", - "args": [ - "-p", - "C:\\Users\\91877\\pwned" - ] - } - } - } \ No newline at end of file