mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
refactor(frontend): remove backward compatibility regex and console.log
- Remove regex matching for old 'Review required for X execution' format - Remove console.log debug statement - Simplify code by removing unnecessary string parsing
This commit is contained in:
@@ -63,11 +63,6 @@ export function PendingReviewCard({
|
||||
|
||||
if (instructions && !isHITLBlock) {
|
||||
instructions = undefined;
|
||||
} else if (instructions) {
|
||||
const match = instructions.match(/^Review required for (.+?) execution$/);
|
||||
if (match) {
|
||||
instructions = match[1];
|
||||
}
|
||||
}
|
||||
|
||||
const [currentData, setCurrentData] = useState(extractedData.data);
|
||||
|
||||
@@ -236,17 +236,7 @@ export function PendingReviewsList({
|
||||
const reviewCount = nodeReviews.length;
|
||||
|
||||
const firstReview = nodeReviews[0];
|
||||
let blockName = firstReview?.instructions;
|
||||
|
||||
if (blockName) {
|
||||
const match = blockName.match(
|
||||
/^Review required for (.+?) execution$/,
|
||||
);
|
||||
if (match) {
|
||||
blockName = match[1];
|
||||
}
|
||||
}
|
||||
|
||||
const blockName = firstReview?.instructions;
|
||||
const reviewTitle = `Review required for ${blockName}`;
|
||||
|
||||
const getShortenedNodeId = (id: string) => {
|
||||
|
||||
Reference in New Issue
Block a user