Fix Remote Host downloads and agent status parity (#6436)
* Fix remote host downloads and agent status parity Co-authored-by: Orca <help@stably.ai> * Address remote download review comments Co-authored-by: Orca <help@stably.ai> * Avoid inefficient SSH chunk fallback Co-authored-by: Orca <help@stably.ai> --------- Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -2007,6 +2007,24 @@ export type PreloadApi = {
|
||||
filePath: string
|
||||
connectionId: string
|
||||
}) => Promise<{ canceled: true } | { canceled: false; destinationPath: string }>
|
||||
saveDownloadedFile: (args: {
|
||||
suggestedName: string
|
||||
content: string
|
||||
encoding: 'utf8' | 'base64'
|
||||
}) => Promise<{ canceled: true } | { canceled: false; destinationPath: string }>
|
||||
startDownloadedFile: (args: {
|
||||
suggestedName: string
|
||||
}) => Promise<
|
||||
{ canceled: true } | { canceled: false; transferId: string; destinationPath: string }
|
||||
>
|
||||
appendDownloadedFileChunk: (args: {
|
||||
transferId: string
|
||||
contentBase64: string
|
||||
}) => Promise<{ ok: true }>
|
||||
finishDownloadedFile: (args: {
|
||||
transferId: string
|
||||
}) => Promise<{ canceled: false; destinationPath: string }>
|
||||
cancelDownloadedFile: (args: { transferId: string }) => Promise<{ ok: true }>
|
||||
listMarkdownDocuments: (args: {
|
||||
rootPath: string
|
||||
connectionId?: string
|
||||
|
||||
@@ -2404,6 +2404,27 @@ const api = {
|
||||
connectionId: string
|
||||
}): Promise<{ canceled: true } | { canceled: false; destinationPath: string }> =>
|
||||
ipcRenderer.invoke('fs:downloadFile', args),
|
||||
saveDownloadedFile: (args: {
|
||||
suggestedName: string
|
||||
content: string
|
||||
encoding: 'utf8' | 'base64'
|
||||
}): Promise<{ canceled: true } | { canceled: false; destinationPath: string }> =>
|
||||
ipcRenderer.invoke('fs:saveDownloadedFile', args),
|
||||
startDownloadedFile: (args: {
|
||||
suggestedName: string
|
||||
}): Promise<
|
||||
{ canceled: true } | { canceled: false; transferId: string; destinationPath: string }
|
||||
> => ipcRenderer.invoke('fs:startDownloadedFile', args),
|
||||
appendDownloadedFileChunk: (args: {
|
||||
transferId: string
|
||||
contentBase64: string
|
||||
}): Promise<{ ok: true }> => ipcRenderer.invoke('fs:appendDownloadedFileChunk', args),
|
||||
finishDownloadedFile: (args: {
|
||||
transferId: string
|
||||
}): Promise<{ canceled: false; destinationPath: string }> =>
|
||||
ipcRenderer.invoke('fs:finishDownloadedFile', args),
|
||||
cancelDownloadedFile: (args: { transferId: string }): Promise<{ ok: true }> =>
|
||||
ipcRenderer.invoke('fs:cancelDownloadedFile', args),
|
||||
listMarkdownDocuments: (args: {
|
||||
rootPath: string
|
||||
connectionId?: string
|
||||
|
||||
Reference in New Issue
Block a user