MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isTerminalOutput

Function isTerminalOutput

src/utils/attribution.ts:104–111  ·  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

102 * Terminal output includes bash input/output tags and caveat messages about local commands.
103 */
104function isTerminalOutput(content: string): boolean {
105 for (const tag of TERMINAL_OUTPUT_TAGS) {
106 if (content.includes(`<${tag}>`)) {
107 return true
108 }
109 }
110 return false
111}
112
113/**
114 * 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