- Specify input and output tokens in flag help text
- Synchronize metadata descriptions across shell completion definitions
- Localize clarified metadata guidance across supported languages
- Record description clarification in incoming changelog entry
- Declare Fish completion arguments for dynamic and fixed values
- Enable filtered file suggestions for supported path options
- Add Spotify, transcription, metadata, and wire-debug completion options
- Include Grok among providers supporting web search completion
- Localize pattern, Spotify, and metadata help descriptions consistently
- Document expanded completion coverage and wire-level debug behavior
- Describe YouTube visual flags directly in generated help
- Translate Bedrock setup prompts across nine supported locales
- Localize datetime and system template errors consistently
- Translate Persian Spotify errors and setup guidance
- Correct Japanese and Polish file operation log labels
Pattern names containing ".." could be used to escape the patterns
directory and read arbitrary files via filepath.Join. Guard added at
the top of getFromDB; i18n key pattern_invalid_name added to all
11 locale files; test cases cover all common traversal variants.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add persistent cache for provider model discovery results
- Serve stale model caches during discovery failures
- Return concise localized errors for rate-limited model fetches
- Send GitHub Models API version header automatically
- Add Claude Fable 5 Anthropic model support
- Omit sampling parameters for Claude Fable 5
- Update model rate-limit translations across supported locales
- Add tests for cache, rate-limit, and GitHub headers
- Update Go dependencies for AI provider integrations
- Move visual flag descriptions to i18n locale system
- Add visual extraction strings to all 11 locale files
- Replace hardcoded English error messages with i18n lookups
- Register visual flags in `flagDescriptionMap` for help system
- Remove inline `description` tags from visual CLI flag structs
- Localize FFmpeg, Tesseract, and yt-dlp error messages
- Add `youtube_visual_frame_cue` translation key across locales
- Add 17 new Codex-related i18n keys across all locale files
- Replace hardcoded English strings in OAuth flow with i18n lookups
- Internationalize Codex error messages in `errors.go`
- Localize token exchange and refresh failure messages
- Translate OAuth callback server responses and browser fallback text
- Add translations for usage limit and request status errors
- Cover DE, EN, ES, FA, FR, IT, JA, PL, PT-BR, PT-PT, ZH locales
## Bug: Streaming Deadlock in Chatter.Send
When a streaming error occurs, two goroutines can race to write to the
same buffered(1) error channel:
1. The SendStream goroutine returns an error and writes to errChan
2. The stream-update loop receives a StreamTypeError update and also
writes to errChan
Since errChan has a buffer of 1, the second write blocks forever,
causing a goroutine leak and a deadlock — the caller never returns.
### Fix
Introduce `recordFirstStreamError()` which uses a non-blocking
select/default to safely send only the first error, discarding
subsequent ones. This prevents the deadlock while preserving the
original error for the caller.
### Scenario that triggers the deadlock (before this fix):
1. Vendor stream emits a StreamTypeError update (e.g., rate limit)
2. The update loop writes the error to errChan (buffer fills)
3. SendStream also returns an error
4. SendStream goroutine tries to write to errChan → BLOCKS FOREVER
5. Chatter.Send never returns → user sees a hang
## Refactor: Unify Strategy Handling (Server + CLI)
The REST API server (chat.go) was loading strategy prompts inline by
reading JSON files directly with os.ReadFile, bypassing the core
Chatter layer entirely. This caused:
- Strategy prompts were prepended to UserInput instead of the system
message, breaking the prompt architecture
- The StrategyName was not passed to GetChatter(), so the core layer
had no knowledge of the strategy
- Duplicate strategy-loading logic between CLI and server paths
### Fix
- Pass StrategyName through to GetChatter() and ChatRequest so the
core Chatter.BuildSession() handles strategy loading uniformly
- Extract `buildPromptChatRequest()` helper for clean request
construction
- Remove inline os.ReadFile strategy loading from the server handler
## Refactor: Clean System Message Assembly
Replace raw string concatenation of context + pattern + strategy
prompts with `joinPromptSections()` which:
- Trims whitespace from each section
- Skips empty sections (no double newlines from missing context)
- Joins with a single newline separator
## Tests Added
- `TestChatter_BuildSession_SeparatesSystemSections`: Verifies
strategy, context, and pattern are joined with newline separators
in the correct order
- `TestChatter_Send_StreamingErrorUpdateAndReturnDoesNotDeadlock`:
Regression test with 2-second timeout that catches the deadlock
when both error paths fire simultaneously
- `TestBuildPromptChatRequest_PreservesStrategyAndUserInput`: Verifies
the extracted helper preserves all fields including StrategyName
- Add new Codex AI vendor plugin with OpenAI OAuth PKCE flow
- Implement browser-based login with automatic token refresh on 401
- Register Codex client in the plugin registry
- Allow explicit Codex model selection bypassing model listing
- Expose shared OpenAI `BuildResponseParams` and `ExtractText` helpers
- Move system/developer messages into Codex `instructions` field
- Add Codex i18n strings across all supported locales
- Add comprehensive unit tests for Codex OAuth, streaming, and retry
- Update README with Codex feature entry and provider listing
- Trim older changelog entries from README recent features section
Add 3-tier authentication for AWS Bedrock:
1. Bearer token (ABSK) - simplest, same as Claude Code
2. Static AWS credentials (access key + secret key)
3. Default AWS credential chain (existing behavior)
- Remove hasAWSCredentials() gate so Bedrock always appears in setup
- Custom guided Setup() flow: auth method, region, model
- Bearer token transport with token redaction
- Nil guards for uninitialized clients
- Temperature-only fix (no top_p) for Claude on Bedrock
- API key masking during re-setup
- Fallback model list when ListFoundationModels API is inaccessible
- i18n support for 11 locales (3 new keys each)
- 25 unit tests
This commit addresses all review feedback from PR #2014 and adds
configurable API version support for Azure OpenAI backend.
PR Review Fixes:
- Add URL validation with HTTPS enforcement (ISC-C7)
- Implement cancellable context in SendStream with 300s timeout (ISC-C6)
- Add response body size limit (10MB) using io.LimitReader (ISC-C12)
- Update error body truncation from 200 to 500 characters (ISC-C13)
- Lowercase error messages per Go convention (ISC-C15)
- Add file-level documentation to all backend files (ISC-C14)
- Fix Bedrock max_tokens to respect opts.MaxTokens with fallback (ISC-C5)
- Document temperature/top_p mutual exclusivity in Bedrock (ISC-C11)
- Add debug logging when empty messages are skipped (ISC-C16)
- Add error check for empty message lists across all backends
- Verify and document Vertex AI endpoint path for APIM routing (ISC-C9)
- Update Azure OpenAI API version to 2025-04-01-preview (ISC-C10)
New Feature - Configurable API Version:
- Add APIVersion field to Client struct for Azure OpenAI backend
- Add optional setup question for API version (default: 2025-04-01-preview)
- Update AzureOpenAIBackend to accept and use configurable API version
- Maintain backward compatibility: empty version defaults to 2025-04-01-preview
- Add test coverage for custom API version and backward compatibility
- Update all existing tests to work with new backend signature
Test Coverage: 89.1% (maintained from 89.0%)
All 52 tests passing (49 existing + 3 new API version tests)
Internationalization polish: add AzureAIGateway locale strings across all 10 languages
- Add `azureaigateway_*` i18n keys to all 10 locale files
- Replace hardcoded error strings with `i18n.T()` calls
- Internationalize setup question prompts for gateway configuration
- Add `errors.New` in place of `fmt.Errorf` for static error strings
- Fix `url.QueryEscape` for API version query parameter encoding
- Correct `claude-opus-4-6-v1` model ID to include `:0` suffix
- Add error case for empty Bedrock text content blocks in `ParseResponse`
- Add test for Bedrock `ParseResponse` with no text content blocks
- Add `SendStream` context limitation note as inline code comment
- Truncate debug error body log output at 2000 characters
## CHANGES
- Add `Wire` log level constant to debug level enum
- Expose `GetLevel()` function for safe concurrent level reads
- Log outbound message roles and content at wire debug level
- Log inbound stream updates and token usage at wire level
- Log non-streaming LLM responses at wire debug level
- Update `--debug` flag description to include new level 4
- Update `set_debug_level` locale strings across all 10 languages
- Add three new DigitalOcean error message translation keys across all locales
- Add plugin registry vendor and setup default translation keys
- Move misplaced locale entries into correct alphabetical order
- Replace hardcoded English error strings with `i18n.T()` calls in DigitalOcean client
- Sort Go import statements alphabetically in YouTube tool
- Replace `fmt.Errorf("%s", ...)` with `errors.New()` across all packages
- Add `errors` import where needed, remove unused `fmt` imports
- Lowercase error message strings in i18n locale files for Go conventions
- Add `plugin_registry_run_setup_select_defaults` i18n key for setup prompt
- Add `plugin_registry_could_not_find_vendor` i18n key for vendor errors
- Internationalize hardcoded English strings in `plugin_registry.go`
- Update `db_error_loading_env_file` format verb from `%s` to `%w` for wrapping
- Normalize error casing in en, de, es, fr, it, ja, pt-BR, pt-PT, zh, fa locales
## CHANGES
- Add new `azure_entra` plugin client to plugin registry
- Extract shared Azure logic into `azurecommon` package
- Move `ParseDeployments`, `BuildEndpoint`, and middleware to `azurecommon`
- Upgrade `azidentity` to v1.13.1 with Entra ID/MSAL support
- Add `golang-jwt`, `pkg/browser`, and `go-keychain` as new dependencies
- Add `azure_credential_failure`, `azure_base_url_question` i18n keys across all locales
- Validate Azure deployment names are non-empty on configure
### CHANGES
- Implement internationalization support for all AI vendor plugins
- Update localization files for multiple languages with new keys
- Replace hardcoded strings in Spotify and YouTube tools
- Add unit tests for localized error handling in Ollama
- Refactor template plugins to use localized system error messages
- Standardize setup questions using the new i18n translation framework
- Replace hardcoded error strings in `file_manager.go` with i18n translation keys
- Add file manager, Vertex AI, and Copilot i18n keys to all 10 locale files
- Internationalize Copilot plugin error messages and debug logs
- Internationalize Vertex AI model fetching error messages
- Fix JSON trailing comma syntax errors across all locale files
- Normalize German locale JSON indentation from tabs to spaces
- Use `AddSetupQuestionWithEnvName` for Bedrock AWS region setup
- Add VertexAI error message translations across 10 locale files
- Add Gemini TTS and audio error translations to all locales
- Add AWS Bedrock client error translations to all locales
- Add fetch plugin error message translations to all locales
- Replace hardcoded English strings with `i18n.T()` calls in Bedrock plugin
- Replace hardcoded English strings with `i18n.T()` calls in Gemini plugin
- Replace hardcoded English strings with `i18n.T()` calls in VertexAI plugin
- Replace hardcoded English strings with `i18n.T()` calls in fetch plugin
- Use `errors.New` instead of `fmt.Errorf` for non-formatted error strings
- Replace hardcoded strings with i18n keys in chatter.go
- Add translation keys for errors, warnings, and metadata in locale files
- Update file.go to use i18n for operation messages and errors
- Provide translations in German, English, Spanish, Persian, French, Italian, Japanese, Portuguese, and Chinese
- Enable localized output for stream updates and file plugin operations
- Ensure consistent error handling across supported languages
- Maintain backward compatibility with existing functionality
Replace 37 hard-coded error/log strings with i18n.T() calls and add
translations for all 10 supported languages (en, de, es, fa, fr, it,
ja, pt-BR, pt-PT, zh). Keys use ollama_ prefix following project
conventions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
## CHANGES
- Add Spotify plugin with OAuth token handling and metadata
- Wire --spotify flag into CLI processing and output
- Register Spotify in plugin setup, env, and registry
- Update shell completions to include --spotify option
- Add i18n strings for Spotify configuration errors
- Add unit and integration tests for Spotify API
- Set gopls integration build tags for workspace
- Add GitHub and Buy Me a Coffee funding configuration.
- Localize setup prompts and error messages across multiple languages.
- Implement helper for localized questions with static environment keys.
- Update environment variable builder to handle hyphenated plugin names.
- Replace hardcoded console output with localized i18n translation strings.
- Expand locale files with comprehensive pattern and strategy translations.
- Add new i18n keys for optional and required markers
- Remove hardcoded `[required]` markers from description strings
- Add custom patterns, Jina AI, YouTube, and language labels
- Switch plugin descriptions to use i18n translation keys
- Append markers dynamically to setup descriptions in Go code
- Remove trailing newlines from plugin question prompt strings
- Standardize all locale files with consistent formatting changes
### CHANGES
- Add automated first-time setup for patterns and strategies.
- Implement configuration validation to warn about missing required components.
- Update setup menu to group plugins into required and optional.
- Provide helpful guidance when no patterns are found in listing.
- Expand localization support for setup and error messaging across languages.
- Enhance strategy manager to reload and count installed strategies.
- Improve pattern error handling with specific guidance for empty directories.
- Add GitHub Models to supported OpenAI-compatible providers list
- Implement direct HTTP fallback for non-standard model responses
- Centralize model fetching logic in openai package
- Upgrade openai-go SDK dependency from v1.8.2 to v1.12.0
- Remove redundant model fetching code from openai_compatible package
- Add comprehensive GitHub Models setup documentation (700+ lines)
- Support custom models URL endpoint per provider configuration
- Add unit tests for direct model fetching functionality
- Update internationalization strings for model fetching errors
- Add VSCode dictionary entries for "azureml" and "Jamba"
- Update `--raw` flag description across all documentation files
- Clarify flag only affects OpenAI-compatible providers behavior
- Document Anthropic models use smart parameter selection
- Remove outdated reference to system/user role changes
- Update help text in CLI flags definition
- Translate updated description to all supported locales
- Update shell completion descriptions for zsh and fish
- chore: incoming 1836 changelog entry
- Thanks to @JuracyAmerico for Brazilian Portugese native speaker expertise!
- Replace "dos" with "entre" for better preposition usage
- Add definite articles where natural in Portuguese
- Clarify "configurações padrão" instead of just "padrões"
- Keep technical terms visible like "padrões/patterns"
- Remove unnecessary quotes around "URL"
- Make phrasing more natural "Exportar para arquivo"
• Add Brazilian Portuguese (pt-BR) translation file
• Add European Portuguese (pt-PT) translation file
• Implement BCP 47 locale normalization system
• Create fallback chain for language variants
• Add default variant mapping for Portuguese
• Update help text to show variant examples
• Add comprehensive test suite for variants
• Create documentation for i18n variant architecture
2025-09-21 16:04:59 -07:00
Renamed from internal/i18n/locales/pt.json (Browse further)