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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user