Fix type assertions and formatting in DirectiveStreamingParser.ts

This commit is contained in:
Steven T. Cramer 2025-06-17 00:46:28 +07:00
parent 7d880f172e
commit 36c993bed3

View file

@ -124,9 +124,9 @@ export class DirectiveStreamingParser {
private static isInsideCodeBlock(context: ParseContext, activeHandler: DirectiveHandler | null): boolean {
return (
context.codeBlockState === CodeBlockState.INSIDE ||
(activeHandler &&
(!!activeHandler &&
activeHandler instanceof ToolDirectiveHandler &&
(activeHandler as ParameterCodeBlockHandler).isInsideParameterCodeBlock())
!!(activeHandler as ParameterCodeBlockHandler).isInsideParameterCodeBlock())
)
}