MCPcopy Create free account
hub / github.com/codeaashu/claude-code / formatSnippet

Function formatSnippet

src/components/LogSelector.tsx:84–90  ·  view source on GitHub ↗
({
  before,
  match,
  after
}: Snippet, highlightColor: (text: string) => string)

Source from the content-addressed store, hash-verified

82 after: string;
83};
84function formatSnippet({
85 before,
86 match,
87 after
88}: Snippet, highlightColor: (text: string) => string): string {
89 return chalk.dim(before) + highlightColor(match) + chalk.dim(after);
90}
91function extractSnippet(text: string, query: string, contextChars: number): Snippet | null {
92 // Find exact query occurrence (case-insensitive).
93 // Note: Fuse does fuzzy matching, so this may miss some fuzzy matches.

Callers 1

LogSelectorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected