Skip to Content

isAttachedFilesText

isAttachedFilesText(text: string | null | undefined): boolean

Defined in: src/lib/chat/fileContext.ts:23 

True when a text part is the attachment-contents part built by buildAttachedFilesText.

Matches the whole generated shape — opening tag plus the fixed header line, and the closing tag — not just the tag, so user text that merely starts with <attached_files> is still treated as the user’s prompt.

Parameters

ParameterType

text

string | null | undefined

Returns

boolean

Last updated on