Skip to content

Commit

Permalink
Adjust code format
Browse files Browse the repository at this point in the history
  • Loading branch information
pplam committed Oct 8, 2024
1 parent e7f8c45 commit 6183876
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ class ContextBuilder(val file: PsiFile, val offset: Int) {
}
?.takeWhile { checkAndUpdateTokenCount(it.second) }
?.joinToString(separator = "") {(name, snippet) ->
val commentedContent = snippet.content.lines().joinToString(LINE_SEPARATOR.toString()) {
"$commentPrefix $it"
}
val commentedContent = snippet.content.lines()
.joinToString(LINE_SEPARATOR.toString()) { "$commentPrefix $it" }
"$commentPrefix Symbol type definition:\n\n" +
"$commentPrefix <symbol>${name}\n\n" +
"$commentPrefix <filename>${snippet.filepath}\n\n" +
Expand All @@ -163,9 +162,8 @@ class ContextBuilder(val file: PsiFile, val offset: Int) {
.filter { it.content.lines().count(String::isBlank) <= 50 }
.takeWhile(::checkAndUpdateTokenCount)
.joinToString(separator = "") {snippet ->
val commentedContent = snippet.content.lines().joinToString(LINE_SEPARATOR.toString()) {
"$commentPrefix $it"
}
val commentedContent = snippet.content.lines()
.joinToString(LINE_SEPARATOR.toString()) { "$commentPrefix $it" }
"$commentPrefix Recently open file:\n\n" +
"$commentPrefix <filename>${snippet.filepath}\n\n" +
"$commentedContent\n\n\n\n"
Expand Down

0 comments on commit 6183876

Please sign in to comment.