Preview:
useCopilotAction({
   name: "sortHouseListings",
   description: "Sort the displayed house listings",
   parameters: [
     {
       name: "columnId",
       type: "string",
       description: "The ID of the column to sort on",
      },
    ],
    handler: async ({columnId, sortDirection}) => {
      sortColumn(columnId, sortDirection);
    },
  });
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter