docs: drop the last traces of the carried draft value

Nit-only round. Two comments still described the target as holding the value
resolution had read, which the previous commit removed, and `ResolvedDraft` still
declared a `value` field no caller reads. The field is gone with them, so the type
says what it is: where the draft lives.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Guilhem Lemouel
2026-10-07 03:06:29 -07:00
co-authored by Claude Opus 5
parent 5d1b20fb62
commit 39c28a95bf
2 changed files with 6 additions and 6 deletions
@@ -4815,8 +4815,8 @@ function addressedDisplayPath(
triggerKind?: TriggerKind
): string {
// From the open editor, which holds the freshest name and answers without a request. A
// draft no editor holds falls back to the path the call named; the write's own result
// names it properly once the value has been read.
// draft no editor holds falls back to the path the call named; the result the write
// returns names it from the draft itself.
const live = liveGlobalDraftDisplayPath(workspace, type, target.storagePath, triggerKind)
return live === target.storagePath ? target.path : live
}
@@ -335,9 +335,9 @@ const NAMEABLE_DRAFT_KINDS: ReadonlySet<UserDraftItemKind> = new Set(
Object.keys(deployedExists) as UserDraftItemKind[]
)
/** What a path resolved to: where the draft is stored, and its value when reaching it
* already fetched one, so a read does not ask for the same draft twice. */
type ResolvedDraft = { storagePath: string; value?: unknown }
/** What a path resolved to: where the draft is stored. Deliberately not the value read on
* the way there — see `readGlobalDraftValue` for why a caller must fetch its own. */
type ResolvedDraft = { storagePath: string }
/**
* Where the draft a path names is stored. A new item is stored at a generated
@@ -362,7 +362,7 @@ async function resolveDraft(
// chat is handed storage paths.
if (UserDraft.get(itemKind, path, { workspace }) !== undefined) return { storagePath: path }
const own = await fetchBackendDraftValue(workspace, itemKind, path)
if (own !== undefined) return { storagePath: path, value: own }
if (own !== undefined) return { storagePath: path }
return { storagePath: await storagePathForChosenName(workspace, itemKind, path, opts) }
}