improve(hashline-edit): rewrite tool description with examples and fix lines schema
- Add XML-structured description (<must>, <operations>, <examples>, <auto>) - Add 5 concrete examples including BAD pattern showing duplication - Add explicit anti-duplication warning for range replace - Move snapshot rule to top-level <must> section - Clarify batch semantics (multiple ops, not one big replace) - Fix lines schema: add string[] to union (was string|null, now string[]|string|null) - Matches runtime RawHashlineEdit type and description text
This commit is contained in:
@@ -30,7 +30,7 @@ export function createHashlineEditTool(): ToolDefinition {
|
||||
pos: tool.schema.string().optional().describe("Primary anchor in LINE#ID format"),
|
||||
end: tool.schema.string().optional().describe("Range end anchor in LINE#ID format"),
|
||||
lines: tool.schema
|
||||
.union([tool.schema.string(), tool.schema.null()])
|
||||
.union([tool.schema.array(tool.schema.string()), tool.schema.string(), tool.schema.null()])
|
||||
.describe("Replacement or inserted lines as newline-delimited string. null deletes with replace"),
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user