fix: make mcp suggestions runtime-backed

This commit is contained in:
shiyue
2026-06-24 11:10:45 +08:00
parent 54edeec802
commit ca97d92a8d
4 changed files with 321 additions and 130 deletions

View File

@@ -414,12 +414,14 @@ function completeDynamicToolTurn(thread, turnId, text) {
function completeMcpToolTurn(thread, turnId) {
const itemId = 'mcp-ccweb-list';
const ccwebConfig = thread.config?.['mcp_servers.ccweb'] || null;
const projectConfig = thread.config?.['mcp_servers.reg-app-project'] || null;
const env = ccwebConfig?.env || {};
const payload = {
ok: true,
currentConversationId: env.CC_WEB_SOURCE_SESSION_ID || null,
sourceHopCount: env.CC_WEB_CROSS_HOP_COUNT || null,
hasCcwebMcpConfig: Boolean(ccwebConfig),
hasProjectMcpConfig: Boolean(projectConfig),
};
const itemBase = {
id: itemId,