feat: remove legacy OpenCode runtime
Cut product flows over to Coding/Pi and retain only the migration-owned v1 boundary. Promote supported native optional packages because electron-builder omitted pnpm transitive optional closure from the packaged ASAR.
This commit is contained in:
@@ -472,7 +472,7 @@ export async function writePiProviderCatalog(
|
||||
await atomicWriteJson(filePath, catalog.modelsFile);
|
||||
}
|
||||
|
||||
function replaceOpenCodeEnvReferences(value: string, credential: string | null): string {
|
||||
function replaceCredentialEnvReferences(value: string, credential: string | null): string {
|
||||
if (!value.includes('{env:')) return value;
|
||||
if (!credential) {
|
||||
throw new PiProviderConfigError('PROVIDER_AUTH_REQUIRED', 'Provider credential is unavailable');
|
||||
@@ -511,7 +511,7 @@ export async function buildPiWorkerCredentialProjection(
|
||||
if (value === undefined) {
|
||||
throw new PiProviderConfigError('PROVIDER_INVALID', `Provider header is unavailable: ${headerName}`);
|
||||
}
|
||||
env[headerEnvForAccount(options.account.id, headerName)] = replaceOpenCodeEnvReferences(value, credential);
|
||||
env[headerEnvForAccount(options.account.id, headerName)] = replaceCredentialEnvReferences(value, credential);
|
||||
}
|
||||
return {
|
||||
env,
|
||||
|
||||
Reference in New Issue
Block a user