@narumitw/pi-starship 0.52.3 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +53 -622
  2. package/dist/chunks/{chunk-6D6VEVE5.js → chunk-UX6PBXVK.js} +125 -26
  3. package/dist/chunks/chunk-UX6PBXVK.js.map +7 -0
  4. package/dist/chunks/{cloud-GEBXIN43.js → cloud-BKHYWCTA.js} +3 -3
  5. package/dist/chunks/cloud-BKHYWCTA.js.map +7 -0
  6. package/dist/chunks/{commands-T73QN435.js → commands-53ZO2JUK.js} +3 -2
  7. package/dist/chunks/{commands-T73QN435.js.map → commands-53ZO2JUK.js.map} +2 -2
  8. package/dist/chunks/{development-TOXV7LWE.js → development-BERD42HW.js} +2 -2
  9. package/dist/chunks/{development-TOXV7LWE.js.map → development-BERD42HW.js.map} +2 -2
  10. package/dist/chunks/{execution-QDYHQKST.js → execution-42JTEY3N.js} +2 -2
  11. package/dist/chunks/{execution-QDYHQKST.js.map → execution-42JTEY3N.js.map} +2 -2
  12. package/dist/chunks/{languages-QR3XPRVQ.js → languages-RMP6DW7H.js} +2 -2
  13. package/dist/chunks/languages-RMP6DW7H.js.map +7 -0
  14. package/dist/index.ts +31 -10
  15. package/dist/index.ts.map +3 -3
  16. package/package.json +14 -12
  17. package/skills/configuring-pi-starship/SKILL.md +113 -0
  18. package/skills/configuring-pi-starship/references/configuration.md +365 -0
  19. package/skills/configuring-pi-starship/references/module-catalog.md +978 -0
  20. package/skills/configuring-pi-starship/references/modules.md +230 -0
  21. package/skills/configuring-pi-starship/references/runtime-and-security.md +213 -0
  22. package/skills/configuring-pi-starship/scripts/apply.mjs +64 -0
  23. package/skills/configuring-pi-starship/scripts/config-path.mjs +11 -0
  24. package/skills/configuring-pi-starship/scripts/script-support.mjs +20 -0
  25. package/skills/configuring-pi-starship/scripts/validate.mjs +30 -0
  26. package/src/config.ts +9 -0
  27. package/src/effective-config.ts +1 -0
  28. package/src/format/style.ts +14 -6
  29. package/src/modules/activity.ts +57 -4
  30. package/src/modules/catalog.ts +2 -2
  31. package/src/modules/provider.ts +19 -1
  32. package/src/modules/render.ts +2 -1
  33. package/src/modules/thinking.ts +24 -0
  34. package/src/modules/types.ts +3 -0
  35. package/src/pi-starship.ts +24 -3
  36. package/src/runtime/cloud.ts +3 -2
  37. package/src/runtime/development.ts +1 -1
  38. package/src/runtime/execution.ts +1 -1
  39. package/src/runtime/github-pr.ts +2 -1
  40. package/src/runtime/languages.ts +1 -1
  41. package/dist/chunks/chunk-6D6VEVE5.js.map +0 -7
  42. package/dist/chunks/cloud-GEBXIN43.js.map +0 -7
  43. package/dist/chunks/languages-QR3XPRVQ.js.map +0 -7
@@ -208,7 +208,7 @@ interface ResolvedStyle
208
208
  background?: ColorSpec;
209
209
  }
210
210
 
