devel/crush: OpenBSD patches
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
--- internal/config/config.go
|
||||
Index: internal/config/config.go
|
||||
--- internal/config/config.go.orig
|
||||
+++ internal/config/config.go
|
||||
@@ -177,6 +177,22 @@ func (c *ProviderConfig) SetupGitHubCopilot() {
|
||||
@@ -178,6 +178,26 @@ func (c *ProviderConfig) SetupGitHubCopilot() {
|
||||
maps.Copy(c.ExtraHeaders, copilot.Headers())
|
||||
}
|
||||
|
||||
|
||||
+func (c *ProviderConfig) SetupClaudeCode() {
|
||||
+ c.FlatRate = true
|
||||
+ c.SystemPromptPrefix = "You are Claude Code, Anthropic's official CLI for Claude."
|
||||
@@ -11,6 +12,7 @@
|
||||
+ c.ExtraHeaders = make(map[string]string)
|
||||
+ }
|
||||
+ c.ExtraHeaders["anthropic-version"] = "2023-06-01"
|
||||
+ c.ExtraHeaders["User-Agent"] = "claude-code/2.1.112"
|
||||
+ const want = "oauth-2025-04-20"
|
||||
+ if v := c.ExtraHeaders["anthropic-beta"]; !strings.Contains(v, want) {
|
||||
+ if v != "" {
|
||||
@@ -18,6 +20,11 @@
|
||||
+ }
|
||||
+ c.ExtraHeaders["anthropic-beta"] = v + want
|
||||
+ }
|
||||
+ if c.APIKey != "" && !strings.HasPrefix(c.APIKey, "Bearer ") {
|
||||
+ c.APIKey = "Bearer " + c.APIKey
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
type MCPType string
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user