Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

Fix: close pdb inputs after resolved (#1076)

Akshay Agrawal3eab397990cf
diff --git a/frontend/src/components/editor/output/ConsoleOutput.tsx b/frontend/src/components/editor/output/ConsoleOutput.tsx
index 007d2b6fba..36f5244528 100644
--- a/frontend/src/components/editor/output/ConsoleOutput.tsx
+++ b/frontend/src/components/editor/output/ConsoleOutput.tsx
@@ -86,6 +86,7 @@ export const ConsoleOutput = (props: Props): React.ReactNode => {
if (output.channel === "pdb") {
return null;
}
+ const original_idx = consoleOutputs.length - idx - 1;
if (output.channel === "stdin") {
if (output.response == null) {
@@ -101,7 +102,7 @@ export const ConsoleOutput = (props: Props): React.ReactNode => {
placeholder="stdin"
onKeyDown={(e) => {
if (e.key === "Enter" && !e.shiftKey) {
- onSubmitDebugger(e.currentTarget.value, idx);
+ onSubmitDebugger(e.currentTarget.value, original_idx);
}
}}
/>