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 f6354b9 commit af2df77Copy full SHA for af2df77
src/mcp_text_editor/text_editor.py
@@ -162,7 +162,8 @@ async def read_file_contents(
162
try:
163
with open(file_path, "r", encoding="utf-8") as f:
164
lines = f.readlines()
165
-
+ file_content = "".join(lines)
166
+ file_hash = self.calculate_hash(file_content)
167
# Adjust line numbers to 0-based index
168
line_start = max(1, line_start) - 1
169
line_end = len(lines) if line_end is None else min(line_end, len(lines))
@@ -179,7 +180,7 @@ async def read_file_contents(
179
180
content,
181
line_start + 1,
182
line_end,
- self.calculate_hash(content),
183
+ file_hash,
184
len(lines),
185
len(content),
186
)
0 commit comments