You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(examples): add useAskableSource and subscribeAsync examples — new APIs have no reference implementation #279
The three newest public APIs — useAskableSource, subscribeAsync / toPromptContextAsync, and async sanitizeItem — have no working example in either examples/analytics-dashboard-react or examples/react-native-expo. Users adopting these features have no reference implementation to copy.
What's missing
1. useAskableSource / collection source
No example shows:
Registering a collection source (e.g. a table or list of items)
Calling handle.notifyChanged() when data updates
Wiring the source into an AI sidebar
2. subscribeAsync / toPromptContextAsync
No example shows:
Setting up an async subscriber for multi-turn context
Passing async context into an LLM call (Vercel AI SDK, CopilotKit, Anthropic)
Handling the onError callback
3. Async sanitizeItem
No example shows redacting or enriching individual collection items before they reach the AI.
Suggested additions
Add a "data sources" panel to examples/analytics-dashboard-react that:
Registers a useAskableSource for the deals table
Subscribes with subscribeAsync and streams context into the chat sidebar
Uses sanitizeItem to strip an internalId field
Acceptance criteria
At least one runnable example demonstrates useAskableSource + notifyChanged
At least one example shows subscribeAsync wired into an LLM call
Example includes inline comments explaining the async data flow
Activity