Skip to content

Commit

Permalink
feat: ContentPartPrimitive.InProgress should display in requires-acti…
Browse files Browse the repository at this point in the history
…on state (#965)
  • Loading branch information
Yonom authored Oct 10, 2024
1 parent 359f26f commit 3a29b04
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import { useContentPart } from "../../context";

export type ContentPartPrimitiveInProgressProps = PropsWithChildren;

// TODO should this be renamed to IsRunning?
export const ContentPartPrimitiveInProgress: FC<
ContentPartPrimitiveInProgressProps
> = ({ children }) => {
const isInProgress = useContentPart((c) => c.status.type === "running");
const isInProgress = useContentPart(
(c) => c.status.type === "running" || c.status.type === "requires-action",
);

return isInProgress ? children : null;
};
Expand Down

0 comments on commit 3a29b04

Please sign in to comment.