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

Function filterContent

web/lib/export/json.ts:3–15  ·  view source on GitHub ↗
(
  content: ContentBlock[] | string,
  options: ExportOptions
)

Source from the content-addressed store, hash-verified

1import type { Conversation, Message, ExportOptions, ContentBlock } from "../types";
2
3function filterContent(
4 content: ContentBlock[] | string,
5 options: ExportOptions
6): ContentBlock[] | string {
7 if (typeof content === "string") return content;
8
9 return content.filter((block) => {
10 if (block.type === "tool_use" || block.type === "tool_result") {
11 return options.includeToolUse;
12 }
13 return true;
14 });
15}
16
17function filterMessage(msg: Message, options: ExportOptions): Message {
18 return {

Callers 1

filterMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected