Skip to content

Commit 4830a4c

Browse files
committed
fix(extend): address PR review comments
1 parent 073315b commit 4830a4c

3 files changed

Lines changed: 18 additions & 5 deletions

File tree

apps/docs/components/icons.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,9 +2043,13 @@ export function Mem0Icon(props: SVGProps<SVGSVGElement>) {
20432043

20442044
export function ExtendIcon(props: SVGProps<SVGSVGElement>) {
20452045
return (
2046-
<svg {...props} xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'>
2047-
<rect width='24' height='24' rx='4' fill='#1A1A2E' />
2048-
<path d='M7 8h10M7 12h10M7 16h6' stroke='#FFFFFF' strokeWidth='2' strokeLinecap='round' />
2046+
<svg {...props} xmlns='http://www.w3.org/2000/svg' viewBox='0 0 33 18' fill='none'>
2047+
<path
2048+
clipRule='evenodd'
2049+
d='M16.2893 0C16.6984 1.91708e-05 17.1074 0.0970011 17.5103 0.293745C22.3018 2.63326 27.0841 4.98521 31.8693 7.33722C32.3003 7.54649 32.5721 7.9868 32.5721 8.46461V9.51422C32.5721 9.99522 32.3004 10.4357 31.8693 10.645C31.8693 10.645 19.5816 16.6732 17.5542 17.6634C17.1357 17.8696 16.692 17.9727 16.2859 17.9727C15.8799 17.9727 15.4707 17.8758 15.0615 17.6759C12.8124 16.5795 1.9646 11.2604 0.705842 10.6419C0.274826 10.4295 2.31482e-05 9.99216 0 9.51117V8.46461C4.59913e-05 7.98366 0.271816 7.54656 0.702792 7.33417C5.8977 4.7819 15.0599 0.301869 15.1021 0.281239C15.4957 0.0938275 15.8801 0 16.2893 0ZM16.2859 2.96124C16.1516 2.96126 16.0173 2.98909 15.8924 3.05153L4.28874 8.77696C4.11382 8.86442 4.11382 9.10831 4.28874 9.19577L15.8924 14.9209C16.0173 14.9802 16.1516 15.0115 16.2859 15.0115C16.4202 15.0115 16.5548 14.9802 16.6797 14.9209L28.2864 9.19577C28.4582 9.10831 28.4582 8.86442 28.2864 8.77696L16.6797 3.05153C16.5548 2.98906 16.4202 2.96124 16.2859 2.96124Z'
2050+
fill='currentColor'
2051+
fillRule='evenodd'
2052+
/>
20492053
</svg>
20502054
)
20512055
}

apps/sim/app/api/tools/extend/parse/route.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,19 @@ export async function POST(request: NextRequest) {
129129
if (!extendResponse.ok) {
130130
const errorText = await extendResponse.text()
131131
logger.error(`[${requestId}] Extend API error:`, errorText)
132+
let clientError = `Extend API error: ${extendResponse.statusText || extendResponse.status}`
133+
try {
134+
const parsedError = JSON.parse(errorText)
135+
if (parsedError?.message || parsedError?.error) {
136+
clientError = (parsedError.message ?? parsedError.error) as string
137+
}
138+
} catch {
139+
// errorText is not JSON; keep generic message
140+
}
132141
return NextResponse.json(
133142
{
134143
success: false,
135-
error: `Extend API error: ${extendResponse.statusText}`,
144+
error: clientError,
136145
},
137146
{ status: extendResponse.status }
138147
)

apps/sim/blocks/blocks/extend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ const extendV2SubBlocks = (ExtendBlock.subBlocks || []).flatMap((subBlock) => {
143143
title: 'Document',
144144
type: 'short-input' as SubBlockType,
145145
canonicalParamId: 'document',
146-
placeholder: 'File reference',
146+
placeholder: 'Connect a file output from another block',
147147
mode: 'advanced' as const,
148148
required: true,
149149
},

0 commit comments

Comments
 (0)