feat(coding-agent): implemented read-to-open tool aliasing in runtime

- Canonicalized file and CLI defaults from `read` to `open` across tool registration and prompts.
- Added `resolveToolAlias()` and applied alias-normalized tool selection so legacy `read` maps to `open`.
- Updated runtime, UI, and export layers to treat `open` as first-class while preserving `read` compatibility.
- Renamed read prompt docs to `open.md`/`open-chunk.md` and refreshed system guidance to recommend `open`.
- Updated tool-related tests and expectations from `read` to `open` (including test fixtures and aliases).
This commit is contained in:
can1357
2026-04-24 19:13:11 +02:00
parent b7d881a7f8
commit c48d2e6080
42 changed files with 212 additions and 181 deletions
@@ -342,7 +342,8 @@ export class SessionObserverOverlayComponent extends Container {
#formatToolArgs(toolName: string, args: Record<string, unknown>): string {
// Show the most relevant arg for common tools
switch (toolName) {
case "read":
case "read": // legacy alias
case "open":
return args.path ? `path: ${args.path}` : "";
case "write":
return args.path ? `path: ${args.path}` : "";
@@ -637,7 +637,8 @@ class TreeList implements Component {
#formatToolCall(name: string, args: Record<string, unknown>): string {
switch (name) {
case "read": {
case "read": // legacy alias
case "open": {
const path = shortenPath(String(args.path || args.file_path || ""));
const offset = args.offset as number | undefined;
const limit = args.limit as number | undefined;