diff --git a/apps/x/apps/renderer/src/App.tsx b/apps/x/apps/renderer/src/App.tsx index 8a5548da..c41833de 100644 --- a/apps/x/apps/renderer/src/App.tsx +++ b/apps/x/apps/renderer/src/App.tsx @@ -80,11 +80,6 @@ type ConversationItem = ChatMessage | ToolCall | ReasoningBlock; type ToolState = 'input-streaming' | 'input-available' | 'output-available' | 'output-error'; -const estimateTokens = (text: string) => { - if (!text) return 0 - return Math.ceil(text.trim().length / 4) -} - const isChatMessage = (item: ConversationItem): item is ChatMessage => 'role' in item const isToolCall = (item: ConversationItem): item is ToolCall => 'name' in item const isReasoningBlock = (item: ConversationItem): item is ReasoningBlock => @@ -274,7 +269,7 @@ function ChatInputInner({ placeholder="Type your message..." disabled={isProcessing} onKeyDown={handleKeyDown} - className="min-h-[1.5rem] py-0 border-0 shadow-none focus-visible:ring-0 rounded-none" + className="min-h-6 py-0 border-0 shadow-none focus-visible:ring-0 rounded-none" /> - - New chat - - + {/* Content - delayed on open, hidden immediately on close to avoid layout issues during animation */} + {showContent && ( + <> + {/* Header - minimal, expand and new chat buttons */} +
+ {onOpenFullScreen && ( + + + + + Full screen chat + + )} + + + + + New chat + +
{/* Conversation area */}
@@ -536,6 +562,8 @@ export function ChatSidebar({ )}
+ + )} ) }