Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,30 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Changed

- `phi config` is now a full-screen terminal editor (`internal/tui/configui`)
instead of a loopback web page. The form edits the same keys with inline text
fields, choice pickers (model list, thinking level, api, permission mode),
tri-state toggles, and expandable bash allow/deny rule lists. Nothing is
written until a save, and the previous file is kept as `config.yaml.bak`.
- The editable config schema moved to `internal/project` (`project.ConfigDoc`,
`ReadConfigDoc`, `Save`, `Validate`). The runtime parser and the editor now
share one definition instead of two hand-kept copies, and empty `api_key` /
`base_url` values are omitted when a file is written.
- The `phi config` form gives its two columns one job each: labels and values the
file does not set share a single quiet tone, real values are body text, and
state (`on`, `default`, `not set`) is the only thing that spends a color. The
label column no longer relies on `Dim`, which terminals render anywhere from
soft to invisible, and a filled `api_key` now reads as data instead of as an
empty field.

### Deprecated

### Removed

- The embedded HTML config page and its `/api/config` and `/api/models`
endpoints, along with the local HTTP server, origin checks, and browser
launch that served them.

### Fixed

- `diff` pane notes no longer persist. `i` / `x` / `a` keep working, but drafts
Expand All @@ -28,6 +48,15 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
file-operation lists are refreshed once instead of accumulating duplicate blocks.
- Picker hints (`/` commands, `@` files, `?` shortcuts) now start in one shared
column instead of trailing each label's own length.
- `phi config` model headers now sit on the same grid as every other row: the
model name owns the label column (truncated when it does not fit) and the
`default` badge plus the api/context summary share the value column. A long
name used to reach into the summary and eat the badge's last letter.

- The `phi config` confirm modal read its arrows backwards: `↑`/`←` selected No
and `↓`/`→` selected Yes, so pressing a key in the visible direction looked
dead. The keys now pick the row above / below like every other decision
panel, and the footer says `↑↓ move` instead of pointing at a horizontal axis.

### Security

Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ A lean, high-performance terminal coding agent harness in Go — a sibling to Pi

![phi diff review](assets/diff.png)

![phi config viewer](assets/phi-config.png)

- [Docs](https://pulseaiclub.github.io/docs/getting-started/)
- [Quick start](#quick-start)
- [Footprint](#footprint)
Expand Down Expand Up @@ -136,10 +138,20 @@ figures.
## Configuration

phi reads `~/.phi/config.yaml` (standard YAML). Environment variables
override it for one-off runs. `phi config` opens an HTML editor for the same
file in your browser.
override it for one-off runs. `phi config` opens a full-screen terminal editor
for the same file — nothing is written until you save, and the previous file is
kept as `config.yaml.bak`.

```
phi config keys
↑↓ ←→ move / cycle a value a add a model
⏎ edit or open a picker d delete the focused row
esc close, or quit f fetch model ids from the provider
^s save s save q quit
```

![phi config](assets/config.png)
An empty field means "not set", i.e. the value the loader would fill in; the
placeholder shows that value.

```yaml
# ~/.phi/config.yaml
Expand Down
13 changes: 11 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,18 @@ TUI 给模型提供四个核心工具——`read`、`write`、`edit` 和 `bash`
## 配置

phi 读取 `~/.phi/config.yaml`(标准 YAML)。环境变量可覆盖配置,用于一次性运行。
`phi config` 会在浏览器中打开一个 HTML 编辑器来编辑同一个文件。
`phi config` 会在终端里打开全屏编辑器来编辑同一个文件;不保存就不落盘,保存前
的旧文件会留作 `config.yaml.bak`。

![phi config](assets/config.png)
```
phi config 按键
↑↓ ←→ 移动 / 切换取值 a 新增模型
⏎ 编辑,或打开选择列表 d 删除当前行
esc 收起列表 / 退出 f 从服务商拉取模型列表
^s 保存 s 保存 q 退出
```

留空表示「未设置」,也就是交给加载器填默认值;占位符显示的就是那个值。

```yaml
# ~/.phi/config.yaml
Expand Down
Binary file removed assets/config.png
Binary file not shown.
Binary file added assets/phi-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading