provideThreadDirectory
Provides one ThreadDirectoryView, built from a directory factory.
Retrieve it in any component with injectThreadDirectory(). Provide it at
the application root for an app-wide thread list, or in a component's
providers to give that subtree its own.
The view creates its directory through config.createDirectory, so this
package depends on no backend. The directory is disposed when the providing
injector is destroyed.
Pass the config object when it is known up front, or a
() => ThreadDirectoryConfig factory when it depends on injected state: the
factory runs once, in an injection context.
import { provideThreadDirectory } from '@threadplane/angular';Declaration · overload 1
export declare function provideThreadDirectory<TDirectory extends ThreadDirectory>(config: ThreadDirectoryConfigInput<TDirectory>): Provider[];Type parameters
TDirectoryThreadDirectory
Parameters
config· requiredThreadDirectoryConfigInput<TDirectory>
Returns
Provider[]Examples
providers: [
provideThreadDirectory({
createDirectory: ({ clientOptions, reportOperationFailure }) =>
createLangGraphThreadDirectory({
apiUrl,
clientOptions,
reportOperationFailure,
}),
}),
];