mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-20 10:01:28 +00:00
Add transcript virtualization to Foundry UI (#255)
This commit is contained in:
parent
5ea9ec5e2f
commit
400f9a214e
15 changed files with 780 additions and 576 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import type { TranscriptEntry } from "@sandbox-agent/react";
|
||||
import { AlertTriangle, Archive, CheckSquare, MessageSquare, Plus, Square, Terminal } from "lucide-react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useEffect, useRef, useState, type RefObject } from "react";
|
||||
import type { AgentInfo } from "sandbox-agent";
|
||||
import { formatShortId } from "../../utils/format";
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ const ChatPanel = ({
|
|||
agents,
|
||||
agentsLoading,
|
||||
agentsError,
|
||||
messagesEndRef,
|
||||
scrollRef,
|
||||
agentLabel,
|
||||
modelLabel,
|
||||
currentAgentVersion,
|
||||
|
|
@ -71,7 +71,7 @@ const ChatPanel = ({
|
|||
agents: AgentInfo[];
|
||||
agentsLoading: boolean;
|
||||
agentsError: string | null;
|
||||
messagesEndRef: React.RefObject<HTMLDivElement>;
|
||||
scrollRef: RefObject<HTMLDivElement>;
|
||||
agentLabel: string;
|
||||
modelLabel?: string | null;
|
||||
currentAgentVersion?: string | null;
|
||||
|
|
@ -233,7 +233,7 @@ const ChatPanel = ({
|
|||
entries={transcriptEntries}
|
||||
sessionError={sessionError}
|
||||
eventError={null}
|
||||
messagesEndRef={messagesEndRef}
|
||||
scrollRef={scrollRef}
|
||||
onEventClick={onEventClick}
|
||||
isThinking={isThinking}
|
||||
agentId={agentId}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import {
|
|||
type TranscriptEntry,
|
||||
} from "@sandbox-agent/react";
|
||||
import { AlertTriangle, Brain, Check, ChevronDown, ChevronRight, ExternalLink, Info, PlayCircle, Send, Shield, Wrench, X } from "lucide-react";
|
||||
import type { ReactNode } from "react";
|
||||
import type { ReactNode, RefObject } from "react";
|
||||
import MarkdownText from "./MarkdownText";
|
||||
|
||||
const agentLogos: Record<string, string> = {
|
||||
|
|
@ -84,7 +84,7 @@ export interface InspectorConversationProps {
|
|||
entries: TranscriptEntry[];
|
||||
sessionError: string | null;
|
||||
eventError?: string | null;
|
||||
messagesEndRef: React.RefObject<HTMLDivElement>;
|
||||
scrollRef: RefObject<HTMLDivElement>;
|
||||
onEventClick?: (eventId: string) => void;
|
||||
isThinking?: boolean;
|
||||
agentId?: string;
|
||||
|
|
@ -102,7 +102,7 @@ const InspectorConversation = ({
|
|||
entries,
|
||||
sessionError,
|
||||
eventError,
|
||||
messagesEndRef,
|
||||
scrollRef,
|
||||
onEventClick,
|
||||
isThinking,
|
||||
agentId,
|
||||
|
|
@ -119,12 +119,13 @@ const InspectorConversation = ({
|
|||
<AgentConversation
|
||||
entries={entries}
|
||||
classNames={conversationClassNames}
|
||||
scrollRef={scrollRef}
|
||||
emptyState={emptyState}
|
||||
transcriptClassNames={transcriptClassNames}
|
||||
transcriptProps={{
|
||||
endRef: messagesEndRef,
|
||||
sessionError,
|
||||
eventError,
|
||||
virtualize: true,
|
||||
onEventClick,
|
||||
isThinking,
|
||||
agentId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue