Documentation
¶
Overview ¶
Package check_context_size implements the ctx system check-context-size subcommand.
It counts prompts per session and emits adaptive checkpoint reminders prompting the user to consider wrapping up.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cmd ¶
Cmd returns the "ctx system check-context-size" subcommand.
Returns:
- *cobra.Command: Configured check-context-size subcommand
func Run ¶
Run executes the check-context-size hook logic.
Reads hook input from stdin, tracks per-session prompt counts, and emits context checkpoint or window warning messages at adaptive intervals. Also fires a one-shot billing warning when token usage exceeds the user-configured threshold.
Parameters:
- cmd: Cobra command for output
- stdin: standard input for hook JSON
Returns:
- error: Always nil (hook errors are non-fatal)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.