Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

Merge branch 'main' into cloud-credit-hooks

Dane Schneiderd345ab4bf2d3
diff --cc app/cli/api/methods.go
index e60ce51d,96dab268..31324819
--- a/app/cli/api/methods.go
+++ b/app/cli/api/methods.go
@@@ -1110,9 -1079,13 +1110,13 @@@ func (a *Api) GetPlanStatus(planId, bra
return string(body), nil
}
- func (a *Api) GetPlanDiffs(planId, branch string) (string, *shared.ApiError) {
+ func (a *Api) GetPlanDiffs(planId, branch string, plain bool) (string, *shared.ApiError) {
- serverUrl := fmt.Sprintf("%s/plans/%s/%s/diffs", getApiHost(), planId, branch)
+ serverUrl := fmt.Sprintf("%s/plans/%s/%s/diffs", GetApiHost(), planId, branch)
+ if plain {
+ serverUrl += "?plain=true"
+ }
+
resp, err := authenticatedFastClient.Get(serverUrl)
if err != nil {
return "", &shared.ApiError{Type: shared.ApiErrorTypeOther, Msg: fmt.Sprintf("error sending request: %v", err)}
@@@ -1121,10 -1094,10 +1125,10 @@@
if resp.StatusCode >= 400 {
errorBody, _ := io.ReadAll(resp.Body)
- apiErr := handleApiError(resp, errorBody)
+ apiErr := HandleApiError(resp, errorBody)
tokenRefreshed, apiErr := refreshTokenIfNeeded(apiErr)
if tokenRefreshed {
- return a.GetPlanDiffs(planId, branch)
+ return a.GetPlanDiffs(planId, branch, plain)
}
return "", apiErr
}