assistant2: Decouple scripting tool from the Tool trait (#26382)

This PR decouples the scripting tool from the `Tool` trait while still
allowing it to be used as a tool from the model's perspective.

This will allow us to evolve the scripting tool as more of a first-class
citizen while still retaining the ability to have the model call it as a
regular tool.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-03-10 13:57:03 -04:00 committed by GitHub
parent 2fc4dec58f
commit e513e81046
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 138 additions and 52 deletions

View file

@ -267,6 +267,7 @@ impl ToolUseState {
pub struct PendingToolUse {
pub id: LanguageModelToolUseId,
/// The ID of the Assistant message in which the tool use was requested.
#[allow(unused)]
pub assistant_message_id: MessageId,
pub name: Arc<str>,
pub input: serde_json::Value,