skipped action should mark as success (#3080)
This commit is contained in:
@@ -25,6 +25,7 @@ export const Status = {
|
|||||||
Queued: "queued",
|
Queued: "queued",
|
||||||
TimedOut: "timed_out",
|
TimedOut: "timed_out",
|
||||||
Canceled: "canceled",
|
Canceled: "canceled",
|
||||||
|
Skipped: "skipped",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export type Status = (typeof Status)[keyof typeof Status];
|
export type Status = (typeof Status)[keyof typeof Status];
|
||||||
|
|||||||
@@ -118,7 +118,9 @@ function useActions({ id }: Props): {
|
|||||||
confidence: action.confidence_float ?? undefined,
|
confidence: action.confidence_float ?? undefined,
|
||||||
input: action.response ?? "",
|
input: action.response ?? "",
|
||||||
type: action.action_type,
|
type: action.action_type,
|
||||||
success: action.status === Status.Completed,
|
success:
|
||||||
|
action.status === Status.Completed ||
|
||||||
|
action.status === Status.Skipped,
|
||||||
stepId: action.step_id ?? "",
|
stepId: action.step_id ?? "",
|
||||||
index: action.action_order ?? 0,
|
index: action.action_order ?? 0,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ type Props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function ActionCard({ action, onClick, active, index }: Props) {
|
function ActionCard({ action, onClick, active, index }: Props) {
|
||||||
const success = action.status === Status.Completed;
|
const success =
|
||||||
|
action.status === Status.Completed || action.status === Status.Skipped;
|
||||||
|
|
||||||
const refCallback = useCallback((element: HTMLDivElement | null) => {
|
const refCallback = useCallback((element: HTMLDivElement | null) => {
|
||||||
if (element && active) {
|
if (element && active) {
|
||||||
|
|||||||
Reference in New Issue
Block a user