Skip to content

Commit f36e74d

Browse files
committed
fix(team): fix nullability issue in TeamPromptsBuilder
The `TeamPromptsBuilder` class had a nullability issue when finding the override file. This commit fixes the issue by using `findFileByRelativePath` instead of `findChild`.
1 parent 123da5b commit f36e74d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/kotlin/cc/unitmesh/devti/custom/team/TeamPromptsBuilder.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class TeamPromptsBuilder(private val project: Project) {
4343
val promptsDir = project.guessProjectDir()?.findChild(baseDir) ?: return null
4444
val path = "$pathPrefix/$filename"
4545

46-
val overrideFile = promptsDir.findChild(path) ?: return null
46+
val overrideFile = promptsDir.findFileByRelativePath(path)
47+
?: return null
4748
return runReadAction { overrideFile.inputStream.readBytes().toString(Charsets.UTF_8) }
4849
}
4950
}

0 commit comments

Comments
 (0)