fix(app): keep tool call summaries neutral (#2090)

Individual tool outcomes remain visible in the expanded list. The aggregate header no longer treats a handled tool result as a failure of the overall work.
This commit is contained in:
Mohamed Boudra
2026-07-15 18:34:30 +02:00
committed by GitHub
parent 04e893417e
commit 9423b091b9
11 changed files with 0 additions and 19 deletions
-1
View File
@@ -1420,7 +1420,6 @@ export const ar: TranslationResources = {
other: "استدعى Paseo {{count}} مرات", other: "استدعى Paseo {{count}} مرات",
}, },
and: "و", and: "و",
failed: "فشل {{count}}",
}, },
renameModal: { renameModal: {
rename: "إعادة تسمية", rename: "إعادة تسمية",
-1
View File
@@ -1428,7 +1428,6 @@ export const en = {
other: "called Paseo {{count}} times", other: "called Paseo {{count}} times",
}, },
and: "and", and: "and",
failed: "{{count}} failed",
}, },
renameModal: { renameModal: {
rename: "Rename", rename: "Rename",
-1
View File
@@ -1459,7 +1459,6 @@ export const es: TranslationResources = {
other: "llamó a Paseo {{count}} veces", other: "llamó a Paseo {{count}} veces",
}, },
and: "y", and: "y",
failed: "{{count}} con error",
}, },
renameModal: { renameModal: {
rename: "Rebautizar", rename: "Rebautizar",
-1
View File
@@ -1462,7 +1462,6 @@ export const fr: TranslationResources = {
other: "a appelé Paseo {{count}} fois", other: "a appelé Paseo {{count}} fois",
}, },
and: "et", and: "et",
failed: "{{count}} en échec",
}, },
renameModal: { renameModal: {
rename: "Rebaptiser", rename: "Rebaptiser",
-1
View File
@@ -1437,7 +1437,6 @@ export const ja: TranslationResources = {
other: "Paseoを{{count}}回呼び出し", other: "Paseoを{{count}}回呼び出し",
}, },
and: "および", and: "および",
failed: "{{count}}件失敗",
}, },
renameModal: { renameModal: {
rename: "名前を変更", rename: "名前を変更",
-1
View File
@@ -1445,7 +1445,6 @@ export const ptBR: TranslationResources = {
other: "chamou o Paseo {{count}} vezes", other: "chamou o Paseo {{count}} vezes",
}, },
and: "e", and: "e",
failed: "{{count}} com falha",
}, },
renameModal: { renameModal: {
rename: "Renomear", rename: "Renomear",
-1
View File
@@ -1451,7 +1451,6 @@ export const ru: TranslationResources = {
other: "Paseo вызван {{count}} раз", other: "Paseo вызван {{count}} раз",
}, },
and: "и", and: "и",
failed: "С ошибкой: {{count}}",
}, },
renameModal: { renameModal: {
rename: "Переименовать", rename: "Переименовать",
-1
View File
@@ -1404,7 +1404,6 @@ export const zhCN: TranslationResources = {
other: "调用了 Paseo {{count}} 次", other: "调用了 Paseo {{count}} 次",
}, },
and: "并", and: "并",
failed: "{{count}} 次失败",
}, },
renameModal: { renameModal: {
rename: "重命名", rename: "重命名",
@@ -17,7 +17,6 @@ export interface OverviewToolCallGroup {
mode: "overview"; mode: "overview";
run: ToolCallRun; run: ToolCallRun;
summary: OverviewSummary; summary: OverviewSummary;
failedCount: number;
isLoading: boolean; isLoading: boolean;
} }
@@ -32,7 +31,6 @@ function isSearchCall(name: string): boolean {
export function buildOverviewGroup(run: ToolCallRun): OverviewToolCallGroup { export function buildOverviewGroup(run: ToolCallRun): OverviewToolCallGroup {
const editedFiles = new Set<string>(); const editedFiles = new Set<string>();
const readFiles = new Set<string>(); const readFiles = new Set<string>();
let failedCount = 0;
let isLoading = false; let isLoading = false;
let commandCount = 0; let commandCount = 0;
let searchCount = 0; let searchCount = 0;
@@ -42,7 +40,6 @@ export function buildOverviewGroup(run: ToolCallRun): OverviewToolCallGroup {
for (const call of run.calls) { for (const call of run.calls) {
const descriptor = describeToolCall(call); const descriptor = describeToolCall(call);
const normalizedName = descriptor.name.trim().toLowerCase(); const normalizedName = descriptor.name.trim().toLowerCase();
failedCount += descriptor.status === "failed" ? 1 : 0;
isLoading ||= descriptor.status === "running" || descriptor.status === "executing"; isLoading ||= descriptor.status === "running" || descriptor.status === "executing";
if (isPaseoCall(descriptor.name, normalizedName)) { if (isPaseoCall(descriptor.name, normalizedName)) {
paseoCallCount += 1; paseoCallCount += 1;
@@ -70,7 +67,6 @@ export function buildOverviewGroup(run: ToolCallRun): OverviewToolCallGroup {
return { return {
mode: "overview", mode: "overview",
run, run,
failedCount,
isLoading, isLoading,
summary, summary,
}; };
@@ -58,11 +58,8 @@ export const OverviewToolCallGroupView = memo(function OverviewToolCallGroupView
onExpandedChange, onExpandedChange,
children, children,
}: OverviewGroupProps) { }: OverviewGroupProps) {
const { t } = useTranslation();
const scrollRef = useRef<ScrollView>(null); const scrollRef = useRef<ScrollView>(null);
const aggregateSummary = useOverviewSummary(group.summary); const aggregateSummary = useOverviewSummary(group.summary);
const failedSummary =
group.failedCount > 0 ? t("toolCallGroup.failed", { count: group.failedCount }) : undefined;
const scrollToLatest = useCallback(() => { const scrollToLatest = useCallback(() => {
scrollRef.current?.scrollToEnd({ animated: false }); scrollRef.current?.scrollToEnd({ animated: false });
}, []); }, []);
@@ -89,10 +86,8 @@ export const OverviewToolCallGroupView = memo(function OverviewToolCallGroupView
<ExpandableBadge <ExpandableBadge
testID="tool-call-group" testID="tool-call-group"
label={aggregateSummary} label={aggregateSummary}
secondaryLabel={failedSummary}
icon={Wrench} icon={Wrench}
isLoading={group.isLoading} isLoading={group.isLoading}
isError={group.failedCount > 0}
isExpanded={expanded} isExpanded={expanded}
isLastInSequence={isLastInSequence} isLastInSequence={isLastInSequence}
onToggle={toggle} onToggle={toggle}
@@ -231,7 +231,6 @@ describe("tool call detail-level projection", () => {
expect(overview.groupsByHostId.get("1")).toEqual({ expect(overview.groupsByHostId.get("1")).toEqual({
mode: "overview", mode: "overview",
run: expect.any(Object), run: expect.any(Object),
failedCount: 1,
isLoading: false, isLoading: false,
summary: { summary: {
editedFileCount: 1, editedFileCount: 1,
@@ -260,7 +259,6 @@ describe("tool call detail-level projection", () => {
const result = project({ level: "overview", head: calls }); const result = project({ level: "overview", head: calls });
expect(result.groupsByHostId.get("1")).toMatchObject({ expect(result.groupsByHostId.get("1")).toMatchObject({
failedCount: 1,
summary: { summary: {
editedFileCount: 0, editedFileCount: 0,
commandCount: 0, commandCount: 0,