Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Add per-session env overrides for built-in shell tool child processes

Abierto
#2,040 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
shell, typescript
Área
api, cli

Línea de trabajo

Empieza siguiendo la estructura wire de ShellOptions y el manejo de session.rpc.options.update descritos en la issue. Revisa cómo se comportan shell e initScripts entre actualizaciones y al reanudar, y después determina con precisión la semántica de reemplazo, precedencia, eliminación mediante null y persistencia; el trabajo estará terminado cuando el overlay de env esté representado y aplicado de forma coherente a los procesos hijo del shell integrado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement vs-code

Follow up to #1911. The initScripts half of that ask shipped through the runtime in github/copilot-agent-runtime#12710, but the per-session env part was deferred out of that PR.

Context: https://github.com/microsoft/vscode/issues/323164

initScripts covers the Python activation case since the host can materialize a shell-specific activation file and have the runtime source it before each command. An explicit env map is still worth having for hosts that just want to set or unset a few variables without generating script files, and without dealing with per-shell quoting.

Current wire shape:

export interface ShellOptions {
    initProfile?: "none" | "non-interactive";
    initScripts?: ShellInitScript[];
    processFlags?: string[];
}

Add the env map from the original proposal:

export interface ShellOptions {
    /** Env applied to built-in shell tool child processes. `null` unsets/removes. */
    env?: Record<string, string | null>;
}

The reason this was deferred is that the update semantics should be pinned down before the wire shape ships:

  • Whether session.rpc.options.update with shell.env replaces the whole overlay or merges per key. Replace seems right: it stays idempotent and a host can revert a variable to the inherited value by omitting it. With merge there is no way to un-touch a variable once set.
  • Precedence: overlay applied to the spawned process env first, initScripts sourced after, so scripts can override.
  • null meaning remove-from-env vs revert-to-inherited.
  • Whether the overlay persists across resume or the host re-sends it, matching how the rest of shell behaves today.

(generated by copilot)

Lenguaje dominante
TypeScript
Estrellas
10.5k
Forks
1.5k
Merge medio
1 d 6 h
PR fusionados (30 d)
106

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/copilot-sdk

Todos los issues de github/copilot-sdk

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.