refactor: use CoreToolCallStatus in the the history data model (#19033)

This commit is contained in:
Jerop Kipruto
2026-02-13 17:20:14 -05:00
committed by GitHub
parent ac6ef59099
commit 8aa2f974e3
40 changed files with 322 additions and 268 deletions
@@ -22,13 +22,12 @@ import {
FocusHint,
} from './ToolShared.js';
import type { ToolMessageProps } from './ToolMessage.js';
import { ToolCallStatus } from '../../types.js';
import {
ACTIVE_SHELL_MAX_LINES,
COMPLETED_SHELL_MAX_LINES,
} from '../../constants.js';
import { useAlternateBuffer } from '../../hooks/useAlternateBuffer.js';
import type { Config } from '@google/gemini-cli-core';
import { type Config, CoreToolCallStatus } from '@google/gemini-cli-core';
export interface ShellToolMessageProps extends ToolMessageProps {
activeShellPtyId?: number | null;
@@ -190,15 +189,15 @@ export const ShellToolMessage: React.FC<ShellToolMessageProps> = ({
* This function ensures a finite number of lines is always returned to prevent performance issues.
*/
function getShellMaxLines(
status: ToolCallStatus,
status: CoreToolCallStatus,
isAlternateBuffer: boolean,
isThisShellFocused: boolean,
availableTerminalHeight: number | undefined,
): number {
if (
status === ToolCallStatus.Success ||
status === ToolCallStatus.Error ||
status === ToolCallStatus.Canceled
status === CoreToolCallStatus.Success ||
status === CoreToolCallStatus.Error ||
status === CoreToolCallStatus.Cancelled
) {
return COMPLETED_SHELL_MAX_LINES;
}