language_model: Use LanguageModelToolUseId instead of a String (#25666)

This PR updates the `LanguageModelToolResult` type to use a
`LanguageModelToolUseId` for the tool use ID instead of a `String`.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-02-26 12:34:16 -05:00 committed by GitHub
parent f11357db7c
commit d82a132477
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -518,7 +518,7 @@ impl Thread {
match output {
Ok(output) => {
tool_results.push(LanguageModelToolResult {
tool_use_id: tool_use_id.to_string(),
tool_use_id: tool_use_id.clone(),
content: output,
is_error: false,
});
@ -527,7 +527,7 @@ impl Thread {
}
Err(err) => {
tool_results.push(LanguageModelToolResult {
tool_use_id: tool_use_id.to_string(),
tool_use_id: tool_use_id.clone(),
content: err.to_string(),
is_error: true,
});