diff --git a/packages/types/src/global-settings.ts b/packages/types/src/global-settings.ts index b3a6dd531d..fce95860e0 100644 --- a/packages/types/src/global-settings.ts +++ b/packages/types/src/global-settings.ts @@ -144,6 +144,8 @@ export const globalSettingsSchema = z.object({ // kilocode_change start: Morph fast apply morphApiKey: z.string().optional(), fastApplyModel: fastApplyModelSchema.optional(), + fastApplyProviderType: z.enum(["morph", "openrouter", "kilocode"]).optional(), + fastApplyProfileId: z.string().optional(), // kilocode_change end codebaseIndexModels: codebaseIndexModelsSchema.optional(), diff --git a/src/core/prompts/sections/rules.ts b/src/core/prompts/sections/rules.ts index cbb8575169..e925dde574 100644 --- a/src/core/prompts/sections/rules.ts +++ b/src/core/prompts/sections/rules.ts @@ -4,7 +4,7 @@ import { CodeIndexManager } from "../../../services/code-index/manager" // kilocode_change start import { getFastApplyEditingInstructions } from "../tools/edit-file" import { type ClineProviderState } from "../../webview/ClineProvider" -import { getFastApplyModelType, isFastApplyAvailable } from "../../tools/editFileTool" +import { isFastApplyAvailable } from "../../tools/editFileTool" // kilocode_change end function getEditingInstructions(diffStrategy?: DiffStrategy): string { @@ -68,7 +68,7 @@ export function getRulesSection( ? "- **CRITICAL: For ANY exploration of code you haven't examined yet in this conversation, you MUST use the `codebase_search` tool FIRST before using search_files or other file exploration tools.** This requirement applies throughout the entire conversation, not just when starting a task. The codebase_search tool uses semantic search to find relevant code based on meaning, not just keywords, making it much more effective for understanding how features are implemented. Even if you've already explored some parts of the codebase, any new area or functionality you need to understand requires using codebase_search first.\n" : "" - const kiloCodeUseMorph = isFastApplyAvailable(clineProviderState) + const kiloCodeUseMorph = isFastApplyAvailable() return `==== @@ -81,7 +81,7 @@ RULES - Before using the execute_command tool, you must first think about the SYSTEM INFORMATION context provided to understand the user's environment and tailor your commands to ensure they are compatible with their system. You must also consider if the command you need to run should be executed in a specific directory outside of the current working directory '${cwd.toPosix()}', and if so prepend with \`cd\`'ing into that directory && then executing the command (as one command since you are stuck operating from '${cwd.toPosix()}'). For example, if you needed to run \`npm install\` in a project outside of '${cwd.toPosix()}', you would need to prepend with a \`cd\` i.e. pseudocode for this would be \`cd (path to project) && (command, in this case npm install)\`. ${codebaseSearchRule}- When using the search_files tool${isCodebaseSearchAvailable ? " (after codebase_search)" : ""}, craft your regex patterns carefully to balance specificity and flexibility. Based on the user's task you may use it to find code patterns, TODO comments, function definitions, or any text-based information across the project. The results include context, so analyze the surrounding code to better understand the matches. Leverage the search_files tool in combination with other tools for more comprehensive analysis. For example, use it to find specific code patterns, then use read_file to examine the full context of interesting matches before using ${kiloCodeUseMorph ? "edit_file" : diffStrategy ? "apply_diff or write_to_file" : "write_to_file"} to make informed changes. - When creating a new project (such as an app, website, or any software project), organize all new files within a dedicated project directory unless the user specifies otherwise. Use appropriate file paths when writing files, as the ${kiloCodeUseMorph ? "edit_file" : "write_to_file"} tool will automatically create any necessary directories. Structure the project logically, adhering to best practices for the specific type of project being created. Unless otherwise specified, new projects should be easily run without additional setup, for example most projects can be built in HTML, CSS, and JavaScript - which you can open in a browser. -${kiloCodeUseMorph ? getFastApplyEditingInstructions(getFastApplyModelType(clineProviderState)) : getEditingInstructions(diffStrategy)} +${kiloCodeUseMorph ? getFastApplyEditingInstructions() : getEditingInstructions(diffStrategy)} - Some modes have restrictions on which files they can edit. If you attempt to edit a restricted file, the operation will be rejected with a FileRestrictionError that will specify which file patterns are allowed for the current mode. - Be sure to consider the type of project (e.g. Python, JavaScript, web application) when determining the appropriate structure and files to include. Also consider what files may be most relevant to accomplishing the task, for example looking at a project's manifest file would help you understand the project's dependencies, which you could incorporate into any code you write. * For example, in architect mode trying to edit app.js would be rejected because architect mode can only edit files matching "\\.md$" diff --git a/src/core/prompts/tools/edit-file.ts b/src/core/prompts/tools/edit-file.ts index a2039d26ed..7071b50cae 100644 --- a/src/core/prompts/tools/edit-file.ts +++ b/src/core/prompts/tools/edit-file.ts @@ -1,8 +1,8 @@ // kilocode_change: Morph fast apply - file added -export function getFastApplyEditingInstructions(modelType: "Morph" | "Relace"): string { - return `- **${modelType} FastApply is enabled.** You have access to the \`edit_file\` tool which uses a specialized model optimized for intelligent code understanding and modification. -- **ONLY use the edit_file tool for file modifications.** Traditional editing tools (apply_diff, write_to_file, insert_content, search_and_replace) are disabled in ${modelType} mode. +export function getFastApplyEditingInstructions(): string { + return `- **FastApply is enabled.** You have access to the \`edit_file\` tool which uses a specialized model optimized for intelligent code understanding and modification. +- **ONLY use the edit_file tool for file modifications.** Traditional editing tools (apply_diff, write_to_file, insert_content, search_and_replace) are disabled in Fast Apply mode. - **Focus on clear instructions and precise code edits** using the edit_file format with \`// ... existing code ...\` placeholders to represent unchanged sections. - **The edit_file tool requires three parameters:** - \`target_file\`: Full path to the file to modify diff --git a/src/core/tools/editFileTool.ts b/src/core/tools/editFileTool.ts index 0b10e85f1e..0ffae0493c 100644 --- a/src/core/tools/editFileTool.ts +++ b/src/core/tools/editFileTool.ts @@ -14,6 +14,7 @@ import { DEFAULT_HEADERS } from "../../api/providers/constants" import { TelemetryService } from "@roo-code/telemetry" import { type ClineProviderState } from "../webview/ClineProvider" import { ClineSayTool } from "../../shared/ExtensionMessage" +import { ProviderSettingsManager } from "../config/ProviderSettingsManager" import { X_KILOCODE_ORGANIZATIONID, X_KILOCODE_TASKID, X_KILOCODE_TESTER } from "../../shared/kilocode/headers" const FAST_APPLY_MODEL_PRICING = { @@ -227,16 +228,18 @@ async function applyFastApplyEdit( filePath: string, ): Promise { try { - // Get the current API configuration + const state = await cline.providerRef.deref()?.getState() + if (!state) { + return { success: false, error: "Unable to get provider state" } + } + const provider = cline.providerRef.deref() if (!provider) { - return { success: false, error: "No API provider available for Fast Apply" } + return { success: false, error: "Unable to get provider reference" } } - const state = await provider.getState() - // Check if user has Fast Apply enabled via OpenRouter or direct API - const morphConfig = await getFastApplyConfiguration(state) + const morphConfig = await getFastApplyConfiguration(state, provider.providerSettingsManager) if (!morphConfig.available) { return { success: false, error: morphConfig.error || "Fast Apply is not available" } } @@ -330,7 +333,10 @@ interface FastApplyConfiguration { kiloCodeOrganizationId?: string } -function getFastApplyConfiguration(state: ClineProviderState): FastApplyConfiguration { +async function getFastApplyConfiguration( + state: ClineProviderState, + providerSettingsManager: ProviderSettingsManager, +): Promise { // Check if Fast Apply is enabled in API configuration if (state.experiments.morphFastApply !== true) { return { @@ -341,6 +347,9 @@ function getFastApplyConfiguration(state: ClineProviderState): FastApplyConfigur // Read the selected model from state const selectedModel = state.fastApplyModel || "auto" + // Get the provider type and profile ID from state + const providerType = state.fastApplyProviderType || "morph" + const profileId = state.fastApplyProfileId // Priority 1: Use direct Morph API key if available // Allow human-relay for debugging @@ -353,46 +362,51 @@ function getFastApplyConfiguration(state: ClineProviderState): FastApplyConfigur model: org === "morph" ? model : "auto", // Use selected model instead of hardcoded "auto" } } - - // Priority 2: Use KiloCode provider - if (state.apiConfiguration?.apiProvider === "kilocode") { - const token = state.apiConfiguration.kilocodeToken - if (!token) { - return { available: false, error: "No KiloCode token available to use Fast Apply" } - } - return { - available: true, - apiKey: token, - baseUrl: `${getKiloBaseUriFromToken(token)}/api/openrouter/`, - model: selectedModel === "auto" ? "morph/morph-v3-large" : selectedModel, // Use selected model - kiloCodeOrganizationId: state.apiConfiguration.kilocodeOrganizationId, - } - } - - // Priority 3: Use OpenRouter provider - if (state.apiConfiguration?.apiProvider === "openrouter") { - const token = state.apiConfiguration.openRouterApiKey - if (!token) { - return { available: false, error: "No OpenRouter API token available to use Fast Apply" } - } - return { - available: true, - apiKey: token, - baseUrl: state.apiConfiguration.openRouterBaseUrl || "https://openrouter.ai/api/v1", - model: selectedModel === "auto" ? "morph/morph-v3-large" : selectedModel, // Use selected model + // Priority 2: Use profile-based configuration if provider type is openrouter or kilocode + if ((providerType === "openrouter" || providerType === "kilocode") && profileId) { + try { + // Get the profile details from the provider settings manager + const profile = await providerSettingsManager.getProfile({ id: profileId }) + + if (providerType === "kilocode") { + // KiloCode provider + const token = profile.kilocodeToken + if (!token) { + return { available: false, error: "No KiloCode token available in selected profile" } + } + return { + available: true, + apiKey: token, + baseUrl: `${getKiloBaseUriFromToken(token)}/api/openrouter/`, + model: selectedModel === "auto" ? "morph/morph-v3-large" : selectedModel, // Use selected model + kiloCodeOrganizationId: profile.kilocodeOrganizationId, + } + } else if (providerType === "openrouter") { + // OpenRouter provider + const token = profile.openRouterApiKey + if (!token) { + return { available: false, error: "No OpenRouter API token available in selected profile" } + } + return { + available: true, + apiKey: token, + baseUrl: profile.openRouterBaseUrl, + model: selectedModel === "auto" ? "morph/morph-v3-large" : selectedModel, // Use selected model + } + } + } catch (error) { + return { + available: false, + error: `Failed to load profile: ${error instanceof Error ? error.message : "Unknown error"}`, + } } } - return { - available: false, - error: "Fast Apply configuration error. Please check your settings.", - } + return { available: false, error: "No valid Fast Apply configuration found" } } export function isFastApplyAvailable(state?: ClineProviderState): boolean { - return (state && getFastApplyConfiguration(state).available) || false -} - -export function getFastApplyModelType(state?: ClineProviderState): "Morph" | "Relace" { - return state && getFastApplyConfiguration(state).model?.startsWith("relace/") ? "Relace" : "Morph" + // For availability check, we only check if morphFastApply is enabled + // We don't validate the full configuration since we don't have providerSettingsManager here + return state?.experiments?.morphFastApply === true } diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index aa22453093..3590baf28c 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -1906,6 +1906,8 @@ export class ClineProvider dismissedNotificationIds, // kilocode_change morphApiKey, // kilocode_change fastApplyModel, // kilocode_change: Fast Apply model selection + fastApplyProviderType, // kilocode_change: Fast Apply provider type + fastApplyProfileId, // kilocode_change: Fast Apply profile ID alwaysAllowFollowupQuestions, followupAutoApproveTimeoutMs, includeDiagnosticMessages, @@ -2087,6 +2089,8 @@ export class ClineProvider dismissedNotificationIds: dismissedNotificationIds ?? [], // kilocode_change morphApiKey, // kilocode_change fastApplyModel: fastApplyModel ?? "auto", // kilocode_change: Fast Apply model selection + fastApplyProviderType, // kilocode_change: Fast Apply provider type + fastApplyProfileId, // kilocode_change: Fast Apply profile ID alwaysAllowFollowupQuestions: alwaysAllowFollowupQuestions ?? false, followupAutoApproveTimeoutMs: followupAutoApproveTimeoutMs ?? 60000, includeDiagnosticMessages: includeDiagnosticMessages ?? true, @@ -2303,6 +2307,8 @@ export class ClineProvider dismissedNotificationIds: stateValues.dismissedNotificationIds ?? [], // kilocode_change morphApiKey: stateValues.morphApiKey, // kilocode_change fastApplyModel: stateValues.fastApplyModel ?? "auto", // kilocode_change: Fast Apply model selection + fastApplyProviderType: stateValues.fastApplyProviderType, // kilocode_change: Fast Apply provider type selection + fastApplyProfileId: stateValues.fastApplyProfileId, // kilocode_change: Fast Apply profile ID historyPreviewCollapsed: stateValues.historyPreviewCollapsed ?? false, reasoningBlockCollapsed: stateValues.reasoningBlockCollapsed ?? true, cloudUserInfo, diff --git a/src/core/webview/webviewMessageHandler.ts b/src/core/webview/webviewMessageHandler.ts index ddd0b6186e..ee800c0161 100644 --- a/src/core/webview/webviewMessageHandler.ts +++ b/src/core/webview/webviewMessageHandler.ts @@ -1457,6 +1457,16 @@ export const webviewMessageHandler = async ( await provider.postStateToWebview() break } + case "fastApplyProviderType": + const providerType = message.text as "morph" | "openrouter" | "kilocode" | undefined + await updateGlobalState("fastApplyProviderType", providerType) + await provider.postStateToWebview() + break + + case "fastApplyProfileId": + await updateGlobalState("fastApplyProfileId", message.text) + await provider.postStateToWebview() + break // kilocode_change end case "updateVSCodeSetting": { const { setting, value } = message diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index 4be68b0c29..23525d0c16 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -334,6 +334,8 @@ export type ExtensionState = Pick< | "fuzzyMatchThreshold" | "morphApiKey" // kilocode_change: Morph fast apply - global setting | "fastApplyModel" // kilocode_change: Fast Apply model selection + | "fastApplyProviderType" // kilocode_change: Fast Apply provider type selection + | "fastApplyProfileId" // kilocode_change: Fast Apply profile ID // | "experiments" // Optional in GlobalSettings, required here. | "language" // | "telemetrySetting" // Optional in GlobalSettings, required here. diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index a020533ae1..022c9485d4 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -128,6 +128,8 @@ export interface WebviewMessage { | "fuzzyMatchThreshold" | "morphApiKey" // kilocode_change: Morph fast apply - global setting | "fastApplyModel" // kilocode_change: Fast Apply model selection + | "fastApplyProviderType" // kilocode_change: Fast Apply provider type + | "fastApplyProfileId" // kilocode_change: Fast Apply profile ID | "writeDelayMs" | "diagnosticsEnabled" | "enhancePrompt" diff --git a/webview-ui/src/components/settings/ExperimentalSettings.tsx b/webview-ui/src/components/settings/ExperimentalSettings.tsx index b98fb03e5e..46366fea6d 100644 --- a/webview-ui/src/components/settings/ExperimentalSettings.tsx +++ b/webview-ui/src/components/settings/ExperimentalSettings.tsx @@ -8,10 +8,7 @@ import { EXPERIMENT_IDS, experimentConfigsMap } from "@roo/experiments" import { useAppTranslation } from "@src/i18n/TranslationContext" import { cn } from "@src/lib/utils" -import { - SetCachedStateField, // kilocode_change - SetExperimentEnabled, -} from "./types" +import { SetExperimentEnabled } from "./types" import { SectionHeader } from "./SectionHeader" import { Section } from "./Section" import { ExperimentalFeature } from "./ExperimentalFeature" @@ -24,7 +21,12 @@ type ExperimentalSettingsProps = HTMLAttributes & { // kilocode_change start morphApiKey?: string fastApplyModel?: string - setCachedStateField: SetCachedStateField<"morphApiKey" | "fastApplyModel"> + fastApplyProviderType?: "morph" | "openrouter" | "kilocode" + fastApplyProfileId?: string + setMorphApiKey: (apiKey: string) => void + setFastApplyModel: (model: string) => void + setFastApplyProviderType: (providerType: "morph" | "openrouter" | "kilocode") => void + setFastApplyProfileId: (profileId: string) => void kiloCodeImageApiKey?: string setKiloCodeImageApiKey?: (apiKey: string) => void currentProfileKilocodeToken?: string @@ -50,7 +52,12 @@ export const ExperimentalSettings = ({ // kilocode_change start morphApiKey, fastApplyModel, // kilocode_change: Fast Apply model selection - setCachedStateField, + fastApplyProviderType, + fastApplyProfileId, + setMorphApiKey, + setFastApplyModel, + setFastApplyProviderType, + setFastApplyProfileId, setKiloCodeImageApiKey, kiloCodeImageApiKey, currentProfileKilocodeToken, @@ -104,9 +111,14 @@ export const ExperimentalSettings = ({ /> {enabled && ( )} diff --git a/webview-ui/src/components/settings/FastApplySettings.tsx b/webview-ui/src/components/settings/FastApplySettings.tsx index 4743d6e10f..090856e902 100644 --- a/webview-ui/src/components/settings/FastApplySettings.tsx +++ b/webview-ui/src/components/settings/FastApplySettings.tsx @@ -1,52 +1,221 @@ -// kilocode_change: Fast Apply - global settings version +import React, { useState, useEffect } from "react" import { VSCodeDropdown, VSCodeOption, VSCodeTextField } from "@vscode/webview-ui-toolkit/react" import { useAppTranslation } from "@/i18n/TranslationContext" -import { SetCachedStateField } from "./types" +import { useExtensionState } from "@src/context/ExtensionStateContext" + +interface FastApplySettingsProps { + morphApiKey?: string + fastApplyModel?: string + fastApplyProviderType?: "morph" | "openrouter" | "kilocode" + fastApplyProfileId?: string + setMorphApiKey: (apiKey: string) => void + setFastApplyModel: (model: string) => void + setFastApplyProviderType: (providerType: "morph" | "openrouter" | "kilocode") => void + setFastApplyProfileId: (profileId: string) => void +} + +const FAST_APPLY_MODELS = [ + { value: "auto", label: "Auto" }, + { value: "morph/morph-v3-fast", label: "Morph v3 Fast" }, + { value: "morph/morph-v3-large", label: "Morph v3 Large" }, + { value: "relace/relace-apply-3", label: "Relace Apply 3" }, +] export const FastApplySettings = ({ morphApiKey, fastApplyModel, - setCachedStateField, -}: { - morphApiKey?: string - fastApplyModel?: string - setCachedStateField: SetCachedStateField<"morphApiKey" | "fastApplyModel"> -}) => { + fastApplyProviderType, + fastApplyProfileId, + setMorphApiKey, + setFastApplyModel, + setFastApplyProviderType, + setFastApplyProfileId, +}: FastApplySettingsProps) => { const { t } = useAppTranslation() + const { listApiConfigMeta = [] } = useExtensionState() + + // Local state to track which provider is selected (like isUsingOpenRouter) + const [currentProviderType, setCurrentProviderType] = useState<"morph" | "openrouter" | "kilocode">( + fastApplyProviderType || "morph", + ) + + // DEBUG: Log when props are received + useEffect(() => { + console.log("[FastApplySettings] Props received:", { + fastApplyProviderType, + fastApplyProfileId, + morphApiKey: morphApiKey ? `***${morphApiKey.length}chars` : undefined, + fastApplyModel, + }) + }, [fastApplyProviderType, fastApplyProfileId, morphApiKey, fastApplyModel]) + + // Effect to handle side effects like default models (like ImageGenerationSettings lines 43-70) + useEffect(() => { + const defaultModel = FAST_APPLY_MODELS[0].value + + // Ensure model has a default value + if (!fastApplyModel) { + setFastApplyModel(defaultModel) + } + }, [fastApplyModel, setFastApplyModel]) + + // Get available profiles + const openRouterProfiles = listApiConfigMeta.filter((profile) => profile.apiProvider === "openrouter") + const kiloCodeProfiles = listApiConfigMeta.filter((profile) => profile.apiProvider === "kilocode") + const selectedProfile = listApiConfigMeta.find((profile) => profile.id === fastApplyProfileId) + + // Handler functions (like lines 74-87) + const handleMorphApiKeyChange = (value: string) => { + setMorphApiKey(value) + } + + const handleModelChange = (value: string) => { + setFastApplyModel(value) + } + + const handleProfileIdChange = (value: string) => { + setFastApplyProfileId(value) + } + + // Determine if configuration is valid + const isConfigValid = () => { + if (currentProviderType === "morph") { + return morphApiKey && morphApiKey.trim() !== "" + } else { + const profiles = currentProviderType === "openrouter" ? openRouterProfiles : kiloCodeProfiles + return profiles.length > 0 && fastApplyProfileId && selectedProfile?.apiProvider === currentProviderType + } + } + return ( -
+
+ {/* Provider Type Selector */}
setCachedStateField("fastApplyModel", (e.target as any)?.value || "auto")} + value={currentProviderType} + onChange={(e: any) => { + const newValue = (e.target as any)?.value || "morph" + // Update local state AND parent (this is where user action happens) + setCurrentProviderType(newValue) + setFastApplyProviderType(newValue) + }} className="w-full"> - {t("settings:experimental.MORPH_FAST_APPLY.models.auto")} - - {t("settings:experimental.MORPH_FAST_APPLY.models.morphFast")} + + {t("settings:experimental.MORPH_FAST_APPLY.providerTypes.morph")} - - {t("settings:experimental.MORPH_FAST_APPLY.models.morphLarge")} + + {t("settings:experimental.MORPH_FAST_APPLY.providerTypes.openrouter")} - - {t("settings:experimental.MORPH_FAST_APPLY.models.relace")} + + {t("settings:experimental.MORPH_FAST_APPLY.providerTypes.kilocode")} +
+ + {/* Morph API Key Input */} + {currentProviderType === "morph" && ( + handleMorphApiKeyChange((e.target as any)?.value || "")} + className="w-full"> + {t("settings:experimental.MORPH_FAST_APPLY.apiKey")} + + )} + + {/* OpenRouter Profile Selector */} + {currentProviderType === "openrouter" && ( +
+ + {openRouterProfiles.length > 0 ? ( + handleProfileIdChange((e.target as any)?.value || "")} + className="w-full"> + + {t("settings:experimental.MORPH_FAST_APPLY.selectProfile")} + + {openRouterProfiles.map((profile) => ( + + {profile.name} + + ))} + + ) : ( +

+ {t("settings:experimental.MORPH_FAST_APPLY.noOpenRouterProfiles")} +

+ )} +
+ )} + + {/* KiloCode Profile Selector */} + {currentProviderType === "kilocode" && ( +
+ + {kiloCodeProfiles.length > 0 ? ( + handleProfileIdChange((e.target as any)?.value || "")} + className="w-full"> + + {t("settings:experimental.MORPH_FAST_APPLY.selectProfile")} + + {kiloCodeProfiles.map((profile) => ( + + {profile.name} + + ))} + + ) : ( +

+ {t("settings:experimental.MORPH_FAST_APPLY.noKiloCodeProfiles")} +

+ )} +
+ )} + + {/* Model Selection */} +
+ + handleModelChange((e.target as any)?.value || "auto")} + className="w-full"> + {FAST_APPLY_MODELS.map((model) => ( + + {model.label} + + ))} +

