mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-15 06:12:50 -07:00
fix(cli): resolve merge conflicts and align with async test helpers
This commit is contained in:
@@ -11,7 +11,7 @@ import { createMockCommandContext } from '../../test-utils/mockCommandContext.js
|
||||
import { MessageType } from '../types.js';
|
||||
|
||||
vi.mock('@google/gemini-cli-core', async (importOriginal) => {
|
||||
const actual = (await importOriginal()) as any;
|
||||
const actual = (await importOriginal()) as Record<string, unknown>;
|
||||
return {
|
||||
...actual,
|
||||
tokenLimit: vi.fn(),
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import { MessageType, type HistoryItemCompression } from '../types.js';
|
||||
import { CommandKind, type SlashCommand } from './types.js';
|
||||
import { tokenLimit, CompressionStatus } from '@google/gemini-cli-core';
|
||||
import { tokenLimit, type CompressionStatus } from '@google/gemini-cli-core';
|
||||
|
||||
export const compressCommand: SlashCommand = {
|
||||
name: 'compress',
|
||||
@@ -76,7 +76,9 @@ export const compressCommand: SlashCommand = {
|
||||
isPending: false,
|
||||
beforePercentage,
|
||||
afterPercentage,
|
||||
compressionStatus: (Number(compressed.compressionStatus) as unknown) as CompressionStatus,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
compressionStatus:
|
||||
Number(compressed.compressionStatus) as unknown as CompressionStatus,
|
||||
isManual: true,
|
||||
thresholdPercentage: Math.round(threshold * 100),
|
||||
},
|
||||
|
||||
@@ -39,6 +39,10 @@ import {
|
||||
getPlanModeExitMessage,
|
||||
isBackgroundExecutionData,
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
type CompressionStatus,
|
||||
>>>>>>> 12bc9cace (fix(cli): resolve merge conflicts and align with async test helpers)
|
||||
Kind,
|
||||
ACTIVATE_SKILL_TOOL_NAME,
|
||||
=======
|
||||
@@ -1173,6 +1177,7 @@ export const useGeminiStream = (
|
||||
isPending: false,
|
||||
beforePercentage,
|
||||
afterPercentage,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
compressionStatus: eventValue ? ((Number(eventValue.compressionStatus) as unknown) as CompressionStatus) : null,
|
||||
isManual: false,
|
||||
thresholdPercentage: Math.round(threshold * 100),
|
||||
|
||||
Reference in New Issue
Block a user