normalizeForAPI method

  1. @override
List<UserMessage> normalizeForAPI()
override

Normalize this attachment into user messages for the API.

Implementation

@override
List<UserMessage> normalizeForAPI() {
  final buf = StringBuffer();
  buf.writeln('<system-reminder>');
  if (reminderType == 'full') {
    buf.writeln('You are in PLAN MODE. Do not write code or make changes.');
    buf.writeln(
      'Instead, analyze the task, ask clarifying questions, and create a plan.',
    );
    if (planExists) {
      buf.writeln('Plan file: $planFilePath');
    }
  } else {
    buf.writeln('Reminder: You are in plan mode.');
  }
  buf.writeln('</system-reminder>');
  return [createUserMessage(content: buf.toString(), isMeta: true)];
}