feat: return project-relative workspace mapping in query responses
This commit is contained in:
12
README.md
12
README.md
@@ -95,6 +95,16 @@ flowchart LR
|
||||
- QMD cache: `/var/lib/qmd/cache`(qmd 容器)/ `/data/qmd-cache`(gateway 调 CLI)
|
||||
- QMD config: `/var/lib/qmd/config`(qmd 容器)/ `/data/qmd-config`(gateway 调 CLI)
|
||||
|
||||
### 查询返回路径映射(项目相对路径)
|
||||
|
||||
为方便你直接在项目目录定位,`/query` 与 `/sync` 返回的 `resolved_workspace` 使用项目相对路径,而不是容器绝对路径。
|
||||
|
||||
- `main` -> `data/workspaces/main`
|
||||
- `memory/2026-03` -> `data/workspaces/memory-2026-03`
|
||||
- `task/TASK-001` -> `data/workspaces/task-TASK-001`
|
||||
|
||||
内部容器路径仍是 `/data/workspaces/...`,网关会在响应时转换为相对路径表示。
|
||||
|
||||
## 5. 分支与 profile 规则
|
||||
|
||||
优先级:`branch > memory_profile > main`
|
||||
@@ -194,7 +204,7 @@ curl -fsS -X POST http://127.0.0.1:8787/query \
|
||||
|
||||
- `ok`
|
||||
- `branch`
|
||||
- `resolved_workspace`
|
||||
- `resolved_workspace`(项目相对路径,例如 `data/workspaces/main`)
|
||||
- `commit_hash`
|
||||
- `synced_at`
|
||||
- `query_type`
|
||||
|
||||
Reference in New Issue
Block a user