Skip to content

Commit 38f5aae

Browse files
authored
v0.2.12: fix + improvement
v0.2.12: fix + improvement
2 parents b7d536b + 36eb04d commit 38f5aae

File tree

19 files changed

+989
-143
lines changed

19 files changed

+989
-143
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bun lint
1+
bunx lint-staged

apps/docs/content/docs/tools/gmail.mdx

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -79,50 +79,38 @@ Send emails using Gmail
7979
| `threadId` | string |
8080
| `labelIds` | string |
8181

82-
### `gmail_read`
82+
### `gmail_draft`
8383

84-
Read emails from Gmail
84+
Draft emails using Gmail
8585

8686
#### Input
8787

8888
| Parameter | Type | Required | Description |
8989
| --------- | ---- | -------- | ----------- |
9090
| `accessToken` | string | Yes | Access token for Gmail API |
91-
| `messageId` | string | No | ID of the message to read |
92-
| `folder` | string | No | Folder/label to read emails from |
93-
| `unreadOnly` | boolean | No | Only retrieve unread messages |
94-
| `maxResults` | number | No | Maximum number of messages to retrieve \(default: 1, max: 10\) |
91+
| `to` | string | Yes | Recipient email address |
92+
| `subject` | string | Yes | Email subject |
93+
| `body` | string | Yes | Email body content |
9594

9695
#### Output
9796

9897
| Parameter | Type |
9998
| --------- | ---- |
10099
| `content` | string |
101100
| `metadata` | string |
102-
103-
### `gmail_search`
104-
105-
Search emails in Gmail
106-
107-
#### Input
108-
109-
| Parameter | Type | Required | Description |
110-
| --------- | ---- | -------- | ----------- |
111-
| `accessToken` | string | Yes | Access token for Gmail API |
112-
| `query` | string | Yes | Search query for emails |
113-
| `maxResults` | number | No | Maximum number of results to return |
114-
115-
#### Output
116-
117-
| Parameter | Type |
118-
| --------- | ---- |
119-
| `content` | string |
101+
| `message` | string |
102+
| `threadId` | string |
103+
| `labelIds` | string |
120104

121105

122106

123107
## Block Configuration
124108

125-
No configuration parameters required.
109+
### Input
110+
111+
| Parameter | Type | Required | Description |
112+
| --------- | ---- | -------- | ----------- |
113+
| `operation` | string | Yes | Operation (e.g., 'send', 'draft') |
126114

127115

128116

apps/sim/app/api/billing/webhooks/stripe/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export async function POST(request: NextRequest) {
2424
return NextResponse.json({ error: 'Missing Stripe signature' }, { status: 400 })
2525
}
2626

