MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / isTerminalOutput

Function isTerminalOutput

source code/utils/attribution.ts:106–113  ·  view source on GitHub ↗

* Check if a message content string is terminal output rather than a user prompt. * Terminal output includes bash input/output tags and caveat messages about local commands.

(content: string)

Source from the content-addressed store, hash-verified

104 * Terminal output includes bash input/output tags and caveat messages about local commands.
105 */
106function isTerminalOutput(content: string): boolean {
107 for (const tag of TERMINAL_OUTPUT_TAGS) {
108 if (content.includes(`<${tag}>`)) {
109 return true
110 }
111 }
112 return false
113}
114
115/**
116 * Count user messages with visible text content in a list of non-sidechain messages.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected