Skip to content

Type Alias: PromptSpan

PromptSpan = { components: LocatedComponent[]; end: number; kind: "shot"; marker: string; origin?: "paste"; path?: string; share?: ShotShare; start: number; thumb?: string; viewport?: boolean; } | { cell?: string; cellLoc?: string; end: number; kind: "app-selection"; marker?: string; sourceLoc?: string; start: number; tab?: TabRecord; tex?: string; url?: string; } | { end: number; kind: "code-selection"; lines?: number; marker?: string; sourceLoc?: string; start: number; tab?: TabRecord; url?: string; } | { end: number; from: string; kind: "navigation" | "tab-switch"; start: number; tab?: TabRecord; to: string; } | { end: number; kind: "preamble"; start: number; }

Defined in: aiui-lowering-pipeline/src/types.ts:600

A typed region of the rendered prompt string — the structure the renderer already knows, handed to consumers (the trace hero) so they annotate the raw text instead of re-discovering it with a regex. [start, end) are character offsets into ComposedIntent.prompt. Body spans are produced by renderPrompt (render.ts); the channel prepends a preamble span and shifts the body spans when it wraps the body in its context preamble.

Union Members

Type Literal

{ components: LocatedComponent[]; end: number; kind: "shot"; marker: string; origin?: "paste"; path?: string; share?: ShotShare; start: number; thumb?: string; viewport?: boolean; }

components

components: LocatedComponent[]

end

end: number

kind

kind: "shot"

marker

marker: string

origin?

optional origin?: "paste"

path?

optional path?: string

The image's RAW disk path — deliberately NOT the cwd-relativized form the prompt text shows: consumers (the hero's blob/preview routes) need the real path, and can derive the basename either way.

share?

optional share?: ShotShare

start

start: number

thumb?

optional thumb?: string

viewport?

optional viewport?: boolean


Type Literal

{ cell?: string; cellLoc?: string; end: number; kind: "app-selection"; marker?: string; sourceLoc?: string; start: number; tab?: TabRecord; tex?: string; url?: string; }


Type Literal

{ end: number; kind: "code-selection"; lines?: number; marker?: string; sourceLoc?: string; start: number; tab?: TabRecord; url?: string; }


Type Literal

{ end: number; from: string; kind: "navigation" | "tab-switch"; start: number; tab?: TabRecord; to: string; }


Type Literal

{ end: number; kind: "preamble"; start: number; }