KetraTerm
API · v0.3.0All versions

TerminalCompletionLearningCoordinator

constructor(learningStore: TerminalCompletionLearningStore, coroutineScope: CoroutineScope, persistencePath: Path, persistenceEnabled: Boolean, onPersistenceLoadFailure: (Throwable) -> Unit)

Creates a learning owner using Dispatchers.IO for blocking snapshot file access.


constructor(learningStore: TerminalCompletionLearningStore, coroutineScope: CoroutineScope, persistencePath: Path, persistenceEnabled: Boolean, ioDispatcher: CoroutineDispatcher, onPersistenceLoadFailure: (Throwable) -> Unit)

Creates a lifecycle-bound learning owner for one fixed persistence path.

Parameters

learningStore

bounded in-memory learning used immediately by completion ranking.

coroutineScope

caller-owned lifecycle scope for the persistence worker.

persistencePath

fixed snapshot path owned by the product.

persistenceEnabled

whether the snapshot may initially be read and written.

ioDispatcher

dispatcher used for blocking snapshot file access.

onPersistenceLoadFailure

invoked once when an existing file is rejected or cannot be read. Exceptions thrown by this diagnostic callback are ignored.