Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInjectedPrompt ¶ added in v0.10.1
IsInjectedPrompt reports whether text is agent-injected rather than user-authored. It is the single source of truth for that question: callers that pick a session title, count user turns, or compact a transcript all use it so the classification cannot drift between them.
func StripIDEContextTags ¶
StripIDEContextTags removes IDE-injected context tags from prompt text. The VSCode extension injects tags like:
- <ide_opened_file>...</ide_opened_file> - currently open file
- <ide_selection>...</ide_selection> - selected code in editor
Also removes system-injected tags like:
- <local-command-caveat>...</local-command-caveat>
- <system-reminder>...</system-reminder>
- <command-name>...</command-name>
Cursor's <user_query> wrapper is unwrapped (content kept) and its prepended <timestamp> line is removed (content included, leading position only).
These shouldn't appear in commit messages or session descriptions. Not idempotent: the unwrap can expose user content at the start of the message, so callers must apply it exactly once per text.
Types ¶
This section is empty.