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:
@@ -590,7 +590,8 @@ function formatStatusEvent(event: PythonStatusEvent, theme: Theme): string {
|
||||
|
||||
// Build description based on common fields
|
||||
switch (op) {
|
||||
case "read":
|
||||
case "read": // legacy alias
|
||||
case "open":
|
||||
parts.push(`${data.chars} chars`);
|
||||
if (data.path) parts.push(`from ${shortenPath(String(data.path))}`);
|
||||
break;
|
||||
@@ -794,7 +795,8 @@ function formatStatusEventExpanded(event: PythonStatusEvent, theme: Theme): stri
|
||||
case "git_branch":
|
||||
if (data.branches) addItems(data.branches as unknown[], b => String(b));
|
||||
break;
|
||||
case "read":
|
||||
case "read": // legacy alias
|
||||
case "open":
|
||||
case "cat":
|
||||
case "head":
|
||||
case "tail":
|
||||
|
||||
Reference in New Issue
Block a user