feat: add plan viewer with browser preview (LET-7645) (#1089)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-02-21 13:39:22 -08:00
committed by GitHub
parent 5ad7094a26
commit 5d8a832c00
7 changed files with 502 additions and 3 deletions

View File

@@ -84,6 +84,11 @@ type Props = {
// External data for FileEdit approvals
precomputedDiff?: AdvancedDiffSuccess;
allDiffs?: Map<string, AdvancedDiffSuccess>;
// Plan viewer data (for ExitPlanMode 'o' key)
planContent?: string;
planFilePath?: string;
agentName?: string;
};
// Parse bash info from approval args
@@ -217,6 +222,9 @@ export const ApprovalSwitch = memo(
allDiffs,
showPreview = true,
defaultScope = "project",
planContent,
planFilePath,
agentName,
}: Props) => {
const toolName = approval.toolName;
@@ -229,6 +237,9 @@ export const ApprovalSwitch = memo(
onKeepPlanning={onPlanKeepPlanning}
onCancel={onCancel ?? (() => {})}
isFocused={isFocused}
planContent={planContent}
planFilePath={planFilePath}
agentName={agentName}
/>
);
}