mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-29 07:21:27 -07:00
propagate abortSignal (#18477)
This commit is contained in:
committed by
GitHub
parent
92012365ca
commit
29a6aecffc
@@ -371,6 +371,7 @@ function constructInitialQuery(
|
||||
async function readMcpResources(
|
||||
resourceParts: AtCommandPart[],
|
||||
config: Config,
|
||||
signal: AbortSignal,
|
||||
): Promise<{
|
||||
parts: PartUnion[];
|
||||
displays: IndividualToolCallDisplay[];
|
||||
@@ -396,7 +397,7 @@ async function readMcpResources(
|
||||
`MCP client for server '${resource.serverName}' is not available or not connected.`,
|
||||
);
|
||||
}
|
||||
const response = await client.readResource(resource.uri);
|
||||
const response = await client.readResource(resource.uri, { signal });
|
||||
const resourceParts = convertResourceContentsToParts(response);
|
||||
return {
|
||||
success: true,
|
||||
@@ -665,7 +666,7 @@ export async function handleAtCommand({
|
||||
}
|
||||
|
||||
const [mcpResult, fileResult] = await Promise.all([
|
||||
readMcpResources(resourceParts, config),
|
||||
readMcpResources(resourceParts, config, signal),
|
||||
readLocalFiles(resolvedFiles, config, signal, userMessageTimestamp),
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user