From d5b9e520c1d192663bca5ab442ef62f07529e7b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Coletta?= Date: Tue, 14 Jan 2025 22:18:50 +0100 Subject: [PATCH] feat: add copilot configuration --- ww-config.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ww-config.js b/ww-config.js index 126dcdc..40f2343 100644 --- a/ww-config.js +++ b/ww-config.js @@ -6,7 +6,23 @@ export default { code: 'downloadCSV', /* wwEditor:start */ edit: () => import('./src/components/DownloadCSV.vue'), + copilot: { + description: 'Downloads data as a CSV file. If the data is an array of objects, it will create columns for all unique keys. If the data is an array of primitive values, it will create a single column.', + returns: 'void', + schema: { + data: { + type: 'array', + description: 'The data to export to CSV format. Can be an array of objects or primitive values', + bindable: true + }, + fileName: { + type: 'string', + description: 'The name of the file to download (without .csv extension)', + bindable: true + } + } + }, /* wwEditor:end */ }, ], -}; +}; \ No newline at end of file