Skip to content

Add linkPolicy to HighlightsContentsOptions#115

Open
LiamHz wants to merge 1 commit intomasterfrom
devin/1767138125-add-linkpolicy-highlights
Open

Add linkPolicy to HighlightsContentsOptions#115
LiamHz wants to merge 1 commit intomasterfrom
devin/1767138125-add-linkpolicy-highlights

Conversation

@LiamHz
Copy link
Copy Markdown
Contributor

@LiamHz LiamHz commented Dec 30, 2025

Summary

Adds linkPolicy option to highlights configuration across all SDKs and documentation. This allows users to control whether links are stripped or kept in highlight snippets.

Changes:

  • monorepo: Added linkPolicy?: "strip" | "keep" to HighlightsContentsOptions in shared types
  • docs: Added linkPolicy enum field to highlights schema in exa-spec.yaml
  • exa-js: Added linkPolicy to HighlightsContentsOptions type with JSDoc
  • exa-py: Added link_policy: Literal["strip", "keep"] to HighlightsContentsOptions

The backend (vulcan) already supports this field via UrlPolicySchema in requests.ts.

Review & Testing Checklist for Human

  • Verify backend actually processes linkPolicy correctly (vulcan has the schema but confirm it's wired through to snippet generation)
  • Test with linkPolicy: "strip" via API call to confirm links are removed from highlights
  • Confirm default behavior matches docs ("keep" by default)

Notes

This is a type-only change exposing an existing backend capability to SDK users.

Link to Devin run: https://app.devin.ai/sessions/3d9a8bd68822476a9383ea8a4631e8e1
Requested by: liam@exa.ai (@LiamHz)

Co-Authored-By: liam@exa.ai <liam.hinzman@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant