Before You Start
Make sure you've installed the Mouse extension and initialized your workspace by running Mouse: Initialize Workspace from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P). If you haven't done this yet, see Installing Mouse.
To confirm Mouse is running, check the status bar; it should show Mouse: Trial or Mouse: Licensed.
Then, ask your AI assistant to try using the get_file_metadata or read_lines tool on any file, or just calling the license_status tool. If the agent can successfully call any Mouse tool, then all of them are enabled, and you're ready to try out Mouse!
Demo 1: Commenting Out Non-Contiguous Blocks
Ask your AI assistant:
Create a new file called
sample.jswith about 25-30 lines of JavaScript containing 3-4 distinct function blocks.
Then, after your AI assistant has created the file, ask this:
Now comment out the first and third function blocks only, leaving the second and fourth blocks untouched. Use batch editing.
What you should see: After creating the file, the agent uses read_lines, find_in_file, and other read-operations to identify the precise location of the functions to be edited out. It calls batch_quick_edit to stage all the edits atomically, then examines its work by using jump_to_line_n, find_in_file, or other read-operations in staging mode, before calling save_changes if correct to commit the changes to disk. If the changes are wrong, the agent may call cancel_changes and rollback the proposed changes without ever touching the saved copy of the file, then try again. If it realizes that the edit is nearly correct, it might say it is going to "refine" the edit and call quick_edit or batch_quick_edit again before saving changes.
What just happened? String replacement for commenting out functions requires the agent to copy the entire function and replace it verbatim with a string in which each line starts with // . Mouse allows the agent to use the powerful FOR_LINES operation to insert // at column 0 (the start of the line) for each line that needs to be commented out, a concise and declarative syntax, and to stage all the changes atomically. The agent can inspect its proposed changes by using read-operation tools in staging or original modes for a surgical diff, revise the staged changes by using in-place refinement, and finally save the changes once ready, or cancel and rollback atomically and cleanly without damaging your file.
Demo 2: Clean Deletion
Ask your AI assistant:
Now delete the second function block entirely from
sample.js. Remove it cleanly with no leftover blank lines or formatting artifacts.
What you should see: The agent calls quick_edit immediately, seamlessly removing the function in a single call. Or, if it needs the precise lines, it may use a read-operation tool call to inspect the precise region to be deleted first.
What just happened? Rather than having to do a find/replace operation that copied the entire second function into the 'oldString' argument and placed an empty string '' as the 'newString' argument, Mouse tools enabled the agent to use a simple DELETE operation that specified just the startLine and endLine boundaries of the region to be edited, saving a vast number of tokens.
Demo 3: Checklist Surgery
Ask your AI assistant:
Create a new file entitled
checkmark-demo.mdin the current workspace, with a table displaying two columns, Done and Description, and 20 rows of a sample checklist (anything is fine). Leave the Done column blank.
Then, after your AI assistant has created the checklist, ask this:
Now update the file by inserting an
xin the Done column for the first row and last 3 rows, without copying or using string-replacement to modify any of the item descriptions, and otherwise leaving all the other rows untouched.
What you should see: The agent creates the file, then uses read_lines, find_in_file, and other read-operation Mouse tools to identify exactly where to place the x accurately. It then calls batch_quick_edit, and after inspecting its work will call save_changes if correct. If it made a mistake, your agent will try to refine in place, or might cancel changes and rollback all changes atomically, then try again before saving. Once saved, you'll see the first and only change to the file: Only the x has been inserted in each of the specified rows, and nothing else has been touched.
What just happened? The agent did not have to copy the entire table and then rewrite it to execute a precise update to your checklist. Instead, it used its read-operations to identify the columnar position of the Done column and to find the precise rows where the checklist items to be marked complete are located. It then batched all operations atomically by calling batch_quick_edit, using the FOR_LINES or REPLACE_RANGE operation to place the x surgically in the precise location. It likely then inspected its work by calling a read-operation tool again, in staging mode, before executing save_changes. If it made a mistake, the batch operation is cancelled atomically without ever touching the original file and without any intervention by you.
TIP
If your agent struggles with this demo, try specifying the operation type in your prompt: "Use REPLACE_RANGE or FOR_LINES to place the x in the Done column." Less capable models may need this extra guidance to select the right Mouse operation.
What You Just Saw
In under 10 minutes, your agent:
- Batched multiple non-contiguous edits atomically with staging and review
- Deleted code cleanly with zero content echo and no artifacts
- Made surgical, column-level edits without rewriting surrounding content
Your assistant used Mouse tools automatically. You do not need to change your system prompts, make special configurations, or master a steep learning curve. Mouse just works!
Next Steps
Now that you've seen Mouse in action, explore Best Practices to see what else Mouse can do.