mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: track OpenCode sessions (#26128)
This follows #26098 by teaching AI Bridge to read OpenCode session IDs from the X-OpenCode-Session header, so OpenCode requests are grouped consistently in interception logs. Adds unit and integration test coverage for the new header. <details> <summary>Coder Agents generated</summary> This pull request was generated with Coder Agents assistance. </details>
This commit is contained in:
@@ -75,6 +75,8 @@ func GuessSessionID(client Client, r *http.Request) *string {
|
||||
return cleanRef(r.Header.Get("X-KILOCODE-TASKID"))
|
||||
case ClientCoderAgents:
|
||||
return cleanRef(r.Header.Get("X-Coder-Chat-Id"))
|
||||
case ClientOpenCode:
|
||||
return cleanRef(r.Header.Get("X-OpenCode-Session"))
|
||||
case ClientCrush:
|
||||
return nil // Crush does not send a session ID header.
|
||||
case ClientRoo:
|
||||
|
||||
Reference in New Issue
Block a user