mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-06 02:47:56 +00:00
Fix/remove path lib webview (#2529)
This commit is contained in:
parent
6d0f08f238
commit
8b6f5fd60b
1 changed files with 7 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { mentionRegex } from "@roo/shared/context-mentions"
|
||||
import { Fzf } from "fzf"
|
||||
import { ModeConfig } from "@roo/shared/modes"
|
||||
import * as path from "path"
|
||||
|
||||
import { escapeSpaces } from "./path-mentions"
|
||||
|
||||
export interface SearchResult {
|
||||
|
|
@ -9,6 +9,11 @@ export interface SearchResult {
|
|||
type: "file" | "folder"
|
||||
label?: string
|
||||
}
|
||||
|
||||
function getBasename(filepath: string): string {
|
||||
return filepath.split("/").pop() || filepath
|
||||
}
|
||||
|
||||
export function insertMention(
|
||||
text: string,
|
||||
position: number,
|
||||
|
|
@ -254,7 +259,7 @@ export function getContextMenuOptions(
|
|||
|
||||
// For display purposes, we don't escape spaces in the label or description
|
||||
const displayPath = formattedPath
|
||||
const displayName = result.label || path.basename(result.path)
|
||||
const displayName = result.label || getBasename(result.path)
|
||||
|
||||
// We don't need to escape spaces here because the insertMention function
|
||||
// will handle that when the user selects a suggestion
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue