LibreChat/client/src/utils
Danny Avila 7c1ee242eb
🪄 feat: Code Artifacts (#3798)
* feat: Add CodeArtifacts component to Beta settings tab

* chore: Update npm dependency to @codesandbox/sandpack-react@2.18.2

* WIP: artifacts first pass

* WIP first pass remark-directive

* chore: revert markdown to original component + new artifacts rendering

* refactor: first pass rewrite

* refactor: add throttling

* first pass styling

* style: Add Radix Tabs, more styling changes

* feat: second pass

* style: code styling

* fix: package markdown fixes

* feat: Add useEffect hook to Artifacts component for visibility control, slide in animation

* fix: only set artifact if there is content

* refactor: typing and make latest artifact active if the number of artifacts changed

* feat: artifacts + shadcnui

* feat: Add Copy Code button to Artifacts component

* feat: first pass streaming updates

* refactor: optimize ordering of artifacts in Artifacts component

* refactor: optimize ordering of artifacts and add latest artifact activation in Artifacts component

* refactor: add order prop to Artifact

* feat: update to latest, use update time for ordering

* refactor: optimize ordering of artifacts and activate latest artifact in Artifacts component

* wip: remove thinking text and artifact formatting if empty

* refactor: optimize Markdown rendering and add support for code artifacts

* feat: global state for current artifact Id and set on artifact preview click

* refactor: Rename CodePreview component to ArtifactButton

* refactor: apply growth to artifact frame so artifact preview can take full space

* refactor: remove artifactIdsState

* refactor: nullify artifact state and reset on empty conversation

* feat: reset artifact state on conversation change

* feat: artifacts system prompt in backend

* refactor: update UI artifact toggle label to match localization key

* style: remove ArtifactButton inline-block styling

* feat: memoize ArtifactPreview, add html support

* refactor: abstract out components

* chore: bump react-resizable-panel

* refactor: resizable panel order props

* fix: side panel resizing crashes

* style: temporarily remove scrolling, add better styling

* chore: remove thinking for now

* chore: preprocess artifacts for now

* feat: Add auto scrolling to CodeMarkdown (artifacts)

* feat: autoswitch to preview

* feat: auto switch to code, adjust prompt, remove unused code

* feat: refresh button

* feat: open/close artifacts

* wip: mermaid

* refactor: w-fit Artifact button

* chore: organize code

* feat: first pass mermaid

* refactor: improve panning logic in MermaidDiagram component

* feat: center/zoom on first render

* refactor: add centering with reset button

* style: mermaid styling

* refactor: add back MermaidDiagram

* fix: static/html template

* fix: mermaid

* add examples to artifacts prompt

* refactor: fix CodeBar plugin prop logic

* refactor: remove unnecessary mention of artifacts when not requested

* fix: remove preprocessCodeArtifacts function and fix imports

* feat: improve artifacts guidelines and remove unnecessary mentions

* refactor: improve artifacts guidelines and remove unnecessary mentions

* chore: uninstall unused packages

* chore: bump vite

* chore: update three dependency to version 0.167.1

* refactor: move beta settings, add additional artifacts toggles

* feat: artifacts mode toggles

* refactor: adjust prompt

* feat: shadcnui instructions

* feat: code artifacts custom prompt mode

* chore: Update artifacts UI labels and instructions localizations

* refactor: Remove unused code in Markdown component
2024-08-27 17:03:16 -04:00
..
artifacts.spec.ts 🪄 feat: Code Artifacts (#3798) 2024-08-27 17:03:16 -04:00
artifacts.ts 🪄 feat: Code Artifacts (#3798) 2024-08-27 17:03:16 -04:00
buildDefaultConvo.ts 🤖 feat: OpenAI Assistants v2 (initial support) (#2781) 2024-05-19 12:56:55 -04:00
buildTree.ts 🌿 feat: Multi-response Streaming (#3191) 2024-06-25 03:02:38 -04:00
cleanupPreset.ts feat: Assistants API, General File Support, Side Panel, File Explorer (#1696) 2024-02-13 20:42:27 -05:00
cn.ts 🪟 fix+feat: General UI Enhancements (#2619) 2024-05-09 17:46:16 -04:00
collection.ts 🗨️ feat: Prompt Slash Commands (#3219) 2024-06-27 17:34:48 -04:00
conversationTags.spec.ts 🔖 feat: Conversation Bookmarks (#3344) 2024-07-29 10:45:59 -04:00
conversationTags.ts 🔖 feat: Conversation Bookmarks (#3344) 2024-07-29 10:45:59 -04:00
convos.fakeData.ts 📋 fix: Ensure Textarea Resizes in Clipboard Edge Case (#2268) 2024-04-01 13:40:21 -04:00
convos.spec.ts 🚑 fix: resolve missing data in infinite queries (#2852) 2024-05-24 12:38:38 -04:00
convos.ts 🤲 a11y: Sidebar Text Contrast (#3665) 2024-08-16 13:50:47 -04:00
endpoints.spec.ts 🔧 fix: Improve Endpoint Handling and Address Edge Cases (#1486) 2024-01-04 10:17:15 -05:00
endpoints.ts 🌿 feat: Multi-response Streaming (#3191) 2024-06-25 03:02:38 -04:00
files.ts 🪄 feat: Code Artifacts (#3798) 2024-08-27 17:03:16 -04:00
getDefaultEndpoint.ts 🔧 fix: Improve Endpoint Handling and Address Edge Cases (#1486) 2024-01-04 10:17:15 -05:00
getLocalStorageItems.ts 🌿 feat: Multi-response Streaming (#3191) 2024-06-25 03:02:38 -04:00
getLoginError.ts 📧 feat: email verification (#2344) 2024-06-07 15:06:47 -04:00
index.ts 🧪 feat: Prompt Dropdown Variable; style: Add Markdown Support (#3681) 2024-08-18 05:52:05 -04:00
json.ts feat: Google Gemini ❇️ (#1355) 2023-12-15 02:18:07 -05:00
languages.ts refactor: Settings/Presets UI Restructure, convert many files to TS (#740) 2023-08-04 13:56:44 -04:00
latex.spec.ts 🧮 feat: Improve LaTeX rendering consistency (#3763) 2024-08-23 13:45:27 -04:00
latex.ts 🧮 feat: Improve LaTeX rendering consistency (#3763) 2024-08-23 13:45:27 -04:00
logger.ts 🖱️ fix: Message Scrolling UX; refactor: Frontend UX/DX Optimizations (#3733) 2024-08-21 18:18:45 -04:00
map.ts 🤖 feat: Model Specs & Save Tools per Convo/Preset (#2578) 2024-04-30 22:11:48 -04:00
mermaid.ts 🪄 feat: Code Artifacts (#3798) 2024-08-27 17:03:16 -04:00
messages.ts 🔖 feat: Enhance Bookmarks UX, add RBAC, toggle via librechat.yaml (#3747) 2024-08-22 17:09:05 -04:00
presets.ts 📧 feat: Mention "@" Command Popover (#2635) 2024-05-07 13:13:55 -04:00
promptGroups.ts 🗨️ feat: Prompt Slash Commands (#3219) 2024-06-27 17:34:48 -04:00
prompts.ts 🗨️ feat: Prompt Slash Commands (#3219) 2024-06-27 17:34:48 -04:00
resetConvo.ts 🐛 fix: Update resetConvo.ts (#3105) 2024-06-21 10:13:21 -04:00
shadcn.ts 🪄 feat: Code Artifacts (#3798) 2024-08-27 17:03:16 -04:00
sharedLink.fakeData.ts 🚀 feat: Shared Links (#2772) 2024-05-17 18:13:32 -04:00
sharedLink.spec.ts 🚀 feat: Shared Links (#2772) 2024-05-17 18:13:32 -04:00
sharedLink.ts 🗨️ feat: Prompts (#3131) 2024-06-20 20:24:32 -04:00
textarea.ts 🌿 feat: Multi-response Streaming (#3191) 2024-06-25 03:02:38 -04:00
theme.ts 🅰️ feat: Dynamic Font Size (#3568) 2024-08-07 14:23:33 -04:00
validateIframe.ts 📜 refactor: Optimize Longer Message Thread Performance (#3610) 2024-08-11 06:08:08 -04:00