From 56caf96c6cd59b209101db68ef1de6f2fbd08e9f Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 8 Nov 2024 16:31:12 -0800 Subject: [PATCH] display range --- gui/src/components/markdown/CodeBlockToolbar.tsx | 7 +++++-- gui/src/components/markdown/PreWithToolbar.tsx | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gui/src/components/markdown/CodeBlockToolbar.tsx b/gui/src/components/markdown/CodeBlockToolbar.tsx index 6851a1a4c..c9eef3470 100644 --- a/gui/src/components/markdown/CodeBlockToolbar.tsx +++ b/gui/src/components/markdown/CodeBlockToolbar.tsx @@ -19,6 +19,7 @@ import { } from ".."; import { IdeMessengerContext } from "../../context/IdeMessenger"; import { useWebviewListener } from "../../hooks/useWebviewListener"; +import { defaultModelSelector } from "../../redux/selectors/modelSelectors"; import { incrementNextCodeBlockToApplyIndex, updateApplyState, @@ -29,7 +30,6 @@ import ButtonWithTooltip from "../ButtonWithTooltip"; import FileIcon from "../FileIcon"; import { CopyButton as CopyButtonHeader } from "./CopyButton"; import { ToolbarButtonWithTooltip } from "./ToolbarButtonWithTooltip"; -import { defaultModelSelector } from "../../redux/selectors/modelSelectors"; const ToolbarDiv = styled.div` display: flex; @@ -266,7 +266,10 @@ function CodeBlockToolBar(props: CodeBlockToolBarProps) { onClick={onClickHeader} > - {getBasename(props.filepath)} + + {getBasename(props.filepath)} + {props.range && ` ${props.range}`} +
diff --git a/gui/src/components/markdown/PreWithToolbar.tsx b/gui/src/components/markdown/PreWithToolbar.tsx index f626dfb90..75304f4e5 100644 --- a/gui/src/components/markdown/PreWithToolbar.tsx +++ b/gui/src/components/markdown/PreWithToolbar.tsx @@ -77,6 +77,7 @@ function PreWithToolbar(props: { bottom={toolbarBottom} language={props.language} filepath={props.filepath} + range={props.range} /> ) : ( hovering && ( @@ -85,6 +86,7 @@ function PreWithToolbar(props: { text={copyValue} bottom={toolbarBottom} language={props.language} + range={props.range} /> ) )}