diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/mcp-dynamic-args/mcp-dynamic-args.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/mcp-dynamic-args/mcp-dynamic-args.tsx
index 1eb5b15cd9..d40f8d0302 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/mcp-dynamic-args/mcp-dynamic-args.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/mcp-dynamic-args/mcp-dynamic-args.tsx
@@ -1,5 +1,6 @@
import { useCallback } from 'react'
import { useParams } from 'next/navigation'
+import { formatDisplayText } from '@/components/ui/formatted-text'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import {
@@ -14,6 +15,7 @@ import { Switch } from '@/components/ui/switch'
import { Textarea } from '@/components/ui/textarea'
import { cn } from '@/lib/utils'
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/hooks/use-sub-block-value'
+import { useAccessibleReferencePrefixes } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes'
import { useMcpTools } from '@/hooks/use-mcp-tools'
import { formatParameterLabel } from '@/tools/params'
@@ -37,6 +39,7 @@ export function McpDynamicArgs({
const { mcpTools } = useMcpTools(workspaceId)
const [selectedTool] = useSubBlockValue(blockId, 'tool')
const [toolArgs, setToolArgs] = useSubBlockValue(blockId, subBlockId)
+ const accessiblePrefixes = useAccessibleReferencePrefixes(blockId)
const selectedToolConfig = mcpTools.find((tool) => tool.id === selectedTool)
const toolSchema = selectedToolConfig?.inputSchema
@@ -180,7 +183,7 @@ export function McpDynamicArgs({
case 'long-input':
return (
-
+
)
@@ -203,9 +212,10 @@ export function McpDynamicArgs({
paramName.toLowerCase().includes('password') ||
paramName.toLowerCase().includes('token')
const isNumeric = paramSchema.type === 'number' || paramSchema.type === 'integer'
+ const isTextInput = !isPassword && !isNumeric
return (
-
+
+ {isTextInput && (
+
+
+ {formatDisplayText(value?.toString() || '', {
+ accessiblePrefixes,
+ highlightAll: !accessiblePrefixes,
+ })}
+
+
+ )}
)
}
diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/response/response-format.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/response/response-format.tsx
index 3f14840141..10f80d075f 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/response/response-format.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/response/response-format.tsx
@@ -3,7 +3,7 @@ import { ResponseFormat as SharedResponseFormat } from '@/app/workspace/[workspa
export interface JSONProperty {
id: string
key: string
- type: 'string' | 'number' | 'boolean' | 'object' | 'array'
+ type: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file'
value?: any
collapsed?: boolean
}
diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/starter/input-format.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/starter/input-format.tsx
index 5741b857ec..5918d54339 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/starter/input-format.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/starter/input-format.tsx
@@ -1,5 +1,5 @@
import { useEffect, useRef, useState } from 'react'
-import { ChevronDown, Plus, Trash } from 'lucide-react'
+import { ChevronDown, Paperclip, Plus, Trash } from 'lucide-react'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
import {
@@ -27,7 +27,7 @@ import { useAccessibleReferencePrefixes } from '@/app/workspace/[workspaceId]/w/
interface Field {
id: string
name: string
- type?: 'string' | 'number' | 'boolean' | 'object' | 'array'
+ type?: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'files'
value?: string
collapsed?: boolean
}
@@ -339,37 +339,46 @@ export function FieldFormat({
onClick={() => updateField(field.id, 'type', 'string')}
className='cursor-pointer'
>
-
Aa
+
Aa
String
updateField(field.id, 'type', 'number')}
className='cursor-pointer'
>
- 123
+ 123
Number
updateField(field.id, 'type', 'boolean')}
className='cursor-pointer'
>
- 0/1
+ 0/1
Boolean
updateField(field.id, 'type', 'object')}
className='cursor-pointer'
>
- {'{}'}
+ {'{}'}
Object
updateField(field.id, 'type', 'array')}
className='cursor-pointer'
>
- []
+ []
Array
+
updateField(field.id, 'type', 'files')}
+ className='cursor-pointer'
+ >
+
+ Files
+
diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/table.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/table.tsx
index 605c818268..4f996cfc8c 100644
--- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/table.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/table.tsx
@@ -8,6 +8,7 @@ import { Input } from '@/components/ui/input'
import { checkTagTrigger, TagDropdown } from '@/components/ui/tag-dropdown'
import { cn } from '@/lib/utils'
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/hooks/use-sub-block-value'
+import { useAccessibleReferencePrefixes } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes'
interface TableProps {
blockId: string
@@ -34,6 +35,7 @@ export function Table({
const params = useParams()
const workspaceId = params.workspaceId as string
const [storeValue, setStoreValue] = useSubBlockValue
(blockId, subBlockId)
+ const accessiblePrefixes = useAccessibleReferencePrefixes(blockId)
// Use preview value when in preview mode, otherwise use store value
const value = isPreview ? previewValue : storeValue
@@ -240,7 +242,12 @@ export function Table({
data-overlay={cellKey}
className='pointer-events-none absolute inset-0 flex items-center overflow-hidden bg-transparent px-3 text-sm'
>
- {formatDisplayText(cellValue)}
+
+ {formatDisplayText(cellValue, {
+ accessiblePrefixes,
+ highlightAll: !accessiblePrefixes,
+ })}
+