Skip to content

Commit

Permalink
Merge pull request #3113 from continuedev/quick-edit-4f1d
Browse files Browse the repository at this point in the history
always render delete button
  • Loading branch information
sestinj authored Nov 27, 2024
2 parents 5641fae + eced0d0 commit 4a8fb57
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions gui/src/components/StepContainer/ResponseActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ export default function ResponseActions({
(store: RootState) => store.editModeState.isInEditMode,
);

// Only render delete button if there is more than one message
const shouldRenderDelete = index !== 1;

if (isInEditMode) {
return <EditActions index={index} item={item} />;
}
Expand All @@ -46,19 +43,16 @@ export default function ResponseActions({
</HeaderButtonWithToolTip>
)}

{shouldRenderDelete && (
<HeaderButtonWithToolTip text="Delete" tabIndex={-1} onClick={onDelete}>
<TrashIcon className="h-3.5 w-3.5 text-gray-500" />
</HeaderButtonWithToolTip>
)}
<HeaderButtonWithToolTip text="Delete" tabIndex={-1} onClick={onDelete}>
<TrashIcon className="h-3.5 w-3.5 text-gray-500" />
</HeaderButtonWithToolTip>

<CopyIconButton
tabIndex={-1}
text={stripImages(item.message.content)}
clipboardIconClassName="h-3.5 w-3.5 text-gray-500"
checkIconClassName="h-3.5 w-3.5 text-green-400"
/>

<FeedbackButtons item={item} />
</div>
);
Expand Down

0 comments on commit 4a8fb57

Please sign in to comment.