Skip to content

Commit bfcf05a

Browse files
committed
chore: remove AI slop comments
- Remove verbose banner-style section comments in block-tree-utils.ts - Remove redundant file header in tool-call-repair.ts - Remove generic header comment in project-discovery.ts - Simplify verbose JSDoc in message-block-helpers.ts
1 parent 73779c8 commit bfcf05a

File tree

4 files changed

+1
-36
lines changed

4 files changed

+1
-36
lines changed

cli/src/utils/block-tree-utils.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
/**
2-
* Block tree utilities for updating nested content blocks.
3-
*/
4-
51
import type { ContentBlock } from '../types/chat'
62
import { isCollapsibleBlock } from '../types/chat'
73

8-
// ============================================================================
9-
// Internal helpers (not exported - used by public API)
10-
// ============================================================================
11-
124
/** Checks if a block matches the given ID (agentId, toolCallId, thinkingId, or id). */
135
function blockMatchesId(block: ContentBlock, id: string): boolean {
146
if (block.type === 'agent' && block.agentId === id) return true
@@ -50,10 +42,6 @@ function updateBlocksByPredicate(
5042
return hasChanges ? result : blocks
5143
}
5244

53-
// ============================================================================
54-
// Traversal and Search Utilities
55-
// ============================================================================
56-
5745
/** Visits all blocks recursively. Return false from visitor to stop traversal early. Returns false if stopped early. */
5846
export function traverseBlocks(
5947
blocks: ContentBlock[],
@@ -117,10 +105,6 @@ export function mapBlocks(
117105
return hasChanges ? result : blocks
118106
}
119107

120-
// ============================================================================
121-
// Public API
122-
// ============================================================================
123-
124108
/** Updates the block matching the given ID (checks agentId, toolCallId, thinkingId, id). */
125109
export function updateBlockById(
126110
blocks: ContentBlock[],

cli/src/utils/message-block-helpers.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,7 @@ export const createAgentBlock = (
288288
}
289289
}
290290

291-
/**
292-
* Helper function to recursively update blocks by target agent ID.
293-
* Uses the unified block tree utilities internally.
294-
*
295-
* @param blocks - The array of blocks to update
296-
* @param targetAgentId - The agent ID to find and update
297-
* @param updateFn - Function that transforms the matching agent block
298-
* @returns New array with updated block, or original array if no match
299-
*/
291+
/** Recursively updates blocks by target agent ID. Delegates to updateAgentBlockById. */
300292
export const updateBlocksRecursively = (
301293
blocks: ContentBlock[],
302294
targetAgentId: string,

sdk/src/impl/project-discovery.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/**
2-
* Project file discovery using .gitignore patterns.
3-
*/
4-
51
import path from 'path'
62

73
import {

sdk/src/impl/tool-call-repair.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
/**
2-
* Tool call repair handler for AI SDK streamText.
3-
*
4-
* Transforms tool calls for spawnable agents into spawn_agents calls,
5-
* and handles other tool errors gracefully.
6-
*/
7-
81
import { NoSuchToolError } from 'ai'
92

103
import type { Logger } from '@codebuff/common/types/contracts/logger'

0 commit comments

Comments
 (0)