Skip to content

Commit

Permalink
Potential Fix 1
Browse files Browse the repository at this point in the history
  • Loading branch information
RXminuS committed Aug 9, 2024
1 parent 1897c8b commit 12b71b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ private constructor(
return normalizeUriOrPath(uriString)
}

//TODO: CODY-3223 - This should be moved to the protocol extension layer so that ALL uri's & paths are properly converted. Probably also means we want to alter the generated bindings to provide a hook or automatically generate the serializer.
@JvmStatic
fun normalizeUriOrPath(uriString: String): String {
val hasScheme = uriString.startsWith("file://")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class CodyFixHighlightPass(val file: PsiFile, val editor: Editor) :
location =
// TODO: Rik Nauta -- Got incorrect range; see QA report Aug 6 2024.
ProtocolLocation(
uri = protocolTextDocument.uri,
uri = ProtocolTextDocument.normalizeUriOrPath(protocolTextDocument.uri),
range = document.codyRange(it.startOffset, it.endOffset)),
code = it.problemGroup?.problemName)
} catch (x: Exception) {
Expand All @@ -113,7 +113,7 @@ class CodyFixHighlightPass(val file: PsiFile, val editor: Editor) :
}
val location =
ProtocolLocation(
uri = protocolTextDocument.uri,
uri = ProtocolTextDocument.normalizeUriOrPath(protocolTextDocument.uri),
range = document.codyRange(highlight.startOffset, highlight.endOffset))
val provideResponse =
agent.server
Expand Down

0 comments on commit 12b71b6

Please sign in to comment.