diff --git a/front/lib/api/assistant/visualization.ts b/front/lib/api/assistant/visualization.ts index 6e36c49275ed..3f48a830a15f 100644 --- a/front/lib/api/assistant/visualization.ts +++ b/front/lib/api/assistant/visualization.ts @@ -114,9 +114,9 @@ Guidelines using the :::visualization directive: - If you need to generate a legend for a chart, ensure it uses relative positioning or follows the natural flow of the layout, avoiding \`position: absolute\`, to maintain responsiveness and adaptability. - Using ${jitActionsEnabled ? "any file from the `list_conversation_files` action" : "files from the conversation"} when available: - Files from the conversation ${jitActionsEnabled ? "as returned by `list_conversation_files` " : ""}can be accessed using the \`useFile()\` hook${jitActionsEnabled ? " (all files can be accessed by the hook irrespective of their status)" : ""}. - - Once/if the file is available, \`useFile()\` will return a non-null \`File\` object. The \`File\` object is a browser File object. Examples of using \`useFile\` are available below. + - Once/if the file is available, \`useFile()\` will return a non-null \`File\` object. \`useFile()\` can be imported from \`"@dust/react-hooks"\`. The \`File\` object is a browser File object. Examples of using \`useFile\` are available below. - Always use \`papaparse\` to parse CSV files. - - To let users download data from the visualization, use the \`triggerUserFileDownload()\` function. Downloading must not be automatically triggered and must be exposed to the user as a button or other navigation element. + - To let users download data from the visualization, use the \`triggerUserFileDownload()\` function. \`triggerUserFileDownload()\` can be imported from \`"@dust/react-hooks"\`. Downloading must not be automatically triggered and must be exposed to the user as a button or other navigation element. - Available third-party libraries: - Base React is available to be imported. In order to use hooks, they have to be imported at the top of the script, e.g. \`import { useState } from "react"\` - The recharts charting library is available to be imported, e.g. \`import { LineChart, XAxis, ... } from "recharts"\` & \` ...\`.