From 247bd4fe219eefec321c336e9920c398565748e5 Mon Sep 17 00:00:00 2001 From: Peter Macdonald Date: Wed, 30 Apr 2025 18:16:09 +0200 Subject: [PATCH] fix: update createTemplateAction example Signed-off-by: Peter Macdonald --- .../software-templates/writing-custom-actions.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/features/software-templates/writing-custom-actions.md b/docs/features/software-templates/writing-custom-actions.md index 163df094a1..51500f1c19 100644 --- a/docs/features/software-templates/writing-custom-actions.md +++ b/docs/features/software-templates/writing-custom-actions.md @@ -183,7 +183,19 @@ export const examples: TemplateExample[] = [ Add the example to the `createTemplateAction` under the object property `examples`: ```ts -return createTemplateAction<{ contents: string; filename: string }>({id: 'acme:file:create', description: 'Create an Acme file', examples, ...}); +return createTemplateAction({ + id: 'acme:file:create', + description: 'Create an Acme file', + schema: { + input: { + contents: d => d.string().describe('The contents of the file'), + filename: d => + d.string().describe('The filename of the file that will be created'), + }, + }, + examples: examples, + // ...rest of the action configuration +}); ``` ### The context object