Refine tool dispatch errors in resume path
Prefix the unknown-tool error with the "cannot" convention and drop the duplicate wrap around executeSingleTool: that helper already wraps its generic error path, so the outer wrap produced messages shaped like "cannot execute tool X: cannot execute tool X: ...". Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
@@ -1332,7 +1332,7 @@ func resumeWithOpts(ctx context.Context, interrupted *InterruptedError, input Re
|
|||||||
|
|
||||||
desc, toolOK := toolMap[tc.Function.Name]
|
desc, toolOK := toolMap[tc.Function.Name]
|
||||||
if !toolOK {
|
if !toolOK {
|
||||||
return nil, fmt.Errorf("unknown tool %q", tc.Function.Name)
|
return nil, fmt.Errorf("cannot dispatch unknown tool %q", tc.Function.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ht, ok := desc.(*handoffToolAdapter); ok {
|
if ht, ok := desc.(*handoffToolAdapter); ok {
|
||||||
|
|||||||
Reference in New Issue
Block a user