Skip to content

Commit f16120f

Browse files
wangyijing130wangyj20
andauthored
fix the display from filename if type is windows (RooCodeInc#3554)
Co-authored-by: wangyj20 <[email protected]>
1 parent 0200286 commit f16120f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

webview-ui/src/components/cline-rules/RuleRow.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ const RuleRow: React.FC<{
99
ruleType: string
1010
toggleRule: (rulePath: string, enabled: boolean) => void
1111
}> = ({ rulePath, enabled, isGlobal, toggleRule, ruleType }) => {
12+
// Check if the path type is Windows
13+
const win32Path = /^[a-zA-Z]:\\/.test(rulePath)
1214
// Get the filename from the path for display
13-
const displayName = rulePath.split("/").pop() || rulePath
15+
const displayName = rulePath.split(win32Path ? "\\" : "/").pop() || rulePath
1416

1517
const getRuleTypeIcon = () => {
1618
switch (ruleType) {

0 commit comments

Comments
 (0)