27-
if (!env.STRIPE_WEBHOOK_SECRET) {
27+
if (!env.STRIPE_BILLING_WEBHOOK_SECRET) {
2828
logger.error('Missing Stripe webhook secret configuration')
2929
return NextResponse.json({ error: 'Webhook secret not configured' }, { status: 500 })
3030
}
@@ -43,7 +43,7 @@ export async function POST(request: NextRequest) {
4343
// Verify webhook signature
4444
let event: Stripe.Event
4545
try {
46-
event = stripe.webhooks.constructEvent(body, signature, env.STRIPE_WEBHOOK_SECRET)
46+
event = stripe.webhooks.constructEvent(body, signature, env.STRIPE_BILLING_WEBHOOK_SECRET)
4747
} catch (signatureError) {
4848
logger.error('Invalid Stripe webhook signature', {
4949
error: signatureError,

apps/sim/app/workspace/[workspaceId]/knowledge/components/create-modal/create-modal.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,9 @@ export function CreateModal({ open, onOpenChange, onKnowledgeBaseCreated }: Crea
430430
placeholder='100'
431431
{...register('minChunkSize', { valueAsNumber: true })}
432432
className={errors.minChunkSize ? 'border-red-500' : ''}
433+
autoComplete='off'
434+
data-form-type='other'
435+
name='min-chunk-size'
433436
/>
434437
{errors.minChunkSize && (
435438
<p className='mt-1 text-red-500 text-xs'>{errors.minChunkSize.message}</p>
@@ -444,6 +447,9 @@ export function CreateModal({ open, onOpenChange, onKnowledgeBaseCreated }: Crea
444447
placeholder='1024'
445448
{...register('maxChunkSize', { valueAsNumber: true })}
446449
className={errors.maxChunkSize ? 'border-red-500' : ''}
450+
autoComplete='off'
451+
data-form-type='other'
452+
name='max-chunk-size'
447453
/>
448454
{errors.maxChunkSize && (
449455
<p className='mt-1 text-red-500 text-xs'>{errors.maxChunkSize.message}</p>
@@ -460,6 +466,9 @@ export function CreateModal({ open, onOpenChange, onKnowledgeBaseCreated }: Crea
460466
placeholder='200'
461467
{...register('overlapSize', { valueAsNumber: true })}
462468
className={errors.overlapSize ? 'border-red-500' : ''}
469+
autoComplete='off'
470+
data-form-type='other'
471+
name='overlap-size'
463472
/>
464473
{errors.overlapSize && (
465474
<p className='mt-1 text-red-500 text-xs'>{errors.overlapSize.message}</p>

apps/sim/app/workspace/[workspaceId]/logs/components/trace-spans/trace-spans-display.tsx

Lines changed: 89 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,22 @@ function transformBlockData(data: any, blockType: string, isInput: boolean) {
2727
if (isInput) {
2828
const cleanInput = { ...data }
2929

30-
// Remove sensitive fields
30+
// Remove sensitive fields (common API keys and tokens)
3131
if (cleanInput.apiKey) {
3232
cleanInput.apiKey = '***'
3333
}
3434
if (cleanInput.azureApiKey) {
3535
cleanInput.azureApiKey = '***'
3636
}
37+
if (cleanInput.token) {
38+
cleanInput.token = '***'
39+
}
40+
if (cleanInput.accessToken) {
41+
cleanInput.accessToken = '***'
42+
}
43+
if (cleanInput.authorization) {
44+
cleanInput.authorization = '***'
45+
}
3746

3847
// Remove null/undefined values for cleaner display
3948
Object.keys(cleanInput).forEach((key) => {
@@ -73,6 +82,10 @@ function transformBlockData(data: any, blockType: string, isInput: boolean) {
7382
headers: response.headers,
7483
}
7584

85+
case 'tool':
86+
// For tool calls, show the result data directly
87+
return response
88+
7689
default:
7790
// For other block types, show the response content
7891
return response
@@ -82,6 +95,70 @@ function transformBlockData(data: any, blockType: string, isInput: boolean) {
8295
return data
8396
}
8497

98+
// Collapsible Input/Output component
99+
interface CollapsibleInputOutputProps {
100+
span: TraceSpan
101+
spanId: string
102+
}
103+
104+
function CollapsibleInputOutput({ span, spanId }: CollapsibleInputOutputProps) {
105+
const [inputExpanded, setInputExpanded] = useState(false)
106+
const [outputExpanded, setOutputExpanded] = useState(false)
107+
108+
return (
109+
<div className='mt-2 mr-4 mb-4 ml-8 space-y-3 overflow-hidden'>
110+
{/* Input Data - Collapsible */}
111+
{span.input && (
112+
<div>
113+
<button
114+
onClick={() => setInputExpanded(!inputExpanded)}
115+
className='flex items-center gap-2 mb-2 font-medium text-muted-foreground text-xs hover:text-foreground transition-colors'
116+
>
117+
{inputExpanded ? (
118+
<ChevronDown className='h-3 w-3' />
119+
) : (
120+
<ChevronRight className='h-3 w-3' />
121+
)}
122+
Input
123+
</button>
124+
{inputExpanded && (
125+
<div className='mb-2 overflow-hidden rounded-md bg-secondary/30 p-3'>
126+
<BlockDataDisplay data={span.input} blockType={span.type} isInput={true} />
127+
</div>
128+
)}
129+
</div>
130+
)}
131+
132+
{/* Output Data - Collapsible */}
133+
{span.output && (
134+
<div>
135+
<button
136+
onClick={() => setOutputExpanded(!outputExpanded)}
137+
className='flex items-center gap-2 mb-2 font-medium text-muted-foreground text-xs hover:text-foreground transition-colors'
138+
>
139+
{outputExpanded ? (
140+
<ChevronDown className='h-3 w-3' />
141+
) : (
142+
<ChevronRight className='h-3 w-3' />
143+
)}
144+
{span.status === 'error' ? 'Error Details' : 'Output'}
145+
</button>
146+
{outputExpanded && (
147+
<div className='mb-2 overflow-hidden rounded-md bg-secondary/30 p-3'>
148+
<BlockDataDisplay
149+
data={span.output}
150+
blockType={span.type}
151+
isInput={false}
152+
isError={span.status === 'error'}
153+
/>
154+
</div>
155+
)}
156+
</div>
157+
)}
158+
</div>
159+
)
160+
}
161+
85162
// Component to display block input/output data in a clean, readable format
86163
function BlockDataDisplay({
87164
data,
@@ -531,37 +608,8 @@ function TraceSpanItem({
531608
{/* Expanded content */}
532609
{expanded && (
533610
<div>
534-
{/* Block Input/Output Data */}
535-
{(span.input || span.output) && (
536-
<div className='mt-2 mr-4 mb-4 ml-8 space-y-3 overflow-hidden'>
537-
{/* Input Data */}
538-
{span.input && (
539-
<div>
540-
<h4 className='mb-2 font-medium text-muted-foreground text-xs'>Input</h4>
541-
<div className='mb-2 overflow-hidden rounded-md bg-secondary/30 p-3'>
542-
<BlockDataDisplay data={span.input} blockType={span.type} isInput={true} />
543-
</div>
544-
</div>
545-
)}
546-
547-
{/* Output Data */}
548-
{span.output && (
549-
<div>
550-
<h4 className='mb-2 font-medium text-muted-foreground text-xs'>
551-
{span.status === 'error' ? 'Error Details' : 'Output'}
552-
</h4>
553-
<div className='mb-2 overflow-hidden rounded-md bg-secondary/30 p-3'>
554-
<BlockDataDisplay
555-
data={span.output}
556-
blockType={span.type}
557-
isInput={false}
558-
isError={span.status === 'error'}
559-
/>
560-
</div>
561-
</div>
562-
)}
563-
</div>
564-
)}
611+
{/* Block Input/Output Data - Collapsible */}
612+
{(span.input || span.output) && <CollapsibleInputOutput span={span} spanId={spanId} />}
565613

566614
{/* Children and tool calls */}
567615
{/* Render child spans */}
@@ -613,9 +661,16 @@ function TraceSpanItem({
613661
startTime: new Date(toolStartTime).toISOString(),
614662
endTime: new Date(toolEndTime).toISOString(),
615663
status: toolCall.error ? 'error' : 'success',
664+
// Include tool call arguments as input and result as output
665+
input: toolCall.input,
666+
output: toolCall.error
667+
? { error: toolCall.error, ...(toolCall.output || {}) }
668+
: toolCall.output,
616669
}
617670

618-
// Tool calls typically don't have sub-items
671+
// Tool calls now have input/output data to display
672+
const hasToolCallData = Boolean(toolCall.input || toolCall.output || toolCall.error)
673+
619674
return (
620675
<TraceSpanItem
621676
key={`tool-${index}`}
@@ -627,7 +682,7 @@ function TraceSpanItem({
627682
workflowStartTime={workflowStartTime}
628683
onToggle={onToggle}
629684
expandedSpans={expandedSpans}
630-
hasSubItems={false}
685+
hasSubItems={hasToolCallData}
631686
/>
632687
)
633688
})}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/eval-input.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ export function EvalInput({
192192
onBlur={(e) => handleRangeBlur(metric.id, 'min', e.target.value)}
193193
disabled={isPreview || disabled}
194194
className='placeholder:text-muted-foreground/50'
195+
autoComplete='off'
196+
data-form-type='other'
197+
name='eval-range-min'
195198
/>
196199
</div>
197200
<div className='space-y-1'>
@@ -203,6 +206,9 @@ export function EvalInput({
203206
onBlur={(e) => handleRangeBlur(metric.id, 'max', e.target.value)}
204207
disabled={isPreview || disabled}
205208
className='placeholder:text-muted-foreground/50'
209+
autoComplete='off'
210+
data-form-type='other'
211+
name='eval-range-max'
206212
/>
207213
</div>
208214
</div>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/long-input.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,13 @@ export function LongInput({
302302
/>
303303
<div
304304
ref={overlayRef}
305-
className='pointer-events-none absolute inset-0 overflow-auto whitespace-pre-wrap break-words bg-transparent px-3 py-2 text-sm'
305+
className='pointer-events-none absolute inset-0 whitespace-pre-wrap break-words bg-transparent px-3 py-2 text-sm'
306306
style={{
307307
fontFamily: 'inherit',
308308
lineHeight: 'inherit',
309309
width: textareaRef.current ? `${textareaRef.current.clientWidth}px` : '100%',
310310
height: `${height}px`,
311+
overflow: 'hidden',
311312
}}
312313
>
313314
{formatDisplayText(value?.toString() ?? '', true)}

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/schedule/components/schedule-modal.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,9 @@ export function ScheduleModal({
436436
type='number'
437437
min='1'
438438
className='h-10'
439+
autoComplete='off'
440+
data-form-type='other'
441+
name='minutes-interval'
439442
/>
440443
</div>
441444
)}
@@ -455,6 +458,9 @@ export function ScheduleModal({
455458
min='0'
456459
max='59'
457460
className='h-10'
461+
autoComplete='off'
462+
data-form-type='other'
463+
name='hourly-minute'
458464
/>
459465
<p className='text-muted-foreground text-xs'>
460466
Specify which minute of each hour the workflow should run (0-59)
@@ -530,6 +536,9 @@ export function ScheduleModal({
530536
min='1'
531537
max='31'
532538
className='h-10'
539+
autoComplete='off'
540+
data-form-type='other'
541+
name='monthly-day'
533542
/>
534543
<p className='text-muted-foreground text-xs'>
535544
Specify which day of the month the workflow should run (1-31)

0 commit comments

Comments
 (0)