Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Antigravity turns now get profile MCP tools from the first model call #40300

Closedjuliusmarmingewants to merge 2 commits intomain fromrefs/pull/40300/headopened View on GitHub

Showing 3 changed files with 120 additions and 0 deletions.

x
0 of 3 viewed, 3 left
23 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.tsModified
View file
@@ -27,6 +27,7 @@
antigravitySteersWithPrompt,
applyAntigravityAcpModelSelection,
buildAntigravityPrompt,
+ readAntigravityProfileMcpServers,
type AntigravityAcpRuntimeInput,
} from "../../provider/acp/AntigravityAcpSupport.ts";
import {
@@ -151,11 +152,27 @@
const makeRuntime = Effect.fn("AntigravityAdapterV2.makeRuntime")(
function* (input: AcpAdapterV2RuntimeInput) {
const scope = yield* Scope.fork(yield* Effect.scope);
+ const sessionServerNames = new Set(input.mcpServers.map((server) => server.name));
+ const profileServers = (
+ profileDirectory === undefined
+ ? []
+ : yield* readAntigravityProfileMcpServers(profileDirectory).pipe(
+ Effect.provideService(FileSystem.FileSystem, options.fileSystem),
+ Effect.provideService(Path.Path, options.path),
+ )
+ ).filter((server) => !sessionServerNames.has(server.name));
+ const withProfileServers = (
+ activation: AcpSessionRuntime.AcpSessionActivationOptions | undefined,
+ ) =>
+ activation?.mcpServers === undefined
+ ? activation
+ : { ...activation, mcpServers: [...activation.mcpServers, ...profileServers] };
const runtime = yield* options
.withProcess(