Filter out current variable from autocomplete and show sub environment variables in base environment autocomplete

This commit is contained in:
Gregory Schier
2025-09-29 06:57:04 -07:00
parent b9613591f8
commit 6abbdc8726
6 changed files with 41 additions and 21 deletions

View File

@@ -0,0 +1,10 @@
import { generateId } from '../../lib/generateId';
import type { Pair, PairWithId } from './PairEditor';
export function ensurePairId(p: Pair): PairWithId {
if (typeof p.id === 'string') {
return p as PairWithId;
} else {
return { ...p, id: p.id ?? generateId() };
}
}