Documentation
¶
Overview ¶
Package prompt renders the templated agent prompts emitted when a review finishes, following crit's hook naming, resolution order, and template variables (https://github.com/tomasz-tomczyk/crit).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HookForFinish ¶
HookForFinish names the hook that fires for a finish result.
func RenderFinish ¶
RenderFinish resolves and renders the finish prompt. prompts is the merged config prompts map; projectRoot may be empty. Rendering errors fall back to a plain message rather than blocking the finish.
func StockTemplates ¶
StockTemplates returns the embedded stock template file names and contents, for `critty install prompts` and staleness checking.
Types ¶
type Context ¶
type Context struct {
ReviewPath string
SessionKey string
Mode string // "diff" (git) or "files"
InternalMode string // "git", "diff", "files", or "plan"
PlanSlug string
UnresolvedCount int
TotalCount int
FilesWithComments []string
UnresolvedJSON string
CommentsJSON string
Approved bool
NextRoundCmd string
}
Context carries the values exposed to finish templates.
func (Context) TemplateData ¶
TemplateData returns the snake_case variable map, matching crit's names.