MCPcopy Index your code
hub / github.com/deepnote/deepnote / computeStats

Function computeStats

packages/mcp/src/tools/reading.ts:43–60  ·  view source on GitHub ↗
(file: DeepnoteFile)

Source from the content-addressed store, hash-verified

41}
42
43function computeStats(file: DeepnoteFile) {
44 // Use CLI's analysis function for consistency
45 const stats = computeProjectStats(file)
46
47 // Convert block type summary to simple counts object for backwards compatibility
48 const blockCounts: Record<string, number> = {}
49 for (const bt of stats.blockTypesSummary) {
50 blockCounts[bt.type] = bt.count
51 }
52
53 return {
54 totalLines: stats.totalLinesOfCode,
55 uniqueImports: stats.imports,
56 importCount: stats.imports.length,
57 blockCounts,
58 totalBlocks: stats.totalBlocks,
59 }
60}
61
62async function computeLintIssues(file: DeepnoteFile) {
63 // Use CLI's analysis function for consistency and comprehensive checks

Callers 1

handleReadFunction · 0.70

Calls 1

computeProjectStatsFunction · 0.90

Tested by

no test coverage detected