Skip to content

Commit 5e98510

Browse files
committed
fix(gamma): address PR review comments
- Make credits/error conditionally included in check_status response to avoid always-truthy objects - Replace full wordmark SVG with square "G" letterform for proper rendering in icon slots
1 parent 239d1a8 commit 5e98510

File tree

3 files changed

+22
-49
lines changed

3 files changed

+22
-49
lines changed

apps/docs/components/icons.tsx

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -528,27 +528,11 @@ export function SlackMonoIcon(props: SVGProps<SVGSVGElement>) {
528528

529529
export function GammaIcon(props: SVGProps<SVGSVGElement>) {
530530
return (
531-
<svg {...props} viewBox='0 0 1111 192' fill='none' xmlns='http://www.w3.org/2000/svg'>
531+
<svg {...props} viewBox='-14 0 192 192' fill='none' xmlns='http://www.w3.org/2000/svg'>
532532
<path
533533
fill='currentColor'
534534
d='M47.2,14.4c-14.4,8.2-26,19.6-34.4,33.6C4.3,62.1,0,77.7,0,94.3s4.3,32.2,12.7,46.3c8.5,14.1,20,25.4,34.4,33.6,14.4,8.2,30.4,12.4,47.7,12.4h69.8v-112.5h-81v39.1h38.2v31.8h-25.6c-9.1,0-17.6-2.3-25.2-6.9-7.6-4.6-13.8-10.8-18.3-18.4-4.5-7.7-6.7-16.2-6.7-25.3s2.3-17.7,6.7-25.3c4.5-7.7,10.6-13.9,18.3-18.4,7.6-4.6,16.1-6.9,25.2-6.9h68.5V2h-69.8c-17.3,0-33.3,4.2-47.7,12.4h0Z'
535535
/>
536-
<path
537-
fill='currentColor'
538-
d='M267.6.2c-42.7,0-77.4,34.8-77.4,77.6v108.8h42v-54.6h70.8v54.6h42v-108.8c0-42.8-34.7-77.6-77.4-77.6ZM303,93h-70.8v-15.3c0-19.6,15.9-35.5,35.4-35.5s35.4,15.9,35.4,35.5v15.3Z'
539-
/>
540-
<path
541-
fill='currentColor'
542-
d='M576.4,0c-32.1,0-58.2,26.2-58.2,58.4v74.2c0,8.7-7,15.7-15.7,15.7s-15.7-7-15.7-15.7V58.5c0-32.2-26.1-58.4-58.2-58.4s-58.2,26.2-58.2,58.4v128.2h42.6V58.5c0-8.7,7-15.7,15.7-15.7s15.7,7,15.7,15.7v74.1c0,32.2,26.1,58.4,58.2,58.4s58.2-26.2,58.2-58.4V58.4c0-8.7,7-15.7,15.7-15.7s15.7,7,15.7,15.7v128.3h42.6V58.4c0-32.2-26.1-58.4-58.2-58.4h0Z'
543-
/>
544-
<path
545-
fill='currentColor'
546-
d='M1033.1.3c-42.7,0-77.4,34.8-77.4,77.6v108.8h42v-54.6h70.8v54.6h42v-108.8c0-42.8-34.7-77.6-77.4-77.6ZM1068.5,93.2h-70.8v-15.3c0-19.6,15.9-35.5,35.4-35.5s35.4,15.9,35.4,35.5v15.3Z'
547-
/>
548-
<path
549-
fill='currentColor'
550-
d='M872,0c-32.1,0-58.2,26.2-58.2,58.4v74.2c0,8.7-7,15.7-15.7,15.7s-15.7-7-15.7-15.7V58.4c0-32.2-26.1-58.4-58.2-58.4s-58.2,26.2-58.2,58.4v128.3h42.6V58.4c0-8.7,7-15.7,15.7-15.7s15.7,7,15.7,15.7v74.2c0,32.2,26.1,58.4,58.2,58.4s58.2-26.2,58.2-58.4V58.4c0-8.7,7-15.7,15.7-15.7s15.7,7,15.7,15.7v128.3h42.6V58.4c0-32.2-26.1-58.4-58.2-58.4Z'
551-
/>
552536
</svg>
553537
)
554538
}

apps/sim/components/icons.tsx

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -528,27 +528,11 @@ export function SlackMonoIcon(props: SVGProps<SVGSVGElement>) {
528528

529529
export function GammaIcon(props: SVGProps<SVGSVGElement>) {
530530
return (
531-
<svg {...props} viewBox='0 0 1111 192' fill='none' xmlns='http://www.w3.org/2000/svg'>
531+
<svg {...props} viewBox='-14 0 192 192' fill='none' xmlns='http://www.w3.org/2000/svg'>
532532
<path
533533
fill='currentColor'
534534
d='M47.2,14.4c-14.4,8.2-26,19.6-34.4,33.6C4.3,62.1,0,77.7,0,94.3s4.3,32.2,12.7,46.3c8.5,14.1,20,25.4,34.4,33.6,14.4,8.2,30.4,12.4,47.7,12.4h69.8v-112.5h-81v39.1h38.2v31.8h-25.6c-9.1,0-17.6-2.3-25.2-6.9-7.6-4.6-13.8-10.8-18.3-18.4-4.5-7.7-6.7-16.2-6.7-25.3s2.3-17.7,6.7-25.3c4.5-7.7,10.6-13.9,18.3-18.4,7.6-4.6,16.1-6.9,25.2-6.9h68.5V2h-69.8c-17.3,0-33.3,4.2-47.7,12.4h0Z'
535535
/>
536-
<path
537-
fill='currentColor'
538-
d='M267.6.2c-42.7,0-77.4,34.8-77.4,77.6v108.8h42v-54.6h70.8v54.6h42v-108.8c0-42.8-34.7-77.6-77.4-77.6ZM303,93h-70.8v-15.3c0-19.6,15.9-35.5,35.4-35.5s35.4,15.9,35.4,35.5v15.3Z'
539-
/>
540-
<path
541-
fill='currentColor'
542-
d='M576.4,0c-32.1,0-58.2,26.2-58.2,58.4v74.2c0,8.7-7,15.7-15.7,15.7s-15.7-7-15.7-15.7V58.5c0-32.2-26.1-58.4-58.2-58.4s-58.2,26.2-58.2,58.4v128.2h42.6V58.5c0-8.7,7-15.7,15.7-15.7s15.7,7,15.7,15.7v74.1c0,32.2,26.1,58.4,58.2,58.4s58.2-26.2,58.2-58.4V58.4c0-8.7,7-15.7,15.7-15.7s15.7,7,15.7,15.7v128.3h42.6V58.4c0-32.2-26.1-58.4-58.2-58.4h0Z'
543-
/>
544-
<path
545-
fill='currentColor'
546-
d='M1033.1.3c-42.7,0-77.4,34.8-77.4,77.6v108.8h42v-54.6h70.8v54.6h42v-108.8c0-42.8-34.7-77.6-77.4-77.6ZM1068.5,93.2h-70.8v-15.3c0-19.6,15.9-35.5,35.4-35.5s35.4,15.9,35.4,35.5v15.3Z'
547-
/>
548-
<path
549-
fill='currentColor'
550-
d='M872,0c-32.1,0-58.2,26.2-58.2,58.4v74.2c0,8.7-7,15.7-15.7,15.7s-15.7-7-15.7-15.7V58.4c0-32.2-26.1-58.4-58.2-58.4s-58.2,26.2-58.2,58.4v128.3h42.6V58.4c0-8.7,7-15.7,15.7-15.7s15.7,7,15.7,15.7v74.2c0,32.2,26.1,58.4,58.2,58.4s58.2-26.2,58.2-58.4V58.4c0-8.7,7-15.7,15.7-15.7s15.7,7,15.7,15.7v128.3h42.6V58.4c0-32.2-26.1-58.4-58.2-58.4Z'
551-
/>
552536
</svg>
553537
)
554538
}

apps/sim/tools/gamma/check_status.ts

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,27 @@ export const checkStatusTool: ToolConfig<GammaCheckStatusParams, GammaCheckStatu
3434
transformResponse: async (response: Response) => {
3535
const data = await response.json()
3636

37-
return {
38-
success: true,
39-
output: {
40-
generationId: data.generationId ?? '',
41-
status: data.status ?? 'pending',
42-
gammaUrl: data.gammaUrl ?? null,
43-
credits: {
44-
deducted: data.credits?.deducted ?? null,
45-
remaining: data.credits?.remaining ?? null,
46-
},
47-
error: {
48-
message: data.error?.message ?? null,
49-
statusCode: data.error?.statusCode ?? null,
50-
},
51-
},
37+
const output: Record<string, unknown> = {
38+
generationId: data.generationId ?? '',
39+
status: data.status ?? 'pending',
40+
gammaUrl: data.gammaUrl ?? null,
41+
}
42+
43+
if (data.credits) {
44+
output.credits = {
45+
deducted: data.credits.deducted ?? null,
46+
remaining: data.credits.remaining ?? null,
47+
}
48+
}
49+
50+
if (data.error) {
51+
output.error = {
52+
message: data.error.message ?? null,
53+
statusCode: data.error.statusCode ?? null,
54+
}
5255
}
56+
57+
return { success: true, output }
5358
},
5459

5560
outputs: {

0 commit comments

Comments
 (0)