211
- export function renderChunksToAnsi(chunks: readonly LayoutChunk[]): string {
211
+ export function renderChunksToAnsi(chunks: readonly LayoutChunk[], trueColor = true): string {
212
212
  const runs: Array<{ text: string; style: ResolvedStyle }> = [];
213
213
  let previous: ResolvedStyle | undefined;
214
214
  for (const chunk of chunks) {
@@ -221,7 +221,7 @@ export function renderChunksToAnsi(chunks: readonly LayoutChunk[]): string {
221
221
  }
222
222
  return runs
223
223
  .map(({ text, style }) => {
224
- const codes = ansiCodes(style);
224
+ const codes = ansiCodes(style, trueColor);
225
225
  return codes.length > 0 ? `\u001b[${codes.join(";")}m${text}\u001b[0m` : text;
226
226
  })
227
227
  .join("");
@@ -253,10 +253,10 @@ function resolveColor(
253
253
  return source === "foreground" ? previous.foreground : previous.background;
254
254
  }
255
255
 
256
- function ansiCodes(style: ResolvedStyle): string[] {
256
+ function ansiCodes(style: ResolvedStyle, trueColor: boolean): string[] {
257
257
  const codes: string[] = [];
258
- if (style.foreground) codes.push(...colorCodes(style.foreground, false));
259
- if (style.background) codes.push(...colorCodes(style.background, true));
258
+ if (style.foreground) codes.push(...colorCodes(style.foreground, false, trueColor));
259
+ if (style.background) codes.push(...colorCodes(style.background, true, trueColor));
260
260
  if (style.bold) codes.push("1");
261
261
  if (style.dimmed) codes.push("2");
262
262
  if (style.italic) codes.push("3");
@@ -268,11 +268,19 @@ function ansiCodes(style: ResolvedStyle): string[] {
268
268
  return codes;
269
269
  }
270
270
 
271
- function colorCodes(color: ColorSpec, background: boolean): string[] {
271
+ function colorCodes(color: ColorSpec, background: boolean, trueColor: boolean): string[] {
272
272
  if (color.kind === "named") {
273
273
  const foreground = FOREGROUND_CODES[color.name];
274
274
  return [`${background ? foreground + 10 : foreground}`];
275
275
  }
276
276
  if (color.kind === "fixed") return [background ? "48" : "38", "5", `${color.value}`];
277
+ if (!trueColor) {
278
+ return [background ? "48" : "38", "5", `${rgbToAnsi256(color.red, color.green, color.blue)}`];
279
+ }
277
280
  return [background ? "48" : "38", "2", `${color.red}`, `${color.green}`, `${color.blue}`];
278
281
  }
282
+
283
+ function rgbToAnsi256(red: number, green: number, blue: number): number {
284
+ const channels = [red, green, blue].map((value) => Math.round((value / 255) * 5));
285
+ return 16 + 36 * (channels[0] ?? 0) + 6 * (channels[1] ?? 0) + (channels[2] ?? 0);
286
+ }
@@ -1,15 +1,54 @@
1
+ import { sliceByColumn, visibleWidth } from "@earendil-works/pi-tui";
2
+ import { sanitizeTerminalText } from "@narumitw/pi-tui-kit/terminal-text";
1
3
  import { defineModule } from "./types.js";
2
4
 
5
+ const MAX_UI_PROMPT_TITLE_CODE_POINTS = 256;
6
+ const MAX_UI_PROMPT_TITLE_WIDTH = 40;
7
+ const EMPTY_PROMPT_VALUES = { kind: "", title: "" } as const;
8
+
9
+ function boundUIPromptTitleLength(title: string): string {
10
+ let end = 0;
11
+ let ellipsisEnd = 0;
12
+ let codePoints = 0;
13
+ while (end < title.length && codePoints < MAX_UI_PROMPT_TITLE_CODE_POINTS) {
14
+ const codePoint = title.codePointAt(end) ?? 0;
15
+ end += codePoint > 0xffff ? 2 : 1;
16
+ codePoints += 1;
17
+ if (codePoints < MAX_UI_PROMPT_TITLE_CODE_POINTS) ellipsisEnd = end;
18
+ }
19
+ return end < title.length ? `${title.slice(0, ellipsisEnd)}…` : title;
20
+ }
21
+
22
+ function formatUIPromptTitle(title: string | undefined): string {
23
+ const safeTitle = title ? sanitizeTerminalText(title).trim() : "";
24
+ const boundedTitle = boundUIPromptTitleLength(safeTitle);
25
+ if (visibleWidth(boundedTitle) <= MAX_UI_PROMPT_TITLE_WIDTH) return boundedTitle;
26
+ return `${sliceByColumn(boundedTitle, 0, MAX_UI_PROMPT_TITLE_WIDTH - 1, true)}…`;
27
+ }
28
+
3
29
  export const activityModule = defineModule({
4
30
  name: "activity",
5
- variables: ["symbol", "state", "tool", "count", "text"],
31
+ variables: ["symbol", "state", "tool", "count", "kind", "title", "text"],
6
32
  defaults: {
7
33
  format: "[ $text ]($style)",
8
- symbol: "⚙",
34
+ symbol: "⚙️",
9
35
  style: "bold yellow",
10
36
  disabled: false,
11
37
  },
12
38
  values: ({ runtime, symbol }) => {
39
+ if (runtime.uiPrompt) {
40
+ const title = formatUIPromptTitle(runtime.uiPrompt.title);
41
+ const waiting = `waiting for ${runtime.uiPrompt.kind}${title ? ` · ${title}` : ""}`;
42
+ return {
43
+ state: "waiting",
44
+ tool: "",
45
+ count: "0",
46
+ kind: runtime.uiPrompt.kind,
47
+ title,
48
+ text: `${symbol} ${waiting}`,
49
+ };
50
+ }
51
+
13
52
  const active = [...runtime.activeTools.entries()];
14
53
  if (active.length > 0) {
15
54
  const [tool = "tool", count = 1] = active[0] ?? [];
@@ -19,20 +58,34 @@ export const activityModule = defineModule({
19
58
  state: "active",
20
59
  tool,
21
60
  count: `${count}`,
61
+ ...EMPTY_PROMPT_VALUES,
22
62
  text: `${symbol} ${tool}${suffix}${more}`,
23
63
  };
24
64
  }
25
65
  if (runtime.isStreaming) {
26
- return { state: "thinking", tool: "", count: "0", text: `${symbol} thinking` };
66
+ return {
67
+ state: "thinking",
68
+ tool: "",
69
+ count: "0",
70
+ ...EMPTY_PROMPT_VALUES,
71
+ text: `${symbol} thinking`,
72
+ };
27
73
  }
28
74
  if (runtime.lastCompletedTool) {
29
75
  return {
30
76
  state: "completed",
31
77
  tool: runtime.lastCompletedTool,
32
78
  count: "0",
79
+ ...EMPTY_PROMPT_VALUES,
33
80
  text: `${symbol} completed ${runtime.lastCompletedTool}`,
34
81
  };
35
82
  }
36
- return { state: "idle", tool: "", count: "0", text: `${symbol} idle` };
83
+ return {
84
+ state: "idle",
85
+ tool: "",
86
+ count: "0",
87
+ ...EMPTY_PROMPT_VALUES,
88
+ text: `${symbol} idle`,
89
+ };
37
90
  },
38
91
  });
@@ -61,7 +61,7 @@ const MODULE_IMPLEMENTATIONS = [
61
61
  export type ModuleName = (typeof MODULE_IMPLEMENTATIONS)[number]["name"];
62
62
 
63
63
  const MODULE_DESCRIPTIONS = {
64
- activity: "Current Pi activity or most recently completed tool.",
64
+ activity: "Current Pi activity, extension UI wait, or most recently completed tool.",
65
65
  aws: "Active AWS profile and region.",
66
66
  azure: "Active Azure subscription and optional username.",
67
67
  brand: "pi-starship brand mark.",
@@ -95,7 +95,7 @@ const MODULE_DESCRIPTIONS = {
95
95
  nodejs: "Node.js version detected in the current workspace.",
96
96
  openstack: "Active OpenStack cloud and project.",
97
97
  os: "Current operating system identity.",
98
- package: "Current workspace package name and version.",
98
+ package: "Current workspace package version and manifest source.",
99
99
  pixi: "Active Pixi environment and project.",
100
100
  provider: "Current Pi model provider.",
101
101
  python: "Python version, virtual environment, and pyenv state.",
@@ -1,5 +1,8 @@
1
+ import { sanitizeTerminalText } from "@narumitw/pi-tui-kit/terminal-text";
1
2
  import { defineModule } from "./types.js";
2
3
 
4
+ const PROVIDER_ALIASES_KEY = "provider_aliases";
5
+
3
6
  export const providerModule = defineModule({
4
7
  name: "provider",
5
8
  variables: ["symbol", "provider"],
@@ -9,5 +12,20 @@ export const providerModule = defineModule({
9
12
  style: "bold blue",
10
13
  disabled: false,
11
14
  },
12
- values: ({ runtime }) => (runtime.model ? { provider: runtime.model.provider } : undefined),
15
+ options: {
16
+ [PROVIDER_ALIASES_KEY]: { kind: "string-map", default: {} },
17
+ },
18
+ values: ({ runtime, options }) => {
19
+ if (!runtime.model) return undefined;
20
+ const aliases = options[PROVIDER_ALIASES_KEY];
21
+ const aliasMap =
22
+ aliases && typeof aliases === "object" && !Array.isArray(aliases)
23
+ ? (aliases as Readonly<Record<string, string>>)
24
+ : undefined;
25
+ const alias =
26
+ aliasMap && Object.hasOwn(aliasMap, runtime.model.provider)
27
+ ? aliasMap[runtime.model.provider]
28
+ : undefined;
29
+ return { provider: sanitizeTerminalText(alias ?? runtime.model.provider) };
30
+ },
13
31
  });
@@ -14,6 +14,7 @@ export function renderStatusline(
14
14
  config: StarshipConfig,
15
15
  runtime: StarshipRuntimeSnapshot,
16
16
  width = 80,
17
+ trueColor = true,
17
18
  ): RenderedStatusline<ModuleName> {
18
19
  const palette = activePalette(config);
19
20
  const modules = {} as Record<ModuleName, StyledChunk[]>;
@@ -61,7 +62,7 @@ export function renderStatusline(
61
62
  const layout = renderFormat(config.formatAst, { variables: rootVariables, palette });
62
63
  const chunks = resolveFillLayout(layout, width);
63
64
  return {
64
- ansi: renderChunksToAnsi(chunks),
65
+ ansi: renderChunksToAnsi(chunks, trueColor),
65
66
  chunks,
66
67
  modules,
67
68
  };
@@ -1,5 +1,20 @@
1
+ import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
1
2
  import { defineModule } from "./types.js";
2
3
 
4
+ const THINKING_LEVELS = [
5
+ "off",
6
+ "minimal",
7
+ "low",
8
+ "medium",
9
+ "high",
10
+ "xhigh",
11
+ "max",
12
+ ] as const satisfies readonly ThinkingLevel[];
13
+
14
+ function thinkingLevelOf(value: string): ThinkingLevel | undefined {
15
+ return THINKING_LEVELS.find((level) => level === value);
16
+ }
17
+
3
18
  export const thinkingModule = defineModule({
4
19
  name: "thinking",
5
20
  variables: ["symbol", "level"],
@@ -9,5 +24,14 @@ export const thinkingModule = defineModule({
9
24
  style: "bold purple",
10
25
  disabled: false,
11
26
  },
27
+ styleDefaults: Object.fromEntries(
28
+ THINKING_LEVELS.map((level) => [`style_${level}`, ""]),
29
+ ) as Record<`style_${ThinkingLevel}`, string>,
30
+ fallbackStyle: true,
31
+ styleVariables: ["style"],
32
+ resolveStyleVariables: ({ runtime, styles, style }) => {
33
+ const level = thinkingLevelOf(runtime.thinkingLevel);
34
+ return { style: (level && styles[`style_${level}`]) || style };
35
+ },
12
36
  values: ({ runtime }) => ({ level: runtime.thinkingLevel }),
13
37
  });
@@ -1,3 +1,4 @@
1
+ import type { UIPromptKind } from "@earendil-works/pi-coding-agent";
1
2
  import type { StyledChunk } from "../format/style.js";
2
3
 
3
4
  export interface GitBranchSnapshot {
@@ -86,6 +87,7 @@ export interface StarshipRuntimeSnapshot {
86
87
  turnCount: number;
87
88
  activeTools: ReadonlyMap<string, number>;
88
89
  isStreaming: boolean;
90
+ uiPrompt?: { kind: UIPromptKind; title?: string };
89
91
  lastCompletedTool?: string;
90
92
  contextUsage?: {
91
93
  percent?: number | null;
@@ -168,6 +170,7 @@ export interface ModuleDefinition<Name extends string> {
168
170
  variables: readonly string[];
169
171
  defaults: ModuleDefaults;
170
172
  styleDefaults?: Readonly<Record<string, string>>;
173
+ fallbackStyle?: boolean;
171
174
  displayDefaults?: readonly ModuleDisplayConfig[];
172
175
  styleVariables?: readonly string[];
173
176
  resolveStyleVariables?(context: ModuleStyleContext): Readonly<Record<string, string>> | undefined;
@@ -5,7 +5,7 @@ import {
5
5
  getAgentDir,
6
6
  type ReadonlyFooterDataProvider,
7
7
  } from "@earendil-works/pi-coding-agent";
8
- import { wrapTextWithAnsi } from "@earendil-works/pi-tui";
8
+ import { getCapabilities, wrapTextWithAnsi } from "@earendil-works/pi-tui";
9
9
  import { completeStarshipArguments } from "./command-contract.js";
10
10
  import type { StarshipCommandOptions } from "./commands.js";
11
11
  import {
@@ -57,6 +57,7 @@ function loadStarshipCommands(): Promise<StarshipCommands> {
57
57
  interface RuntimeState {
58
58
  activeTools: Map<string, number>;
59
59
  isStreaming: boolean;
60
+ uiPrompt?: NonNullable<StarshipRuntimeSnapshot["uiPrompt"]>;
60
61
  thinkingLevel: string;
61
62
  lastCompletedTool?: string;
62
63
  git?: GitSnapshot;
@@ -102,6 +103,7 @@ export default function piStarship(pi: ExtensionAPI, options: PiStarshipOptions
102
103
  let githubPrGeneration = 0;
103
104
 
104
105
  const refresh = () => runtime.requestRender?.();
106
+ const ownsRuntime = (ctx: ExtensionContext) => sessionOwner === ctx.sessionManager;
105
107
  const githubPrExec = options.githubPrExec ?? execWorkspaceCommand;
106
108
  const gitController = new AsyncRefreshController<GitRefreshInput, GitSnapshot | undefined>({
107
109
  async read(input, signal) {
@@ -280,7 +282,7 @@ export default function piStarship(pi: ExtensionAPI, options: PiStarshipOptions
280
282
  runtime.renderPreview = (preview, width) => {
281
283
  const snapshot = runtimeSnapshot(ctx, footerData, runtime);
282
284
  return wrapFormattedStatusline(
283
- renderStatusline(preview.config, snapshot, width).ansi,
285
+ renderStatusline(preview.config, snapshot, width, getCapabilities().trueColor).ansi,
284
286
  width,
285
287
  );
286
288
  };
@@ -335,7 +337,7 @@ export default function piStarship(pi: ExtensionAPI, options: PiStarshipOptions
335
337
  if (!current) return [];
336
338
  const snapshot = runtimeSnapshot(ctx, footerData, runtime);
337
339
  return wrapFormattedStatusline(
338
- renderStatusline(current.config, snapshot, width).ansi,
340
+ renderStatusline(current.config, snapshot, width, getCapabilities().trueColor).ansi,
339
341
  width,
340
342
  );
341
343
  },
@@ -401,6 +403,10 @@ export default function piStarship(pi: ExtensionAPI, options: PiStarshipOptions
401
403
  });
402
404
 
403
405
  pi.on("session_start", (_event, ctx) => {
406
+ runtime.activeTools.clear();
407
+ runtime.isStreaming = false;
408
+ runtime.uiPrompt = undefined;
409
+ runtime.lastCompletedTool = undefined;
404
410
  loaded = loadStarshipConfig(configPath);
405
411
  loadedRevision += 1;
406
412
  if (loaded.diagnostics.length > 0 && (ctx.mode === "tui" || ctx.hasUI)) {
@@ -428,6 +434,10 @@ export default function piStarship(pi: ExtensionAPI, options: PiStarshipOptions
428
434
  stopGithubPr();
429
435
  runtime.git = undefined;
430
436
  runtime.workspace = undefined;
437
+ runtime.activeTools.clear();
438
+ runtime.isStreaming = false;
439
+ runtime.uiPrompt = undefined;
440
+ runtime.lastCompletedTool = undefined;
431
441
  runtime.requestRender = undefined;
432
442
  runtime.renderPreview = undefined;
433
443
  runtime.inspect = undefined;
@@ -452,6 +462,16 @@ export default function piStarship(pi: ExtensionAPI, options: PiStarshipOptions
452
462
  if (target?.sessionManager === ctx.sessionManager) requestGithubPr(target);
453
463
  refresh();
454
464
  });
465
+ pi.on("ui_prompt_start", (event, ctx) => {
466
+ if (!ownsRuntime(ctx)) return;
467
+ runtime.uiPrompt = { kind: event.kind, title: event.title };
468
+ refresh();
469
+ });
470
+ pi.on("ui_prompt_end", (_event, ctx) => {
471
+ if (!ownsRuntime(ctx)) return;
472
+ runtime.uiPrompt = undefined;
473
+ refresh();
474
+ });
455
475
  pi.on("turn_start", () => {
456
476
  runtime.isStreaming = true;
457
477
  refresh();
@@ -568,6 +588,7 @@ function runtimeSnapshot(
568
588
  turnCount: userTurnCount(ctx),
569
589
  activeTools: runtime.activeTools,
570
590
  isStreaming: runtime.isStreaming,
591
+ uiPrompt: runtime.uiPrompt,
571
592
  lastCompletedTool: runtime.lastCompletedTool,
572
593
  contextUsage: ctx.getContextUsage() ?? undefined,
573
594
  tokenTotals: summarizeFooterUsage(ctx.sessionManager.getEntries()),
@@ -35,8 +35,9 @@ export async function collectCloud(context: CollectorContext): Promise<MutableMo
35
35
 
36
36
  async function collectAws(context: CollectorContext): Promise<Record<string, string> | undefined> {
37
37
  const env = context.input.environment;
38
- const profile = safeMetadata(env.AWS_PROFILE ?? env.AWS_DEFAULT_PROFILE) ?? "default";
39
- let region = safeMetadata(env.AWS_REGION ?? env.AWS_DEFAULT_REGION);
38
+ const profile =
39
+ safeMetadata(env.AWS_PROFILE) ?? safeMetadata(env.AWS_DEFAULT_PROFILE) ?? "default";
40
+ let region = safeMetadata(env.AWS_REGION) ?? safeMetadata(env.AWS_DEFAULT_REGION);
40
41
  if (!region) {
41
42
  const configPath =
42
43
  safeMetadata(env.AWS_CONFIG_FILE, 1_024) ?? joinHome(context.input, ".aws", "config");
@@ -141,7 +141,7 @@ async function readPixiProject(context: CollectorContext): Promise<string | unde
141
141
  const document = parse(source);
142
142
  const project = isRecord(document.project) ? document.project : undefined;
143
143
  const workspace = isRecord(document.workspace) ? document.workspace : undefined;
144
- return safeMetadata(project?.name ?? workspace?.name);
144
+ return safeMetadata(project?.name) ?? safeMetadata(workspace?.name);
145
145
  } catch {
146
146
  return undefined;
147
147
  }
@@ -109,7 +109,7 @@ function usernameValues(context: CollectorContext): Record<string, string> | und
109
109
  const user = safeMetadata(context.input.username);
110
110
  if (!user) return undefined;
111
111
  const env = context.input.environment;
112
- const login = safeMetadata(env.LOGNAME ?? env.USER ?? env.USERNAME);
112
+ const login = safeMetadata(env.LOGNAME) ?? safeMetadata(env.USER) ?? safeMetadata(env.USERNAME);
113
113
  const privileged = /^(?:root|administrator)$/iu.test(user);
114
114
  const detected = optionStrings(context, "username", "detect_env_vars").some(
115
115
  (name) => safeMetadata(env[name]) !== undefined,
@@ -1,3 +1,4 @@
1
+ import { getCapabilities } from "@earendil-works/pi-tui";
1
2
  import type { GithubPrSnapshot, GithubPrState } from "../modules/types.js";
2
3
  import type { WorkspaceExec } from "./types.js";
3
4
 
@@ -219,7 +220,7 @@ function compactStatus(
219
220
  }
220
221
 
221
222
  function osc8Link(value: string, label: string): string {
222
- if (hasTerminalControls(value)) return label;
223
+ if (!getCapabilities().hyperlinks || hasTerminalControls(value)) return label;
223
224
  try {
224
225
  const url = new URL(value);
225
226
  if ((url.protocol !== "http:" && url.protocol !== "https:") || url.username || url.password) {
@@ -95,7 +95,7 @@ function addEnvironmentValues(
95
95
  ): void {
96
96
  const env = context.input.environment;
97
97
  if (name === "python") {
98
- const virtualenv = safeMetadata(env.VIRTUAL_ENV ?? env.CONDA_DEFAULT_ENV);
98
+ const virtualenv = safeMetadata(env.VIRTUAL_ENV) ?? safeMetadata(env.CONDA_DEFAULT_ENV);
99
99
  if (virtualenv && context.needs(name, "virtualenv")) values.virtualenv = pathName(virtualenv);
100
100
  const pyenv = safeMetadata(env.PYENV_VERSION);
101
101
  if (pyenv && context.needs(name, "pyenv_prefix")) values.pyenv_prefix = pyenv;