Shows text for a while, then removes it.
A second flash replaces the first rather than queueing behind it: the newer message is the current truth, and a queue would show stale text. Early-dismiss handles are guarded by displayed text; when two consecutive flashes use identical text, treat the earlier handle as superseded rather than disposing it.
What to show. Supports $(icon) syntax.
OptionaldurationMs: number
How long to show it. Defaults to 3000 ms.
A handle that ends the message early. Idempotent.
Short-lived status bar messages.
Distinct from
defineStatusBarItem, which declares an item the extension owns and keeps updating — a sync indicator, a line count. This is for the other case: "Copied.", "History cleared." — text that appears, says one thing, and goes away. Flashing that through a declared item would clobber whatever the item was showing, and declaring an item per message would leave the caller disposing it on a timer.Example