Skip to content

feat(ai): read explicit URLs in Ask AI and preserve insertions - #144

Merged
LeoStehlik merged 1 commit into
masterfrom
feat/ai-explicit-url-sources
Nov 21, 2026
Merged

LeoStehlik merged 1 commit into
masterfrom
feat/ai-explicit-url-sources

Conversation

@LeoStehlik

Copy link
Copy Markdown
Contributor

Description

Ask AI can now read public URLs supplied in the custom instruction, so a request such as “summarize this GitHub page” reaches the model with the retrieved source text. The editor shows retrieval progress and lets the user apply the completed result with Insert below or Replace.

Retrieval is limited to explicitly supplied URLs. Selected document text and retrieved pages do not trigger further fetches. The service extracts readable HTML/text, rewrites GitHub file links to raw content, labels external text as untrusted, and reports unavailable or truncated sources. Time, redirect, download and prompt-context limits keep each request bounded. DNS answers are checked and pinned to the connection; every redirect is validated, private addresses and URL credentials are rejected, and credentials/cookies are not forwarded.

This also fixes a reproduced WebKit insertion rollback: focusing the editor could remount the formatting toolbar while React link/code views were being created, reinitializing collaboration before the new content reached Yjs. Keeping the toolbar plugin mounted preserves the inserted result and its server save.

Includes feature documentation, provenance notes, AI regression CI, and a reusable browser regression script. Preview auto-scroll is a separate follow-up.

Validation

  • All 56 AI tests passed, including DNS pinning, redirects, private addresses, timeout/cancellation, content extraction, limits and runtime integration.
  • All 31 editor regressions passed; full production build passed.
  • Real GitHub README retrieval succeeded through the pinned transport; a loopback source was rejected.
  • Chromium and WebKit: Insert below and Replace passed with links, code and a table, including server-side persistence and reopening in a fresh browser context. The browser regression fails on the original build.
  • The user verified a real URL-summary request and successful insertion on the deployed runtime; server persistence was independently confirmed.

DCO sign-off

Each commit includes a Signed-off-by line matching the contribution identity. This is original WrenLore work; no proprietary Docmost material or post-fork upstream implementation was used.

@LeoStehlik
LeoStehlik merged commit ce7fa37 into master Nov 21, 2026
3 checks passed
@LeoStehlik
LeoStehlik deleted the feat/ai-explicit-url-sources branch November 21, 2026 01:14
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