Skip to content

deriveAutoQuestion

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/web/src/app/app/desk/components/copilotUtils.ts

The customer's question = the LAST customer message. The thread description is the first customer message (ThreadView renders it that way), so the fallback chain is: last non-internal, non-agent comment → description → title. Comments with an authorName are agent replies (same rule as the timeline).

Signature

ts
function deriveAutoQuestion(thread: Pick<DeskThreadDetail, 'title' | 'description'> & { comments?: DeskComment[] }): string

Parameters

NameType
thread`Pick<DeskThreadDetail, 'title'

Returns: string

Was this page helpful?

Download as PDF