Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
One change · api

text-editor-tool changed

agents-and-tools/tool-use/text-editor-tool

Nearest release: v2.1.275, published an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+26added
Lines−20removed
From line 1,504 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits4to this page, all time

The whole hunk

from line 1504, old and new numbered
/
lines
from line 1504
15041504 command = input_params.get("command", "")
15051505 file_path = input_params.get("path", "")
15061506 
1507 if command == "view":
1508 # Read and return file contents
1509 pass
1510 elif command == "str_replace":
1511 # Replace text in file
1512 pass
1513 elif command == "create":
1514 # Create new file
1515 pass
1516 elif command == "insert":
1517 # Insert text at location
1518 pass
1507 match command:
1508 case "view":
1509 # Read and return file contents
1510 pass
1511 case "str_replace":
1512 # Replace text in file
1513 pass
1514 case "create":
1515 # Create new file
1516 pass
1517 case "insert":
1518 # Insert text at location
1519 pass
15191520 ```
15201521 
15211522 ```typescript TypeScript
from line 1525
15241525 const command = inputParams.command ?? "";
15251526 const filePath = inputParams.path ?? "";
15261527 
1527 if (command === "view") {
1528 // Read and return file contents
1529 } else if (command === "str_replace") {
1530 // Replace text in file
1531 } else if (command === "create") {
1532 // Create new file
1533 } else if (command === "insert") {
1534 // Insert text at location
1528 switch (command) {
1529 case "view":
1530 // Read and return file contents
1531 break;
1532 case "str_replace":
1533 // Replace text in file
1534 break;
1535 case "create":
1536 // Create new file
1537 break;
1538 case "insert":
1539 // Insert text at location
1540 break;
15351541 }
15361542 }
15371543 ```