mirror of
https://github.com/davidkaya/aryx.git
synced 2026-07-28 15:38:37 +02:00
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>
15 lines
551 B
TypeScript
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);
|
|
}
|