mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
fix(selectors): rename advanced subBlock IDs to avoid canonicalParamId clashes
Rename all advanced-mode subBlock IDs that matched their canonicalParamId to use a `manual*` prefix, following the established convention (e.g., manualSiteId, manualCredential). This prevents ambiguity between subBlock IDs and canonical parameter names in the serialization layer. 25 renames across 14 blocks: baseId→manualBaseId, tableId→manualTableId, workspace→manualWorkspace, objectType→manualObjectType, etc.
This commit is contained in:
@@ -72,7 +72,7 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
|
||||
required: { field: 'operation', value: 'listBases', not: true },
|
||||
},
|
||||
{
|
||||
id: 'baseId',
|
||||
id: 'manualBaseId',
|
||||
title: 'Base ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'baseId',
|
||||
@@ -96,7 +96,7 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
|
||||
required: { field: 'operation', value: ['listBases', 'listTables'], not: true },
|
||||
},
|
||||
{
|
||||
id: 'tableId',
|
||||
id: 'manualTableId',
|
||||
title: 'Table ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'tableId',
|
||||
|
||||
@@ -66,7 +66,7 @@ export const AsanaBlock: BlockConfig<AsanaResponse> = {
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'workspace',
|
||||
id: 'manualWorkspace',
|
||||
title: 'Workspace GID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'workspace',
|
||||
@@ -117,7 +117,7 @@ export const AsanaBlock: BlockConfig<AsanaResponse> = {
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'getTasks_workspace',
|
||||
id: 'manualGetTasksWorkspace',
|
||||
title: 'Workspace GID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'getTasks_workspace',
|
||||
|
||||
@@ -121,7 +121,7 @@ export const AttioBlock: BlockConfig<AttioResponse> = {
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'objectType',
|
||||
id: 'manualObjectType',
|
||||
title: 'Object Type',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'objectType',
|
||||
@@ -597,7 +597,7 @@ Return ONLY the JSON array. No explanations, no markdown, no extra text.
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'listIdOrSlug',
|
||||
id: 'manualListIdOrSlug',
|
||||
title: 'List ID or Slug',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'listIdOrSlug',
|
||||
|
||||
@@ -83,7 +83,7 @@ export const CalComBlock: BlockConfig<ToolResponse> = {
|
||||
required: { field: 'operation', value: 'calcom_create_booking' },
|
||||
},
|
||||
{
|
||||
id: 'eventTypeId',
|
||||
id: 'manualEventTypeId',
|
||||
title: 'Event Type ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'eventTypeId',
|
||||
@@ -301,7 +301,7 @@ Return ONLY the IANA timezone string - no explanations or quotes.`,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'eventTypeIdParam',
|
||||
id: 'manualEventTypeIdParam',
|
||||
title: 'Event Type ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'eventTypeIdParam',
|
||||
@@ -422,7 +422,7 @@ Return ONLY the IANA timezone string - no explanations or quotes.`,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'eventTypeScheduleId',
|
||||
id: 'manualEventTypeScheduleId',
|
||||
title: 'Schedule ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'eventTypeScheduleId',
|
||||
@@ -467,7 +467,7 @@ Return ONLY the IANA timezone string - no explanations or quotes.`,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'scheduleId',
|
||||
id: 'manualScheduleId',
|
||||
title: 'Schedule ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'scheduleId',
|
||||
|
||||
@@ -157,7 +157,7 @@ export const ConfluenceBlock: BlockConfig<ConfluenceResponse> = {
|
||||
required: { field: 'operation', value: ['create', 'get_space'] },
|
||||
},
|
||||
{
|
||||
id: 'spaceId',
|
||||
id: 'manualSpaceId',
|
||||
title: 'Space ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'spaceId',
|
||||
|
||||
@@ -124,7 +124,7 @@ Return ONLY the SQL query - no explanations, no quotes, no extra text.`,
|
||||
required: { field: 'operation', value: ['list_tables', 'get_table', 'insert_rows'] },
|
||||
},
|
||||
{
|
||||
id: 'datasetId',
|
||||
id: 'manualDatasetId',
|
||||
title: 'Dataset ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'datasetId',
|
||||
@@ -149,7 +149,7 @@ Return ONLY the SQL query - no explanations, no quotes, no extra text.`,
|
||||
required: { field: 'operation', value: ['get_table', 'insert_rows'] },
|
||||
},
|
||||
{
|
||||
id: 'tableId',
|
||||
id: 'manualTableId',
|
||||
title: 'Table ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'tableId',
|
||||
|
||||
@@ -66,7 +66,7 @@ export const GoogleTasksBlock: BlockConfig<GoogleTasksResponse> = {
|
||||
condition: { field: 'operation', value: 'list_task_lists', not: true },
|
||||
},
|
||||
{
|
||||
id: 'taskListId',
|
||||
id: 'manualTaskListId',
|
||||
title: 'Task List ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'taskListId',
|
||||
|
||||
@@ -146,7 +146,7 @@ export const JiraServiceManagementBlock: BlockConfig<JsmResponse> = {
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'serviceDeskId',
|
||||
id: 'manualServiceDeskId',
|
||||
title: 'Service Desk ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'serviceDeskId',
|
||||
@@ -195,7 +195,7 @@ export const JiraServiceManagementBlock: BlockConfig<JsmResponse> = {
|
||||
condition: { field: 'operation', value: ['create_request', 'get_request_type_fields'] },
|
||||
},
|
||||
{
|
||||
id: 'requestTypeId',
|
||||
id: 'manualRequestTypeId',
|
||||
title: 'Request Type ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'requestTypeId',
|
||||
|
||||
@@ -108,7 +108,7 @@ export const MicrosoftPlannerBlock: BlockConfig<MicrosoftPlannerResponse> = {
|
||||
|
||||
// Plan ID - advanced mode
|
||||
{
|
||||
id: 'planId',
|
||||
id: 'manualPlanId',
|
||||
title: 'Plan ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'planId',
|
||||
@@ -146,7 +146,7 @@ export const MicrosoftPlannerBlock: BlockConfig<MicrosoftPlannerResponse> = {
|
||||
type: 'short-input',
|
||||
placeholder: 'Enter the task ID',
|
||||
condition: { field: 'operation', value: ['read_task'] },
|
||||
dependsOn: ['credential', 'planId'],
|
||||
dependsOn: ['credential', 'manualPlanId'],
|
||||
mode: 'advanced',
|
||||
canonicalParamId: 'readTaskId',
|
||||
},
|
||||
|
||||
@@ -69,7 +69,7 @@ export const NotionBlock: BlockConfig<NotionResponse> = {
|
||||
required: { field: 'operation', value: ['notion_read', 'notion_write'] },
|
||||
},
|
||||
{
|
||||
id: 'pageId',
|
||||
id: 'manualPageId',
|
||||
title: 'Page ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'pageId',
|
||||
@@ -100,7 +100,7 @@ export const NotionBlock: BlockConfig<NotionResponse> = {
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'databaseId',
|
||||
id: 'manualDatabaseId',
|
||||
title: 'Database ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'databaseId',
|
||||
@@ -137,7 +137,7 @@ export const NotionBlock: BlockConfig<NotionResponse> = {
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'parentId',
|
||||
id: 'manualParentId',
|
||||
title: 'Parent Page ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'parentId',
|
||||
|
||||
@@ -114,7 +114,7 @@ export const PipedriveBlock: BlockConfig<PipedriveResponse> = {
|
||||
required: { field: 'operation', value: 'get_pipeline_deals' },
|
||||
},
|
||||
{
|
||||
id: 'pipeline_id',
|
||||
id: 'manualPipelineId',
|
||||
title: 'Pipeline ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'pipeline_id',
|
||||
|
||||
@@ -126,7 +126,7 @@ export const SharepointBlock: BlockConfig<SharepointResponse> = {
|
||||
condition: { field: 'operation', value: ['read_list', 'update_list', 'add_list_items'] },
|
||||
},
|
||||
{
|
||||
id: 'listId',
|
||||
id: 'manualListId',
|
||||
title: 'List ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'listId',
|
||||
|
||||
@@ -84,7 +84,7 @@ export const TrelloBlock: BlockConfig<ToolResponse> = {
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'boardId',
|
||||
id: 'manualBoardId',
|
||||
title: 'Board ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'boardId',
|
||||
|
||||
@@ -104,7 +104,7 @@ export const ZoomBlock: BlockConfig<ZoomResponse> = {
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'meetingId',
|
||||
id: 'manualMeetingId',
|
||||
title: 'Meeting ID',
|
||||
type: 'short-input',
|
||||
canonicalParamId: 'meetingId',
|
||||
|
||||
@@ -246,9 +246,9 @@ function extractExtendedContext(
|
||||
siteId: getStringValue('siteId'),
|
||||
collectionId: getStringValue('collectionId'),
|
||||
spreadsheetId: getStringValue('spreadsheetId') || getStringValue('fileId'),
|
||||
baseId: getStringValue('baseId') || getStringValue('baseSelector'),
|
||||
datasetId: getStringValue('datasetId') || getStringValue('datasetSelector'),
|
||||
serviceDeskId: getStringValue('serviceDeskId') || getStringValue('serviceDeskSelector'),
|
||||
baseId: getStringValue('manualBaseId') || getStringValue('baseSelector'),
|
||||
datasetId: getStringValue('manualDatasetId') || getStringValue('datasetSelector'),
|
||||
serviceDeskId: getStringValue('manualServiceDeskId') || getStringValue('serviceDeskSelector'),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user