Skip to content

Commit 4ed6501

Browse files
committed
fix chunk issue && closed #61
1 parent a275fb8 commit 4ed6501

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/kotlin/com/intellij/temporary/similar/chunks/SimilarChunksWithPaths.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ class SimilarChunksWithPaths(private var snippetLength: Int = 60, private var ma
9898
}
9999

100100
/**
101-
* since is slowly will tokenize, we revoke to same way will Copilot:
101+
* since is slowly will tokenize, we revoke the same way will Copilot:
102102
* https://github.com/mengjian-github/copilot-analysis#promptelement%E4%B8%BB%E8%A6%81%E5%86%85%E5%AE%B9
103-
*
104103
*/
105104
private fun tokenize(chunk: String): List<String> {
106105
return chunk.split(Regex("[^a-zA-Z0-9]")).filter { it.isNotBlank() }
@@ -130,7 +129,6 @@ class SimilarChunksWithPaths(private var snippetLength: Int = 60, private var ma
130129
?.filter {
131130
!it.trim().startsWith("import ") && !it.trim().startsWith("package ")
132131
}
133-
?.chunked(snippetLength)?.flatten()
134132
}
135133
}
136134

0 commit comments

Comments
 (0)