- Standardized missing-file read errors and now return `File not found: <path>` for absent edit targets. - Centralized AI provider, usage, and OAuth helpers into shared modules to remove duplicated logic. - Migrated OAuth/API-key login flows to shared factory helpers and removed inline prompt/token-exchange code. - Reused shared tools and formatter utilities for discovery, stream tails, LSP batching, and source formatting. - Consolidated repeated test helpers and fixtures into shared modules, replacing inline helper duplicates.
9 lines
312 B
TypeScript
9 lines
312 B
TypeScript
import { $env } from "@oh-my-pi/pi-utils";
|
|
|
|
export function isFoundryEnabled(): boolean {
|
|
const value = $env.CLAUDE_CODE_USE_FOUNDRY;
|
|
if (!value) return false;
|
|
const normalized = value.trim().toLowerCase();
|
|
return normalized === "1" || normalized === "true" || normalized === "yes" || normalized === "on";
|
|
}
|