import { Frame } from "@/components"; The `useCopilotAction` hook accepts a `render` method. Whatever is returned from this method will be rendered in the copilot chat window. In the example below, we take one of the actions we added in the [Todo List Copilot Tutorial](/tutorial-ai-todo-list-copilot/step-4-copilot-actions) and add a generative UI element to it: ```tsx {15-23} useCopilotAction({ name: "deleteTask", description: "Deletes a task from the todo list", parameters: [ { name: "id", type: "number", description: "The id of the task", required: true, }, ], handler: ({ id }) => { deleteTask(id); }, render: ({ status, args }) => (
{status !== "complete" &&

Deleting task with ID {args.id}...

}
✅ Task with ID {args.id} deleted.
), }); ``` **Rendering a Waiting Message** Sometimes, you might want to display a simple text message to let the user know that the action is in progress. To do this, simply return a string from the `render` method. For example:
```tsx useCopilotAction({ ..., render: "Processing..." }); ```