injectThreadDirectory
Retrieves the thread directory view provided in the current injection
context. The result is typed by the core contract, where every command is
optional; name the directory type, for example
injectThreadDirectory<LangGraphThreadDirectory>(), to have the commands it
guarantees typed as present, so they are called without ?.. That is not
checked against the provider.
import { injectThreadDirectory } from '@threadplane/angular';Declaration · overload 1
export declare function injectThreadDirectory<TDirectory extends ThreadDirectory = ThreadDirectory>(): ThreadDirectoryView<TDirectory>;Type parameters
TDirectoryThreadDirectoryDefault:ThreadDirectory
Returns
ThreadDirectoryView<TDirectory>Examples
readonly threads = injectThreadDirectory();
constructor() {
void this.threads.refresh();
refreshOnRunEnd(injectAgent(), this.threads);
}