Commit Graph

681 Commits

Author SHA1 Message Date
can1357 1f6c61ac3a feat(ai): added OpenCode Zen provider and updated AI model configurations
- Added OpenCode Zen provider with API key-based authentication supporting multiple AI models.
- Added four new free models via OpenCode provider: glm-4.7-free, kimi-k2.5-free, minimax-m2.1-free, and trinity-large-preview-free.
- Added glm-4.7-flash model via Zai provider.
- Updated pricing and configuration for multiple models across Kimi, MiniMax, OpenRouter, Anthropic, Vercel AI Gateway, and Zai providers.
- Removed google/gemini-2.0-flash-exp:free from OpenRouter and stealth models from Vercel AI Gateway.
2026-01-31 02:11:23 +01:00
can1357 5280292306 docs: retrospective changelog maintenance for recent commits 2026-01-31 01:57:20 +01:00
can1357 4e4fb944c5 chore: bump version to 9.2.1 2026-01-31 01:35:32 +01:00
can1357 ff8ec3426c chore: bump version to 9.2.0 2026-01-31 01:29:50 +01:00
can1357 d1a18a29e5 feat: added Kimi Code provider with OpenAI and Anthropic API format support
- Added Kimi Code provider with support for both OpenAI and Anthropic API formats.
- Added kimiApiFormat configuration option to allow users to select between 'openai' and 'anthropic' API formats for Kimi Code provider.
- Added Kimi API format setting in the tools configuration tab with descriptions for each format option.
- Refactored Anthropic provider authentication logic to support multiple API endpoints including Kimi's Anthropic-compatible API.
- Updated OpenAI completions provider to route direct Kimi models to dedicated Kimi provider implementation.
2026-01-30 23:09:28 +01:00
can1357 3f3e696e3e fix(ai/providers): fixed rate limit issues with Kimi models by always sending max_tokens
- Fixed rate limit issues with Kimi models by always sending max_tokens parameter, which Kimi uses for TPM calculation regardless of actual output.
- Added detection for Kimi models (kimi-code provider or moonshotai/kimi ID) to apply the max_tokens workaround.
2026-01-30 18:09:31 +01:00
can1357 27d7e66be6 chore: bump version to 9.1.1 2026-01-30 01:27:47 +01:00
can1357 cdb4f72cbc chore: bump version to 9.1.0 2026-01-30 01:13:03 +01:00
can1357 f28d0bc507 chore: bump version to 9.0.0 2026-01-30 00:23:37 +01:00
can1357 bf891b329c fix: backport fixes from pi-mono (9f3eef65f..52532c7c0)
packages/ai:
- fix: handle "sensitive" stop reason from Anthropic API
- fix: normalize tool call IDs with special characters for Responses API
- fix: add overflow detection for Bedrock, MiniMax, Kimi providers
- fix: 429 status is rate limiting, not context overflow

packages/tui:
- fix: refactored autocomplete state tracking
- fix: file autocomplete should not trigger on empty text
- fix: configurable autocomplete max visible items
- fix: improved table column width calculation with word-aware wrapping

