Skip to content

Commit a2205b2

Browse files
forrestbaoKonoyoru435
authored andcommitted
fix(ui): render markdown in header title and keep class autorun disabled by default
1 parent 226613d commit a2205b2

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

backend/funix/decorator/runtime.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,16 @@ def visit_FunctionDef(self, node: FunctionDef):
256256
)
257257
)
258258

259+
# Align class-method default with normal @funix default:
260+
# keep auto-run disabled unless user explicitly sets auto_run.
261+
if not any(k.arg == "auto_run" for k in funix_decorator.keywords):
262+
funix_decorator.keywords.append(
263+
keyword(
264+
arg="auto_run",
265+
value=Constant(value=False),
266+
)
267+
)
268+
259269
funix_decorator.keywords.append(
260270
keyword(
261271
arg="is_class_method",

frontend/src/App.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ import {
6262
TemplateString,
6363
} from "./components/Common/TemplateString";
6464
import PrivacyDialog from "./components/PrivacyDialog";
65+
import MarkdownDiv from "./components/Common/MarkdownDiv";
6566
import {
6667
appSecretAtom,
6768
backendAtom,
@@ -549,9 +550,8 @@ const App = () => {
549550
</IconButton>
550551
)}
551552
<Typography variant="h6" component="div" sx={{ flexGrow: 1 }}>
552-
<TemplateString
553-
template={theme?.funix_header || "{{org}}"}
554-
records={{
553+
<MarkdownDiv
554+
markdown={stringTemplate(theme?.funix_header || "{{org}}", {
555555
org: selectedFunction?.name || "Funix",
556556
functionName: selectedFunction?.name || "No name",
557557
functionPath: selectedFunction?.path || "No path",
@@ -563,7 +563,8 @@ const App = () => {
563563
? "Yes"
564564
: "No",
565565
functionModule: selectedFunction?.module || "No module",
566-
}}
566+
})}
567+
isRenderInline={true}
567568
/>
568569
</Typography>
569570
{selectedFunction && selectedFunction.secret && (

0 commit comments

Comments
 (0)