No JSDoc comment in source yet.
API
@Interface()
export abstract class ChatDrafts {
abstract readonly newChatId: string;
abstract useParked(userId: string | null, projectId: string | null): readonly ParkedDraft[];
abstract removeParked(userId: string, projectId: string, id: string): void;
abstract forgetSession(userId: string, sessionId: string): void;
abstract prepareNewChat(userId: string, projectId: string): void;
abstract useNewChat(): () => void;
}Contract Topology
Static AST wiring across @Module / @Provide / @UseMembers (6)
newChatId
readonly newChatId: stringThe new-chat draft page's route id: the page is /chat/<newChatId>.
useParked
useParked(userId: string | null, projectId: string | null): readonly ParkedDraft[]A user × Project's parked drafts, newest first — a React hook, re-rendering when they change.
@paramuserId
string | null@paramprojectId
string | null@returns
readonly ParkedDraft[]removeParked
removeParked(userId: string, projectId: string, id: string): voidDrops a parked draft (sent or deleted). Idempotent.
@paramuserId
string@paramprojectId
string@paramid
string@returns
voidforgetSession
forgetSession(userId: string, sessionId: string): voidDrops a deleted conversation's unsent composer text, so no orphaned key is left behind.
@paramuserId
string@paramsessionId
string@returns
voidprepareNewChat
prepareNewChat(userId: string, projectId: string): voidClears the active new-chat slot for an entry point about to open it: typed text is parked first.
@paramuserId
string@paramprojectId
string@returns
voiduseNewChat
useNewChat(): () => voidThe generic New chat as a hook: prepares the slot, then opens the draft page on the Project's defaults.
@returns
() => void