ScriptsGuide

The editor’s AI chat

The AI chat tab beside the code answers questions about the script on screen and proposes changes to it. A proposal is never applied by itself: it arrives as a diff between Current script and Suggestion, and only Apply to editor puts it into your draft. The chat cannot save, publish or run anything — those stay your buttons.

What you will learn
  • Ask about the script or request a change
  • Review a proposal as a diff and apply it to the draft
  • Send a failed run with Fix with AI
  • Choose the model and know what the chat sees

A chat that proposes, you decide

Open the AI chat tab in the editor’s side panel (it is the first tab; if the panel is folded to its rail, click the chat icon). An empty chat says Ask about this script or describe a change. Review the suggested code before applying it. Type in Ask about your script… and press Send.

hello.py
1def main(name: str = "world", shout: bool = False):2    text = f"Hello, {name}!"3    return {"message": text}
Python 3.15LSP
AI chat31
Upper-case the message when shout is true.

One change in main: when shout is true, the text is upper-cased before it is returned.

Current scriptSuggestion
text = f"Hello, {name}!"+ if shout:+ text = text.upper() return {"message": text}
Apply to editorChanges stay in your draft until you save.
Ask about your script…
claude-sonnet-4-5
The answer’s summary, then the diff and Apply to editor; the model picker sits in the composer.

Every answer has a short summary. A question — “why does this return null?” — gets only words. A change request gets the summary plus the whole file rewritten, shown as a diff against the code you had when you asked.

The chat seesThe chat does not see
The code in the editor now, saved or not, and its languageOther scripts, flows or files of the project
Your request and the last 12 exchanges of this conversationYour variables, secrets or integration credentials
A failed run you attach: its error, frames and inputsEarlier runs you did not attach

Ask for a change and apply it

Start from a small script:

order_total.py
def main(prices: list[float] = [19.9, 5.0]):
    return {"total": round(sum(prices), 2)}
  1. Describe the change

    Type Add a discount percentage input and return the subtotal too and press Send. While it works, ■ stops the request and puts your words back in the box.

  2. Review the diff

    The reply shows Current script against Suggestion with full context. Read it as you would read a colleague’s change.

  3. Apply it to your draft

    Apply to editor replaces the code in the editor and turns into Applied. The note says Changes stay in your draft until you save. — the Inputs card updates with the new parameter at once.

  4. Run, then save

    Run the new code, and press Save when you are happy. Publishing is a separate step, as always.

order_total.py
def main(prices: list[float] = [19.9, 5.0], discount_pct: float = 0):
    subtotal = sum(prices)
    total = subtotal * (1 - discount_pct / 100)
    return {"subtotal": round(subtotal, 2), "total": round(total, 2)}
Expected outputSuccessA suggestion like this one, run with <code>discount_pct</code> set to 10
{
  "subtotal": 24.9,
  "total": 22.41
}

Fix with AI

When a run fails, the error block in the Output tab has Fix with AI (see Errors and results). It opens this chat with a request already written and the run attached as a chip — Error attached, with an × to remove it. Nothing is sent until you press Send; then the error, its frames and the inputs of that run go with your request, and the reply explains the cause and, when the fix is in the code, proposes the corrected file.

Provider, model and access

  • The chat runs on your project’s AI provider connection. Without one it says Connect an AI provider to use the assistant. with Open integrations, and the box stays disabled.
  • The model picker in the composer chooses which of that provider’s models answers; the choice is kept for the script assistant of the project.
  • You need edit access to Scripts to use it — the chat exists to change code.
  • While you look at an old run from Run history, the chat waits: Return to the current script to ask for changes.
  • Inside the Waiso Desk app, this tab is the Desk’s own chat, one conversation shared with the Desk window.

Limits

  • A request up to 8,000 bytes, a script up to 100 KB and an attached run up to 64 KB.
  • The conversation lives in the open page; leaving the editor starts a new one.
  • The chat never runs the code and never claims to have tested it — run it yourself before you save.
  • Each answer is a call to your AI provider, billed by that provider on your account.