MCPcopy Index your code
hub / github.com/continuedev/continue / convertLegacyModeFlags

Function convertLegacyModeFlags

extensions/cli/src/flags/flagProcessor.ts:23–40  ·  view source on GitHub ↗
(
  readonly?: boolean,
  auto?: boolean,
)

Source from the content-addressed store, hash-verified

21 * This logic was previously duplicated in chat.ts lines 168-173 and 259-264
22 */
23export function convertLegacyModeFlags(
24 readonly?: boolean,
25 auto?: boolean,
26): PermissionMode | undefined {
27 if (readonly && auto) {
28 throw new Error("Cannot use both --readonly and --auto flags together");
29 }
30
31 if (readonly) {
32 return "plan";
33 }
34
35 if (auto) {
36 return "auto";
37 }
38
39 return undefined;
40}
41
42/**
43 * Structures permission overrides for service initialization

Callers 2

processCommandFlagsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected