The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
merge(feat/309-compact-visible): into integ/309
purple96cf018eba0c
diff --cc src/components/chat/MessageBubble.tsxindex 82e12918,5be38070..47cc84cc--- a/src/components/chat/MessageBubble.tsx+++ b/src/components/chat/MessageBubble.tsx@@@ -82,7 -81,7 +86,7 @@@ interface Propsdeclined?: boolean}- function MessageBubbleImpl({ message, onRegenerate, onRegenerateRound, onEdit, pendingApprovalId, onApprove, onReject, isLast, isStreaming, speakerName, declined, forkKey, forkIndex, forkTotal, onSwitchFork, onBranch }: Props) {-function MessageBubbleImpl({ message, onRegenerate, onEdit, pendingApprovalId, onApprove, onReject, isLast, isStreaming, speakerName, declined, forkKey, forkIndex, forkTotal, onSwitchFork, onBranch, readOnly }: Props) {++function MessageBubbleImpl({ message, onRegenerate, onRegenerateRound, onEdit, pendingApprovalId, onApprove, onReject, isLast, isStreaming, speakerName, declined, forkKey, forkIndex, forkTotal, onSwitchFork, onBranch, readOnly }: Props) {const [copied, setCopied] = useState(false)const [isEditing, setIsEditing] = useState(false)const [editContent, setEditContent] = useState('')diff --cc src/components/chat/MessageList.tsxindex a9ceb21c,193d53df..e29c5a0f--- a/src/components/chat/MessageList.tsx+++ b/src/components/chat/MessageList.tsx@@@ -223,24 -198,15 +231,17 @@@ export function MessageList({ isGenerat})}const skipOffscreen = skipGate.id === conversation.id && skipGate.on- const tailStart = visibleMessages.length - ALWAYS_RENDERED_TAIL-- // Die Verdichtungslinien. Berechnet aus der VOLLEN Nachrichtenliste, weil- // der Schnittpunkt auf eine gefilterte Nachricht zeigen kann, aber- // angezeigt an sichtbaren Zeilen — siehe compactionAnchors.+ const tailStart = items.length - ALWAYS_RENDERED_TAIL+ const groupOn = (groupModels?.length ?? 0) >= 2- const compactAt = compactionAnchors(- conversation.messages,- visibleMessages.map((m) => m.id),- conversation.compactions,- )-return (+ <>+ <div className="relative flex-1 min-h-0 flex flex-col">+ <CompactLayerBanner view={layers} /><divref={scrollRef}- className="flex-1 overflow-y-auto scrollbar-thin py-4"+ className={`flex-1 overflow-y-auto scrollbar-thin py-4 ${layers.cuts.length ? 'pl-6' : ''}`}+ data-compact-layer={layers.layer ?? 'current'}style={{// Soft top fade — chat content "blurs out" under the header.WebkitMaskImage: 'linear-gradient(to bottom, transparent 0, #000 28px)',@@@ -300,19 -257,18 +304,21 @@@isLast={message.id === lastVisibleId}// The live generating flag, not `message.usage`: a backend that// never reports usage would lose the action bar for good.- isStreaming={showTyping && message.id === lastVisibleId && message.role === 'assistant'}- onRegenerate={message.role === 'assistant' && onRegenerate && !isGenerating && !message.greetings+ isStreaming={!readOnly && showTyping && message.id === lastVisibleId && message.role === 'assistant'}+ // An earlier layer is read only: no regenerate, no edit, no+ // approval, no switching or branching of versions.+ onRegenerate={!readOnly && message.role === 'assistant' && onRegenerate && !isGenerating && !message.greetings? handleRegenerate: undefined}- onRegenerateRound={groupOn && message.role === 'assistant' && onRegenerate && !isGenerating && message.modelId++ onRegenerateRound={!readOnly && groupOn && message.role === 'assistant' && onRegenerate && !isGenerating && message.modelId+ ? handleRegenerateRound+ : undefined}- onEdit={message.role === 'user' && onEdit && !isGenerating+ onEdit={!readOnly && message.role === 'user' && onEdit && !isGenerating? handleEdit: undefined}- pendingApprovalId={pendingApprovalId}- onApprove={onApprove}- onReject={onReject}+ pendingApprovalId={readOnly ? null : pendingApprovalId}+ onApprove={readOnly ? undefined : onApprove}+ onReject={readOnly ? undefined : onReject}forkKey={marks.get(message.id)?.key}forkIndex={marks.get(message.id)?.index}forkTotal={marks.get(message.id)?.total}@@@ -350,21 -307,8 +357,23 @@@)}</div></div>+ <CompactLayerRail view={layers} />+ </div>+ {/* GH #199: later speakers of this round already answered. Ask before+ anything moves. Outside the scrolling list, whose mask would clip it. */}+ <Modal open={!!askRegen} onClose={() => setAskRegen(null)} title="Regenerate this answer" maxWidth="max-w-md">+ <p className="t-small text-gray-600 dark:text-gray-300" data-testid="regen-speaker-question">+ {askRegen?.later === 1 ? 'One later speaker' : `${askRegen?.later ?? 0} later speakers`} of this round already answered.+ Keep {askRegen?.later === 1 ? 'that answer' : 'their answers'}, or let {askRegen?.later === 1 ? 'it' : 'them'} answer again after the new one?+ {askRegen?.laterRounds ? ' Later rounds move into the earlier version either way; the arrows bring them back.' : ''}+ </p>+ <ModalActions>+ <ModalButton variant="quiet" onClick={() => setAskRegen(null)}>Cancel</ModalButton>+ <ModalButton data-testid="regen-from-here" onClick={() => answerRegen('from-here')}>Regenerate from here</ModalButton>+ <ModalButton data-testid="regen-keep-later" variant="primary" onClick={() => answerRegen('only')}>Keep later answers</ModalButton>+ </ModalActions>+ </Modal>+ </>)}