@nextclaw/server 0.15.16 → 0.15.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5022,10 +5022,7 @@ async function readFilePreviewBytes(params) {
5022
5022
  const { maxBytes, resolvedPath, sizeBytes, targetLine } = params;
5023
5023
  const fileHandle = await open(resolvedPath, "r");
5024
5024
  try {
5025
- const { offset, startLine } = (targetLine === 1 ? {
5026
- offset: 0,
5027
- startLine: 1
5028
- } : targetLine ? await findPreviewWindowLocation({
5025
+ const { offset, startLine } = (targetLine && targetLine > 1 && sizeBytes > maxBytes ? await findPreviewWindowLocation({
5029
5026
  fileHandle,
5030
5027
  maxBytes,
5031
5028
  sizeBytes,