mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-22 10:14:22 +01:00
wip: desktop work
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
export function getFilename(path: string) {
|
||||
const parts = path.split("/")
|
||||
return parts[parts.length - 1]
|
||||
if (!path) return ""
|
||||
const trimmed = path.replace(/[\/]+$/, "")
|
||||
const parts = trimmed.split("/")
|
||||
return parts[parts.length - 1] ?? ""
|
||||
}
|
||||
|
||||
export function getDirectory(path: string) {
|
||||
|
||||
Reference in New Issue
Block a user