mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 06:04:43 +00:00
fix: mock agent process, React 18/19 types, release version refs
- Add hidden `mock-agent-process` CLI subcommand implementing a stdio JSON-RPC echo agent (ported from examples/mock-acp-agent) - Update write_mock_agent_process_launcher() to exec the new subcommand instead of exiting with error - Update sdks/react to support React 18 and 19 peer dependencies - Update @types/react to v19 across workspace (pnpm override + inspector) - Fix RefObject<T | null> compatibility for React 19 useRef() signatures - Add version reference replacement logic to release update_version.ts covering all docs, examples, and code files listed in CLAUDE.md - Add missing files to CLAUDE.md Install Version References list (architecture.mdx, boxlite, modal, computesdk docs and examples) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2f9f25ae54
commit
bf543d225d
14 changed files with 296 additions and 100 deletions
|
|
@ -1,8 +1,19 @@
|
|||
import { AgentTranscript as AgentTranscript_, type AgentTranscriptClassNames, type TranscriptEntry } from "@sandbox-agent/react";
|
||||
|
||||
// Cast to work around React 18/19 type incompatibility between @sandbox-agent/react and foundry
|
||||
const AgentTranscript = AgentTranscript_ as unknown as (props: Record<string, unknown>) => JSX.Element;
|
||||
import { memo, useEffect, useMemo, type MutableRefObject, type RefObject } from "react";
|
||||
|
||||
// Cast needed: tsup-generated .d.ts returns react_jsx_runtime.JSX.Element which
|
||||
// doesn't unify with the consumer's JSX.Element under Bundler moduleResolution.
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const AgentTranscript = AgentTranscript_ as any as React.FC<{
|
||||
entries: TranscriptEntry[];
|
||||
classNames?: Partial<AgentTranscriptClassNames>;
|
||||
scrollRef?: RefObject<HTMLDivElement | null>;
|
||||
scrollToEntryId?: string | null;
|
||||
virtualize?: boolean;
|
||||
isThinking?: boolean;
|
||||
renderMessageText?: (entry: TranscriptEntry) => React.ReactNode;
|
||||
renderThinkingState?: () => React.ReactNode;
|
||||
}>;
|
||||
import { useStyletron } from "baseui";
|
||||
import { LabelSmall, LabelXSmall } from "baseui/typography";
|
||||
import { Copy } from "lucide-react";
|
||||
|
|
@ -156,7 +167,7 @@ export const MessageList = memo(function MessageList({
|
|||
pendingMessage,
|
||||
}: {
|
||||
session: AgentSession | null | undefined;
|
||||
scrollRef: RefObject<HTMLDivElement>;
|
||||
scrollRef: RefObject<HTMLDivElement | null>;
|
||||
messageRefs: MutableRefObject<Map<string, HTMLDivElement>>;
|
||||
historyEvents: HistoryEvent[];
|
||||
onSelectHistoryEvent: (event: HistoryEvent) => void;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue