Skip to content

Commit 7bd118e

Browse files
chore: appease linter and formatter
1 parent 29f446a commit 7bd118e

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

coderd/aitasks.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,16 @@ The workspace name **MUST** be prefixed with "task".`,
104104
},
105105
}
106106

107-
if anthropicClient := api.anthropicClient.Load(); anthropicClient != nil {
108-
stream, err = anthropicDataStream(ctx, *anthropicClient, conversation)
109-
if err != nil {
110-
return "", xerrors.Errorf("create anthropic data stream: %w", err)
111-
}
112-
} else {
107+
anthropicClient := api.anthropicClient.Load()
108+
if anthropicClient == nil {
113109
return fallback, nil
114110
}
115111

112+
stream, err = anthropicDataStream(ctx, *anthropicClient, conversation)
113+
if err != nil {
114+
return "", xerrors.Errorf("create anthropic data stream: %w", err)
115+
}
116+
116117
var acc aisdk.DataStreamAccumulator
117118
stream = stream.WithAccumulator(&acc)
118119

coderd/coderd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"time"
2222

2323
"github.com/anthropics/anthropic-sdk-go"
24+
2425
"github.com/coder/coder/v2/coderd/oauth2provider"
2526
"github.com/coder/coder/v2/coderd/pproflabel"
2627
"github.com/coder/coder/v2/coderd/prebuilds"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ require (
477477
)
478478

479479
require (
480+
github.com/anthropics/anthropic-sdk-go v1.4.0
480481
github.com/brianvoe/gofakeit/v7 v7.3.0
481482
github.com/coder/agentapi-sdk-go v0.0.0-20250505131810-560d1d88d225
482483
github.com/coder/aisdk-go v0.0.9
@@ -500,7 +501,6 @@ require (
500501
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50.0 // indirect
501502
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.50.0 // indirect
502503
github.com/Masterminds/semver/v3 v3.3.1 // indirect
503-
github.com/anthropics/anthropic-sdk-go v1.4.0 // indirect
504504
github.com/aquasecurity/go-version v0.0.1 // indirect
505505
github.com/aquasecurity/trivy v0.58.2 // indirect
506506
github.com/aws/aws-sdk-go v1.55.7 // indirect

0 commit comments

Comments
 (0)