summaryrefslogtreecommitdiff
path: root/packages/core/src/utils/messageInspectors.ts
blob: b2c3cdce497a7a4c73951bf28d0251bc637897ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * @license
 * Copyright 2025 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */

import { Content } from '@google/genai';

export function isFunctionResponse(content: Content): boolean {
  return (
    content.role === 'user' &&
    !!content.parts &&
    content.parts.every((part) => !!part.functionResponse)
  );
}