Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,3 @@ repos:
hooks:
- id: stylua-github
language: lua
- repo: 'https://github.com/kdheepak/panvimdoc'
rev: v4.0.1
hooks:
- id: panvimdoc-docker
files: docs/neovim.md
args:
- '--project-name'
- 'VectorCode'
- '--input-file'
- './docs/neovim.md'
4 changes: 2 additions & 2 deletions src/vectorcode/subcommands/chunks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ async def chunks(configs: Config) -> int:
chunker = TreeSitterChunker(configs)
result = []
for file_path in configs.files:
result.append(list(chunker.chunk(str(file_path))))
print(json.dumps(str(result)))
result.append(list(i.text for i in chunker.chunk(str(file_path))))
print(json.dumps((result)))
return 0
6 changes: 3 additions & 3 deletions tests/subcommands/test_chunks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from vectorcode.chunking import TreeSitterChunker
from vectorcode.chunking import Chunk, TreeSitterChunker
from vectorcode.cli_utils import Config
from vectorcode.subcommands import chunks

Expand All @@ -19,8 +19,8 @@ async def test_chunks():
mock_chunker = TreeSitterChunker(mock_config)
mock_chunker.chunk = MagicMock()
mock_chunker.chunk.side_effect = [
["chunk1_file1", "chunk2_file1"],
["chunk1_file2", "chunk2_file2"],
[Chunk("chunk1_file1", None, None), Chunk("chunk2_file1", None, None)],
[Chunk("chunk1_file2", None, None), Chunk("chunk2_file2", None, None)],
]
with patch(
"vectorcode.subcommands.chunks.TreeSitterChunker", return_value=mock_chunker
Expand Down