feat: fix filepaht issues w/ apply

This commit is contained in:
Patrick Erichsen 2025-04-27 18:35:18 -07:00
parent 5f4a9e5189
commit 6c848ba7a7
2 changed files with 8 additions and 3 deletions

View file

@ -207,7 +207,7 @@ export function StepContainerPreToolbar({
setAppliedFileUri(undefined);
}
function onClickFilename() {
async function onClickFilename() {
if (appliedFileUri) {
ideMessenger.post("showFile", {
filepath: appliedFileUri,
@ -215,8 +215,13 @@ export function StepContainerPreToolbar({
}
if (relativeFilepath) {
const filepath = await inferResolvedUriFromRelativePath(
relativeFilepath,
ideMessenger.ide,
);
ideMessenger.post("showFile", {
filepath: relativeFilepath,
filepath,
});
}
}

View file

@ -221,7 +221,7 @@ const StyledMarkdownPreview = memo(function StyledMarkdownPreview(
visit(tree, "code", (node: any) => {
if (!node.lang) {
node.lang = "javascript";
node.lang = "";
} else if (node.lang.includes(".")) {
node.lang = node.lang.split(".").slice(-1)[0];
}