mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-17 17:41:24 -07:00
refactor: improve large text paste placeholder (#17269)
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { parseInputForHighlighting } from './highlight.js';
|
||||
import type { Transformation } from '../components/shared/text-buffer.js';
|
||||
|
||||
describe('parseInputForHighlighting', () => {
|
||||
it('should handle an empty string', () => {
|
||||
@@ -136,12 +137,13 @@ describe('parseInputForHighlighting', () => {
|
||||
});
|
||||
|
||||
describe('parseInputForHighlighting with Transformations', () => {
|
||||
const transformations = [
|
||||
const transformations: Transformation[] = [
|
||||
{
|
||||
logStart: 10,
|
||||
logEnd: 19,
|
||||
logicalText: '@test.png',
|
||||
collapsedText: '[Image test.png]',
|
||||
type: 'image',
|
||||
},
|
||||
];
|
||||
|
||||
@@ -177,18 +179,20 @@ describe('parseInputForHighlighting with Transformations', () => {
|
||||
|
||||
it('should handle multiple transformations in a line', () => {
|
||||
const line = 'Images: @test1.png and @test2.png';
|
||||
const multiTransformations = [
|
||||
const multiTransformations: Transformation[] = [
|
||||
{
|
||||
logStart: 8,
|
||||
logEnd: 18,
|
||||
logicalText: '@test1.png',
|
||||
collapsedText: '[Image test1.png]',
|
||||
type: 'image',
|
||||
},
|
||||
{
|
||||
logStart: 23,
|
||||
logEnd: 33,
|
||||
logicalText: '@test2.png',
|
||||
collapsedText: '[Image test2.png]',
|
||||
type: 'image',
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user