Add a preferred language dropdown

This commit is contained in:
Matt Rubens
2024-12-21 10:10:05 -05:00
parent 6ad6949265
commit 8b4c52fb51
11 changed files with 275 additions and 7 deletions

View File

@@ -769,8 +769,8 @@ export class Cline {
throw new Error("MCP hub not available")
}
const { browserLargeViewport } = await this.providerRef.deref()?.getState() ?? {}
const systemPrompt = await SYSTEM_PROMPT(cwd, this.api.getModel().info.supportsComputerUse ?? false, mcpHub, this.diffStrategy, browserLargeViewport) + await addCustomInstructions(this.customInstructions ?? '', cwd)
const { browserLargeViewport, preferredLanguage } = await this.providerRef.deref()?.getState() ?? {}
const systemPrompt = await SYSTEM_PROMPT(cwd, this.api.getModel().info.supportsComputerUse ?? false, mcpHub, this.diffStrategy, browserLargeViewport) + await addCustomInstructions(this.customInstructions ?? '', cwd, preferredLanguage)
// If the previous API request's total token usage is close to the context window, truncate the conversation history to free up space for the new request
if (previousApiReqIndex >= 0) {