Skip to content

Per-project default AI provider #29

@Ron537

Description

@Ron537

Summary

Allow each project to have its own preferred AI provider, overriding the global default. When the user clicks "New AI session" on a project, DPlex starts the session with that project's preferred provider.

Acceptance criteria

  • Extend Project with defaultProviderId?: string.
  • When set, startAISession(project) honors it (currently uses the global defaultAITool setting).
  • UI: dropdown in the project's right-click menu → "Default AI tool for this project" → list of registered providers, with "Use global default" as the first option.
  • Persists in settings.json alongside other project metadata.
  • Falls back to global default when the per-project provider is no longer registered (e.g. provider removed).

Files to touch

  • src/renderer/src/types/index.ts (extend Project)
  • src/renderer/src/stores/projectStore.ts (startAISession, persistence)
  • src/renderer/src/components/projects/ProjectItem.tsx (menu UI)
  • tests/unit/project-store-active.test.ts (cover the override)

How to test

  • Create two projects, set one to Copilot CLI and another to Claude Code, leaving global default alone.
  • "New AI session" on each → expect the right tool starts.

Effort: 1 day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions