mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-24 04:52:43 -07:00
feat: support multi-file drag and drop of images (#14832)
This commit is contained in:
@@ -9,7 +9,7 @@ import fs from 'node:fs';
|
||||
import os from 'node:os';
|
||||
import pathMod from 'node:path';
|
||||
import { useState, useCallback, useEffect, useMemo, useReducer } from 'react';
|
||||
import { unescapePath, coreEvents, CoreEvent } from '@google/gemini-cli-core';
|
||||
import { coreEvents, CoreEvent } from '@google/gemini-cli-core';
|
||||
import {
|
||||
toCodePoints,
|
||||
cpLen,
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
stripUnsafeCharacters,
|
||||
getCachedStringWidth,
|
||||
} from '../../utils/textUtils.js';
|
||||
import { parsePastedPaths } from '../../utils/clipboardUtils.js';
|
||||
import type { Key } from '../../contexts/KeypressContext.js';
|
||||
import type { VimAction } from './vim-buffer-actions.js';
|
||||
import { handleVimAction } from './vim-buffer-actions.js';
|
||||
@@ -1675,8 +1676,10 @@ export function useTextBuffer({
|
||||
}
|
||||
|
||||
potentialPath = potentialPath.trim();
|
||||
if (isValidPath(unescapePath(potentialPath))) {
|
||||
ch = `@${potentialPath} `;
|
||||
|
||||
const processed = parsePastedPaths(potentialPath, isValidPath);
|
||||
if (processed) {
|
||||
ch = processed;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user