diff --git a/webapp/src/components/chat/plan-viewer/PlanViewer.tsx b/webapp/src/components/chat/plan-viewer/PlanViewer.tsx index 8c5cc50f2..f3e559950 100644 --- a/webapp/src/components/chat/plan-viewer/PlanViewer.tsx +++ b/webapp/src/components/chat/plan-viewer/PlanViewer.tsx @@ -80,7 +80,7 @@ export const PlanViewer: React.FC = ({ message, messageIndex }) plan={plan} setPlan={setPlan} planState={planState} - description={getPlanGoal((parsedContent.userIntent ?? parsedContent.originalUserInput) ?? parsedContent.proposedPlan.description)} + description={getPlanGoal(parsedContent.userIntent ?? parsedContent.originalUserInput ?? parsedContent.proposedPlan.description)} /> {planState === PlanState.PlanApprovalRequired && ( <> diff --git a/webapp/src/components/chat/tabs/PlansTab.tsx b/webapp/src/components/chat/tabs/PlansTab.tsx index a3b5b66c9..3f3b34818 100644 --- a/webapp/src/components/chat/tabs/PlansTab.tsx +++ b/webapp/src/components/chat/tabs/PlansTab.tsx @@ -144,7 +144,7 @@ function useTable(planMessages: IChatMessage[], setChatTab: () => void) { const items = planMessages .map((message, index) => { const parsedPlan = JSON.parse(message.content) as ProposedPlan; - const plangoal = (parsedPlan.userIntent ?? parsedPlan.originalUserInput) ?? parsedPlan.proposedPlan.description; + const plangoal = parsedPlan.userIntent ?? parsedPlan.originalUserInput ?? parsedPlan.proposedPlan.description; return { index: index, diff --git a/webapp/src/libs/models/Plan.ts b/webapp/src/libs/models/Plan.ts index bcc36cfa5..14a8a6483 100644 --- a/webapp/src/libs/models/Plan.ts +++ b/webapp/src/libs/models/Plan.ts @@ -80,7 +80,7 @@ export interface ProposedPlan { state: PlanState; // User input that prompted the plan - originalUserInput: string; + originalUserInput?: string; // User intent to serves as goal of plan. userIntent?: string;