Fix duplicate Codex plan approval panels
This commit is contained in:
@@ -1129,6 +1129,7 @@ function PermissionRequestCard({
|
||||
description={description}
|
||||
text={planMarkdown}
|
||||
footer={footer}
|
||||
testID="permission-plan-card"
|
||||
disableOuterSpacing
|
||||
/>
|
||||
);
|
||||
@@ -1141,7 +1142,12 @@ function PermissionRequestCard({
|
||||
{description ? <Text style={permissionStyles.description}>{description}</Text> : null}
|
||||
|
||||
{planMarkdown ? (
|
||||
<PlanCard title="Proposed plan" text={planMarkdown} disableOuterSpacing />
|
||||
<PlanCard
|
||||
title="Proposed plan"
|
||||
text={planMarkdown}
|
||||
testID="permission-plan-card"
|
||||
disableOuterSpacing
|
||||
/>
|
||||
) : null}
|
||||
|
||||
{!isPlanRequest ? (
|
||||
|
||||
@@ -2973,6 +2973,7 @@ export const ToolCall = memo(function ToolCall({
|
||||
<PlanCard
|
||||
title="Plan"
|
||||
text={effectiveDetail.text}
|
||||
testID="timeline-plan-card"
|
||||
disableOuterSpacing={disableOuterSpacing}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -199,12 +199,14 @@ export function PlanCard({
|
||||
text,
|
||||
footer,
|
||||
disableOuterSpacing = false,
|
||||
testID,
|
||||
}: {
|
||||
title?: string;
|
||||
description?: string;
|
||||
text: string;
|
||||
footer?: ReactNode;
|
||||
disableOuterSpacing?: boolean;
|
||||
testID?: string;
|
||||
}) {
|
||||
const { theme } = useUnistyles();
|
||||
const markdownStyles = createMarkdownStyles(theme);
|
||||
@@ -231,7 +233,7 @@ export function PlanCard({
|
||||
);
|
||||
|
||||
return (
|
||||
<View style={containerStyle}>
|
||||
<View testID={testID} style={containerStyle}>
|
||||
<Text style={titleStyle}>{title}</Text>
|
||||
{description ? <Text style={descriptionStyle}>{description}</Text> : null}
|
||||
<Markdown style={markdownStyles} rules={markdownRules}>
|
||||
|
||||
Reference in New Issue
Block a user