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:
@@ -18,7 +18,7 @@ export interface PruneConfig {
|
||||
export const DEFAULT_PRUNE_CONFIG: PruneConfig = {
|
||||
protectTokens: 40_000,
|
||||
minimumSavings: 20_000,
|
||||
protectedTools: ["skill", "read"],
|
||||
protectedTools: ["skill", "open", "read"],
|
||||
};
|
||||
|
||||
export interface PruneResult {
|
||||
|
||||
@@ -44,7 +44,8 @@ export function extractFileOpsFromMessage(message: AgentMessage, fileOps: FileOp
|
||||
if (!path) continue;
|
||||
|
||||
switch (block.name) {
|
||||
case "read":
|
||||
case "read": // legacy alias
|
||||
case "open":
|
||||
fileOps.read.add(path);
|
||||
break;
|
||||
case "write":
|
||||
|
||||
Reference in New Issue
Block a user