|
| 1 | +"""config command — view and modify configuration.""" |
| 2 | + |
| 3 | +from typing import Optional |
| 4 | + |
| 5 | +import click |
| 6 | + |
| 7 | + |
| 8 | +def config_cmd( |
| 9 | + key: Optional[str] = None, |
| 10 | + value: Optional[str] = None, |
| 11 | + *, |
| 12 | + init_config: bool = False, |
| 13 | +) -> None: |
| 14 | + """View or modify workspace configuration. |
| 15 | +
|
| 16 | + Args: |
| 17 | + key: Config key (dot-separated, e.g. "llm.model"). |
| 18 | + value: New value to set. If None, prints current value. |
| 19 | + init_config: Reset config to defaults. |
| 20 | +
|
| 21 | + Usage: |
| 22 | + vectorless-cli config # show all |
| 23 | + vectorless-cli config llm.model # show one key |
| 24 | + vectorless-cli config llm.model gpt-4o # set value |
| 25 | + vectorless-cli config --init # reset defaults |
| 26 | +
|
| 27 | + Config keys (in .vectorless/config.toml): |
| 28 | + llm.model LLM model name |
| 29 | + llm.api_key API key (or env VECTORLESS_API_KEY) |
| 30 | + llm.endpoint API endpoint |
| 31 | + retrieval.strategy agent | pipeline |
| 32 | + retrieval.max_rounds navigation budget |
| 33 | + index.summary full | selective | lazy | navigation |
| 34 | + index.compact_mode true | false |
| 35 | + """ |
| 36 | + raise NotImplementedError |
| 37 | + |
| 38 | + |
| 39 | +def _load_config(workspace: str) -> dict: |
| 40 | + """Load config.toml from workspace. |
| 41 | +
|
| 42 | + Args: |
| 43 | + workspace: Path to .vectorless/ directory. |
| 44 | +
|
| 45 | + Returns: |
| 46 | + Parsed config dict. |
| 47 | + """ |
| 48 | + raise NotImplementedError |
| 49 | + |
| 50 | + |
| 51 | +def _save_config(workspace: str, config: dict) -> None: |
| 52 | + """Save config dict to config.toml. |
| 53 | +
|
| 54 | + Args: |
| 55 | + workspace: Path to .vectorless/ directory. |
| 56 | + config: Config dict to serialize. |
| 57 | + """ |
| 58 | + raise NotImplementedError |
| 59 | + |
| 60 | + |
| 61 | +def _default_config() -> dict: |
| 62 | + """Return default configuration values.""" |
| 63 | + raise NotImplementedError |
0 commit comments