Files
aryx/src/renderer/lib/chatTooling.ts
T
David KayaandCopilot c8bb9d6f59 fix: align chat MCP tooling with session project
Resolve chat tooling from the selected session's project instead of the
separately tracked selectedProjectId so project-scoped discovered MCPs do
not appear for the wrong session. Also synchronize selectedProjectId when
a session is selected and add regression tests for both behaviors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 21:57:30 +01:00

15 lines
551 B
TypeScript

import type { ProjectRecord } from '@shared/domain/project';
import { resolveProjectToolingSettings, type WorkspaceToolingSettings } from '@shared/domain/tooling';
import type { WorkspaceState } from '@shared/domain/workspace';
export function resolveChatToolingSettings(
workspace: WorkspaceState | undefined,
projectForSession: ProjectRecord | undefined,
): WorkspaceToolingSettings | undefined {
if (!workspace) {
return undefined;
}
return resolveProjectToolingSettings(workspace.settings, projectForSession?.discoveredTooling);
}