mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-03 02:21:44 +00:00
refactor: drop unused notebook code-cell counter
The sequential JSON walk already tracks cells without a separate index. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
d2acefe016
commit
939e0e4639
1 changed files with 0 additions and 3 deletions
|
|
@ -200,7 +200,6 @@ export function extractNotebookPython(content: string): NotebookPythonExtraction
|
|||
const segments: NotebookLineSegment[] = [];
|
||||
let extractLine = 0;
|
||||
let searchFrom = 0;
|
||||
let codeCellIndex = 0;
|
||||
|
||||
for (const rawCell of nb.cells) {
|
||||
if (!rawCell || typeof rawCell !== 'object') continue;
|
||||
|
|
@ -210,7 +209,6 @@ export function extractNotebookPython(content: string): NotebookPythonExtraction
|
|||
const located = findNextCodeCellSourceSpan(content, searchFrom);
|
||||
if (!located) return null;
|
||||
searchFrom = located.nextFrom;
|
||||
codeCellIndex++;
|
||||
|
||||
const lang = cellLanguage(cell);
|
||||
if (lang !== undefined && !isPythonFamilyLanguage(lang)) {
|
||||
|
|
@ -255,7 +253,6 @@ export function extractNotebookPython(content: string): NotebookPythonExtraction
|
|||
});
|
||||
}
|
||||
|
||||
void codeCellIndex;
|
||||
const pythonSource = chunks.join('');
|
||||
if (pythonSource.trim().length === 0) return null;
|
||||
return { pythonSource, segments };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue