Skip to content

Commit 128f671

Browse files
committed
use any for optvalue
1 parent 8838e91 commit 128f671

File tree

2 files changed

+16
-10
lines changed
  • plugins/amazonq
    • chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview
    • shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/model/aws/chat

2 files changed

+16
-10
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/BrowserConnector.kt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,6 @@ class BrowserConnector(
476476
)
477477
}
478478
}
479-
else -> {
480-
println(node.command)
481-
}
482479
}
483480
}
484481

@@ -539,14 +536,18 @@ class BrowserConnector(
539536

540537
is JsonRpcRequest<Request, Response> -> {
541538
{
542-
rawEndpoint.request(lspMethod.name, node.params?.let { serializer.objectMapper.treeToValue<Any>(it) }).thenApply {
543-
serializer.objectMapper.readValue(
544-
Gson().toJson(it),
545-
lspMethod.response
546-
)
547-
}
539+
540+
rawEndpoint.request(lspMethod.name, node.params?.let { serializer.objectMapper.treeToValue<Any>(it) }).thenApply {
541+
serializer.objectMapper.readValue(
542+
Gson().toJson(it),
543+
lspMethod.response
544+
)
545+
}
546+
547+
548548
}
549549
}
550+
550551
} as () -> CompletableFuture<Response>
551552
serverAction(requestFromUi, invokeService)
552553
} ?: CompletableFuture.failedFuture<Response>(IllegalStateException("LSP Server not running"))

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/model/aws/chat/Mcp.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,18 @@ data class ListMcpServersResult(
3333
)
3434
}
3535

36+
3637
// MCP Server Click Parameters
3738
data class McpServerClickParams(
3839
val id: String,
3940
val title: String? = null,
40-
val optionsValues: Map<String, String>? = null
41+
// here Any is sufficient to serialize/deserialze complex objects
42+
val optionsValues: Map<String, Any>? = null
4143
)
4244

45+
46+
47+
4348
// MCP Server Click Result
4449
data class McpServerClickResult(
4550
val id: String,

0 commit comments

Comments
 (0)