mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 12:04:15 +00:00
Rename Foundry handoffs to tasks (#239)
* Restore foundry onboarding stack * Consolidate foundry rename * Create foundry tasks without prompts * Rename Foundry handoffs to tasks
This commit is contained in:
parent
d30cc0bcc8
commit
d75e8c31d1
281 changed files with 9242 additions and 4356 deletions
102
foundry/packages/frontend/src/sandbox-agent-react.d.ts
vendored
Normal file
102
foundry/packages/frontend/src/sandbox-agent-react.d.ts
vendored
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
declare module "@sandbox-agent/react" {
|
||||
import type { CSSProperties, KeyboardEvent, ReactNode, Ref, RefObject, TextareaHTMLAttributes } from "react";
|
||||
import type { SandboxAgent } from "sandbox-agent";
|
||||
|
||||
export type PermissionReply = "once" | "always" | "reject";
|
||||
|
||||
export type PermissionOption = {
|
||||
optionId: string;
|
||||
name: string;
|
||||
kind: string;
|
||||
};
|
||||
|
||||
export type TranscriptEntry = {
|
||||
id: string;
|
||||
eventId?: string;
|
||||
kind: "message" | "tool" | "meta" | "reasoning" | "permission";
|
||||
time: string;
|
||||
role?: "user" | "assistant";
|
||||
text?: string;
|
||||
};
|
||||
|
||||
export interface AgentTranscriptClassNames {
|
||||
root: string;
|
||||
message: string;
|
||||
messageContent: string;
|
||||
messageText: string;
|
||||
thinkingRow: string;
|
||||
thinkingIndicator: string;
|
||||
}
|
||||
|
||||
export interface PermissionOptionRenderContext {
|
||||
entry: TranscriptEntry;
|
||||
option: PermissionOption;
|
||||
label: string;
|
||||
reply: PermissionReply;
|
||||
selected: boolean;
|
||||
dimmed: boolean;
|
||||
resolved: boolean;
|
||||
}
|
||||
|
||||
export interface AgentTranscriptProps {
|
||||
entries: TranscriptEntry[];
|
||||
className?: string;
|
||||
classNames?: Partial<AgentTranscriptClassNames>;
|
||||
endRef?: RefObject<HTMLDivElement>;
|
||||
sessionError?: string | null;
|
||||
eventError?: string | null;
|
||||
isThinking?: boolean;
|
||||
agentId?: string;
|
||||
onEventClick?: (eventId: string) => void;
|
||||
onPermissionReply?: (permissionId: string, reply: PermissionReply) => void;
|
||||
renderMessageText?: (entry: TranscriptEntry) => ReactNode;
|
||||
renderInlinePendingIndicator?: () => ReactNode;
|
||||
renderThinkingState?: (context: { agentId?: string }) => ReactNode;
|
||||
renderPermissionOptionContent?: (context: PermissionOptionRenderContext) => ReactNode;
|
||||
}
|
||||
|
||||
export const AgentTranscript: (props: AgentTranscriptProps) => ReactNode;
|
||||
|
||||
export interface ChatComposerClassNames {
|
||||
root: string;
|
||||
form: string;
|
||||
input: string;
|
||||
submit: string;
|
||||
submitContent: string;
|
||||
}
|
||||
|
||||
export interface ChatComposerProps {
|
||||
message: string;
|
||||
onMessageChange: (value: string) => void;
|
||||
onSubmit: () => void;
|
||||
onKeyDown?: (event: KeyboardEvent<HTMLTextAreaElement>) => void;
|
||||
placeholder?: string;
|
||||
disabled?: boolean;
|
||||
submitDisabled?: boolean;
|
||||
allowEmptySubmit?: boolean;
|
||||
submitLabel?: string;
|
||||
className?: string;
|
||||
classNames?: Partial<ChatComposerClassNames>;
|
||||
inputRef?: Ref<HTMLTextAreaElement>;
|
||||
rows?: number;
|
||||
textareaProps?: Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "className" | "disabled" | "onChange" | "onKeyDown" | "placeholder" | "rows" | "value">;
|
||||
renderSubmitContent?: () => ReactNode;
|
||||
renderFooter?: () => ReactNode;
|
||||
}
|
||||
|
||||
export const ChatComposer: (props: ChatComposerProps) => ReactNode;
|
||||
|
||||
export interface ProcessTerminalClient extends SandboxAgent {}
|
||||
|
||||
export interface ProcessTerminalProps {
|
||||
client: SandboxAgent | null;
|
||||
processId: string;
|
||||
height?: string | number;
|
||||
showStatusBar?: boolean;
|
||||
style?: CSSProperties;
|
||||
terminalStyle?: CSSProperties;
|
||||
onExit?: () => void;
|
||||
}
|
||||
|
||||
export const ProcessTerminal: (props: ProcessTerminalProps) => ReactNode;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue