refactor(agents): remove now-dead hasNamePool declaration in agentFormModel

The hasNamePool const was only used by the !hasNamePool gate in nameChanged,
which was removed in the previous commit. Drop it to keep the model clean.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
Duncan
2026-08-29 15:15:13 -04:00
parent c9fa216195
commit 2717477f0c
2 changed files with 1 additions and 7 deletions

View File

@@ -567,10 +567,7 @@ export function AgentEditMergedDialog({
(selectedRuntimeId !== "custom" ||
inheritHarness ||
agentCommand.trim().length > 0) &&
// Block submission when the instance name field is blank — applies to
// all instances including pool-named ones. Pooled instances can be
// explicitly renamed; the blank guard prevents submitting an empty name
// regardless of pool membership.
// Block submission when the visible instance name is blank (pool or not).
instanceName.trim().length > 0
: true);

View File

@@ -528,9 +528,6 @@ export function emitAgentFormDiff(
// I-field diff — only when instance is present
let agentInput: UpdateManagedAgentInput | null = null;
if (inst !== null) {
// Row 1 contract: stop materializing displayName→name when a name pool exists
const hasNamePool = (def?.namePool?.length ?? 0) > 0;
// Row 8 contract: instance env edit goes to instance, NOT wholesale-replace from definition.
// When a definition is present, instanceEnvVars holds the per-instance overlay.
const instanceEnvChanged =