fix: support Windows file paths in editor opens
This commit is contained in:
@@ -18,6 +18,7 @@ import { changedFilesPopoverClassName, changedFilesPopoverStyle } from './change
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
|
||||
import { Icon } from "@/components/icon/Icon";
|
||||
import type { TurnActivityRecord } from './lib/turns/types';
|
||||
import { toAbsoluteFilePath } from '@/lib/path-utils';
|
||||
|
||||
interface TurnChangedFilesDropdownProps {
|
||||
activityParts: TurnActivityRecord[] | undefined;
|
||||
@@ -57,9 +58,7 @@ export const TurnChangedFilesDropdown: React.FC<TurnChangedFilesDropdownProps> =
|
||||
if (!currentDirectory) return;
|
||||
if (isGitFile(file)) return;
|
||||
|
||||
const absolutePath = file.path.startsWith('/')
|
||||
? file.path
|
||||
: (currentDirectory.endsWith('/') ? currentDirectory : currentDirectory + '/') + file.path;
|
||||
const absolutePath = toAbsoluteFilePath(currentDirectory, file.path);
|
||||
|
||||
const editor = runtime?.editor;
|
||||
if (editor) {
|
||||
|
||||
Reference in New Issue
Block a user