Skip to content
Open
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
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.10.2
d9b88f7113f0d5b2be6f8ae07d531823672b089f
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.8.6
version = 3.10.2
maxColumn = 140
rewrite.rules = [RedundantBraces, RedundantParens, SortImports]
runner.dialect = scala3
2 changes: 1 addition & 1 deletion core/src/main/scala/chimp/McpHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class McpHandler[F[_]](
// For each sub-request, process as a single request using flatMap/fold (no .sequence)
def processBatch(reqs: List[JSONRPCMessage], acc: List[JSONRPCMessage]): F[List[JSONRPCMessage]] =
reqs match
case Nil => acc.reverse.unit
case Nil => acc.reverse.unit
case head :: tail =>
head match
case JSONRPCMessage.Notification(_, _, _) =>
Expand Down
4 changes: 2 additions & 2 deletions examples/src/main/scala/chimp/weatherMcp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private def geocodeCity(city: String, backend: SyncBackend): Either[String, Nomi
val nominatimUrl = uri"https://nominatim.openstreetmap.org/search?format=json&limit=1&q=$city"
val geoResp = basicRequest.get(nominatimUrl).header("User-Agent", "chimp-weather-tool").send(backend)
geoResp.body match
case Left(_) => Left(s"Failed to contact geocoding service: ${geoResp.code}")
case Left(_) => Left(s"Failed to contact geocoding service: ${geoResp.code}")
case Right(body) =>
decode[List[NominatimResult]](body) match
case Left(err) => Left(s"Failed to decode geocoding response: $err")
Expand All @@ -87,7 +87,7 @@ private def fetchWeather(lat: String, lon: String, backend: SyncBackend): Either
val meteoUrl = uri"https://api.open-meteo.com/v1/forecast?latitude=$lat&longitude=$lon&current_weather=true"
val meteoResp = basicRequest.get(meteoUrl).send(backend)
meteoResp.body match
case Left(_) => Left(s"Failed to contact weather service: ${meteoResp.code}")
case Left(_) => Left(s"Failed to contact weather service: ${meteoResp.code}")
case Right(body) =>
decode[OpenMeteoResponse](body) match
case Left(err) => Left(s"Failed to decode weather response: $err")
Expand Down