packages/coding-agent:
- fix: preserve external config.yml edits on save (#1046 by @nicobailonMD)
- fix: resolve macOS NFD and curly quote variants in file paths
2026-01-30 00:22:13 +01:00
can1357 fa68a6606b chore: bump version to 8.13.0 2026-01-29 23:35:38 +01:00
can1357 d1be6e541b chore: bump version to 8.12.10 2026-01-29 15:43:01 +01:00
can1357 e6e217c8f1 chore: bump version to 8.12.9 2026-01-29 11:33:27 +01:00
can1357 6d23309f14 chore: bump version to 8.12.8 2026-01-29 11:19:52 +01:00
can1357 2aa046c053 chore: bump version to 8.12.7 2026-01-29 11:03:59 +01:00
can1357 2abaddec84 chore: bump version to 8.12.6 2026-01-29 10:53:15 +01:00
can1357 a7ad179356 chore: bump version to 8.12.5 2026-01-29 09:49:52 +01:00
can1357 aa156af6e1 chore: bump version to 8.12.4 2026-01-29 09:34:06 +01:00
can1357 d9de0f02d8 refactor(event-stream): restructured event stream batching logic into base class to reduce test mock duplication
- Extracted delta event batching and throttling logic into AssistantMessageEventStream base class to eliminate duplication across test mocks.
- Changed access modifiers from private to protected in EventStream class to allow subclass customization of queue, waiting, and completion handling.
- Simplified MockAssistantStream implementations across five test files by removing custom event handling logic and delegating to AssistantMessageEventStream.
- Added protected methods deliver() and endWaiting() to EventStream to support subclass event delivery patterns.
- Implemented delta event type guard and merging utilities to consolidate event batching logic in one place.
2026-01-29 00:22:34 +01:00
can1357 669530fc41 chore: bump version to 8.12.3 2026-01-28 22:27:15 +01:00
can1357 38f0628496 chore: bump version to 8.12.2 2026-01-28 17:18:23 +01:00
can1357 306f380d0f chore: bump version to 8.12.1 2026-01-28 15:46:28 +01:00
can1357 3ffd817b61 chore: bump version to 8.12.0 2026-01-28 15:37:57 +01:00
can1357 defdfd664f feat(ai/usage): integrated profile endpoint to resolve user emails with 24-hour caching
- Added profile endpoint integration to resolve user email addresses when not available in usage payload.
- Implemented profile caching with 24-hour TTL to reduce redundant API calls for email resolution.
- Added fetchProfile function to retrieve Claude account profile information from the API.
- Added buildProfileCacheKey function to generate cache keys based on provider, token fingerprint, and base URL.
- Added resolveEmail function to handle email resolution with fallback to profile API and caching.
2026-01-28 14:32:28 +01:00
can1357 7e58a02053 feat(ai/usage): added automatic token refresh for expired Kimi OAuth credentials
- Added automatic token refresh for expired Kimi OAuth credentials in usage provider.
- Imported refreshKimiToken function to enable token refresh capability.
- Enhanced error handling with validation for refresh token availability and try-catch block for refresh failures.
2026-01-28 14:29:17 +01:00
can1357 41c852cbc8 chore: bump version to 8.11.14 2026-01-28 14:22:04 +01:00
can1357 8c007bfb95 chore: bump version to 8.10.13 2026-01-28 14:02:13 +01:00
can1357 fd06c41117 refactor(coding-agent/extensibility): restructured wrapper classes to use dynamic getters and safer property access
- Converted wrapper class properties to dynamic getters that delegate to underlying tool objects.
- Added optional chaining operators for safer null/undefined access in JSON schema property handling.
- Changed output metadata wrapper to use Object.create() with property descriptors instead of object spread syntax.
2026-01-28 14:02:00 +01:00
can1357 df00e12be8 chore: bump version to 8.10.12 2026-01-28 13:51:40 +01:00
can1357 e94514e4f2 build(deps): updated dependencies across packages including protoc-gen-es, typebox, and other libraries
- Updated @bufbuild/protoc-gen-es from ^2.10.2 to ^2.11.0.
- Updated @types/bun from ^1.2.18 to ^1.3.7.
- Updated prettier from ^3.8.0 to ^3.8.1.
- Updated @sinclair/typebox from ^0.34.46 to ^0.34.48 across multiple packages.
- Updated @bufbuild/protobuf from ^2.10.2 to ^2.11.0 in packages/ai.
- Updated multiple dependencies including chalk, diff, file-type, zod, winston, recharts, and mime-types to their latest patch and minor versions.
2026-01-28 13:27:58 +01:00
can1357 a91330bae0 feat(ai): added Kimi Code provider integration with OAuth and token management
- Added Kimi Code provider integration with OAuth device authorization flow and token management.
- Added four new Kimi Code models (kimi-for-coding, kimi-k2, kimi-k2-turbo-preview, kimi-k2.5) with reasoning support and 262K context window.
- Added kimiUsageProvider for fetching and caching Kimi Code API usage quota information.
- Added kimi-code login command to CLI for OAuth authentication with Kimi Code.
- Updated openai-completions provider to support Kimi-specific headers and cached token formats.
- Updated MiniMax-M2 model pricing: input 1.2->0.6, output 1.2->3, cacheRead 0.6->0.1.
2026-01-28 13:22:19 +01:00
can1357 0471a3fde7 chore: bump version to 8.10.11 2026-01-28 11:29:22 +01:00
can1357 59a3fdb1d1 build(deps): updated minimum Bun runtime requirement to >=1.3.7 across all packages
- Updated minimum Bun runtime requirement from >=1.0.0 to >=1.3.7 across all packages.
2026-01-28 04:12:18 +01:00
can1357 925491b79f chore: bump version to 8.9.10 2026-01-28 04:10:43 +01:00
can1357 1257dd8fac chore: bump version to 8.8.8 2026-01-28 04:01:10 +01:00
can1357 eb3ca1ddd2 refactor(coding-agent): restructured prompt rendering and tool utilities into dedicated modules
- Extracted tool choice mapping logic into dedicated utility module for provider-specific format conversions.
- Refactored task summary generation to use template-based rendering instead of string concatenation.
- Migrated system prompt generation to use Handlebars templates with structured data instead of hardcoded strings.
- Extracted JTD to TypeScript conversion logic into dedicated utility module for schema documentation.
- Consolidated prompt template rendering across multiple modules using unified renderPromptTemplate function.
- Simplified type assertions in stream module to use generic OptionsForApi type instead of provider-specific types.
2026-01-28 03:47:16 +01:00
can1357 9b90dabaa9 feat(coding-agent): added session compaction enhancements with auto-continue, tool pruning, and remote endpoint support
- Added session compaction auto-continue feature that automatically sends a synthetic continuation prompt after compaction completes when enabled in settings.
- Added tool output pruning system that intelligently removes verbose tool outputs from session history during compaction to reduce token usage while preserving critical information.
- Added short summary generation for compaction results, providing concise PR-style summaries of conversation changes alongside full summaries.
- Added session.compacting extension hook that allows extensions to customize compaction prompts, add context, and preserve metadata during summarization.
- Added synthetic message support to mark system-injected messages (like auto-continue prompts) and prevent them from being persisted to editor history.
2026-01-28 03:15:28 +01:00
can1357 cc91f80e99 feat: added toolChoice support and optimized TUI
- Added ToolChoice type and toolChoice parameter support across all AI providers (OpenAI, Azure OpenAI, Anthropic, Google) enabling fine-grained control over tool/function selection during LLM calls.
- Added toolChoice override capability to Agent.prompt() method and session prompt options allowing callers to control tool selection behavior per request.
- Added provider-specific tool choice mapping functions (mapAnthropicToolChoice, mapGoogleToolChoice, mapOpenAiToolChoice) to normalize tool choice formats across different LLM APIs.
- Removed kernel heartbeat/ping mechanism from PythonKernel, simplifying health monitoring by relying on direct isAlive() checks instead of periodic HTTP requests.
2026-01-28 02:53:58 +01:00
can1357 938beca49e chore: bump version to 8.6.0 2026-01-27 23:26:38 +01:00
can1357 799a990ade refactor(coding-agent): extracted type guard functions for improved type safety and reusability
- Extracted type guard functions for improved type safety and code reusability across RPC and migration modules.
- Centralized AgentEvent type validation into a dedicated Set constant and type guard function in rpc-client.
- Replaced inline type assertions with type guard functions in RPC response and event handling logic.
- Refactored test utilities to use parseSessionEntries helper and type guard functions for cleaner test code.
- Added reasoning content configuration properties to OpenAI compatibility settings.
2026-01-27 23:21:38 +01:00
can1357 57a3650cc6 fix: backport fixes from pi-mono (3635e45f..9f3eef65f)
packages/ai:
- feat: HTTP proxy support via environment variables
- fix: correct provider error message typo
- fix: filter deprecated OpenCode models from generation

packages/tui:
- fix: scrollback overwrite when appending lines past viewport
- fix: keep overlays centered across resizes
- fix: handle multi-line text in insertTextAtCursor()

packages/coding-agent:
- fix: add /model instruction to no models warning
- fix: active path highlighting in HTML exports
2026-01-27 19:47:36 +01:00
can1357 70c7ca325a refactor(ai/google): restructured historical tool call messages
- Migrated historical tool call context to an XML-like structure.
- Clarified the message to explicitly warn models against mimicking tool calls.
- Enhanced context interpretation for Gemini 3 models.
2026-01-27 19:19:52 +01:00
can1357 d9a3291641 feat(deps): replaced external JSON/JSONL and text utilities with Bun built-in APIs
- Replaced external JSON/JSONL parsing libraries with Bun's built-in JSON5 and JSONL APIs across all packages.
- Removed dependencies: json5, ndjson, get-east-asian-width, json-stringify-safe, split2, through2, and @types/ndjson.
- Replaced custom text width and ANSI wrapping implementations with Bun.stringWidth() and Bun.wrapAnsi() APIs.
- Updated Bun type definitions from ^1.2.17 to ^1.2.18 and bun-types from ^1.3.5 to ^1.3.7.
- Refactored JSONL parsing throughout codebase to use Bun.JSONL.parse() and Bun.JSONL.parseChunk() with improved buffer management and error handling.
- Updated test assertions to use Bun.stringWidth() for dynamic width calculations instead of hardcoded values.
2026-01-27 19:18:58 +01:00
can1357 3cec31c57d fix(ai): fixed filtering of empty user text blocks and reasoning content normalization
- Fixed filtering of empty user text blocks for OpenAI-compatible completions.
- Fixed normalization of Kimi reasoning_content for OpenRouter tool-call messages.
- Added compatibility flags for reasoning content field handling and tool-call requirements.
- Updated model registry with new models (kimi-k2.5, solar-pro-3, qwen3-max-thinking) and adjusted pricing/token limits.
2026-01-27 18:22:37 +01:00
can1357 0c30ef4b9b chore: bump version to 8.5.0 2026-01-27 05:20:27 +01:00
can1357 6c1804e73b chore: bump version to 8.4.5 2026-01-26 15:12:13 +01:00
can1357 2d075c3059 chore: bump version to 8.4.3 2026-01-25 19:53:31 +01:00
can1357 2abe271d50 chore: bump version to 8.4.2 2026-01-25 19:41:24 +01:00
can1357 6ef1f4510b chore: bump version to 8.4.1 2026-01-25 19:35:49 +01:00
can1357 d26f759b80 chore: bump version to 8.4.0 2026-01-25 14:13:26 +01:00