From 2e9125f2b50c227ccd8278f2fcad3cabf319fed7 Mon Sep 17 00:00:00 2001 From: Rohit Rajan Date: Fri, 7 Nov 2025 13:23:34 +0530 Subject: [PATCH] fix: legacy cap text action naming --- src/components/robot/pages/RobotEditPage.tsx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/components/robot/pages/RobotEditPage.tsx b/src/components/robot/pages/RobotEditPage.tsx index fa745160..80671c1f 100644 --- a/src/components/robot/pages/RobotEditPage.tsx +++ b/src/components/robot/pages/RobotEditPage.tsx @@ -552,16 +552,12 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { pair.what.forEach((action, actionIndex) => { if (!editableActions.has(String(action.action))) return; - let currentName = - action.name || - (action.args && action.args[0] && typeof action.args[0] === 'object') || - ''; + let currentName = action.name || ''; if (!currentName) { switch (action.action) { case 'scrapeSchema': - textCount++; - currentName = `Text ${textCount}`; + currentName = 'Texts'; break; case 'screenshot': screenshotCount++; @@ -574,9 +570,6 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { } } else { switch (action.action) { - case 'scrapeSchema': - textCount++; - break; case 'screenshot': screenshotCount++; break; @@ -599,10 +592,7 @@ export const RobotEditPage = ({ handleStart }: RobotSettingsProps) => { switch (action.action) { case 'scrapeSchema': { - const existingName = - currentName || - (action.args && action.args[0] && typeof action.args[0] === "object") || - "Texts"; + const existingName = currentName || "Texts"; if (!textInputs.length) { textInputs.push(