From 3f8f7ec5881640f40490b2f5d17504c6a390f773 Mon Sep 17 00:00:00 2001 From: adamdottv <2363879+adamdottv@users.noreply.github.com> Date: Tue, 27 May 2025 10:33:01 -0500 Subject: [PATCH 1/5] feat: claude 4 opus --- internal/llm/models/anthropic.go | 15 +++++++++++++++ internal/llm/models/bedrock.go | 30 ++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/internal/llm/models/anthropic.go b/internal/llm/models/anthropic.go index f67a748424e2..d8f8c08469fa 100644 --- a/internal/llm/models/anthropic.go +++ b/internal/llm/models/anthropic.go @@ -10,6 +10,7 @@ const ( Claude35Haiku ModelID = "claude-3.5-haiku" Claude3Opus ModelID = "claude-3-opus" Claude4Sonnet ModelID = "claude-4-sonnet" + Claude4Opus ModelID = "claude-4-opus" ) // https://docs.anthropic.com/en/docs/about-claude/models/all-models @@ -68,6 +69,20 @@ var AnthropicModels = map[ModelID]Model{ CanReason: true, SupportsAttachments: true, }, + Claude4Opus: { + ID: Claude4Opus, + Name: "Claude 4 Opus", + Provider: ProviderAnthropic, + APIModel: "claude-opus-4-20250514", + CostPer1MIn: 15.0, + CostPer1MInCached: 18.75, + CostPer1MOutCached: 1.50, + CostPer1MOut: 75.0, + ContextWindow: 200000, + DefaultMaxTokens: 32000, + CanReason: true, + SupportsAttachments: true, + }, Claude35Haiku: { ID: Claude35Haiku, Name: "Claude 3.5 Haiku", diff --git a/internal/llm/models/bedrock.go b/internal/llm/models/bedrock.go index 06f825654137..8386bef9008d 100644 --- a/internal/llm/models/bedrock.go +++ b/internal/llm/models/bedrock.go @@ -5,6 +5,8 @@ const ( // Models BedrockClaude37Sonnet ModelID = "bedrock.claude-3.7-sonnet" + BedrockClaude4Sonnet ModelID = "bedrock.claude-4.0-sonnet" + BedrockClaude4Opus ModelID = "bedrock.claude-4.0-opus" ) var BedrockModels = map[ModelID]Model{ @@ -22,4 +24,32 @@ var BedrockModels = map[ModelID]Model{ CanReason: true, SupportsAttachments: true, }, + BedrockClaude4Sonnet: { + ID: BedrockClaude4Sonnet, + Name: "Bedrock: Claude 4 Sonnet", + Provider: ProviderBedrock, + APIModel: "anthropic.claude-sonnet-4-20250514-v1:0", + CostPer1MIn: 3.0, + CostPer1MInCached: 3.75, + CostPer1MOutCached: 0.30, + CostPer1MOut: 15.0, + ContextWindow: 200_000, + DefaultMaxTokens: 50_000, + CanReason: true, + SupportsAttachments: true, + }, + BedrockClaude4Opus: { + ID: BedrockClaude4Opus, + Name: "Bedrock: Claude 4 Opus", + Provider: ProviderBedrock, + APIModel: "anthropic.claude-opus-4-20250514-v1:0", + CostPer1MIn: 15.0, + CostPer1MInCached: 18.75, + CostPer1MOutCached: 1.50, + CostPer1MOut: 75.0, + ContextWindow: 200_000, + DefaultMaxTokens: 50_000, + CanReason: true, + SupportsAttachments: true, + }, } From c554430c59171e2dbec4b4d311e5f7d5a8107d0b Mon Sep 17 00:00:00 2001 From: James Pozdena Date: Thu, 5 Jun 2025 18:23:01 -0600 Subject: [PATCH 2/5] Nord theme (#64) --- internal/tui/theme/nord.go | 107 +++++++++++++++++++++++++++ internal/tui/theme/theme_test.go | 12 +++ www/src/content/docs/docs/themes.mdx | 1 + 3 files changed, 120 insertions(+) create mode 100644 internal/tui/theme/nord.go diff --git a/internal/tui/theme/nord.go b/internal/tui/theme/nord.go new file mode 100644 index 000000000000..e894f987d692 --- /dev/null +++ b/internal/tui/theme/nord.go @@ -0,0 +1,107 @@ +package theme + +import ( + "github.com/charmbracelet/lipgloss" +) + +// NordTheme implements the Theme interface with Nord colors. +// It provides both list and dark variants based on the Nord palette. +type NordTheme struct { + BaseTheme +} + +// NewNordTheme creates a new instance of the Nord theme. +func NewNordTheme() *NordTheme { + // Nord color palette from https://www.nordtheme.com/docs/colors-and-palettes + polarNight0 := "#2E3440" + polarNight1 := "#3B4252" + polarNight2 := "#434C5E" + polarNight3 := "#4C566A" + snowStorm0 := "#D8DEE9" + snowStorm1 := "#E5E9F0" + snowStorm2 := "#ECEFF4" + frost0 := "#8FBCBB" + frost1 := "#88C0D0" + frost2 := "#81A1C1" + frost3 := "#5E81AC" + aurora0 := "#BF616A" + // aurora1 := "#D08770" + aurora2 := "#EBCB8B" + aurora3 := "#A3BE8C" + aurora4 := "#B48EAD" + + theme := &NordTheme{} + + // Base colors + theme.PrimaryColor = lipgloss.AdaptiveColor{Dark: frost1, Light: frost1} + theme.SecondaryColor = lipgloss.AdaptiveColor{Dark: frost2, Light: frost2} + theme.AccentColor = lipgloss.AdaptiveColor{Dark: frost0, Light: frost0} + + // Status colors + theme.ErrorColor = lipgloss.AdaptiveColor{Dark: aurora0, Light: aurora0} + theme.WarningColor = lipgloss.AdaptiveColor{Dark: aurora2, Light: aurora2} + theme.SuccessColor = lipgloss.AdaptiveColor{Dark: aurora3, Light: aurora3} + theme.InfoColor = lipgloss.AdaptiveColor{Dark: frost0, Light: frost0} + + // Text colors + theme.TextColor = lipgloss.AdaptiveColor{Dark: snowStorm2, Light: polarNight0} + theme.TextMutedColor = lipgloss.AdaptiveColor{Dark: snowStorm0, Light: polarNight3} + theme.TextEmphasizedColor = lipgloss.AdaptiveColor{Dark: aurora2, Light: aurora2} + + // Background colors + theme.BackgroundColor = lipgloss.AdaptiveColor{Dark: polarNight0, Light: snowStorm2} + theme.BackgroundSecondaryColor = lipgloss.AdaptiveColor{Dark: polarNight1, Light: snowStorm1} + theme.BackgroundDarkerColor = lipgloss.AdaptiveColor{Dark: polarNight2, Light: snowStorm0} + + // Border colors + theme.BorderNormalColor = lipgloss.AdaptiveColor{Dark: polarNight3, Light: snowStorm1} + theme.BorderFocusedColor = lipgloss.AdaptiveColor{Dark: frost3, Light: frost3} + theme.BorderDimColor = lipgloss.AdaptiveColor{Dark: polarNight2, Light: snowStorm0} + + // Diff view colors + theme.DiffAddedColor = lipgloss.AdaptiveColor{Dark: aurora3, Light: aurora3} + theme.DiffRemovedColor = lipgloss.AdaptiveColor{Dark: aurora0, Light: aurora0} + theme.DiffContextColor = lipgloss.AdaptiveColor{Dark: polarNight3, Light: snowStorm0} + theme.DiffHunkHeaderColor = lipgloss.AdaptiveColor{Dark: frost3, Light: frost3} + theme.DiffHighlightAddedColor = lipgloss.AdaptiveColor{Dark: frost3, Light: frost3} + theme.DiffHighlightRemovedColor = lipgloss.AdaptiveColor{Dark: aurora0, Light: aurora0} + theme.DiffAddedBgColor = lipgloss.AdaptiveColor{Dark: polarNight2, Light: snowStorm0} + theme.DiffRemovedBgColor = lipgloss.AdaptiveColor{Dark: polarNight2, Light: snowStorm0} + theme.DiffContextBgColor = lipgloss.AdaptiveColor{Dark: polarNight1, Light: snowStorm1} + theme.DiffLineNumberColor = lipgloss.AdaptiveColor{Dark: polarNight3, Light: snowStorm1} + theme.DiffAddedLineNumberBgColor = lipgloss.AdaptiveColor{Dark: polarNight2, Light: snowStorm0} + theme.DiffRemovedLineNumberBgColor = lipgloss.AdaptiveColor{Dark: polarNight2, Light: snowStorm0} + + // Markdown colors + theme.MarkdownTextColor = lipgloss.AdaptiveColor{Dark: snowStorm2, Light: polarNight0} + theme.MarkdownHeadingColor = lipgloss.AdaptiveColor{Dark: frost3, Light: frost3} + theme.MarkdownLinkColor = lipgloss.AdaptiveColor{Dark: frost0, Light: frost0} + theme.MarkdownLinkTextColor = lipgloss.AdaptiveColor{Dark: frost1, Light: frost1} + theme.MarkdownCodeColor = lipgloss.AdaptiveColor{Dark: aurora3, Light: aurora3} + theme.MarkdownBlockQuoteColor = lipgloss.AdaptiveColor{Dark: aurora2, Light: aurora2} + theme.MarkdownEmphColor = lipgloss.AdaptiveColor{Dark: aurora2, Light: aurora2} + theme.MarkdownStrongColor = lipgloss.AdaptiveColor{Dark: aurora0, Light: aurora0} + theme.MarkdownHorizontalRuleColor = lipgloss.AdaptiveColor{Dark: polarNight3, Light: snowStorm1} + theme.MarkdownListItemColor = lipgloss.AdaptiveColor{Dark: polarNight2, Light: snowStorm1} + theme.MarkdownListEnumerationColor = lipgloss.AdaptiveColor{Dark: polarNight2, Light: snowStorm1} + theme.MarkdownImageColor = lipgloss.AdaptiveColor{Dark: frost1, Light: frost1} + theme.MarkdownImageTextColor = lipgloss.AdaptiveColor{Dark: frost1, Light: frost1} + theme.MarkdownCodeBlockColor = lipgloss.AdaptiveColor{Dark: polarNight2, Light: snowStorm0} + + // Syntax highsnowStorming colors + theme.SyntaxCommentColor = lipgloss.AdaptiveColor{Dark: polarNight3, Light: snowStorm2} + theme.SyntaxKeywordColor = lipgloss.AdaptiveColor{Dark: aurora4, Light: aurora4} + theme.SyntaxFunctionColor = lipgloss.AdaptiveColor{Dark: frost1, Light: frost1} + theme.SyntaxVariableColor = lipgloss.AdaptiveColor{Dark: frost0, Light: frost0} + theme.SyntaxStringColor = lipgloss.AdaptiveColor{Dark: aurora2, Light: aurora2} + theme.SyntaxNumberColor = lipgloss.AdaptiveColor{Dark: aurora2, Light: aurora2} + theme.SyntaxTypeColor = lipgloss.AdaptiveColor{Dark: aurora3, Light: aurora3} + theme.SyntaxOperatorColor = lipgloss.AdaptiveColor{Dark: aurora4, Light: aurora4} + theme.SyntaxPunctuationColor = lipgloss.AdaptiveColor{Dark: polarNight2, Light: snowStorm2} + + return theme +} + +func init() { + RegisterTheme("nord", NewNordTheme()) +} diff --git a/internal/tui/theme/theme_test.go b/internal/tui/theme/theme_test.go index 790ee3aa8a37..f64ba080d99b 100644 --- a/internal/tui/theme/theme_test.go +++ b/internal/tui/theme/theme_test.go @@ -47,6 +47,18 @@ func TestThemeRegistration(t *testing.T) { t.Errorf("Monokai theme is not registered") } + // Check if "nord" theme is registered + nordFound := false + for _, themeName := range availableThemes { + if themeName == "nord" { + nordFound = true + break + } + } + if !nordFound { + t.Errorf("Nord theme is not registered") + } + // Try to get the themes and make sure they're not nil catppuccin := GetTheme("catppuccin") if catppuccin == nil { diff --git a/www/src/content/docs/docs/themes.mdx b/www/src/content/docs/docs/themes.mdx index e691a22e7f08..e8e7b594bd8d 100644 --- a/www/src/content/docs/docs/themes.mdx +++ b/www/src/content/docs/docs/themes.mdx @@ -14,6 +14,7 @@ The following predefined themes are available: - `flexoki` - `gruvbox` - `monokai` +- `nord` - `onedark` - `tokyonight` - `tron` From 77f1116ac9f182e8da784a958159fa7bfc38b82b Mon Sep 17 00:00:00 2001 From: Dax Date: Thu, 12 Jun 2025 18:36:17 -0400 Subject: [PATCH 3/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c9ebb45e7905..a689dbc723f3 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ paru -S opencode-bin ### Using Go ```bash -go install github.com/sst/opencode@latest +go install github.com/sst/opencode@v0.0.52 ``` ## Configuration From 3bce2c9dc3b2b009388cb696a1eec06ad14fc84a Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Fri, 13 Jun 2025 13:35:04 -0400 Subject: [PATCH 4/5] pin install script --- install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install b/install index 5441a2274d9d..1a10a745391a 100755 --- a/install +++ b/install @@ -40,8 +40,8 @@ INSTALL_DIR=$HOME/.opencode/bin mkdir -p "$INSTALL_DIR" if [ -z "$requested_version" ]; then - url="https://github.com/sst/opencode/releases/latest/download/$filename" - specific_version=$(curl -s https://api.github.com/repos/sst/opencode/releases/latest | awk -F'"' '/"tag_name": "/ {gsub(/^v/, "", $4); print $4}') + specific_version=$(curl -s https://api.github.com/repos/sst/opencode/releases/tags/v0.0.52 | awk -F'"' '/"tag_name": "/ {gsub(/^v/, "", $4); print $4}') + url="https://github.com/sst/opencode/releases/download/v${specific_version}/$filename" if [[ $? -ne 0 ]]; then echo "${RED}Failed to fetch version information${NC}" @@ -86,6 +86,7 @@ check_version() { } download_and_install() { + echo $url print_message info "Downloading ${ORANGE}opencode ${GREEN}version: ${YELLOW}$specific_version ${GREEN}..." mkdir -p opencodetmp && cd opencodetmp curl -# -L $url | tar xz From 183043f66e9495067e3467d38999f442915c1c4a Mon Sep 17 00:00:00 2001 From: captjt Date: Fri, 13 Jun 2025 13:59:16 -0400 Subject: [PATCH 5/5] update gemini 2.5 models --- internal/llm/models/gemini.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/llm/models/gemini.go b/internal/llm/models/gemini.go index f73910166645..2cc4b6dad9b3 100644 --- a/internal/llm/models/gemini.go +++ b/internal/llm/models/gemini.go @@ -15,7 +15,7 @@ var GeminiModels = map[ModelID]Model{ ID: Gemini25Flash, Name: "Gemini 2.5 Flash", Provider: ProviderGemini, - APIModel: "gemini-2.5-flash-preview-04-17", + APIModel: "gemini-2.5-flash-preview-05-20", CostPer1MIn: 0.15, CostPer1MInCached: 0, CostPer1MOutCached: 0, @@ -28,7 +28,7 @@ var GeminiModels = map[ModelID]Model{ ID: Gemini25, Name: "Gemini 2.5 Pro", Provider: ProviderGemini, - APIModel: "gemini-2.5-pro-preview-03-25", + APIModel: "gemini-2.5-pro-preview-06-05", CostPer1MIn: 1.25, CostPer1MInCached: 0, CostPer1MOutCached: 0,