From 2c8da2ce09fd23a8b5e246c2deeaed3d43ed7d16 Mon Sep 17 00:00:00 2001 From: can1357 Date: Sun, 26 Apr 2026 05:01:52 +0200 Subject: [PATCH] refactor(ast-tools): reorganized ast-edit+grep hashline sep and lax strict - Applied HASHLINE_CONTENT_SEPARATOR in AstEditTool output so hashline entries share a shared delimiter. - Set AstEditTool and AstGrepTool strict defaults to false for more permissive tool call input handling. --- packages/coding-agent/src/tools/ast-edit.ts | 6 +++--- packages/coding-agent/src/tools/ast-grep.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/coding-agent/src/tools/ast-edit.ts b/packages/coding-agent/src/tools/ast-edit.ts index 3b07b64fa..2e2ebb8cc 100644 --- a/packages/coding-agent/src/tools/ast-edit.ts +++ b/packages/coding-agent/src/tools/ast-edit.ts @@ -5,7 +5,7 @@ import type { Component } from "@oh-my-pi/pi-tui"; import { Text } from "@oh-my-pi/pi-tui"; import { $envpos, prompt, untilAborted } from "@oh-my-pi/pi-utils"; import { type Static, Type } from "@sinclair/typebox"; -import { computeLineHash } from "../edit/line-hash"; +import { computeLineHash, HASHLINE_CONTENT_SEPARATOR } from "../edit/line-hash"; import type { RenderResultOptions } from "../extensibility/custom-tools/types"; import type { Theme } from "../modes/theme/theme"; import astEditDescription from "../prompts/tools/ast-edit.md" with { type: "text" }; @@ -72,7 +72,7 @@ export class AstEditTool implements AgentTool