Skip to content

Commit c02c9d0

Browse files
dbg
1 parent 7f8fb4a commit c02c9d0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

kernel/src/components/Dialog.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ export class Dialog {
7070
});
7171
}
7272

73-
return props.serviceContainer.saveCodeToDevice(allCellContent, (content) => {
74-
console.log("[Dialog] saveCard: Streaming output:", content);
75-
});
73+
return props.serviceContainer.saveCodeToDevice(allCellContent);
7674
});
7775

7876
optionsContainer.appendChild(this.connectCard.getElement());

kernel/src/services/ServiceContainer.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class ServiceContainer {
5252

5353
public async saveCodeToDevice(
5454
codeToSave: string,
55-
stream: ((content: string) => void) | StreamCallback
55+
stream: StreamCallback | null = null
5656
): Promise<{ status: string; execution_count: number; ename?: string; evalue?: string; traceback?: string[] }> {
5757
if (!codeToSave) {
5858
return {
@@ -78,7 +78,10 @@ export class ServiceContainer {
7878
};
7979
}
8080

81-
const result = await this._consoleService.executeCommand(bootCodeWithSave, stream);
81+
const result = await this._consoleService.executeCommand(
82+
bootCodeWithSave,
83+
stream ?? (() => {})
84+
);
8285

8386
if (!result.success) {
8487
console.log("[ServiceContainer] saveCodeToDevice - Command execution failed:", result.error);

0 commit comments

Comments
 (0)