We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7d6845 commit ba9e9b8Copy full SHA for ba9e9b8
src/services/tools/file_read.ts
@@ -137,13 +137,15 @@ export const createFileReadTool: ToolFactory = (config: ToolConfiguration) => {
137
const content = numberedLines.join("\n");
138
139
// Return file info and content
140
+ // IMPORTANT: lease must be last in the return object so it remains fresh in the LLM's context
141
+ // when it's reading this tool result. The LLM needs the lease value to perform subsequent edits.
142
return {
143
success: true,
144
file_size: stats.size,
145
modifiedTime: stats.mtime.toISOString(),
146
lines_read: numberedLines.length,
147
content,
- lease,
148
+ lease, // Must be last - see comment above
149
};
150
} catch (error) {
151
// Handle specific errors
0 commit comments