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
feat(api): thread AbortSignal through querySparql wrappers
Adds opt-in cancellation to every public API method that wraps a
querySparql call. Callers pass `{ signal }` from an AbortController and
the executor receives a `request.cancel` over the WebSocket, short-
circuiting the JSON reply. Aborted calls reject with `DOMException
('Aborted', 'AbortError')` — wrappers re-throw this so callers can
distinguish cancellation from real failures (non-AbortError exceptions
are still logged + swallowed for graceful degradation).
Wired through:
- Channel: allItems, unprocessedItems, totalItemCount,
recentConversations, pinnedConversations
- Conversation: stats, topics, subgroups, subgroupsData
- ConversationSubgroup: stats, topics, itemsData, topicsWithRelevance
- SemanticRelationship: itemEmbedding, allConversationEmbeddings,
allSubgroupEmbeddings, allItemEmbeddings, allItemEmbeddingsByType
- Topic: linkedConversations, linkedSubgroups
Structural `AbortOptions { signal?: AbortSignal }` type lives in
`packages/api/src/shared/abort.ts` and is re-exported from the package
index. Structurally compatible with ad4m's `CallOptions` — no version
bump required to consume the underlying executor cancellation support
shipped in coasys/ad4m#855.
Tests
- Forwarding: Channel.allItems passes the signal to
perspective.querySparql.
- Re-throw: Channel.allItems propagates DOMException AbortError instead
of swallowing it.
Backwards compatible: all new parameters are optional, existing call
sites are unchanged.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
// find the necissary data to render the conversations subgroups in timeline components (include timestamps for the first and last item in each subgroup)
142
145
try{
143
146
// SPARQL migration
@@ -154,7 +157,7 @@ export class Conversation extends Ad4mModel {
0 commit comments