refactor: restructured chunk region notation from @head/@body/@tail/@decl to ^/~ suffix format

- Simplified chunk region notation from @head/@body/@tail/@decl to ^/~ suffix format across all modules.
- Removed ChunkRegion::Tail and ChunkRegion::Decl enum variants and updated region matching logic accordingly.
- Added call-with-callback pattern detection via try_promote_call_with_callback() and trailing_callback_body() functions.
- Updated documentation and test fixtures to reflect new region selector syntax throughout codebase.
This commit is contained in:
can1357
2026-04-10 17:04:31 +02:00
parent 4a1ca64a7b
commit fa375d6eaa
17 changed files with 399 additions and 270 deletions
@@ -332,7 +332,7 @@ export const chunkToolEditSchema = Type.Object({
op: StringEnum(CHUNK_OP_VALUES),
sel: Type.String({
description:
"Chunk selector. Format: 'path@region' for insertions, 'path#CRC@region' for replace. Omit @region to target the full chunk. Valid regions: head, body, tail, decl.",
"Chunk selector. Use 'path~' or 'path^' for insertions, 'path#CRC~' or 'path#CRC^' for replace, or omit the suffix to target the full chunk.",
}),
content: Type.String({
description: