feat(websearch): finish managed third-party rollout

- steer third-party launches toward the managed WebSearch MCP tool

- add opt-in trace diagnostics across launch, MCP, provider, and headless paths

- extend docs and regression coverage for the first-class runtime

Refs #862
This commit is contained in:
Tam Nhu Tran
2026-03-30 22:41:51 -04:00
parent b087c02738
commit de7171d810
21 changed files with 1281 additions and 92 deletions
+12 -2
View File
@@ -17,6 +17,7 @@ import { fail, info, ok, warn } from '../utils/ui';
import {
getWebSearchHookEnv,
appendThirdPartyWebSearchToolArgs,
createWebSearchTraceContext,
syncWebSearchMcpToConfigDir,
} from '../utils/websearch-manager';
import { getImageAnalysisHookEnv } from '../utils/hooks';
@@ -181,9 +182,18 @@ export async function executeCopilotProfile(
// Spawn Claude CLI
return new Promise((resolve) => {
const proc = spawn(claudeCliPath, appendThirdPartyWebSearchToolArgs(claudeArgs), {
const launchArgs = appendThirdPartyWebSearchToolArgs(claudeArgs);
const traceEnv = createWebSearchTraceContext({
launcher: 'copilot.executor',
args: launchArgs,
profile: 'copilot',
profileType: 'copilot',
claudeConfigDir,
});
const proc = spawn(claudeCliPath, launchArgs, {
stdio: 'inherit',
env,
env: { ...env, ...traceEnv },
shell: process.platform === 'win32',
});