Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/tools/hashline-edit/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ 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.array(tool.schema.string()), tool.schema.null()])
.describe("Replacement or inserted lines. null/[] deletes with replace"),
.union([tool.schema.string(), tool.schema.null()])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore array support in lines schema

Removing string[] from the declared lines type makes the tool contract inconsistent with its own prompt text (src/tools/hashline-edit/tool-description.ts still says lines: string|string[]|null and calls string[] the preferred multi-line format). In any provider/runtime that validates tool arguments against the declared schema before execution, a model that follows those instructions will produce an array and the call will be rejected before normalize-edits.ts can apply its array fallback, so multi-line edits regress despite the backward-compatibility claim.

Useful? React with 👍 / 👎.

.describe("Replacement or inserted lines as newline-delimited string. null deletes with replace"),
})
)
.describe("Array of edit operations to apply (empty when delete=true)"),
Expand Down