MCPcopy Create free account
hub / github.com/Noumena-Network/code / isTerminalOutput

Function isTerminalOutput

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

88 * Terminal output includes bash input/output tags and caveat messages about local commands.
89 */
90function isTerminalOutput(content: string): boolean {
91 for (const tag of TERMINAL_OUTPUT_TAGS) {
92 if (content.includes(`<${tag}>`)) {
93 return true
94 }
95 }
96 return false
97}
98
99/**
100 * 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