feat(coding-agent): added unified path targets for grep family

- Consolidated grep, ast-grep, and ast-edit on required `path`, replacing `glob`/`lang`/`sel` with inline file, dir, glob, list, and URL targets.
- Changed ast-grep and grep schemas to require a single `pat` string and use `skip` pagination instead of array patterns or offsets.
- Updated argument validation to reject empty `path` and invalid `skip`, and routed grep context to session settings only.
- Updated tool prompts and tests to reflect new path globbing semantics and `first N` truncation output text.
This commit is contained in:
can1357
2026-04-26 04:33:04 +02:00
parent 44ea247cf8
commit b22837f898
15 changed files with 210 additions and 336 deletions
@@ -1,7 +1,7 @@
import * as fs from "node:fs/promises";
import * as nodePath from "node:path";
import type { AgentToolResult } from "@oh-my-pi/pi-agent-core";
import { StringEnum } from "@oh-my-pi/pi-coding-agent";
import { StringEnum } from "@oh-my-pi/pi-ai";
import {
ChunkAnchorStyle,
ChunkEditOp,