attachConversation(
args: {conversation: {id:string; };entity:LixEntityCanonical|LixEntity;lix:Pick<Lix,"db">;versionId?:string; }):Promise<void>
Attaches a conversation to an entity (creates mapping).
// Attach an existing conversation to an entity
await attachConversation({
lix,
entity: { entity_id: "para_123", schema_key: "markdown_paragraph", file_id: "README.md" },
conversation: { id: "conv_123" }
});// Scope the mapping to a specific version
await attachConversation({
lix,
entity: { entity_id: "para_123", schema_key: "markdown_paragraph", file_id: "README.md" },
conversation: { id: "conv_123" },
versionId: "v1"
});| Parameter | Type |
|---|---|
args | { conversation: { id: string; }; entity: LixEntityCanonical | LixEntity; lix: Pick<Lix, "db">; versionId?: string; } |
args.conversation | { id: string; } |
args.conversation.id | string |
args.entity | LixEntityCanonical | LixEntity |
args.lix | Pick<Lix, "db"> |
args.versionId? | string |
Promise<void>