Skip to content

Commit edb2461

Browse files
committed
fix(cursor): resolve build errors in cursor block and download artifact 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
1 parent 6de6979 commit edb2461

File tree

3 files changed

+14
-20
lines changed

3 files changed

+14
-20
lines changed

apps/sim/blocks/blocks/cursor.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ export const CursorBlock: BlockConfig<CursorResponse> = {
6767
placeholder: '[{"data": "base64...", "dimension": {"width": 1024, "height": 768}}]',
6868
condition: { field: 'operation', value: ['cursor_launch_agent', 'cursor_add_followup'] },
6969
mode: 'advanced',
70-
wandConfig: {
71-
generationType: 'json-array',
72-
placeholder: 'Describe the images to include with the prompt',
73-
prompt:
74-
'Generate a JSON array of image objects with base64 data and dimensions. Return ONLY the JSON array - no explanations, no extra text.',
75-
},
7670
},
7771
{
7872
id: 'model',
@@ -258,7 +252,7 @@ export const CursorV2Block: BlockConfig<CursorResponse> = {
258252
status: { type: 'string', description: 'Agent status' },
259253
source: { type: 'json', description: 'Agent source repository info' },
260254
target: { type: 'json', description: 'Agent target branch/PR info' },
261-
summary: { type: 'string', description: 'Agent summary', optional: true },
255+
summary: { type: 'string', description: 'Agent summary' },
262256
createdAt: { type: 'string', description: 'Agent creation timestamp' },
263257
agents: { type: 'json', description: 'Array of agent objects (list operation)' },
264258
nextCursor: { type: 'string', description: 'Pagination cursor (list operation)' },

apps/sim/tools/cursor/download_artifact.ts

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import type { DownloadArtifactParams, DownloadArtifactResponse } from '@/tools/cursor/types'
1+
import type {
2+
DownloadArtifactParams,
3+
DownloadArtifactResponse,
4+
DownloadArtifactV2Response,
5+
} from '@/tools/cursor/types'
26
import type { ToolConfig } from '@/tools/types'
37

48
const downloadArtifactBase = {
@@ -74,18 +78,6 @@ export const downloadArtifactTool: ToolConfig<DownloadArtifactParams, DownloadAr
7478
},
7579
}
7680

77-
interface DownloadArtifactV2Response {
78-
success: boolean
79-
output: {
80-
file: {
81-
name: string
82-
mimeType: string
83-
data: string
84-
size: number
85-
}
86-
}
87-
}
88-
8981
export const downloadArtifactV2Tool: ToolConfig<
9082
DownloadArtifactParams,
9183
DownloadArtifactV2Response

apps/sim/tools/cursor/types.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,13 @@ export interface DownloadArtifactParams extends BaseCursorParams {
199199
}
200200

201201
export interface DownloadArtifactResponse extends ToolResponse {
202+
output: {
203+
content: string
204+
metadata: Record<string, unknown>
205+
}
206+
}
207+
208+
export interface DownloadArtifactV2Response extends ToolResponse {
202209
output: {
203210
file: {
204211
name: string
@@ -222,3 +229,4 @@ export type CursorResponse =
222229
| ListRepositoriesResponse
223230
| ListArtifactsResponse
224231
| DownloadArtifactResponse
232+
| DownloadArtifactV2Response

0 commit comments

Comments
 (0)