Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assistant: Make scripting a first-class concept instead of a tool #26338

Merged
merged 16 commits into from
Mar 9, 2025

Conversation

agu-z
Copy link
Contributor

@agu-z agu-z commented Mar 9, 2025

This PR makes refactors the scripting functionality to be a first-class concept of the assistant instead of a generic tool, which will allow us to build a more customized experience.

  • The tool prompt has been slightly tweaked and is now included as a system message in all conversations. I'm getting decent results, but now that it isn't in the tools framework, it will probably require more refining.

  • The model will now include an <eval ...> tag at the end of the message with the script. We parse this tag incrementally as it streams in, so that we can indicate that we are generating a script before we see the closing </eval> tag. Later, this will help us interpret the script as it arrives also.

  • Threads now hold a ScriptSession entity which manages the state of all scripts (from parsing to exited) in a centralized way, and will later collect all script operations so they can be displayed in the UI.

  • script_tool has been renamed to assistant_scripting

  • Script source now opens in a regular read-only buffer

Note: We still need to handle persistence properly

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 9, 2025
@agu-z agu-z enabled auto-merge (squash) March 9, 2025 08:50
@agu-z agu-z merged commit e298301 into main Mar 9, 2025
13 checks passed
@agu-z agu-z deleted the first-class-scripts branch March 9, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant