mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-24 01:41:42 +02:00
feat: make chat-style tasks the default experience (#11101)
This commit is contained in:
1 parent
2da6a248c3
commit
815e49bb7c
80 files changed
+3858
-1497
No files matched your search
@@ -40,6 +40,10 @@ interface TaskChatThreadViewProps {
|
||||
* fixtures omit it and the bubbles render actionless.
|
||||
*/
|
||||
renderMessageActions?: (item: TaskChatMessageItem) => ReactNode;
|
||||
/** Content appended inside the transcript scroller after the settled thread. */
|
||||
tail?: ReactNode;
|
||||
/** Optional streaming-aware key when `tail` changes without changing `items`. */
|
||||
contentKey?: number;
|
||||
className?: string;
|
||||
/** When false, render the list without the scroll container (e.g. previews). */
|
||||
scroll?: boolean;
|
||||
@@ -128,6 +132,8 @@ export function TaskChatThreadView({
|
||||
renderInteraction,
|
||||
renderBrief,
|
||||
renderMessageActions,
|
||||
tail,
|
||||
contentKey,
|
||||
className,
|
||||
scroll = true,
|
||||
}: TaskChatThreadViewProps) {
|
||||
@@ -143,12 +149,17 @@ export function TaskChatThreadView({
|
||||
{renderItem(item, onApprovalDecision, renderInteraction, renderBrief, renderMessageActions)}
|
||||
</div>
|
||||
))}
|
||||
{tail}
|
||||
</div>
|
||||
);
|
||||
|
||||
if (!scroll) return body;
|
||||
|
||||
return <TaskMessageScroller contentKey={taskChatContentKey(items)}>{body}</TaskMessageScroller>;
|
||||
return (
|
||||
<TaskMessageScroller contentKey={contentKey ?? taskChatContentKey(items)}>
|
||||
{body}
|
||||
</TaskMessageScroller>
|
||||
);
|
||||
}
|
||||
|
||||
// Cheap content signature so streaming growth (text lengthening without the
|
||||
|
||||
Reference in new issue
Block a user