History

fix(server): stop showing commit/push/PR notices as errors in the work log (#5559)

Theo Browne committed 3 months ago

Commit 0ec4fbc1 parent ea50b692 files · +27 −3Browse files

Unified · Split

2 files
  1. apps/server/src/provider/Layers/ClaudeAdapter.test.ts +18 −0
  2. apps/server/src/provider/Layers/ClaudeAdapter.ts +9 −3
apps/server/src/provider/Layers/ClaudeAdapter.test.ts+18−0
@@ -2021,6 +2021,24 @@ describe("ClaudeAdapterLive", () => { · 2020 unmodified lines
2021 session_id: "session",2021 session_id: "session",
2022 uuid: "roster",2022 uuid: "roster",
2023 },2023 },
2024 {
2025 type: "system",
2026 subtype: "vcs_state_changed",
2027 kind: "push",
2028 cwd: "/tmp/worktree",
2029 session_id: "session",
2030 uuid: "vcs",
2031 },
2032 {
2033 type: "system",
2034 subtype: "code_change_published",
2035 provider: "github",
2036 url: "https://github.com/pingdotgg/t3code/pull/1",
2037 repo: "pingdotgg/t3code",
2038 identifier: "1",
2039 session_id: "session",
2040 uuid: "ccp",
2041 },
2024 {2042 {
2025 type: "system",2043 type: "system",
2026 subtype: "task_updated",2044 subtype: "task_updated",
apps/server/src/provider/Layers/ClaudeAdapter.ts+9−3
@@ -3034,9 +3034,15 @@ export const makeClaudeAdapter = Effect.fn("makeClaudeAdapter")(function* ( · 3033 unmodified lines
3034 // error rows in client work logs. `background_tasks_changed` is a roster3034 // error rows in client work logs. `background_tasks_changed` is a roster
3035 // snapshot ({tasks: [...]}) — the task_* lifecycle events carry the3035 // snapshot ({tasks: [...]}) — the task_* lifecycle events carry the
3036 // authoritative per-agent data and the typed background_tasks control3036 // authoritative per-agent data and the typed background_tasks control
3037 // request is the reconciliation source.3037 // request is the reconciliation source. `vcs_state_changed`
3038 if ((message.subtype as string) === "background_tasks_changed") {3038 // ({kind: commit|push|rebase}) and `code_change_published`
3039 return;3039 // ({provider, url, repo}) are informational CLI notices; the work log
3040 // already shows the underlying git/gh tool calls.
3041 switch (message.subtype as string) {
3042 case "background_tasks_changed":
3043 case "vcs_state_changed":
3044 case "code_change_published":
3045 return;
3040 }3046 }
3041 3047
3042 switch (message.subtype) {3048 switch (message.subtype) {