fromString static method

EntryMode fromString(
  1. String s
)

Parse an entry mode from a string identifier.

Implementation

static EntryMode fromString(String s) => switch (s.toLowerCase()) {
  'interactive' => interactive,
  'cli' => cli,
  'sdk' => sdk,
  'mcp' || 'mcp-server' || 'mcpserver' => mcpServer,
  'headless' => headless,
  'embedded' => embedded,
  'remote' => remote,
  'piped' || 'pipe' => piped,
  _ => throw ArgumentError('Unknown entry mode: $s'),
};