ThreadRoutingConfig
Configures synchronization between the active thread signal and Angular router URLs.
import type { ThreadRoutingConfig } from '@threadplane/chat';Declaration
export interface ThreadRoutingConfig {
navigationExtras?: NavigationExtras;
threadId: WritableSignal<string | null>;
threadIdFromUrl?: (url: string) => string | null;
toCommands?: (id: string | null) => unknown[];
validate?: (id: string) => Promise<boolean>;
}Members
threadId
The app-owned source-of-truth signal for the active thread id.
threadId: WritableSignal<string | null>;threadIdFromUrl
Extract the thread id from a URL (null = bare). Default: last non-empty path segment.
threadIdFromUrl?: (url: string) => string | null;toCommands
Router commands for a thread id (or the bare/welcome path when null).
Default: (id) => (id ? ['/', id] : ['/']).
toCommands?: (id: string | null) => unknown[];validate
Optional async validity check; on false the helper redirects to the bare path
(replaceUrl: true). LangGraph apps pass id => threads.getThread(id).then(Boolean).
validate?: (id: string) => Promise<boolean>;