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
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ object A2uiA2a {

val isSupportRequired = false
return AgentExtension(
A2UI_EXTENSION_URI,
"Provides agent driven UI using the A2UI JSON format.",
params,
isSupportRequired,
"Provides agent driven UI using the A2UI JSON format.",
A2UI_EXTENSION_URI,
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import com.google.genai.types.Part
import io.a2a.spec.Event as A2aEvent
import io.a2a.spec.Message
import io.a2a.spec.Message.Role.ROLE_AGENT
import io.a2a.spec.Part as A2aPart
import io.a2a.spec.TaskState
import io.a2a.spec.TaskStatus
import io.a2a.spec.TaskStatusUpdateEvent
Expand All @@ -49,7 +50,7 @@ class A2uiPartConverter(
// to returning DataParts for A2UI, and omitting standard conversions here.
// Client applications should adapt this integration logic based on actual available converters.

fun convert(part: Part): List<io.a2a.spec.Part<*>> {
fun convert(part: Part): List<A2aPart<*>> {
val functionResponse = part.functionResponse().orElse(null)
val isSendA2uiJsonToClientResponse =
functionResponse != null &&
Expand Down Expand Up @@ -129,7 +130,7 @@ class A2uiEventConverter(
// 2. Process Content
val content = event.content().orElse(null)
if (content != null) {
val outputParts = mutableListOf<io.a2a.spec.Part<*>>()
val outputParts = mutableListOf<A2aPart<*>>()

val genaiParts = content.parts().orElse(emptyList()) ?: emptyList()
for (part in genaiParts) {
Expand Down
Loading
Loading