fix: address PR #149 review findings

- Replace custom contains/searchString with strings.Contains in tests
- Fix variable shadow (r -> reposJSON) in workspace handler
- Wire daemon auth token + server URL into spawned agent env vars
- Remove unused CreateAgentTaskWithContext query (dead code after refactor)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
yushen 2026-03-27 16:15:58 +08:00
parent 327973be08
commit 4d8b2edb2d
5 changed files with 11 additions and 62 deletions

View file

@ -215,8 +215,8 @@ func (h *Handler) UpdateWorkspace(w http.ResponseWriter, r *http.Request) {
params.Settings = s
}
if req.Repos != nil {
r, _ := json.Marshal(req.Repos)
params.Repos = r
reposJSON, _ := json.Marshal(req.Repos)
params.Repos = reposJSON
}
ws, err := h.Queries.UpdateWorkspace(r.Context(), params)