Add per-feature Cursor channel toggles for admin and runtime.
Memind CI / Test, build, and release guards (push) Has been cancelled

Expose page/data/scheduled-task/chat-bridge switches in the智趣体验通道 config so Tang can roll out Cursor paths independently with DeepSeek fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-31 09:40:52 +08:00
parent ac2c87be43
commit 617ff0d1dd
21 changed files with 915 additions and 127 deletions
+40
View File
@@ -2258,6 +2258,46 @@ export function createLlmProviderService(
return { ok: true, providerId: goosedProviderId, model: row.default_model, source: 'vision' };
},
async applyCursorChatBridgeForSession(sessionId, fetchImpl = apiFetchImpl) {
if (!cursorChatBridgeEnabled()) {
return { ok: false, message: 'TKMind Chat Bridge 未启用(MEMIND_CURSOR_CHAT_BRIDGE_ENABLED=1' };
}
const catalogItem = catalogById.custom_cursor;
const profile = {
providerId: 'custom_cursor',
defaultModel: catalogItem?.defaultModel ?? 'cursor-chat-bridge',
models: catalogItem?.models ?? ['cursor-chat-bridge'],
apiKey: 'cursor-bridge-local',
};
const sessionGoosedApi = (pathname, init) =>
goosedApiFetch(apiTarget, apiSecret, pathname, init, fetchImpl);
try {
const goosedProviderId = await syncCursorChatBridgeProfileToGoosed(
apiTarget,
apiSecret,
profile,
fetchImpl,
);
await updateSessionProvider(
sessionGoosedApi,
sessionId,
goosedProviderId,
profile.defaultModel,
);
return {
ok: true,
providerId: goosedProviderId,
model: profile.defaultModel,
source: 'cursor_chat_bridge',
};
} catch (err) {
return {
ok: false,
message: err instanceof Error ? err.message : 'Cursor Chat Bridge 同步失败',
};
}
},
// Calls the vision provider directly (not through Goose) to analyze images.
// Returns the model's text description, or null on failure.
async analyzeImagesWithVision(imageItems, userText) {