1jehuang / 1jehuang/jcode

feat(config): project-scoped .jcode.toml to scope the model picker per project

Open
#1,098 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

autonomous: no enhancement triage: needs-decision
Dominant language
Rust
Stars
19.9k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
30

Description

Problem

Provider allowance is global only (provider.model_picker_providers in
~/.jcode/config.toml). A user who wants one work project pinned to OpenRouter
and another to a different provider cannot scope the model picker per project.

Fix sketch

  • Read a project-local .jcode.toml (in the session working directory) that is
    a partial subset of the global config; unknown sections/keys fail open.
  • The model picker resolves [provider] model_picker_providers from the
    project file first, falling back to the global config for projects/sessions
    that do not override it.
  • jcode-base gains project_model_picker_providers(working_dir); the TUI
    picker passes the session working directory.

Example project file:

[provider]
model_picker_providers = ["openrouter"]

Tests

jcode-base config::project_config_tests — reads the allowlist from a
project file and fails open on absent/malformed files.

PR ready

Branch tom-dyar/jcode:feat/project-scoped-providers (single commit) is pushed
and ready to open as a PR against master; blocked only because tom-dyar is
not a collaborator on this repo.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the jcode-base configuration code and the config::project_config_tests module, then trace how the TUI model picker receives its session working directory. Verify the project file allowlist, fallback to global configuration, and fail-open behavior for absent or malformed files; the issue also notes that an implementation branch is already pushed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.