Disallow underspecified types (#21485)

This commit is contained in:
Christian Gunderman
2026-03-07 21:05:38 +00:00
committed by GitHub
parent 245b68e9f1
commit dac3735626
18 changed files with 51 additions and 7 deletions
@@ -119,6 +119,7 @@ export class BrowserAgentInvocation extends BaseToolInvocation<
if (
activity.type === 'THOUGHT_CHUNK' &&
// eslint-disable-next-line no-restricted-syntax
typeof activity.data['text'] === 'string'
) {
updateOutput(`🌐💭 ${activity.data['text']}`);
@@ -356,6 +356,7 @@ class TypeTextDeclarativeTool extends DeclarativeTool<
params: Record<string, unknown>,
): ToolInvocation<Record<string, unknown>, ToolResult> {
const submitKey =
// eslint-disable-next-line no-restricted-syntax
typeof params['submitKey'] === 'string' && params['submitKey']
? params['submitKey']
: undefined;