mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
refactor(util): remove unreachable path fallback
This commit is contained in:
@@ -44,5 +44,7 @@ export function abbreviateHomePath(path: string, home?: string): string {
|
||||
* @returns the final segment, or an empty string for a separator-only path.
|
||||
*/
|
||||
export function workspaceTitleOf(path: string): string {
|
||||
return path.replace(/[/\\]+$/, '').split(/[/\\]/).pop() ?? ''
|
||||
const trimmed = path.replace(/[/\\]+$/, '')
|
||||
const separator = Math.max(trimmed.lastIndexOf('/'), trimmed.lastIndexOf('\\'))
|
||||
return trimmed.slice(separator + 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user