assistant2: Improve Lua script rendering (#26389)

This PR improves the rendering of Lua scripts provided to the scripting
tool.

We now render them in code blocks with syntax highlighting:

<img width="1297" alt="Screenshot 2025-03-10 at 2 40 51 PM"
src="https://github.com/user-attachments/assets/def65b5c-86a8-490f-aaa5-5cc1687fe01e"
/>

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-03-10 14:54:03 -04:00 committed by GitHub
parent 5ecc67f2ef
commit 02e970192f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 150 additions and 23 deletions

View file

@ -8,8 +8,8 @@ use schemars::JsonSchema;
use serde::Deserialize;
#[derive(Debug, Deserialize, JsonSchema)]
struct ScriptingToolInput {
lua_script: String,
pub struct ScriptingToolInput {
pub lua_script: String,
}
pub struct ScriptingTool;