File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -70,9 +70,7 @@ export class Dialog {
70
70
} ) ;
71
71
}
72
72
73
- return props . serviceContainer . saveCodeToDevice ( allCellContent , ( content ) => {
74
- console . log ( "[Dialog] saveCard: Streaming output:" , content ) ;
75
- } ) ;
73
+ return props . serviceContainer . saveCodeToDevice ( allCellContent ) ;
76
74
} ) ;
77
75
78
76
optionsContainer . appendChild ( this . connectCard . getElement ( ) ) ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export class ServiceContainer {
52
52
53
53
public async saveCodeToDevice (
54
54
codeToSave : string ,
55
- stream : ( ( content : string ) => void ) | StreamCallback
55
+ stream : StreamCallback | null = null
56
56
) : Promise < { status : string ; execution_count : number ; ename ?: string ; evalue ?: string ; traceback ?: string [ ] } > {
57
57
if ( ! codeToSave ) {
58
58
return {
@@ -78,7 +78,10 @@ export class ServiceContainer {
78
78
} ;
79
79
}
80
80
81
- const result = await this . _consoleService . executeCommand ( bootCodeWithSave , stream ) ;
81
+ const result = await this . _consoleService . executeCommand (
82
+ bootCodeWithSave ,
83
+ stream ?? ( ( ) => { } )
84
+ ) ;
82
85
83
86
if ( ! result . success ) {
84
87
console . log ( "[ServiceContainer] saveCodeToDevice - Command execution failed:" , result . error ) ;
You can’t perform that action at this time.
0 commit comments