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:
@@ -6,6 +6,7 @@
|
||||
* the specialized tools instead.
|
||||
*/
|
||||
import { type BashInterceptorRule, DEFAULT_BASH_INTERCEPTOR_RULES } from "../config/settings-schema";
|
||||
import { resolveToolAlias } from "./index";
|
||||
|
||||
export interface InterceptionResult {
|
||||
/** If true, the bash command should be blocked */
|
||||
@@ -50,7 +51,7 @@ export function checkBashInterception(
|
||||
|
||||
for (const { rule, regex } of compiled) {
|
||||
// Only block if the suggested tool is actually available
|
||||
if (!availableTools.includes(rule.tool)) {
|
||||
if (!availableTools.some(name => resolveToolAlias(name) === rule.tool)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user