Avoid inefficient SSH chunk fallback

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Jinwoo-H
2026-06-26 12:19:18 -07:00
co-authored by Orca
parent d205818b99
commit 024db6f12e
+1 -8
View File
@@ -486,14 +486,7 @@ export class RuntimeFileCommands {
if (fileStat.type === 'directory') {
throw new Error('Cannot download a directory')
}
const result = await provider.readFile(target.path)
const content = Buffer.from(result.content, result.isBinary ? 'base64' : 'utf8')
const chunk = content.subarray(offset, offset + length)
return {
contentBase64: chunk.toString('base64'),
bytesRead: chunk.byteLength,
eof: offset + chunk.byteLength >= content.byteLength
}
throw new Error('SSH runtime chunked download is unavailable; use the SSH download path')
}
const filePath = await resolveAuthorizedPath(target.path, this.host.requireStore())