mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
fix remote file stream function (#1620)
This commit is contained in:
parent
d833f57214
commit
904d942c4c
@ -14,7 +14,7 @@ Legend: ✅ Done | 🔧 In Progress | 🔷 Planned | 🤞 Stretch Goal
|
||||
- 🔷 Remote S3 bucket browsing (directory + files)
|
||||
- 🔷 Drag & drop between preview blocks
|
||||
- 🔷 Drag into a preview directory from the native file browser or desktop to copy a file
|
||||
- 🔷 EC-TIME timeout when transferring large files
|
||||
- ✅ EC-TIME timeout when transferring large files
|
||||
- 🤞 log viewer
|
||||
- 🤞 binary viewer
|
||||
- 🔷 Wave Apps (Go SDK)
|
||||
@ -27,7 +27,6 @@ Legend: ✅ Done | 🔧 In Progress | 🔷 Planned | 🤞 Stretch Goal
|
||||
- 🔷 Multi-Input between terminal blocks on the same tab
|
||||
- 🔧 Gemini AI support
|
||||
- 🔷 Monaco Theming
|
||||
- 🤞 Log Viewer (stretch)
|
||||
- 🤞 Blockcontroller fixes for terminal escape sequences
|
||||
- 🤞 Explore VSCode Extension Compatibility with standalone Monaco Editor (language servers)
|
||||
- 🔷 Various Connection Bugs + Improvements
|
||||
|
@ -187,18 +187,21 @@ func (impl *ServerImpl) remoteStreamFileInternal(ctx context.Context, data wshrp
|
||||
|
||||
func (impl *ServerImpl) RemoteStreamFileCommand(ctx context.Context, data wshrpc.CommandRemoteStreamFileData) chan wshrpc.RespOrErrorUnion[wshrpc.CommandRemoteStreamFileRtnData] {
|
||||
ch := make(chan wshrpc.RespOrErrorUnion[wshrpc.CommandRemoteStreamFileRtnData], 16)
|
||||
defer close(ch)
|
||||
err := impl.remoteStreamFileInternal(ctx, data, func(fileInfo []*wshrpc.FileInfo, data []byte) {
|
||||
resp := wshrpc.CommandRemoteStreamFileRtnData{}
|
||||
resp.FileInfo = fileInfo
|
||||
if len(data) > 0 {
|
||||
resp.Data64 = base64.StdEncoding.EncodeToString(data)
|
||||
go func() {
|
||||
defer close(ch)
|
||||
err := impl.remoteStreamFileInternal(ctx, data, func(fileInfo []*wshrpc.FileInfo, data []byte) {
|
||||
resp := wshrpc.CommandRemoteStreamFileRtnData{}
|
||||
resp.FileInfo = fileInfo
|
||||
if len(data) > 0 {
|
||||
resp.Data64 = base64.StdEncoding.EncodeToString(data)
|
||||
}
|
||||
log.Printf("callback -- sending response %d\n", len(resp.Data64))
|
||||
ch <- wshrpc.RespOrErrorUnion[wshrpc.CommandRemoteStreamFileRtnData]{Response: resp}
|
||||
})
|
||||
if err != nil {
|
||||
ch <- respErr(err)
|
||||
}
|
||||
ch <- wshrpc.RespOrErrorUnion[wshrpc.CommandRemoteStreamFileRtnData]{Response: resp}
|
||||
})
|
||||
if err != nil {
|
||||
ch <- respErr(err)
|
||||
}
|
||||
}()
|
||||
return ch
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user