Skip to content

docs: add Custom Sources concept guide - #354

Merged
vamgan merged 1 commit into
mainfrom
claude/sources-concept-guide
Jun 29, 2026
Merged

vamgan merged 1 commit into
mainfrom
claude/sources-concept-guide

Conversation

@vamgan

@vamgan vamgan commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a dedicated Custom Sources concept guide. Sources — registerSource, the 30+ createAskable*Source factories, and useAskableSource — are a major capability with no conceptual page; they were only mentioned piecemeal inside the per-framework hook lists.

What's included

  • New site/docs/guide/sources.md:
    • The focus-vs-sources distinction (what the user is looking at vs. what the app knows)
    • ctx.registerSource(id, source) + the handle (notifyChanged / unregister)
    • The AskableContextSource shape (kind / describe / getState / resolve / modes / sanitize)
    • Resolve modes (summary / state / visible / selected / all / custom) and the resolve-request budgets
    • Reading sources via toPromptContextAsync / toContextPacketAsync({ sources }), resolveSource, listSources, subscribeAsync
    • Prebuilt factory → hook table, plus a createAskableCollectionSource example
    • useAskableSource framework-hook usage, sanitization, and SSR behavior
  • Wired into the Concepts sidebar (after "Region & Text Capture").

Notes

  • Every API (method signatures, mode names, factory/hook names) was verified against packages/core/src/types.ts and sources.ts. Docs-only; no code changes.

Test plan

  • vitepress build clean (no dead links)
  • CI preview/build green

🤖 Generated with Claude Code


Generated by Claude Code

Sources (registerSource, the createAskable*Source factories, useAskableSource)
are a major feature with no conceptual page — only scattered per-framework hook
mentions. Documents the source model: registration + handle, the
AskableContextSource shape, resolve modes (summary/state/visible/selected/all),
async serialization (toPromptContextAsync/toContextPacketAsync with sources),
the prebuilt factory/hook table, createAskableCollectionSource, sanitization,
and SSR behavior. Wires it into the Concepts sidebar.
@vercel

vercel Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
askable Ready Ready Preview, Comment Jun 29, 2026 4:36am

@vamgan
vamgan merged commit 5bcee95 into main Jun 29, 2026
3 checks passed
@vamgan
vamgan deleted the claude/sources-concept-guide branch June 29, 2026 04:36

This branch was successfully deployed

1 active deployment
Preview — b3b1a2f9 Deployed Jun 29, 2026 by vercel[bot]
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.

2 participants