mirror of
https://github.com/cline/cline.git
synced 2026-09-01 23:19:18 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b96b5fdaea | |||
| 0757f7f025 | |||
| 0d59ae47df | |||
| 433e217d74 | |||
| 2b52ffefee | |||
| 58ff4fc6af |
@@ -1,5 +1,18 @@
|
||||
# Changelog
|
||||
|
||||
## [3.27.1]
|
||||
|
||||
- Add new Kimi K2 model to groq and moonshot providers
|
||||
|
||||
## [3.27.0]
|
||||
|
||||
- Fix `grok-code-fast-1` model information
|
||||
- Add call to action for trying free `grok-code-fast-1` in Announcement banner
|
||||
|
||||
## [3.26.7]
|
||||
|
||||
- Add 200k context window variant for Claude Sonnet 4 to OpenRouter and Cline providers
|
||||
|
||||
## [3.26.6]
|
||||
|
||||
- Add free Grok Coder model to Cline provider for users looking for a fast, free coding model option
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "claude-dev",
|
||||
"version": "3.26.6",
|
||||
"version": "3.27.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "claude-dev",
|
||||
"version": "3.26.6",
|
||||
"version": "3.27.1",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.37.0",
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "claude-dev",
|
||||
"displayName": "Cline",
|
||||
"description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.",
|
||||
"version": "3.26.6",
|
||||
"version": "3.27.1",
|
||||
"icon": "assets/icons/icon.png",
|
||||
"engines": {
|
||||
"vscode": "^1.84.0"
|
||||
|
||||
@@ -110,6 +110,12 @@ export async function refreshOpenRouterModels(
|
||||
|
||||
switch (rawModel.id) {
|
||||
case "anthropic/claude-sonnet-4":
|
||||
// NOTE: we artificially restrict the context window to 200k to keep costs low for users, and have a :1m model variant created below for users that want to use the full 1m.
|
||||
modelInfo.contextWindow = 200_000
|
||||
modelInfo.supportsPromptCache = true
|
||||
modelInfo.cacheWritesPrice = 3.75
|
||||
modelInfo.cacheReadsPrice = 0.3
|
||||
break
|
||||
case "anthropic/claude-3-7-sonnet":
|
||||
case "anthropic/claude-3-7-sonnet:beta":
|
||||
case "anthropic/claude-3.7-sonnet":
|
||||
@@ -183,6 +189,10 @@ export async function refreshOpenRouterModels(
|
||||
modelInfo.maxTokens = 8_192 // 128000 breaks context window truncation
|
||||
modelInfo.contextWindow = 272_000 // openrouter reports 400k but the input limit is actually 400k-128k
|
||||
break
|
||||
case "x-ai/grok-code-fast-1":
|
||||
modelInfo.supportsPromptCache = true
|
||||
modelInfo.cacheReadsPrice = 0.02
|
||||
break
|
||||
default:
|
||||
if (rawModel.id.startsWith("openai/")) {
|
||||
modelInfo.cacheReadsPrice = parsePrice(rawModel.pricing?.input_cache_read)
|
||||
|
||||
+34
-4
@@ -2834,7 +2834,7 @@ export const vercelAiGatewayDefaultModelInfo: ModelInfo = {
|
||||
// https://console.groq.com/docs/models
|
||||
// https://groq.com/pricing/
|
||||
export type GroqModelId = keyof typeof groqModels
|
||||
export const groqDefaultModelId: GroqModelId = "openai/gpt-oss-120b"
|
||||
export const groqDefaultModelId: GroqModelId = "moonshotai/kimi-k2-instruct-0905"
|
||||
export const groqModels = {
|
||||
"openai/gpt-oss-120b": {
|
||||
maxTokens: 32766, // Model fails if you try to use more than 32K tokens
|
||||
@@ -2926,7 +2926,7 @@ export const groqModels = {
|
||||
outputPrice: 0.08,
|
||||
description: "Fast and efficient Llama 3.1 8B model optimized for speed, low latency, and reliable tool execution.",
|
||||
},
|
||||
// Mistral Models
|
||||
// Moonshot Models
|
||||
"moonshotai/kimi-k2-instruct": {
|
||||
maxTokens: 16384,
|
||||
contextWindow: 131072,
|
||||
@@ -2938,6 +2938,17 @@ export const groqModels = {
|
||||
description:
|
||||
"Kimi K2 is Moonshot AI's state-of-the-art Mixture-of-Experts (MoE) language model with 1 trillion total parameters and 32 billion activated parameters.",
|
||||
},
|
||||
"moonshotai/kimi-k2-instruct-0905": {
|
||||
maxTokens: 16384,
|
||||
contextWindow: 262144,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: true,
|
||||
inputPrice: 0.6,
|
||||
outputPrice: 2.5,
|
||||
cacheReadsPrice: 0.15,
|
||||
description:
|
||||
"Kimi K2 model gets a new version update: Agentic coding: more accurate, better generalization across scaffolds. Frontend coding: improved aesthetics and functionalities on web, 3d, and other tasks. Context length: extended from 128k to 256k, providing better long-horizon support.",
|
||||
},
|
||||
} as const satisfies Record<string, ModelInfo>
|
||||
|
||||
// Requesty
|
||||
@@ -3120,6 +3131,14 @@ export const sapAiCoreModels = {
|
||||
// Moonshot AI Studio
|
||||
// https://platform.moonshot.ai/docs/pricing/chat
|
||||
export const moonshotModels = {
|
||||
"kimi-k2-0905-preview": {
|
||||
maxTokens: 16384,
|
||||
contextWindow: 262144,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: false,
|
||||
inputPrice: 0.6,
|
||||
outputPrice: 2.5,
|
||||
},
|
||||
"kimi-k2-0711-preview": {
|
||||
maxTokens: 32_000,
|
||||
contextWindow: 131_072,
|
||||
@@ -3154,7 +3173,7 @@ export const moonshotModels = {
|
||||
},
|
||||
} as const satisfies Record<string, ModelInfo>
|
||||
export type MoonshotModelId = keyof typeof moonshotModels
|
||||
export const moonshotDefaultModelId = "kimi-k2-0711-preview" satisfies MoonshotModelId
|
||||
export const moonshotDefaultModelId = "kimi-k2-0905-preview" satisfies MoonshotModelId
|
||||
|
||||
// Huawei Cloud MaaS
|
||||
export type HuaweiCloudMaasModelId = keyof typeof huaweiCloudMaasModels
|
||||
@@ -3418,8 +3437,19 @@ export const mainlandZAiModels = {
|
||||
|
||||
// Fireworks AI
|
||||
export type FireworksModelId = keyof typeof fireworksModels
|
||||
export const fireworksDefaultModelId: FireworksModelId = "accounts/fireworks/models/kimi-k2-instruct"
|
||||
export const fireworksDefaultModelId: FireworksModelId = "accounts/fireworks/models/kimi-k2-instruct-0905"
|
||||
export const fireworksModels = {
|
||||
"accounts/fireworks/models/kimi-k2-instruct-0905": {
|
||||
maxTokens: 16384,
|
||||
contextWindow: 262144,
|
||||
supportsImages: false,
|
||||
supportsPromptCache: true,
|
||||
inputPrice: 0.6,
|
||||
outputPrice: 2.5,
|
||||
cacheReadsPrice: 0.15,
|
||||
description:
|
||||
"Kimi K2 model gets a new version update: Agentic coding: more accurate, better generalization across scaffolds. Frontend coding: improved aesthetics and functionalities on web, 3d, and other tasks. Context length: extended from 128k to 256k, providing better long-horizon support.",
|
||||
},
|
||||
"accounts/fireworks/models/kimi-k2-instruct": {
|
||||
maxTokens: 16384,
|
||||
contextWindow: 128000,
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import { Accordion, AccordionItem } from "@heroui/react"
|
||||
import { EmptyRequest } from "@shared/proto/cline/common"
|
||||
import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react"
|
||||
import { CSSProperties, memo } from "react"
|
||||
import { CSSProperties, memo, useState } from "react"
|
||||
import { useClineAuth } from "@/context/ClineAuthContext"
|
||||
import { useExtensionState } from "@/context/ExtensionStateContext"
|
||||
import { AccountServiceClient } from "@/services/grpc-client"
|
||||
import { getAsVar, VSC_DESCRIPTION_FOREGROUND, VSC_INACTIVE_SELECTION_BACKGROUND } from "@/utils/vscStyles"
|
||||
import { useApiConfigurationHandlers } from "../settings/utils/useApiConfigurationHandlers"
|
||||
|
||||
interface AnnouncementProps {
|
||||
version: string
|
||||
@@ -36,6 +41,37 @@ Patch releases (3.19.1 → 3.19.2) will not trigger new announcements.
|
||||
*/
|
||||
const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
|
||||
const minorVersion = version.split(".").slice(0, 2).join(".") // 2.0.0 -> 2.0
|
||||
const { clineUser } = useClineAuth()
|
||||
const { apiConfiguration, openRouterModels, setShowChatModelSelector } = useExtensionState()
|
||||
const user = apiConfiguration?.clineAccountId ? clineUser : undefined
|
||||
const { handleFieldsChange } = useApiConfigurationHandlers()
|
||||
|
||||
const [didClickGrokCodeButton, setDidClickGrokCodeButton] = useState(false)
|
||||
|
||||
const setGrokCodeFast1 = () => {
|
||||
const modelId = "x-ai/grok-code-fast-1"
|
||||
// set both plan and act modes to use grok-code-fast-1
|
||||
handleFieldsChange({
|
||||
planModeOpenRouterModelId: modelId,
|
||||
actModeOpenRouterModelId: modelId,
|
||||
planModeOpenRouterModelInfo: openRouterModels[modelId],
|
||||
actModeOpenRouterModelInfo: openRouterModels[modelId],
|
||||
planModeApiProvider: "cline",
|
||||
actModeApiProvider: "cline",
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
setDidClickGrokCodeButton(true)
|
||||
setShowChatModelSelector(true)
|
||||
}, 10)
|
||||
}
|
||||
|
||||
const handleShowAccount = () => {
|
||||
AccountServiceClient.accountLoginClicked(EmptyRequest.create()).catch((err) =>
|
||||
console.error("Failed to get login URL:", err),
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={containerStyle}>
|
||||
<VSCodeButton appearance="icon" data-testid="close-button" onClick={hideAnnouncement} style={closeIconStyle}>
|
||||
@@ -44,52 +80,62 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
|
||||
<h3 style={h3TitleStyle}>
|
||||
🎉{" "}New in v{minorVersion}
|
||||
</h3>
|
||||
<ul style={ulStyle}>
|
||||
<li>
|
||||
<b>Free Stealth Model</b> Advanced stealth model with 262K context window designed for complex coding tasks.
|
||||
Available in the Cline provider for free.
|
||||
</li>
|
||||
<li>
|
||||
<b>Focus Chain:</b> Keeps cline focused on long-horizon tasks with automatic todo list management, breaking
|
||||
down complex tasks into manageable steps with real-time progress tracking and passive reminders.
|
||||
</li>
|
||||
<li>
|
||||
<b>Auto Compact:</b> Auto summarizes your task and next steps when your conversation approaches the model's
|
||||
context window limit. This significantly helps Cline stay on track for long task sessions!
|
||||
</li>
|
||||
<li>
|
||||
<b>Deep Planning:</b> New <code>/deep-planning</code> slash command transforms Cline into an architect who
|
||||
investigates your codebase, asks clarifying questions, and creates a comprehensive plan before writing any
|
||||
code.
|
||||
</li>
|
||||
</ul>
|
||||
<Accordion className="pl-0" isCompact>
|
||||
<AccordionItem
|
||||
aria-label="Previous Updates"
|
||||
classNames={{
|
||||
trigger: "bg-transparent border-0 pl-0 pb-0 w-fit",
|
||||
title: "font-bold text-[var(--vscode-foreground)]",
|
||||
indicator:
|
||||
"text-[var(--vscode-foreground)] mb-0.5 -rotate-180 data-[open=true]:-rotate-90 rtl:rotate-0 rtl:data-[open=true]:-rotate-90",
|
||||
}}
|
||||
key="1"
|
||||
title="Previous Updates:">
|
||||
<ul style={ulStyle}>
|
||||
<li>
|
||||
<b>1M Context for Claude Sonnet 4:</b> Cline/OpenRouter users get instant access, Anthropic users need
|
||||
Tier 4, and Bedrock users must be on a supported region.
|
||||
</li>
|
||||
<li>
|
||||
<b>Optimized for Claude 4:</b> Cline is now optimized to work with the Claude 4 family of models,
|
||||
resulting in improved performance, reliability, and new capabilities.
|
||||
</li>
|
||||
<li>
|
||||
<b>Workflows:</b> Create and manage workflow files that can be injected into conversations via slash
|
||||
commands, making it easy to automate repetitive tasks.
|
||||
</li>
|
||||
</ul>
|
||||
</AccordionItem>
|
||||
</Accordion>
|
||||
<b>
|
||||
Free <code>grok-code-fast-1</code> Until Sept 10th
|
||||
</b>
|
||||
<div style={{ margin: "0.3rem 0" }} />
|
||||
We partnered with xAI to help build this model from the ground up for agentic coding, and so far–community feedback
|
||||
has been incredible. xAI is continuously improving the model's intelligence with more usage, so give it a try today
|
||||
and let us know what you think! Read more about it here:{" "}
|
||||
<a href="https://x.ai/news/grok-code-fast-1">https://x.ai/news/grok-code-fast-1</a>
|
||||
<div style={{ margin: "18px 0" }} />
|
||||
{user ? (
|
||||
!didClickGrokCodeButton ? (
|
||||
<VSCodeButton appearance="primary" onClick={setGrokCodeFast1}>
|
||||
Try grok-code-fast-1
|
||||
</VSCodeButton>
|
||||
) : null
|
||||
) : (
|
||||
<VSCodeButton appearance="secondary" onClick={handleShowAccount}>
|
||||
Sign Up with Cline
|
||||
</VSCodeButton>
|
||||
)}
|
||||
<div style={{ margin: "-8px 0 -3px 0" }}>
|
||||
<Accordion className="pl-0" isCompact>
|
||||
<AccordionItem
|
||||
aria-label="Previous Updates"
|
||||
classNames={{
|
||||
trigger: "bg-transparent border-0 pl-0 pb-0 w-fit",
|
||||
title: "font-bold text-[var(--vscode-foreground)]",
|
||||
indicator:
|
||||
"text-[var(--vscode-foreground)] mb-0.5 -rotate-180 data-[open=true]:-rotate-90 rtl:rotate-0 rtl:data-[open=true]:-rotate-90",
|
||||
}}
|
||||
key="1"
|
||||
title="Previous Updates:">
|
||||
<ul style={ulStyle}>
|
||||
<li>
|
||||
<b>Focus Chain:</b> Keeps cline focused on long-horizon tasks with automatic todo list management,
|
||||
breaking down complex tasks into manageable steps with real-time progress tracking and passive
|
||||
reminders.
|
||||
</li>
|
||||
<li>
|
||||
<b>Auto Compact:</b> Auto summarizes your task and next steps when your conversation approaches
|
||||
the model's context window limit. This significantly helps Cline stay on track for long task
|
||||
sessions!
|
||||
</li>
|
||||
<li>
|
||||
<b>Deep Planning:</b> New <code>/deep-planning</code> slash command transforms Cline into an
|
||||
architect who investigates your codebase, asks clarifying questions, and creates a comprehensive
|
||||
plan before writing any code.
|
||||
</li>
|
||||
<li>
|
||||
<b>1M Context for Claude Sonnet 4:</b> Cline/OpenRouter users get instant access, Anthropic users
|
||||
need Tier 4, and Bedrock users must be on a supported region.
|
||||
</li>
|
||||
</ul>
|
||||
</AccordionItem>
|
||||
</Accordion>
|
||||
</div>
|
||||
<div style={hrStyle} />
|
||||
<p style={linkContainerStyle}>
|
||||
Join us on{" "}
|
||||
|
||||
@@ -279,8 +279,16 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
||||
},
|
||||
ref,
|
||||
) => {
|
||||
const { mode, apiConfiguration, openRouterModels, platform, localWorkflowToggles, globalWorkflowToggles } =
|
||||
useExtensionState()
|
||||
const {
|
||||
mode,
|
||||
apiConfiguration,
|
||||
openRouterModels,
|
||||
platform,
|
||||
localWorkflowToggles,
|
||||
globalWorkflowToggles,
|
||||
showChatModelSelector: showModelSelector,
|
||||
setShowChatModelSelector: setShowModelSelector,
|
||||
} = useExtensionState()
|
||||
const [isTextAreaFocused, setIsTextAreaFocused] = useState(false)
|
||||
const [isDraggingOver, setIsDraggingOver] = useState(false)
|
||||
const [gitCommits, setGitCommits] = useState<GitCommit[]>([])
|
||||
@@ -304,7 +312,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
|
||||
const [justDeletedSpaceAfterSlashCommand, setJustDeletedSpaceAfterSlashCommand] = useState(false)
|
||||
const [intendedCursorPosition, setIntendedCursorPosition] = useState<number | null>(null)
|
||||
const contextMenuContainerRef = useRef<HTMLDivElement>(null)
|
||||
const [showModelSelector, setShowModelSelector] = useState(false)
|
||||
|
||||
const modelSelectorRef = useRef<HTMLDivElement>(null)
|
||||
const { width: viewportWidth, height: viewportHeight } = useWindowSize()
|
||||
const buttonRef = useRef<HTMLDivElement>(null)
|
||||
|
||||
@@ -140,7 +140,7 @@ describe("ApiOptions Component", () => {
|
||||
)
|
||||
const modelIdSelect = screen.getByLabelText("Model")
|
||||
expect(modelIdSelect).toBeInTheDocument()
|
||||
expect(modelIdSelect).toHaveValue("accounts/fireworks/models/kimi-k2-instruct")
|
||||
expect(modelIdSelect).toHaveValue("accounts/fireworks/models/kimi-k2-instruct-0905")
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -52,9 +52,11 @@ interface ExtensionStateContextType extends ExtensionState {
|
||||
showHistory: boolean
|
||||
showAccount: boolean
|
||||
showAnnouncement: boolean
|
||||
showChatModelSelector: boolean
|
||||
|
||||
// Setters
|
||||
setShowAnnouncement: (value: boolean) => void
|
||||
setShowChatModelSelector: (value: boolean) => void
|
||||
setShouldShowAnnouncement: (value: boolean) => void
|
||||
setMcpServers: (value: McpServer[]) => void
|
||||
setRequestyModels: (value: Record<string, ModelInfo>) => void
|
||||
@@ -91,6 +93,7 @@ interface ExtensionStateContextType extends ExtensionState {
|
||||
hideHistory: () => void
|
||||
hideAccount: () => void
|
||||
hideAnnouncement: () => void
|
||||
hideChatModelSelector: () => void
|
||||
closeMcpView: () => void
|
||||
|
||||
// Event callbacks
|
||||
@@ -112,6 +115,7 @@ export const ExtensionStateContextProvider: React.FC<{
|
||||
const [showHistory, setShowHistory] = useState(false)
|
||||
const [showAccount, setShowAccount] = useState(false)
|
||||
const [showAnnouncement, setShowAnnouncement] = useState(false)
|
||||
const [showChatModelSelector, setShowChatModelSelector] = useState(false)
|
||||
|
||||
// Helper for MCP view
|
||||
const closeMcpView = useCallback(() => {
|
||||
@@ -124,6 +128,7 @@ export const ExtensionStateContextProvider: React.FC<{
|
||||
const hideHistory = useCallback(() => setShowHistory(false), [setShowHistory])
|
||||
const hideAccount = useCallback(() => setShowAccount(false), [setShowAccount])
|
||||
const hideAnnouncement = useCallback(() => setShowAnnouncement(false), [setShowAnnouncement])
|
||||
const hideChatModelSelector = useCallback(() => setShowChatModelSelector(false), [setShowChatModelSelector])
|
||||
|
||||
// Navigation functions
|
||||
const navigateToMcp = useCallback(
|
||||
@@ -632,6 +637,7 @@ export const ExtensionStateContextProvider: React.FC<{
|
||||
showHistory,
|
||||
showAccount,
|
||||
showAnnouncement,
|
||||
showChatModelSelector,
|
||||
globalClineRulesToggles: state.globalClineRulesToggles || {},
|
||||
localClineRulesToggles: state.localClineRulesToggles || {},
|
||||
localCursorRulesToggles: state.localCursorRulesToggles || {},
|
||||
@@ -654,6 +660,8 @@ export const ExtensionStateContextProvider: React.FC<{
|
||||
hideAccount,
|
||||
hideAnnouncement,
|
||||
setShowAnnouncement,
|
||||
hideChatModelSelector,
|
||||
setShowChatModelSelector,
|
||||
setShouldShowAnnouncement: (value) =>
|
||||
setState((prevState) => ({
|
||||
...prevState,
|
||||
|
||||
Reference in New Issue
Block a user