mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 05:02:11 +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
|
|
@ -24,7 +24,7 @@
|
|||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18.3.1",
|
||||
"react": "^18.3.1 || ^19.0.0",
|
||||
"sandbox-agent": "^0.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
@ -32,8 +32,8 @@
|
|||
"ghostty-web": "^0.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.3.3",
|
||||
"react": "^18.3.1",
|
||||
"@types/react": "^19.1.12",
|
||||
"react": "^19.1.1",
|
||||
"sandbox-agent": "workspace:*",
|
||||
"tsup": "^8.0.0",
|
||||
"typescript": "^5.7.0"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export interface AgentConversationProps {
|
|||
emptyState?: ReactNode;
|
||||
transcriptClassName?: string;
|
||||
transcriptClassNames?: Partial<AgentTranscriptClassNames>;
|
||||
scrollRef?: RefObject<HTMLDivElement>;
|
||||
scrollRef?: RefObject<HTMLDivElement | null>;
|
||||
composerClassName?: string;
|
||||
composerClassNames?: Partial<ChatComposerClassNames>;
|
||||
transcriptProps?: Omit<AgentTranscriptProps, "entries" | "className" | "classNames" | "scrollRef">;
|
||||
|
|
|
|||
|
|
@ -98,8 +98,8 @@ export interface AgentTranscriptProps {
|
|||
entries: TranscriptEntry[];
|
||||
className?: string;
|
||||
classNames?: Partial<AgentTranscriptClassNames>;
|
||||
endRef?: RefObject<HTMLDivElement>;
|
||||
scrollRef?: RefObject<HTMLDivElement>;
|
||||
endRef?: RefObject<HTMLDivElement | null>;
|
||||
scrollRef?: RefObject<HTMLDivElement | null>;
|
||||
scrollToEntryId?: string | null;
|
||||
sessionError?: string | null;
|
||||
eventError?: string | null;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import type { RefObject } from "react";
|
|||
import { useEffect, useRef } from "react";
|
||||
import { useVirtualizer } from "@tanstack/react-virtual";
|
||||
|
||||
export function useTranscriptVirtualizer<T>(items: T[], scrollElementRef?: RefObject<HTMLDivElement>, onAtBottomChange?: (atBottom: boolean) => void) {
|
||||
export function useTranscriptVirtualizer<T>(items: T[], scrollElementRef?: RefObject<HTMLDivElement | null>, onAtBottomChange?: (atBottom: boolean) => void) {
|
||||
const isFollowingRef = useRef(true);
|
||||
|
||||
const virtualizer = useVirtualizer({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue