File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import { Kbd } from "@/components/ui/kbd";
2727import { Tooltip } from "@/components/ui/tooltip" ;
2828import { getCellEditorView } from "@/core/cells/cells" ;
2929import type { CellId } from "@/core/cells/ids" ;
30+ import { SCRATCH_CELL_ID } from "@/core/cells/ids" ;
3031import { insertDebuggerAtLine } from "@/core/codemirror/editing/debugging" ;
3132import { aiEnabledAtom } from "@/core/config/config" ;
3233import { getRequestClient } from "@/core/network/requests" ;
@@ -58,6 +59,7 @@ const KEY = "item";
5859export const MarimoTracebackOutput = ( {
5960 onRefactorWithAI,
6061 traceback,
62+ cellId,
6163} : Props ) : JSX . Element => {
6264 const htmlTraceback = renderHTML ( {
6365 html : traceback ,
@@ -71,12 +73,13 @@ export const MarimoTracebackOutput = ({
7173 // Get last traceback info
7274 const tracebackInfo = extractAllTracebackInfo ( traceback ) ?. at ( 0 ) ;
7375
74- // Don't show in wasm or static notebooks
76+ // Don't show in wasm, static notebooks, or scratchpad
7577 const showDebugger =
7678 tracebackInfo &&
7779 tracebackInfo . kind === "cell" &&
7880 ! isWasm ( ) &&
79- ! isStaticNotebook ( ) ;
81+ ! isStaticNotebook ( ) &&
82+ cellId !== SCRATCH_CELL_ID ;
8083
8184 const showAIFix = onRefactorWithAI && aiEnabled && ! isStaticNotebook ( ) ;
8285
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ export const ScratchPad: React.FC = () => {
208208 className = "flex flex-col h-full overflow-hidden divide-y"
209209 id = { HTMLCellId . create ( cellId ) }
210210 >
211- < p className = "mx-2 my -2 text-muted-foreground text-sm" >
211+ < p className = "p -2 text-muted-foreground text-sm" >
212212 Use this scratchpad cell to experiment with code without restrictions on
213213 variable names. Scratchpad code is ephemeral: variables defined in the
214214 scratchpad aren't saved to notebook memory, and the code is not saved in
You can’t perform that action at this time.
0 commit comments