fix: update createTemplateAction example

Signed-off-by: Peter Macdonald <peterm4c@pm.me>
This commit is contained in:
Peter Macdonald
2025-04-30 18:16:09 +02:00
parent a182209fad
commit 247bd4fe21
@@ -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