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 e7e4c68c5c
commit f87468c644
40 changed files with 322 additions and 268 deletions

View File

@@ -8,6 +8,7 @@ import {
checkExhaustive,
partListUnionToString,
SESSION_FILE_PREFIX,
CoreToolCallStatus,
type Config,
type ConversationRecord,
type MessageRecord,
@@ -16,11 +17,7 @@ import * as fs from 'node:fs/promises';
import path from 'node:path';
import { stripUnsafeCharacters } from '../ui/utils/textUtils.js';
import type { Part } from '@google/genai';
import {
MessageType,
ToolCallStatus,
type HistoryItemWithoutId,
} from '../ui/types.js';
import { MessageType, type HistoryItemWithoutId } from '../ui/types.js';
/**
* Constant for the resume "latest" identifier.
@@ -585,8 +582,8 @@ export function convertSessionToHistoryFormats(
renderOutputAsMarkdown: tool.renderOutputAsMarkdown ?? true,
status:
tool.status === 'success'
? ToolCallStatus.Success
: ToolCallStatus.Error,
? CoreToolCallStatus.Success
: CoreToolCallStatus.Error,
resultDisplay: tool.resultDisplay,
confirmationDetails: undefined,
})),