Skip to content

Commit

Permalink
fix: added missing signal about success
Browse files Browse the repository at this point in the history
  • Loading branch information
y9vad9 committed Nov 20, 2024
1 parent 3d12870 commit f628631
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public sealed interface PluginSignal : GPSignal {

@Serializable
public sealed interface RequestStatusChange : PluginSignal {
@Serializable
public data class Finished(public val message: String) : RequestStatusChange
@Serializable
public data object Accepted : RequestStatusChange
@Serializable
Expand Down Expand Up @@ -93,6 +95,10 @@ public class PluginMessage @PublishedApi internal constructor(

is PluginSignal.SendOptions -> SendOptionsField(value)

is PluginSignal.RequestStatusChange.Finished ->
RequestStatusFinishedField(value)


null -> null
}
}
Expand Down Expand Up @@ -127,6 +133,12 @@ public class PluginMessage @PublishedApi internal constructor(
override val value: PluginSignal.RequestStatusChange.Accepted,
) : SignalOneOf

@JvmInline
value class RequestStatusFinishedField(
@ProtoNumber(3)
override val value: PluginSignal.RequestStatusChange.Finished,
) : SignalOneOf

@JvmInline
value class RequestStatusFailedField(
@ProtoNumber(4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class GenerateCommand(
)
}
is PluginSignal.SendOptions -> { /* ignored: should've received before */ }
is PluginSignal.RequestStatusChange.Finished -> return@launch
}
}
}
Expand Down

0 comments on commit f628631

Please sign in to comment.