import type { ChatAttachment } from '../../../api';

export const buildAttachmentsText = (attachments: ChatAttachment[]) => {
  if (!attachments.length) return '';
  return attachments
    .map((a, i) => `### 附件 ${i + 1}: ${a.name}${a.truncated ? ' (已截断)' : ''}\n${a.text}`)
    .join('\n\n---\n\n');
};

