Skip to content

Commit ed206ed

Browse files
authored
feat(table): expose position parameter for row insertion via copilot (#4326)
* feat(table): expose position parameter for row insertion via copilot * fix(table): validate positions length matches rows before service call * chore(table): regenerate tool types from updated copilot contract * fix(table): validate no duplicate positions in batch_insert_rows * chore(table): regenerate tool types with integer position schema
1 parent 3784f54 commit ed206ed

3 files changed

Lines changed: 141 additions & 91 deletions

File tree

apps/sim/lib/copilot/generated/tool-catalog-v1.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ export const EditWorkflow: ToolCatalogEntry = {
957957
params: {
958958
type: 'object',
959959
description:
960-
'Parameters for the operation. \nFor edit: {"inputs": {"temperature": 0.5}} NOT {"subBlocks": {"temperature": {"value": 0.5}}}\nFor add: {"type": "agent", "name": "My Agent", "inputs": {"model": "gpt-4o"}}\nFor delete: {} (empty object)',
960+
'Parameters for the operation. \nFor edit: {"inputs": {"temperature": 0.5}} NOT {"subBlocks": {"temperature": {"value": 0.5}}}\nFor add: {"type": "agent", "name": "My Agent", "inputs": {"model": "claude-sonnet-4-6"}}\nFor delete: {} (empty object)',
961961
},
962962
},
963963
required: ['operation_type', 'block_id', 'params'],
@@ -2868,6 +2868,17 @@ export const UserTable: ToolCatalogEntry = {
28682868
description:
28692869
'Pipe query_rows results directly to a NEW workspace file. The format is auto-inferred from the file extension: .csv → CSV, .json → JSON, .md → Markdown, etc. Use .csv for tabular exports. Use a flat path like "files/export.csv" — nested paths are not supported.',
28702870
},
2871+
position: {
2872+
type: 'integer',
2873+
description:
2874+
'Zero-based index at which to insert the row (optional, insert_row only). Rows at and below that index shift down. Omit to append at the end.',
2875+
},
2876+
positions: {
2877+
type: 'array',
2878+
description:
2879+
'Per-row insertion indices for batch_insert_rows (optional). Must be the same length as rows and contain no duplicates. Values are final positions in the resulting table — lower-index shifts are applied automatically. Omit to append all rows at the end.',
2880+
items: { type: 'integer' },
2881+
},
28712882
rowId: {
28722883
type: 'string',
28732884
description: 'Row ID (required for get_row, update_row, delete_row)',

0 commit comments

Comments
 (0)