Repository navigation
🔗 feat: Link Custom Artifact Mode to Its Instructions Guide - #17021
danny-avila wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4769a9c851
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| const ARTIFACTS_CUSTOM_DOCS_URL = | ||
| 'https://www.librechat.ai/docs/features/artifacts#custom-instructions'; |
There was a problem hiding this comment.
Point the link at an existing docs anchor
When a user selects Custom and clicks “Learn more,” the #custom-instructions fragment has no matching heading or anchor in the current Artifacts documentation, so the browser opens the top of the page instead of the relevant guidance. The Custom-mode text currently lives under #enable-artifacts-for-an-agent; target that section or add the intended anchor to the docs before shipping this link.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing this one. The #custom-instructions anchor is added by the companion docs PR, LibreChat-AI/docs#825 (## Custom Instructions on features/artifacts), and that section is the guidance this link exists to reach. Pointing at #enable-artifacts-for-an-agent would land on the one-line mode list that left users stuck in the first place, and would need a second client change once the docs merge. The docs PR is meant to merge first; until it does, the fragment simply resolves to the top of the same artifacts page, so the link is never broken. The PR description states this dependency.
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Pull Request
Summary
The Artifacts tool in the agent builder has a Custom mode that keeps artifact rendering on but injects none of LibreChat's artifact instructions. Its info text told users to "write your own" instructions without saying what those instructions need to contain, so someone picking Custom had no way to learn the
:::artifact{identifier type title}syntax, the supported types, or the React runtime's import list, and their agent quietly stopped producing artifacts.This PR adds a Learn more link to the Custom mode info that opens the new Custom Instructions section of the artifacts docs in a new tab, and rewords the info to say that the agent's instructions must teach the artifact syntax and the types it may use. Normal and shadcn/ui modes are unchanged.
The link points to
https://www.librechat.ai/docs/features/artifacts#custom-instructions. That anchor is added by LibreChat-AI/docs#825, which is not merged yet: until it is, the link opens the existing artifacts page without the section. That PR documents the three modes, the artifact syntax, each supported type's requirements (verified against the current renderer), the React runtime's available imports and shadcn/ui paths, and a copy-paste minimal template derived from the built-in prompt.How it works
Each entry in
ARTIFACT_MODEScan now carry adocslink (URL plus a localized accessible-name key); only Custom sets one.ArtifactsConfigrenders it inline after the active mode's info text:The visible text is "Learn more"; the accessible name is "Learn more about writing custom artifact instructions (opens in a new tab)", which starts with the visible label. The anchor follows the existing doc-link pattern in the agent builder (
SidePanel/Agents/Search/InputSection.tsx), using the semantictext-link/text-link-hoverroles.New English keys:
com_ui_learn_more,com_ui_artifacts_mode_custom_docs. Updated:com_ui_artifacts_mode_custom_info.Type of change
Testing
#custom-instructionsin a new tab.Tested environments/configuration:
Automated tests:
BuiltinSection.spec.tsx: Custom renders the link with the docs href,target="_blank",rel="noopener noreferrer", the localized accessible name and visible text, inside the info paragraph; Normal and shadcn/ui render no link; switching the radio to Custom reveals it.cd client && npx jest src/components/SidePanel/Agents/Tools/ItemDialog/__tests__/BuiltinSection.spec.tsx: 10 passed.cd client && npm run typecheck: clean.Screenshots / recordings
Agent builder, Artifacts tool settings with Custom selected (dark mode; no color or theme changes, the link uses the existing
text-linkrole).dev)Risk / compatibility
None. Client-only copy and a static external link; no API, schema or configuration changes.
Checklist