File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,12 +45,18 @@ for (const [language, definition] of Object.entries({
4545}
4646hljs . registerAliases ( "shell" , { languageName : "bash" } ) ;
4747
48+ function codeBlockRenderEnv ( env : unknown ) : Partial < MarkdownRenderEnv > | undefined {
49+ // SAFETY: markdown-it types renderer env as unknown; this internal renderer
50+ // receives the normalized options object, or undefined from direct calls.
51+ return env as Partial < MarkdownRenderEnv > | undefined ;
52+ }
53+
4854function shouldRenderCodeBlockCopy ( env : unknown ) : boolean {
49- return ( env as Partial < MarkdownRenderEnv > | undefined ) ?. codeBlockChrome !== "none" ;
55+ return codeBlockRenderEnv ( env ) ?. codeBlockChrome !== "none" ;
5056}
5157
5258function shouldRenderCodeBlockInteraction ( env : unknown ) : boolean {
53- return ( env as Partial < MarkdownRenderEnv > | undefined ) ?. codeBlockInteraction === "interactive" ;
59+ return codeBlockRenderEnv ( env ) ?. codeBlockInteraction === "interactive" ;
5460}
5561
5662function encodeBlockArtCodeBlockCopyPayload ( value : string ) : string {
Original file line number Diff line number Diff line change 408408 cursor : var ( --cursor-action ) ;
409409}
410410
411- : is ( . chat-text , . chat-thinking )
412- : where ( details > summary ) :: -webkit-details-marker {
411+ : is ( . chat-text , . chat-thinking ) : where ( details > summary ) :: -webkit-details-marker {
413412 display : none;
414413}
415414
796795
797796/* The preview lines plus the code element's own 4px/8px/6px vertical box. */
798797. code-block-wrapper . is-collapsible : not ( . is-expanded ) . code-block-viewport {
799- max-height : calc (
800- var ( --code-block-line-height ) * var ( --code-block-preview-lines ) + 18px
801- ) ;
798+ max-height : calc ( var ( --code-block-line-height ) * var ( --code-block-preview-lines ) + 18px ) ;
802799 overflow-y : hidden;
803800}
804801
You can’t perform that action at this time.
0 commit comments