AI Assistant

A chat window in the IDE where Claude can answer questions about BambooBasic, explain your code, fix build errors and, if you let it, edit your files.

IDE

Opening it

Pick View → AI Assistant, or press Ctrl+Shift+A. It opens in its own window, so you can put it beside the editor or on a second monitor. If it was open when you closed the IDE, it opens again next time.

Setting it up

The AI Assistant uses your own Anthropic API key, and what you use is billed to your Anthropic account. The first time you open it you'll be asked for the key:

  • Sign in to the Anthropic Console, add some credit, and create an API key.
  • Paste the key (it starts with sk-ant-) into the box and click Save key.

The key is kept outside the BambooBasic folder, so it never ends up in your projects or gets shared with them. On Windows it is stored encrypted, for your Windows user only, in your own settings folder. On Linux it goes in your desktop's keyring (GNOME Keyring, or KWallet on KDE); if no keyring is running, it is stored unencrypted in ~/.config/BambooBasic, readable only by you, and the setup page tells you so. You can change or remove it at any time from Options.

Choosing a model

The drop-down at the top of the window picks which Claude model answers. You can switch at any time, even mid-chat.

ModelGood forPrice per million tokens (in / out)
Claude Opus 5.5The best answers, trickier problems and bigger edits$4 / $20
Claude Sonnet 5.5Quicker replies, most everyday questions$2 / $10
Claude Haiku 4.5The cheapest, fine for simple questions$1 / $5

The Session figure next to it is a running estimate of what this session has cost, worked out from the token counts Anthropic sends back. Your Anthropic Console has the exact figures.

Asking a question

Type in the box at the bottom and press Enter to send (Shift+Enter starts a new line). The reply appears as it is written. While Claude is answering, the Send button becomes Stop.

New chat starts a fresh conversation. Claude forgets the old one, which also keeps each question cheaper. Your attachments stay, and go with the first message of the new chat.

Code in a reply has two links under it: Copy puts it on the clipboard, and Insert at cursor drops it into the editor where your cursor is.

Showing Claude your code

Claude only sees what you attach. It can't look around your computer or open your other files by itself.

The Attach menu adds:

  • Current file: the file in the editor tab you're on.
  • Selection: the text you've selected, or the line the cursor is on.
  • Last build output: handy when a build has failed.

You can also right-click in the editor and pick Ask AI about this. The selected code (or the line you clicked) is put in the message box under "Explain this code", ready to send with Enter or to change first. It also shows in the attachments list, marked "in your message", until Claude has answered.

The attached button shows how many things are attached and opens the Attachments window, which you can dock on any side or leave floating. Selections come off the list by themselves once Claude has answered. Files and build output stay until you remove them (select and press Delete, or right-click for more). Each one is sent once. When an attached file changes, Claude is sent the new copy with your next message, so it always works from what's in the editor, unsaved changes included. If you remove a file, Claude is told it can't use it any more.

Along with your message, Claude is also told the name of the file you're on and whether you're building for Desktop or Web, so it suggests things that work on that target.

Quick questions

The Quick menu has two ready-made questions:

  • Explain the selection: what the selected code does, in plain words.
  • Fix my build errors: attaches the last build output and asks what went wrong and how to fix it.

Looking things up

Claude already knows the list of BambooBasic functions for Desktop and Web. When it needs more detail, such as exact parameters or how a feature works, it searches the documentation and example programs installed with BambooBasic rather than guessing. A grey Looked up: line under the reply shows which pages it read, so you can read them too.

Letting Claude edit your files

When you ask for a change ("fix this", "add a pause screen"), Claude can make it in your code itself. It can only edit files you have attached. If the change belongs in another file, such as an Include, it will ask you to attach that one.

  • Edits go straight into the editor, opening the file in a tab if needed, but they are not saved. You decide when to save.
  • Every edit is a normal editor change, so Ctrl+Z undoes it.
  • A note under the reply says which files were changed and how many times.

If you'd rather Claude only suggested changes, untick Options → Let Claude edit attached files. It will then show the code in its reply instead, for you to copy or insert yourself.

Privacy

Nothing is sent until you send a message. Then your message, your attachments and any documentation Claude looks up are sent to Anthropic to get the reply. Nothing else from your computer is sent. Your API key never leaves your computer except to talk to Anthropic.

If something goes wrong

  • API key rejected (401): the key is wrong or has been revoked. Use Options → Change API key.
  • Rate limited (429): too many requests in a short time. Wait a moment and try again.
  • Overloaded (529): Anthropic is busy. Try again shortly.
  • Couldn't reach the API: check your internet connection.
  • The reply was cut off: the answer got too long. Ask Claude to carry on, or ask about a smaller part.
  • Continued on ...: the chosen model wouldn't answer that one, so another Claude model finished the reply.

A word of caution

AI can make mistakes. Always read the code or advice the AI Assistant gives you, and test changes before you rely on them.