mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-27 00:02:35 +00:00
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:
co-authored by
Claude Opus 5
parent
5d1b20fb62
commit
39c28a95bf
@@ -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) }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user