File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,7 @@ public abstract class Protocol(
260260 LOGGER .trace { " Received progress notification: token=${notification.progressToken} , progress=${notification.progress} /${notification.total} " }
261261 val progress = notification.progress
262262 val total = notification.total
263+ val message = notification.message
263264 val progressToken = notification.progressToken
264265
265266 val handler = progressHandlers[progressToken]
@@ -272,7 +273,7 @@ public abstract class Protocol(
272273 return
273274 }
274275
275- handler.invoke(Progress (progress, total))
276+ handler.invoke(Progress (progress, total, message ))
276277 }
277278
278279 private fun onResponse (response : JSONRPCResponse ? , error : JSONRPCError ? ) {
Original file line number Diff line number Diff line change @@ -510,6 +510,11 @@ public sealed interface ProgressBase {
510510 * Total number of items to a process (or total progress required), if known.
511511 */
512512 public val total: Double?
513+
514+ /* *
515+ * An optional message describing the current progress.
516+ */
517+ public val message: String?
513518}
514519
515520/* Progress notifications */
@@ -530,6 +535,11 @@ public open class Progress(
530535 * Total number of items to a process (or total progress required), if known.
531536 */
532537 override val total : Double? ,
538+
539+ /* *
540+ * An optional message describing the current progress.
541+ */
542+ override val message : String? ,
533543) : ProgressBase
534544
535545/* *
@@ -546,6 +556,7 @@ public data class ProgressNotification(
546556 public val progressToken : ProgressToken ,
547557 @Suppress(" PropertyName" ) val _meta : JsonObject = EmptyJsonObject ,
548558 override val total : Double? ,
559+ override val message : String? ,
549560) : ClientNotification, ServerNotification, ProgressBase {
550561 override val method: Method = Method .Defined .NotificationsProgress
551562}
You can’t perform that action at this time.
0 commit comments