Disallow redundant typecasts. (#15030)

This commit is contained in:
Christian Gunderman
2025-12-12 17:43:43 -08:00
committed by GitHub
parent fcc3b2b5ec
commit 942bcfc61e
86 changed files with 235 additions and 371 deletions
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import type { WritableStream, ReadableStream } from 'node:stream/web';
import type { ReadableStream } from 'node:stream/web';
import type {
Config,
@@ -53,7 +53,7 @@ export async function runZedIntegration(
argv: CliArgs,
) {
const { stdout: workingStdout } = createWorkingStdio();
const stdout = Writable.toWeb(workingStdout) as WritableStream;
const stdout = Writable.toWeb(workingStdout);
const stdin = Readable.toWeb(process.stdin) as ReadableStream<Uint8Array>;
new acp.AgentSideConnection(
@@ -355,7 +355,7 @@ export class Session {
fc: FunctionCall,
): Promise<Part[]> {
const callId = fc.id ?? `${fc.name}-${Date.now()}`;
const args = (fc.args ?? {}) as Record<string, unknown>;
const args = fc.args ?? {};
const startTime = Date.now();
@@ -393,7 +393,7 @@ export class Session {
}
const toolRegistry = this.config.getToolRegistry();
const tool = toolRegistry.getTool(fc.name as string);
const tool = toolRegistry.getTool(fc.name);
if (!tool) {
return errorResponse(