Repository navigation
Dato Agent: return full website URLs from Web Previews - #167
rodrigobarona wants to merge 1 commit into
Conversation
When an editor asks for a page link, call the Web Previews endpoints and return the full URL. Keep a saved copy of those endpoints for editors who cannot read plugin settings, and fall back to a configured website address plus the record slug. Co-authored-by: Cursor <cursoragent@cursor.com>
|
(Claude here [Opus 5.5]) TriageStatus: open, still relevant. Master ( Checks I ran on the PR head (
Overlap with other open Dato Agent PRs: I trial-merged #157, #160 and #161 on top of this branch. All three merge without conflicts. ReviewThe approach is sound. The POST payload matches what Web Previews sends ( Issues to fix before merge:
Minor: the endpoints now receive requests from the Dato Agent iframe origin. An endpoint that allows only the Web Previews origin through CORS will fail. The error reaches the model, so the failure stays visible. Recommended next step
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #164
When an editor asks for a page link, the agent calls
get_record_preview_links. That tool reads the Web Previews frontends and POSTs the same payload that plugin sends. Each endpoint has its own timeout, and a failure on one frontend does not drop the links from the others.Editors who cannot read plugin settings use a copy imported from the config screen. If no preview endpoint returns a URL, the agent builds one from the configured website address and the record slug, and says so. If neither is configured, it returns the slug and says the full URL is unavailable.
Test plan
npm testindato-agentMade with Cursor