MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / shouldShowEditDiff

Function shouldShowEditDiff

cli/src/utils/implementor-helpers.ts:445–458  ·  view source on GitHub ↗
(toolBlock: ToolContentBlock)

Source from the content-addressed store, hash-verified

443 * operations never briefly flash an input-derived full-file diff.
444 */
445export function shouldShowEditDiff(toolBlock: ToolContentBlock): boolean {
446 if (!extractDiff(toolBlock) || isCreateFile(toolBlock)) {
447 return false
448 }
449
450 if (
451 !isProposedToolName(toolBlock.toolName) &&
452 !hasToolResultOutput(toolBlock)
453 ) {
454 return false
455 }
456
457 return true
458}
459
460export interface TimelineItem {
461 type: 'commentary' | 'edit'

Callers 2

renderFunction · 0.90

Calls 4

extractDiffFunction · 0.85
isCreateFileFunction · 0.85
isProposedToolNameFunction · 0.85
hasToolResultOutputFunction · 0.85

Tested by

no test coverage detected