{t("settings:experimental.MORPH_FAST_APPLY.modelDescription")}

- setCachedStateField("morphApiKey", (e.target as any)?.value || "")} - className="w-full"> - {t("settings:experimental.MORPH_FAST_APPLY.apiKey")} - + {/* Warning Message */} + {!isConfigValid() && ( +
+ {t("settings:experimental.MORPH_FAST_APPLY.warningInvalidConfig")} +
+ )} + + {/* Success Message */} + {isConfigValid() && ( +
+ {t("settings:experimental.MORPH_FAST_APPLY.successConfigured")} +
+ )}
) } diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index cc693ebbeb..8c5af8b81f 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -183,6 +183,8 @@ const SettingsView = forwardRef(({ onDone, t experiments, morphApiKey, // kilocode_change fastApplyModel, // kilocode_change: Fast Apply model selection + fastApplyProviderType, // kilocode_change: Fast Apply provider type + fastApplyProfileId, // kilocode_change: Fast Apply profile ID fuzzyMatchThreshold, maxOpenTabsContext, maxWorkspaceFiles, @@ -366,7 +368,51 @@ const SettingsView = forwardRef(({ onDone, t return { ...prevState, kiloCodeImageApiKey: apiKey } }) }, []) + const setMorphApiKey = useCallback((apiKey: string) => { + console.log(`[SettingsView] setMorphApiKey called with length: ${apiKey.length}`) + setCachedState((prevState) => { + console.log(`[SettingsView] setMorphApiKey updating cachedState`) + setChangeDetected(true) + return { ...prevState, morphApiKey: apiKey } + }) + }, []) + + const setFastApplyModel = useCallback((model: string) => { + console.log(`[SettingsView] setFastApplyModel called with: ${model}`) + setCachedState((prevState) => { + console.log(`[SettingsView] setFastApplyModel updating cachedState`) + setChangeDetected(true) + return { + ...prevState, + fastApplyModel: model as + | "auto" + | "morph/morph-v3-fast" + | "morph/morph-v3-large" + | "relace/relace-apply-3" + | undefined, + } + }) + }, []) + const setFastApplyProviderType = useCallback((providerType: "morph" | "openrouter" | "kilocode") => { + console.log(`[SettingsView] setFastApplyProviderType called with: ${providerType}`) + setCachedState((prevState) => { + console.log( + `[SettingsView] setFastApplyProviderType updating cachedState, current value: ${prevState.fastApplyProviderType}`, + ) + setChangeDetected(true) + return { ...prevState, fastApplyProviderType: providerType } + }) + }, []) + + const setFastApplyProfileId = useCallback((profileId: string) => { + console.log(`[SettingsView] setFastApplyProfileId called with: ${profileId}`) + setCachedState((prevState) => { + console.log(`[SettingsView] setFastApplyProfileId updating cachedState`) + setChangeDetected(true) + return { ...prevState, fastApplyProfileId: profileId } + }) + }, []) const setImageGenerationSelectedModel = useCallback((model: string) => { setCachedState((prevState) => { // Only set change detected if value actually changed @@ -474,14 +520,18 @@ const SettingsView = forwardRef(({ onDone, t vscode.postMessage({ type: "ghostServiceSettings", values: ghostServiceSettings }) // kilocode_change vscode.postMessage({ type: "morphApiKey", text: morphApiKey }) // kilocode_change vscode.postMessage({ type: "fastApplyModel", text: fastApplyModel }) // kilocode_change: Fast Apply model selection + console.log(`[SettingsView.handleSubmit] Sending fastApplyProviderType: ${fastApplyProviderType}`) + vscode.postMessage({ type: "fastApplyProviderType", text: fastApplyProviderType }) // kilocode_change: Fast Apply provider type + console.log(`[SettingsView.handleSubmit] Sending fastApplyProfileId: ${fastApplyProfileId}`) + vscode.postMessage({ type: "fastApplyProfileId", text: fastApplyProfileId }) // kilocode_change: Fast Apply profile ID vscode.postMessage({ type: "openRouterImageApiKey", text: openRouterImageApiKey }) vscode.postMessage({ type: "kiloCodeImageApiKey", text: kiloCodeImageApiKey }) vscode.postMessage({ type: "openRouterImageGenerationSelectedModel", text: openRouterImageGenerationSelectedModel, }) - // Update cachedState to match the current state to prevent isChangeDetected from being set back to true - setCachedState((prevState) => ({ ...prevState, ...extensionState })) + // CRITICAL: Set this synchronously BEFORE any async operations + // This prevents the "overwrite unsaved changes" workaround from firing setChangeDetected(false) } } @@ -941,9 +991,14 @@ const SettingsView = forwardRef(({ onDone, t setExperimentEnabled={setExperimentEnabled} experiments={experiments} // kilocode_change start - setCachedStateField={setCachedStateField} morphApiKey={morphApiKey} fastApplyModel={fastApplyModel} + fastApplyProviderType={fastApplyProviderType} + fastApplyProfileId={fastApplyProfileId} + setMorphApiKey={setMorphApiKey} + setFastApplyModel={setFastApplyModel} + setFastApplyProviderType={setFastApplyProviderType} + setFastApplyProfileId={setFastApplyProfileId} // kilocode_change end apiConfiguration={apiConfiguration} setApiConfigurationField={setApiConfigurationField} diff --git a/webview-ui/src/i18n/locales/ar/settings.json b/webview-ui/src/i18n/locales/ar/settings.json index 960b92fac5..187a65073b 100644 --- a/webview-ui/src/i18n/locales/ar/settings.json +++ b/webview-ui/src/i18n/locales/ar/settings.json @@ -844,7 +844,19 @@ "morphFast": "Morph v3 السريع (أسرع، تكلفة أقل)", "morphLarge": "Morph v3 الكبير (أكثر قدرة)", "relace": "Relace Apply v3" - } + }, + "providerTypeLabel": "نوع المزوّد", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "ملف API", + "selectProfile": "اختر ملف", + "noOpenRouterProfiles": "لم يتم تكوين ملفات OpenRouter. يرجى إضافة ملف OpenRouter في قسم المزوّدين.", + "noKiloCodeProfiles": "لم يتم تكوين ملفات Kilocode. يرجى إضافة ملف Kilocode في قسم المزوّدين.", + "warningInvalidConfig": "التكوين غير مكتمل. يرجى اختيار مزوّد وتكوين الإعدادات المطلوبة أعلاه.", + "successConfigured": "تم تكوين التطبيق السريع وهو جاهز للاستخدام" }, "PREVENT_FOCUS_DISRUPTION": { "name": "التحرير في الخلفية", diff --git a/webview-ui/src/i18n/locales/ca/settings.json b/webview-ui/src/i18n/locales/ca/settings.json index 179c62668b..c5ea8c0ef4 100644 --- a/webview-ui/src/i18n/locales/ca/settings.json +++ b/webview-ui/src/i18n/locales/ca/settings.json @@ -807,7 +807,19 @@ "morphFast": "Morph v3 Fast (Més ràpid, cost més baix)", "morphLarge": "Morph v3 Large (Més capaç)", "relace": "Relace Apply v3" - } + }, + "providerTypeLabel": "Tipus de proveïdor", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "Perfil d'API", + "selectProfile": "Selecciona un perfil", + "noOpenRouterProfiles": "No hi ha perfils d'OpenRouter configurats. Si us plau, afegiu un perfil d'OpenRouter a la secció de Proveïdors.", + "noKiloCodeProfiles": "No hi ha perfils de Kilocode configurats. Si us plau, afegiu un perfil de Kilocode a la secció de Proveïdors.", + "warningInvalidConfig": "Configuració incompleta. Si us plau, seleccioneu un proveïdor i configureu els ajustos requerits a dalt.", + "successConfigured": "Fast Apply està configurat i llest per utilitzar" }, "RUN_SLASH_COMMAND": { "name": "Habilitar comandes de barra diagonal iniciades pel model", diff --git a/webview-ui/src/i18n/locales/cs/settings.json b/webview-ui/src/i18n/locales/cs/settings.json index 03621a6ac6..9c26d661be 100644 --- a/webview-ui/src/i18n/locales/cs/settings.json +++ b/webview-ui/src/i18n/locales/cs/settings.json @@ -827,7 +827,19 @@ "morphFast": "Morph v3 Fast (rychlejší, nižší náklady)", "morphLarge": "Morph v3 Large (schopnější)", "relace": "Relace Apply v3" - } + }, + "providerTypeLabel": "Typ poskytovatele", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "API profil", + "selectProfile": "Vyberte profil", + "noOpenRouterProfiles": "Nenakonfigurovány žádné profily OpenRouter. Přidejte prosím profil OpenRouter v sekci Poskytovatelé.", + "noKiloCodeProfiles": "Nenakonfigurovány žádné profily Kilocode. Přidejte prosím profil Kilocode v sekci Poskytovatelé.", + "warningInvalidConfig": "Konfigurace neúplná. Vyberte prosím poskytovatele a nakonfigurujte požadovaná nastavení výše.", + "successConfigured": "Rychlé aplikování je nakonfigurováno a připraveno k použití" }, "SEARCH_AND_REPLACE": { "name": "Použít experimentální nástroj hledání a nahrazování", diff --git a/webview-ui/src/i18n/locales/de/settings.json b/webview-ui/src/i18n/locales/de/settings.json index 37acc150c7..a3430ea944 100644 --- a/webview-ui/src/i18n/locales/de/settings.json +++ b/webview-ui/src/i18n/locales/de/settings.json @@ -776,7 +776,19 @@ "morphFast": "Morph v3 Fast (Schneller, niedrigere Kosten)", "morphLarge": "Morph v3 Large (Leistungsfähiger)", "relace": "Relace Apply v3" - } + }, + "providerTypeLabel": "Anbietertyp", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "API-Profil", + "selectProfile": "Profil auswählen", + "noOpenRouterProfiles": "Keine OpenRouter-Profile konfiguriert. Bitte füge ein OpenRouter-Profil im Abschnitt 'Anbieter' hinzu.", + "noKiloCodeProfiles": "Keine Kilocode-Profile konfiguriert. Bitte füge ein Kilocode-Profil im Abschnitt 'Anbieter' hinzu.", + "warningInvalidConfig": "Konfiguration unvollständig. Bitte wähle einen Anbieter aus und konfiguriere die erforderlichen Einstellungen oben.", + "successConfigured": "Fast Apply ist konfiguriert und einsatzbereit" }, "PREVENT_FOCUS_DISRUPTION": { "name": "Hintergrundbearbeitung", diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 31dbb4b2a8..fbac34c88f 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -793,17 +793,23 @@ }, "MORPH_FAST_APPLY": { "name": "Enable Fast Apply", - "description": "When enabled, Kilo Code can edit files using Fast Apply with specialized models optimized for code modifications. Requires the Kilo Code API Provider, OpenRouter, or a Morph API key.", - "apiKey": "Morph API key (optional)", - "placeholder": "Enter your Morph API key (optional)", + "description": "When enabled, Kilocode edits files with Fast Apply using code-optimized models. Requires one configured Kilocode API provider, OpenRouter, or Morph API key.", + "providerTypeLabel": "Provider Type", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "apiKey": "Morph API key", + "placeholder": "Enter your Morph API key", + "profileLabel": "API Profile", + "selectProfile": "Select a profile", + "noOpenRouterProfiles": "No OpenRouter profiles configured. Please add an OpenRouter profile in the Providers section.", + "noKiloCodeProfiles": "No Kilocode profiles configured. Please add a Kilocode profile in the Providers section.", "modelLabel": "Model Selection", "modelDescription": "Choose which Fast Apply model to use for file edits", - "models": { - "auto": "Auto (Default - chooses best available)", - "morphFast": "Morph v3 Fast (Faster, lower cost)", - "morphLarge": "Morph v3 Large (More capable)", - "relace": "Relace Apply v3" - } + "warningInvalidConfig": "Configuration incomplete. Please select a provider and configure the required settings above.", + "successConfigured": "Fast Apply is configured and ready to use" }, "PREVENT_FOCUS_DISRUPTION": { "name": "Background editing", diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json index bce2c528a1..888d136b72 100644 --- a/webview-ui/src/i18n/locales/es/settings.json +++ b/webview-ui/src/i18n/locales/es/settings.json @@ -776,7 +776,19 @@ "morphFast": "Morph v3 Fast (Más rápido, menor costo)", "morphLarge": "Morph v3 Large (Más capaz)", "relace": "Relace Apply v3" - } + }, + "providerTypeLabel": "Tipo de proveedor", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "Perfil de API", + "selectProfile": "Seleccionar un perfil", + "noOpenRouterProfiles": "No hay perfiles de OpenRouter configurados. Por favor, añade un perfil de OpenRouter en la sección de Proveedores.", + "noKiloCodeProfiles": "No hay perfiles de Kilocode configurados. Por favor, añade un perfil de Kilocode en la sección de Proveedores.", + "warningInvalidConfig": "Configuración incompleta. Por favor, selecciona un proveedor y configura los ajustes requeridos arriba.", + "successConfigured": "Fast Apply está configurado y listo para usar" }, "PREVENT_FOCUS_DISRUPTION": { "name": "Edición en segundo plano", diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json index 8e754e7381..ef8ca1bd4b 100644 --- a/webview-ui/src/i18n/locales/fr/settings.json +++ b/webview-ui/src/i18n/locales/fr/settings.json @@ -776,7 +776,19 @@ "morphFast": "Morph v3 Fast (Plus rapide, coût réduit)", "morphLarge": "Morph v3 Large (Plus performant)", "relace": "Relace Apply v3" - } + }, + "providerTypeLabel": "Type de fournisseur", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "Profil API", + "selectProfile": "Sélectionner un profil", + "noOpenRouterProfiles": "Aucun profil OpenRouter configuré. Veuillez ajouter un profil OpenRouter dans la section Fournisseurs.", + "noKiloCodeProfiles": "Aucun profil Kilocode configuré. Veuillez ajouter un profil Kilocode dans la section Fournisseurs.", + "warningInvalidConfig": "Configuration incomplète. Veuillez sélectionner un fournisseur et configurer les paramètres requis ci-dessus.", + "successConfigured": "Fast Apply est configuré et prêt à l'emploi" }, "PREVENT_FOCUS_DISRUPTION": { "name": "Édition en arrière-plan", diff --git a/webview-ui/src/i18n/locales/hi/settings.json b/webview-ui/src/i18n/locales/hi/settings.json index 2c7f7fcbdf..02c49a52ae 100644 --- a/webview-ui/src/i18n/locales/hi/settings.json +++ b/webview-ui/src/i18n/locales/hi/settings.json @@ -772,12 +772,18 @@ "placeholder": "अपनी Morph API कुंजी दर्ज करें (वैकल्पिक)", "modelLabel": "मॉडल चयन", "modelDescription": "फ़ाइल संपादन के लिए किस Fast Apply मॉडल का उपयोग करना है चुनें", - "models": { - "auto": "स्वचालित (डिफ़ॉल्ट - सर्वोत्तम उपलब्ध चुनता है)", - "morphFast": "Morph v3 Fast (तेज़, कम लागत)", - "morphLarge": "Morph v3 Large (अधिक सक्षम)", - "relace": "Relace Apply v3" - } + "providerTypeLabel": "प्रदाता प्रकार", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "प्रोफ़ाइल API", + "selectProfile": "प्रोफ़ाइल चुनें", + "noOpenRouterProfiles": "कोई OpenRouter प्रोफ़ाइल कॉन्फ़िगर नहीं है। कृपया प्रदाताओं अनुभाग में एक OpenRouter प्रोफ़ाइल जोड़ें।", + "noKiloCodeProfiles": "कोई Kilocode प्रोफ़ाइल कॉन्फ़िगर नहीं है। कृपया प्रदाताओं अनुभाग में एक Kilocode प्रोफ़ाइल जोड़ें।", + "warningInvalidConfig": "अधूरी कॉन्फ़िगरेशन। कृपया एक प्रदाता चुनें और ऊपर आवश्यक सेटिंग्स कॉन्फ़िगर करें।", + "successConfigured": "Fast Apply कॉन्फ़िगर किया गया है और उपयोग के लिए तैयार है" }, "PREVENT_FOCUS_DISRUPTION": { "name": "बैकग्राउंड संपादन", diff --git a/webview-ui/src/i18n/locales/id/settings.json b/webview-ui/src/i18n/locales/id/settings.json index d72cfd58e5..367bbe353e 100644 --- a/webview-ui/src/i18n/locales/id/settings.json +++ b/webview-ui/src/i18n/locales/id/settings.json @@ -789,6 +789,18 @@ "MORPH_FAST_APPLY": { "name": "Aktifkan Fast Apply", "description": "Ketika diaktifkan, Kilo Code dapat mengedit file menggunakan Fast Apply dengan model khusus yang dioptimalkan untuk modifikasi kode. Memerlukan Kilo Code API Provider, OpenRouter, atau kunci API Morph.", + "providerTypeLabel": "Jenis Provider", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "Profil API", + "selectProfile": "Pilih profil", + "noOpenRouterProfiles": "Tidak ada profil OpenRouter yang dikonfigurasi. Harap tambahkan profil OpenRouter di bagian Provider.", + "noKiloCodeProfiles": "Tidak ada profil Kilocode yang dikonfigurasi. Harap tambahkan profil Kilocode di bagian Provider.", + "warningInvalidConfig": "Konfigurasi tidak lengkap. Harap pilih provider dan konfigurasikan pengaturan yang diperlukan di atas.", + "successConfigured": "Fast Apply telah dikonfigurasi dan siap digunakan", "apiKey": "Kunci API Morph (opsional)", "placeholder": "Masukkan kunci API Morph kamu (opsional)", "modelLabel": "Pemilihan Model", diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json index 737f200f6a..eab3c49d33 100644 --- a/webview-ui/src/i18n/locales/it/settings.json +++ b/webview-ui/src/i18n/locales/it/settings.json @@ -34,8 +34,7 @@ "experimental": "Sperimentale", "language": "Lingua", "about": "Informazioni su Kilo Code", - "display": "Mostra", - "ghost": "Ghost" + "display": "Mostra" }, "slashCommands": { "description": "Gestisci i tuoi comandi slash per eseguire rapidamente flussi di lavoro e azioni personalizzate. Scopri di più" @@ -809,7 +808,19 @@ "morphFast": "Morph v3 Fast (Più veloce, costo inferiore)", "morphLarge": "Morph v3 Large (Più capace)", "relace": "Relace Apply v3" - } + }, + "providerTypeLabel": "Tipo di Provider", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "Profilo API", + "selectProfile": "Seleziona un profilo", + "noOpenRouterProfiles": "Nessun profilo OpenRouter configurato. Aggiungi un profilo OpenRouter nella sezione Provider.", + "noKiloCodeProfiles": "Nessun profilo Kilocode configurato. Aggiungi un profilo Kilocode nella sezione Provider.", + "warningInvalidConfig": "Configurazione incompleta. Seleziona un provider e configura le impostazioni richieste sopra.", + "successConfigured": "Fast Apply è configurato e pronto all'uso" }, "RUN_SLASH_COMMAND": { "name": "Abilita comandi slash avviati dal modello", diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json index 882183a413..61c85cb8c0 100644 --- a/webview-ui/src/i18n/locales/ja/settings.json +++ b/webview-ui/src/i18n/locales/ja/settings.json @@ -800,16 +800,22 @@ "MORPH_FAST_APPLY": { "name": "Fast Applyを有効化", "description": "有効にすると、Kilo Codeはコード変更に最適化された専用モデルを使用してFast Applyでファイルを編集できます。Kilo Code APIプロバイダー、OpenRouter、またはMorph APIキーが必要です。", + "providerTypeLabel": "プロバイダータイプ", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, "apiKey": "Morph APIキー(オプション)", "placeholder": "Morph APIキーを入力してください(オプション)", + "profileLabel": "APIプロファイル", + "selectProfile": "プロファイルを選択", + "noOpenRouterProfiles": "OpenRouterプロファイルが設定されていません。プロバイダーセクションでOpenRouterプロファイルを追加してください。", + "noKiloCodeProfiles": "Kilocodeプロファイルが設定されていません。プロバイダーセクションでKilocodeプロファイルを追加してください。", "modelLabel": "モデル選択", "modelDescription": "ファイル編集に使用するFast Applyモデルを選択", - "models": { - "auto": "自動(デフォルト - 最適なものを選択)", - "morphFast": "Morph v3 Fast(高速、低コスト)", - "morphLarge": "Morph v3 Large(より高性能)", - "relace": "Relace Apply v3" - } + "warningInvalidConfig": "設定が不完全です。プロバイダーを選択し、上記の必要な設定を構成してください。", + "successConfigured": "Fast Applyが設定され、使用準備完了です" }, "RUN_SLASH_COMMAND": { "name": "モデル開始スラッシュコマンドを有効にする", diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json index b02bdad689..1672302b0d 100644 --- a/webview-ui/src/i18n/locales/ko/settings.json +++ b/webview-ui/src/i18n/locales/ko/settings.json @@ -777,7 +777,19 @@ "morphFast": "Morph v3 Fast (더 빠르고 저렴한 비용)", "morphLarge": "Morph v3 Large (더 강력함)", "relace": "Relace Apply v3" - } + }, + "warningInvalidConfig": "구성이 불완전합니다. 제공자를 선택하고 위에 필요한 설정을 구성하세요.", + "successConfigured": "Fast Apply가 구성되었으며 사용할 준비가 되었습니다.", + "providerTypeLabel": "제공자 유형", + "providerTypes": { + "morph": "모프", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "API 프로필", + "selectProfile": "프로필 선택", + "noOpenRouterProfiles": "OpenRouter 프로필이 구성되지 않았습니다. 공급자 섹션에서 OpenRouter 프로필을 추가하세요.", + "noKiloCodeProfiles": "Kilocode 프로필이 구성되지 않았습니다. 공급자 섹션에서 Kilocode 프로필을 추가하세요." }, "PREVENT_FOCUS_DISRUPTION": { "name": "백그라운드 편집", diff --git a/webview-ui/src/i18n/locales/nl/settings.json b/webview-ui/src/i18n/locales/nl/settings.json index a40ee3100e..0911d28b26 100644 --- a/webview-ui/src/i18n/locales/nl/settings.json +++ b/webview-ui/src/i18n/locales/nl/settings.json @@ -777,7 +777,19 @@ "morphFast": "Morph v3 Fast (Sneller, lagere kosten)", "morphLarge": "Morph v3 Large (Meer capabel)", "relace": "Relace Apply v3" - } + }, + "providerTypeLabel": "Provider Type", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "API-profiel", + "selectProfile": "Selecteer een profiel", + "noOpenRouterProfiles": "Geen OpenRouter-profielen geconfigureerd. Voeg een OpenRouter-profiel toe in de sectie Providers.", + "noKiloCodeProfiles": "Geen Kilocode-profielen geconfigureerd. Voeg een Kilocode-profiel toe in de sectie Providers.", + "warningInvalidConfig": "Configuratie onvolledig. Selecteer een provider en configureer de vereiste instellingen hierboven.", + "successConfigured": "Fast Apply is geconfigureerd en klaar voor gebruik" }, "PREVENT_FOCUS_DISRUPTION": { "name": "Achtergrondbewerking", diff --git a/webview-ui/src/i18n/locales/pl/settings.json b/webview-ui/src/i18n/locales/pl/settings.json index c0a1907821..436b09ed36 100644 --- a/webview-ui/src/i18n/locales/pl/settings.json +++ b/webview-ui/src/i18n/locales/pl/settings.json @@ -777,7 +777,19 @@ "morphFast": "Morph v3 Fast (Szybszy, niższy koszt)", "morphLarge": "Morph v3 Large (Bardziej zaawansowany)", "relace": "Relace Apply v3" - } + }, + "providerTypeLabel": "Typ dostawcy", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "Profil API", + "selectProfile": "Wybierz profil", + "noOpenRouterProfiles": "Brak skonfigurowanych profili OpenRouter. Dodaj profil OpenRouter w sekcji Dostawcy.", + "noKiloCodeProfiles": "Brak skonfigurowanych profili Kilocode. Dodaj profil Kilocode w sekcji Dostawcy.", + "warningInvalidConfig": "Konfiguracja niekompletna. Wybierz dostawcę i skonfiguruj wymagane ustawienia powyżej.", + "successConfigured": "Szybkie stosowanie jest skonfigurowane i gotowe do użycia" }, "PREVENT_FOCUS_DISRUPTION": { "name": "Edycja w tle", diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json index 7f4624e863..a2ebe23378 100644 --- a/webview-ui/src/i18n/locales/pt-BR/settings.json +++ b/webview-ui/src/i18n/locales/pt-BR/settings.json @@ -777,7 +777,19 @@ "morphFast": "Morph v3 Fast (Mais rápido, menor custo)", "morphLarge": "Morph v3 Large (Mais capaz)", "relace": "Relace Apply v3" - } + }, + "providerTypeLabel": "Tipo de Provedor", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "Perfil da API", + "selectProfile": "Selecionar um perfil", + "noOpenRouterProfiles": "Nenhum perfil OpenRouter configurado. Por favor, adicione um perfil OpenRouter na seção Provedores.", + "noKiloCodeProfiles": "Nenhum perfil Kilocode configurado. Por favor, adicione um perfil Kilocode na seção Provedores.", + "warningInvalidConfig": "Configuração incompleta. Por favor, selecione um provedor e configure as configurações necessárias acima.", + "successConfigured": "Fast Apply está configurado e pronto para usar" }, "PREVENT_FOCUS_DISRUPTION": { "name": "Edição em segundo plano", diff --git a/webview-ui/src/i18n/locales/ru/settings.json b/webview-ui/src/i18n/locales/ru/settings.json index e4bd887698..3434bbd4bb 100644 --- a/webview-ui/src/i18n/locales/ru/settings.json +++ b/webview-ui/src/i18n/locales/ru/settings.json @@ -777,7 +777,19 @@ "morphFast": "Morph v3 Fast (быстрее, ниже стоимость)", "morphLarge": "Morph v3 Large (более мощная)", "relace": "Relace Apply v3" - } + }, + "providerTypeLabel": "Тип провайдера", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "Профиль API", + "selectProfile": "Выберите профиль", + "noOpenRouterProfiles": "Профили OpenRouter не настроены. Пожалуйста, добавьте профиль OpenRouter в разделе «Провайдеры».", + "noKiloCodeProfiles": "Профили Kilocode не настроены. Пожалуйста, добавьте профиль Kilocode в разделе «Провайдеры».", + "warningInvalidConfig": "Конфигурация неполная. Пожалуйста, выберите провайдера и настройте необходимые параметры выше.", + "successConfigured": "Fast Apply настроен и готов к использованию" }, "PREVENT_FOCUS_DISRUPTION": { "name": "Фоновое редактирование", diff --git a/webview-ui/src/i18n/locales/th/settings.json b/webview-ui/src/i18n/locales/th/settings.json index 606dc766c1..143f8439f7 100644 --- a/webview-ui/src/i18n/locales/th/settings.json +++ b/webview-ui/src/i18n/locales/th/settings.json @@ -860,12 +860,18 @@ "placeholder": "ป้อน Morph API key ของคุณ (ไม่บังคับ)", "modelLabel": "การเลือกโมเดล", "modelDescription": "เลือกโมเดล Fast Apply ที่จะใช้สำหรับการแก้ไขไฟล์", - "models": { - "auto": "อัตโนมัติ (ค่าเริ่มต้น - เลือกที่ดีที่สุดที่มี)", - "morphFast": "Morph v3 Fast (เร็วกว่า ค่าใช้จ่ายต่ำกว่า)", - "morphLarge": "Morph v3 Large (มีความสามารถมากกว่า)", - "relace": "Relace Apply v3" - } + "providerTypeLabel": "ประเภทผู้ให้บริการ", + "profileLabel": "โปรไฟล์ API", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "selectProfile": "เลือกโปรไฟล์", + "noOpenRouterProfiles": "ไม่มีโปรไฟล์ OpenRouter ที่กำหนดค่าไว้ โปรดเพิ่มโปรไฟล์ OpenRouter ในส่วนผู้ให้บริการ", + "noKiloCodeProfiles": "ไม่มีโปรไฟล์ Kilocode ที่กำหนดค่าไว้ โปรดเพิ่มโปรไฟล์ Kilocode ในส่วนผู้ให้บริการ", + "warningInvalidConfig": "การกำหนดค่าไม่สมบูรณ์ โปรดเลือกผู้ให้บริการและกำหนดค่าการตั้งค่าที่จำเป็นด้านบน", + "successConfigured": "Fast Apply ได้รับการกำหนดค่าและพร้อมใช้งาน" }, "INLINE_ASSIST": { "name": "Autocomplete", diff --git a/webview-ui/src/i18n/locales/tr/settings.json b/webview-ui/src/i18n/locales/tr/settings.json index 8f9bb5ba70..0530b0d3b0 100644 --- a/webview-ui/src/i18n/locales/tr/settings.json +++ b/webview-ui/src/i18n/locales/tr/settings.json @@ -773,12 +773,18 @@ "placeholder": "Morph API anahtarınızı girin (isteğe bağlı)", "modelLabel": "Model Seçimi", "modelDescription": "Dosya düzenlemeleri için hangi Hızlı Uygulama modelinin kullanılacağını seçin", - "models": { - "auto": "Otomatik (Varsayılan - en uygun olanı seçer)", - "morphFast": "Morph v3 Fast (Daha hızlı, düşük maliyet)", - "morphLarge": "Morph v3 Large (Daha yetenekli)", - "relace": "Relace Apply v3" - } + "providerTypeLabel": "Sağlayıcı Türü", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "API Profili", + "selectProfile": "Bir profil seçin", + "noOpenRouterProfiles": "OpenRouter profili yapılandırılmamış. Lütfen Sağlayıcılar bölümünde bir OpenRouter profili ekleyin.", + "noKiloCodeProfiles": "Kilocode profili yapılandırılmamış. Lütfen Sağlayıcılar bölümünde bir Kilocode profili ekleyin.", + "warningInvalidConfig": "Yapılandırma eksik. Lütfen bir sağlayıcı seçin ve yukarıdaki gerekli ayarları yapılandırın.", + "successConfigured": "Hızlı Uygulama yapılandırıldı ve kullanıma hazır" }, "PREVENT_FOCUS_DISRUPTION": { "name": "Arka plan düzenleme", diff --git a/webview-ui/src/i18n/locales/uk/settings.json b/webview-ui/src/i18n/locales/uk/settings.json index 0f4a3ce1b7..681adb11c1 100644 --- a/webview-ui/src/i18n/locales/uk/settings.json +++ b/webview-ui/src/i18n/locales/uk/settings.json @@ -875,13 +875,25 @@ "morphFast": "Morph v3 Fast (Швидше, нижча вартість)", "morphLarge": "Morph v3 Large (Більш здатна)", "relace": "Relace Apply v3" - } - }, - "INLINE_ASSIST": { - "name": "Autocomplete", - "description": "Увімкни функції Autocomplete для швидких пропозицій коду та покращень безпосередньо у твоєму редакторі. Включає Швидке Завдання (Cmd+I) для цільових змін та Autocomplete для контекстуальних покращень." + }, + "providerTypeLabel": "Тип провайдера", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "Профіль API", + "selectProfile": "Виберіть профіль", + "noOpenRouterProfiles": "Профілі OpenRouter не налаштовані. Будь ласка, додайте профіль OpenRouter у розділі «Провайдери».", + "noKiloCodeProfiles": "Профілі Kilocode не налаштовані. Будь ласка, додайте профіль Kilocode у розділі «Провайдери».", + "warningInvalidConfig": "Конфігурація неповна. Будь ласка, виберіть провайдера та налаштуйте необхідні параметри вище.", + "successConfigured": "Швидке застосування налаштовано та готове до використання" } }, + "INLINE_ASSIST": { + "name": "Autocomplete", + "description": "Увімкни функції Autocomplete для швидких пропозицій коду та покращень безпосередньо у твоєму редакторі. Включає Швидке Завдання (Cmd+I) для цільових змін та Autocomplete для контекстуальних покращень." + }, "promptCaching": { "label": "Вимкнути кешування підказок", "description": "Якщо відмічено, Kilo Code не використовуватиме кешування підказок для цієї моделі." diff --git a/webview-ui/src/i18n/locales/vi/settings.json b/webview-ui/src/i18n/locales/vi/settings.json index de37986f5b..bfaef5eadd 100644 --- a/webview-ui/src/i18n/locales/vi/settings.json +++ b/webview-ui/src/i18n/locales/vi/settings.json @@ -803,12 +803,18 @@ "placeholder": "Nhập khóa API Morph của bạn (tùy chọn)", "modelLabel": "Lựa chọn mô hình", "modelDescription": "Chọn mô hình Fast Apply nào để sử dụng cho việc chỉnh sửa tệp", - "models": { - "auto": "Tự động (Mặc định - chọn tốt nhất có sẵn)", - "morphFast": "Morph v3 Fast (Nhanh hơn, chi phí thấp hơn)", - "morphLarge": "Morph v3 Large (Khả năng cao hơn)", - "relace": "Relace Apply v3" - } + "providerTypeLabel": "Loại nhà cung cấp", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "Hồ sơ API", + "selectProfile": "Chọn một hồ sơ", + "noOpenRouterProfiles": "Chưa cấu hình hồ sơ OpenRouter nào. Vui lòng thêm hồ sơ OpenRouter trong phần Nhà cung cấp.", + "noKiloCodeProfiles": "Chưa cấu hình hồ sơ Kilocode nào. Vui lòng thêm hồ sơ Kilocode trong phần Nhà cung cấp.", + "warningInvalidConfig": "Cấu hình chưa hoàn tất. Vui lòng chọn nhà cung cấp và cấu hình các cài đặt bắt buộc ở trên.", + "successConfigured": "Fast Apply đã được cấu hình và sẵn sàng sử dụng" }, "RUN_SLASH_COMMAND": { "name": "Bật lệnh slash do mô hình khởi tạo", diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json index 0f200d24bd..bf8aaba614 100644 --- a/webview-ui/src/i18n/locales/zh-CN/settings.json +++ b/webview-ui/src/i18n/locales/zh-CN/settings.json @@ -808,12 +808,18 @@ "placeholder": "输入您的 Morph API 密钥(可选)", "modelLabel": "模型选择", "modelDescription": "选择用于文件编辑的快速应用模型", - "models": { - "auto": "自动(默认 - 选择最佳可用)", - "morphFast": "Morph v3 Fast(更快,成本更低)", - "morphLarge": "Morph v3 Large(功能更强)", - "relace": "Relace Apply v3" - } + "providerTypeLabel": "提供商类型", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "API 配置文件", + "selectProfile": "选择配置文件", + "noOpenRouterProfiles": "未配置 OpenRouter 配置文件。请在“提供商”部分添加 OpenRouter 配置文件。", + "noKiloCodeProfiles": "未配置 Kilocode 配置文件。请在“提供商”部分添加 Kilocode 配置文件。", + "warningInvalidConfig": "配置不完整。请选择提供商并在上方配置所需设置。", + "successConfigured": "快速应用已配置完成,可以使用" }, "RUN_SLASH_COMMAND": { "name": "启用模型发起的斜杠命令", diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json index 8b065ee52c..9e0299642c 100644 --- a/webview-ui/src/i18n/locales/zh-TW/settings.json +++ b/webview-ui/src/i18n/locales/zh-TW/settings.json @@ -778,7 +778,19 @@ "morphFast": "Morph v3 Fast(更快、成本更低)", "morphLarge": "Morph v3 Large(功能更強)", "relace": "Relace Apply v3" - } + }, + "providerTypeLabel": "供應商類型", + "providerTypes": { + "morph": "Morph", + "openrouter": "OpenRouter", + "kilocode": "Kilocode" + }, + "profileLabel": "API 設定檔", + "selectProfile": "選擇設定檔", + "noOpenRouterProfiles": "未設定 OpenRouter 設定檔。請在「供應商」區段新增 OpenRouter 設定檔。", + "noKiloCodeProfiles": "未設定 Kilocode 設定檔。請在「供應商」區段新增 Kilocode 設定檔。", + "warningInvalidConfig": "設定不完整。請選擇供應商並設定上方所需的設定。", + "successConfigured": "快速套用已設定完成並準備使用" }, "PREVENT_FOCUS_DISRUPTION": { "name": "背景編輯",