Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(cursor): resolve build errors in cursor block and download artifa…
…ct types

- Remove invalid wandConfig with unsupported generationType 'json-array' from promptImages subBlock
- Remove invalid 'optional' property from summary output definition
- Split DownloadArtifactResponse into v1 (content/metadata) and v2 (file) response types
  • Loading branch information
waleedlatif1 committed Apr 5, 2026
commit edb2461786619a310a85b9fdfc6c7d4d273a3e27
8 changes: 1 addition & 7 deletions apps/sim/blocks/blocks/cursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ export const CursorBlock: BlockConfig<CursorResponse> = {
placeholder: '[{"data": "base64...", "dimension": {"width": 1024, "height": 768}}]',
condition: { field: 'operation', value: ['cursor_launch_agent', 'cursor_add_followup'] },
mode: 'advanced',
wandConfig: {
generationType: 'json-array',
placeholder: 'Describe the images to include with the prompt',
prompt:
'Generate a JSON array of image objects with base64 data and dimensions. Return ONLY the JSON array - no explanations, no extra text.',
},
},
{
id: 'model',
Expand Down Expand Up @@ -258,7 +252,7 @@ export const CursorV2Block: BlockConfig<CursorResponse> = {
status: { type: 'string', description: 'Agent status' },
source: { type: 'json', description: 'Agent source repository info' },
target: { type: 'json', description: 'Agent target branch/PR info' },
summary: { type: 'string', description: 'Agent summary', optional: true },
summary: { type: 'string', description: 'Agent summary' },
createdAt: { type: 'string', description: 'Agent creation timestamp' },
agents: { type: 'json', description: 'Array of agent objects (list operation)' },
nextCursor: { type: 'string', description: 'Pagination cursor (list operation)' },
Expand Down
18 changes: 5 additions & 13 deletions apps/sim/tools/cursor/download_artifact.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import type { DownloadArtifactParams, DownloadArtifactResponse } from '@/tools/cursor/types'
import type {
DownloadArtifactParams,
DownloadArtifactResponse,
DownloadArtifactV2Response,
} from '@/tools/cursor/types'
import type { ToolConfig } from '@/tools/types'

const downloadArtifactBase = {
Expand Down Expand Up @@ -74,18 +78,6 @@ export const downloadArtifactTool: ToolConfig<DownloadArtifactParams, DownloadAr
},
}
Comment thread
waleedlatif1 marked this conversation as resolved.

interface DownloadArtifactV2Response {
success: boolean
output: {
file: {
name: string
mimeType: string
data: string
size: number
}
}
}

export const downloadArtifactV2Tool: ToolConfig<
DownloadArtifactParams,
DownloadArtifactV2Response
Expand Down
8 changes: 8 additions & 0 deletions apps/sim/tools/cursor/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ export interface DownloadArtifactParams extends BaseCursorParams {
}

export interface DownloadArtifactResponse extends ToolResponse {
output: {
content: string
metadata: Record<string, unknown>
}
}

export interface DownloadArtifactV2Response extends ToolResponse {
output: {
file: {
name: string
Expand All @@ -222,3 +229,4 @@ export type CursorResponse =
| ListRepositoriesResponse
| ListArtifactsResponse
| DownloadArtifactResponse
| DownloadArtifactV2Response
Loading