Merge claudedo/dc5d5776339b4da6a5fb628a5c2ed648
This commit is contained in:
+13
-1
@@ -109,7 +109,19 @@ public sealed class TaskWaitMcpTools
|
||||
var tasks = new TaskRepository(ctx);
|
||||
var resolved = new string[ids.Length];
|
||||
for (var i = 0; i < ids.Length; i++)
|
||||
resolved[i] = await TaskIdResolver.ResolveAsync(tasks, ids[i], ct);
|
||||
{
|
||||
try
|
||||
{
|
||||
resolved[i] = await TaskIdResolver.ResolveAsync(tasks, ids[i], ct);
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
// A #<number>/bare-number id with no matching task -- keep the original,
|
||||
// unresolvable id so CheckOnceAsync's lookup misses and reports "NotFound",
|
||||
// per this tool's documented contract, instead of failing the whole call.
|
||||
resolved[i] = ids[i];
|
||||
}
|
||||
}
|
||||
return resolved;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user