File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 66 been possible to use in a functional manner, so it is assumed that it had
77 no usage previously.
88- Fix the ` type ` getter on ` EmbeddedResource ` to read the actual type field.
9+ - Add ` toJson ` method to the ` CreateMessageResult ` of a sampling request.
910
1011## 0.4.0
1112
Original file line number Diff line number Diff line change 1010 resources or resource links (when reading a directory).
1111- Add ` additionalProperties: false ` to most schemas so they provide better
1212 errors when invoked with incorrect arguments.
13- - Add ` toJson ` method to the ` CreateMessageResult ` of a sampling request.
13+ - Add ` DartMcpServer.samplingRequest ` service extension method to send a sampling
14+ request over DTD.
1415
1516# 0.1.1 (Dart SDK 3.10.0)
1617
Original file line number Diff line number Diff line change @@ -289,11 +289,13 @@ base mixin DartToolingDaemonSupport
289289 Future <void > _registerServices () async {
290290 final dtd = _dtd! ;
291291
292- await dtd.registerService (
293- McpServiceConstants .serviceName,
294- McpServiceConstants .samplingRequest,
295- _handleSamplingRequest,
296- );
292+ if (clientCapabilities.sampling != null ) {
293+ await dtd.registerService (
294+ McpServiceConstants .serviceName,
295+ McpServiceConstants .samplingRequest,
296+ _handleSamplingRequest,
297+ );
298+ }
297299 }
298300
299301 Future <Map <String , Object ?>> _handleSamplingRequest (Parameters params) async {
You can’t perform that action at this time.
0 commit comments