addEnvironment method

void addEnvironment({
  1. required String workingDir,
  2. String? shell,
  3. String? gitBranch,
})

Add environment context.

Implementation

void addEnvironment({
  required String workingDir,
  String? shell,
  String? gitBranch,
}) {
  final parts = [
    'Working directory: $workingDir',
    'Platform: ${_platform.platform.name}',
    if (shell != null) 'Shell: $shell',
    if (gitBranch != null) 'Git branch: $gitBranch',
  ];

  addSection(
    PromptSection(
      name: 'environment',
      content: parts.join('\n'),
      priority: 5,
    ),
  );
}