Type Alias: ActionIntent
Makaio Framework / contracts / ActionIntent
Type Alias: ActionIntent
Section titled “Type Alias: ActionIntent”ActionIntent = {
kind:"noop"; } | {feedback?:string;kind:"clipboard";text:string; } | {kind:"navigate";target:FocusContext; } | {column?:number;filePath:string;kind:"openEditor";line?:number; } | {internalRoute?:string;kind:"openPage";pageId:string; } | {kind:"busRequest";payload?:Record<string,unknown>;subject:string; } | {kind:"feedback";message:string;variant?:"info"|"success"|"warning"|"error"; } | {kind:"confirm";message:string;onConfirmIntent:ActionIntent;title:string; } | {intents: readonlyActionIntent[];kind:"compound"; } | {commitId:string|null;filePath:string;kind:"viewDiff";originalPath?:string;parentCount?:number;status?:string;variant?:string; } | {commitId:string;filePath:string;kind:"viewAtCommit"; } | {commitId:string;filePath:string;kind:"viewBlame"; } | {commitId:string|null;filePath:string;kind:"compareVersions";originalPath?:string;parentCount?:number;status?:string;variant?:string; }
Defined in: ../../../packages/contracts/src/common/action-intent.ts:23
Describes a UI side effect that an action handler intends to produce.
Action handlers return an ActionIntent rather than executing effects directly.
The framework’s intent executor interprets and dispatches each kind.
SEAM: New intent kinds are added here. The executor in web/framework gains a
corresponding case. Platform services return intents without depending on execution.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ kind: "noop"; }
Type Literal
Section titled “Type Literal”{ feedback?: string; kind: "clipboard"; text: string; }
Type Literal
Section titled “Type Literal”{ kind: "navigate"; target: FocusContext; }
Type Literal
Section titled “Type Literal”{ column?: number; filePath: string; kind: "openEditor"; line?: number; }
Type Literal
Section titled “Type Literal”{ internalRoute?: string; kind: "openPage"; pageId: string; }
Type Literal
Section titled “Type Literal”{ kind: "busRequest"; payload?: Record<string, unknown>; subject: string; }
Type Literal
Section titled “Type Literal”{ kind: "feedback"; message: string; variant?: "info" | "success" | "warning" | "error"; }
Type Literal
Section titled “Type Literal”{ kind: "confirm"; message: string; onConfirmIntent: ActionIntent; title: string; }
Type Literal
Section titled “Type Literal”{ intents: readonly ActionIntent[]; kind: "compound"; }
Type Literal
Section titled “Type Literal”{ commitId: string | null; filePath: string; kind: "viewDiff"; originalPath?: string; parentCount?: number; status?: string; variant?: string; }
Open a diff view for a file.
commitIdisnullfor working-tree diffs (right side is read from disk).statusis the git file status character (A/M/D/R/…) for commit contexts.parentCountdrives empty-tree handling for root commits.originalPathcarries the rename origin when the file was renamed.variantis the working-tree section (‘staged’ | ‘unstaged’ | ‘untracked’ | ‘conflicted’).
Type Literal
Section titled “Type Literal”{ commitId: string; filePath: string; kind: "viewAtCommit"; }
Show file content at a specific commit in the inline file viewer panel. Only valid for commit-context files.
Type Literal
Section titled “Type Literal”{ commitId: string; filePath: string; kind: "viewBlame"; }
Show blame annotations for a file at a specific commit in the inline blame panel. Only valid for commit-context files.
Type Literal
Section titled “Type Literal”{ commitId: string | null; filePath: string; kind: "compareVersions"; originalPath?: string; parentCount?: number; status?: string; variant?: string; }
Compare a file across revisions using the diff viewer.
Equivalent to viewDiff but with useEmptyTreeForRoot = true — root commits
are shown as full-add diffs against the empty tree. For working-tree contexts,
untracked files are silently skipped.
commitIdisnullfor working-tree compare.status,parentCount,originalPath,variantcarry the same semantics asviewDiff.
Example
Section titled “Example”const intent: ActionIntent = { kind: 'clipboard', text: commit.hash };const compound: ActionIntent = { kind: 'compound', intents: [ { kind: 'clipboard', text: commit.hash }, { kind: 'feedback', message: 'Hash copied', variant: 'success' }, ],};Type Composition
Section titled “Type Composition”ActionIntent- `| { readonly kind: ‘noop’ } | { readonly kind: ‘clipboard’; readonly text: string; readonly feedback?: string } | { readonly kind: ‘navigate’; readonly target: FocusContext } | { readonly kind: ‘openEditor’; readonly filePath: string; readonly line?: number; readonly column?: number } | { readonly kind: ‘openPage’; readonly pageId: string; readonly internalRoute?: string } | { readonly kind: ‘busRequest’; readonly subject: string; readonly payload?: Record<string, unknown> } | { readonly kind: ‘feedback’; readonly message: string; readonly variant?: ‘info’ | ‘success’ | ‘warning’ | ‘error’ } | { readonly kind: ‘confirm’; readonly title: string; readonly message: string; readonly onConfirmIntent: ActionIntent; } | { readonly kind: ‘compound’; readonly intents: readonly ActionIntent[] } /**
- Open a diff view for a file.
-
commitIdisnullfor working-tree diffs (right side is read from disk).
-
statusis the git file status character (A/M/D/R/…) for commit contexts.
-
parentCountdrives empty-tree handling for root commits.
-
originalPathcarries the rename origin when the file was renamed.
-
variantis the working-tree section (‘staged’ | ‘unstaged’ | ‘untracked’ | ‘conflicted’). / | { readonly kind: ‘viewDiff’; readonly filePath: string; readonly commitId: string | null; readonly status?: string; readonly parentCount?: number; readonly originalPath?: string; readonly variant?: string; } /*
- Show file content at a specific commit in the inline file viewer panel.
- Only valid for commit-context files. / | { readonly kind: ‘viewAtCommit’; readonly filePath: string; readonly commitId: string } /*
- Show blame annotations for a file at a specific commit in the inline blame panel.
- Only valid for commit-context files. / | { readonly kind: ‘viewBlame’; readonly filePath: string; readonly commitId: string } /*
- Compare a file across revisions using the diff viewer.
- Equivalent to
viewDiffbut withuseEmptyTreeForRoot = true— root commits - are shown as full-add diffs against the empty tree. For working-tree contexts,
- untracked files are silently skipped.
-
commitIdisnullfor working-tree compare.
-
status,parentCount,originalPath,variantcarry the same semantics asviewDiff. */ | { readonly kind: ‘compareVersions’; readonly filePath: string; readonly commitId: string | null; readonly status?: string; readonly parentCount?: number; readonly originalPath?: string; readonly variant?: string; }`
{ readonly kind: 'noop' }{ readonly kind: 'clipboard'; readonly text: string; readonly feedback?: string }{ readonly kind: 'navigate'; readonly target: FocusContext }{ readonly kind: 'openEditor'; readonly filePath: string; readonly line?: number; readonly column?: number }{ readonly kind: 'openPage'; readonly pageId: string; readonly internalRoute?: string }{ readonly kind: 'busRequest'; readonly subject: string; readonly payload?: Record<string, unknown> }{ readonly kind: 'feedback'; readonly message: string; readonly variant?: 'info' | 'success' | 'warning' | 'error' }{ readonly kind: 'confirm'; readonly title: string; readonly message: string; readonly onConfirmIntent: ActionIntent; }{ readonly kind: 'compound'; readonly intents: readonly ActionIntent[] }{ readonly kind: 'viewDiff'; readonly filePath: string; readonly commitId: string | null; readonly status?: string; readonly parentCount?: number; readonly originalPath?: string; readonly variant?: string; }{ readonly kind: 'viewAtCommit'; readonly filePath: string; readonly commitId: string }{ readonly kind: 'viewBlame'; readonly filePath: string; readonly commitId: string }{ readonly kind: 'compareVersions'; readonly filePath: string; readonly commitId: string | null; readonly status?: string; readonly parentCount?: number; readonly originalPath?: string; readonly variant?: string; }
Resolved Shape
Section titled “Resolved Shape”type ActionIntent = { kind: 'noop' | 'clipboard' | 'navigate' | 'openEditor' | 'openPage' | 'busRequest' | 'feedback' | 'confirm' | 'compound' | 'viewDiff' | 'viewAtCommit' | 'viewBlame' | 'compareVersions';};