Documentation
¶
Overview ¶
Package hook provides terminal output functions for the hook command.
Index ¶
- func BlockResponse(cmd *cobra.Command, response string)
- func Content(cmd *cobra.Command, content string)
- func HookContext(cmd *cobra.Command, response string)
- func InfoCopilotCreated(cmd *cobra.Command, targetFile string)
- func InfoCopilotMerged(cmd *cobra.Command, targetFile string)
- func InfoCopilotSessionsDir(cmd *cobra.Command, sessionsDir string)
- func InfoCopilotSkipped(cmd *cobra.Command, targetFile string)
- func InfoCopilotSummary(cmd *cobra.Command)
- func InfoTool(cmd *cobra.Command, content string)
- func InfoUnknownTool(cmd *cobra.Command, tool string)
- func Nudge(cmd *cobra.Command, nudgeBox string)
- func NudgeBlock(cmd *cobra.Command, nudgeBox string)
- func Separator(cmd *cobra.Command)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockResponse ¶
BlockResponse prints a JSON block response line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- response: JSON-encoded block response.
func Content ¶
Content prints raw hook content to stdout.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- content: Pre-rendered content string.
func HookContext ¶
HookContext prints a JSON hook response line. Nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- response: JSON-encoded hook response.
func InfoCopilotCreated ¶
InfoCopilotCreated reports that copilot instructions were created.
Parameters:
- cmd: Cobra command for output
- targetFile: Path to the created file
func InfoCopilotMerged ¶
InfoCopilotMerged reports that copilot instructions were merged into an existing file.
Parameters:
- cmd: Cobra command for output
- targetFile: Path to the merged file
func InfoCopilotSessionsDir ¶
InfoCopilotSessionsDir reports that the sessions directory was created.
Parameters:
- cmd: Cobra command for output
- sessionsDir: Path to the sessions directory
func InfoCopilotSkipped ¶
InfoCopilotSkipped reports that copilot instructions were skipped because the ctx marker already exists in the target file.
Parameters:
- cmd: Cobra command for output
- targetFile: Path to the existing file
func InfoCopilotSummary ¶
InfoCopilotSummary prints the post-write summary for copilot.
Parameters:
- cmd: Cobra command for output
func InfoTool ¶
InfoTool prints a tool integration section to stdout.
The content is a pre-formatted multi-line text block loaded from commands.yaml. A trailing newline is not added: the content is expected to include its own formatting.
Parameters:
- cmd: Cobra command for output
- content: Pre-formatted text block
func InfoUnknownTool ¶
InfoUnknownTool prints the unknown tool message.
Parameters:
- cmd: Cobra command for output
- tool: The unrecognized tool name
func Nudge ¶
Nudge prints a pre-built nudge box to stdout.
Used by system hooks to emit nudge messages through the write layer rather than calling cmd.Println directly.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- nudgeBox: fully formatted nudge box string.
func NudgeBlock ¶
NudgeBlock prints a nudge box followed by an empty line. Empty box or nil cmd is a no-op.
Parameters:
- cmd: Cobra command for output. Nil is a no-op.
- nudgeBox: fully formatted nudge box string.
Types ¶
This section is empty.