fix(session-query): harden provider operation lifecycle

This commit is contained in:
Hypatia May
2026-07-11 12:02:51 +08:00
parent 8dd85bd185
commit 8fd68731ba
6 changed files with 114 additions and 31 deletions

View File

@@ -151,9 +151,9 @@ export class SessionQueryService extends Service {
/**
* Register one full-text provider with effect-scoped disposal.
* @param provider - provider and synchronization implementation.
* @returns disposer that unregisters the provider.
* @returns async disposer that immediately unregisters selection and awaits accepted provider work.
*/
registerSearchProvider(provider: SessionSearchProvider): () => void {
registerSearchProvider(provider: SessionSearchProvider): () => Promise<void> {
return this._providers.register(this.ctx, provider)
}