Explorar o código

feat: add settings to configure time and cost in system prompt (#8451)

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>
Co-authored-by: Daniel <[email protected]>
roomote[bot] hai 4 meses
pai
achega
3cbdbc2af6
Modificáronse 27 ficheiros con 254 adicións e 14 borrados
  1. 11 0
      packages/types/src/global-settings.ts
  2. 21 14
      src/core/environment/getEnvironmentDetails.ts
  3. 6 0
      src/core/webview/ClineProvider.ts
  4. 8 0
      src/core/webview/webviewMessageHandler.ts
  5. 2 0
      src/shared/ExtensionMessage.ts
  6. 2 0
      src/shared/WebviewMessage.ts
  7. 34 0
      webview-ui/src/components/settings/ContextManagementSettings.tsx
  8. 6 0
      webview-ui/src/components/settings/SettingsView.tsx
  9. 20 0
      webview-ui/src/context/ExtensionStateContext.tsx
  10. 8 0
      webview-ui/src/i18n/locales/ca/settings.json
  11. 8 0
      webview-ui/src/i18n/locales/de/settings.json
  12. 8 0
      webview-ui/src/i18n/locales/en/settings.json
  13. 8 0
      webview-ui/src/i18n/locales/es/settings.json
  14. 8 0
      webview-ui/src/i18n/locales/fr/settings.json
  15. 8 0
      webview-ui/src/i18n/locales/hi/settings.json
  16. 8 0
      webview-ui/src/i18n/locales/id/settings.json
  17. 8 0
      webview-ui/src/i18n/locales/it/settings.json
  18. 8 0
      webview-ui/src/i18n/locales/ja/settings.json
  19. 8 0
      webview-ui/src/i18n/locales/ko/settings.json
  20. 8 0
      webview-ui/src/i18n/locales/nl/settings.json
  21. 8 0
      webview-ui/src/i18n/locales/pl/settings.json
  22. 8 0
      webview-ui/src/i18n/locales/pt-BR/settings.json
  23. 8 0
      webview-ui/src/i18n/locales/ru/settings.json
  24. 8 0
      webview-ui/src/i18n/locales/tr/settings.json
  25. 8 0
      webview-ui/src/i18n/locales/vi/settings.json
  26. 8 0
      webview-ui/src/i18n/locales/zh-CN/settings.json
  27. 8 0
      webview-ui/src/i18n/locales/zh-TW/settings.json

+ 11 - 0
packages/types/src/global-settings.ts

@@ -93,6 +93,17 @@ export const globalSettingsSchema = z.object({
 	autoCondenseContextPercent: z.number().optional(),
 	maxConcurrentFileReads: z.number().optional(),
 
+	/**
+	 * Whether to include current time in the environment details
+	 * @default true
+	 */
+	includeCurrentTime: z.boolean().optional(),
+	/**
+	 * Whether to include current cost in the environment details
+	 * @default true
+	 */
+	includeCurrentCost: z.boolean().optional(),
+
 	/**
 	 * Whether to include diagnostic messages (errors, warnings) in tool outputs
 	 * @default true

+ 21 - 14
src/core/environment/getEnvironmentDetails.ts

@@ -190,21 +190,28 @@ export async function getEnvironmentDetails(cline: Task, includeFileDetails: boo
 		details += terminalDetails
 	}
 
-	// Add current time information with timezone.
-	const now = new Date()
-
-	const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
-	const timeZoneOffset = -now.getTimezoneOffset() / 60 // Convert to hours and invert sign to match conventional notation
-	const timeZoneOffsetHours = Math.floor(Math.abs(timeZoneOffset))
-	const timeZoneOffsetMinutes = Math.abs(Math.round((Math.abs(timeZoneOffset) - timeZoneOffsetHours) * 60))
-	const timeZoneOffsetStr = `${timeZoneOffset >= 0 ? "+" : "-"}${timeZoneOffsetHours}:${timeZoneOffsetMinutes.toString().padStart(2, "0")}`
-	details += `\n\n# Current Time\nCurrent time in ISO 8601 UTC format: ${now.toISOString()}\nUser time zone: ${timeZone}, UTC${timeZoneOffsetStr}`
-
-	// Add context tokens information.
-	const { contextTokens, totalCost } = getApiMetrics(cline.clineMessages)
-	const { id: modelId } = cline.api.getModel()
+	// Get settings for time and cost display
+	const { includeCurrentTime = true, includeCurrentCost = true } = state ?? {}
+
+	// Add current time information with timezone (if enabled).
+	if (includeCurrentTime) {
+		const now = new Date()
+
+		const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone
+		const timeZoneOffset = -now.getTimezoneOffset() / 60 // Convert to hours and invert sign to match conventional notation
+		const timeZoneOffsetHours = Math.floor(Math.abs(timeZoneOffset))
+		const timeZoneOffsetMinutes = Math.abs(Math.round((Math.abs(timeZoneOffset) - timeZoneOffsetHours) * 60))
+		const timeZoneOffsetStr = `${timeZoneOffset >= 0 ? "+" : "-"}${timeZoneOffsetHours}:${timeZoneOffsetMinutes.toString().padStart(2, "0")}`
+		details += `\n\n# Current Time\nCurrent time in ISO 8601 UTC format: ${now.toISOString()}\nUser time zone: ${timeZone}, UTC${timeZoneOffsetStr}`
+	}
 
-	details += `\n\n# Current Cost\n${totalCost !== null ? `$${totalCost.toFixed(2)}` : "(Not available)"}`
+	// Add context tokens information (if enabled).
+	if (includeCurrentCost) {
+		const { totalCost } = getApiMetrics(cline.clineMessages)
+		details += `\n\n# Current Cost\n${totalCost !== null ? `$${totalCost.toFixed(2)}` : "(Not available)"}`
+	}
+
+	const { id: modelId } = cline.api.getModel()
 
 	// Add current mode and any mode-specific warnings.
 	const {

+ 6 - 0
src/core/webview/ClineProvider.ts

@@ -1813,6 +1813,8 @@ export class ClineProvider
 			includeDiagnosticMessages,
 			maxDiagnosticMessages,
 			includeTaskHistoryInEnhance,
+			includeCurrentTime,
+			includeCurrentCost,
 			taskSyncEnabled,
 			remoteControlEnabled,
 			openRouterImageApiKey,
@@ -1961,6 +1963,8 @@ export class ClineProvider
 			includeDiagnosticMessages: includeDiagnosticMessages ?? true,
 			maxDiagnosticMessages: maxDiagnosticMessages ?? 50,
 			includeTaskHistoryInEnhance: includeTaskHistoryInEnhance ?? true,
+			includeCurrentTime: includeCurrentTime ?? true,
+			includeCurrentCost: includeCurrentCost ?? true,
 			taskSyncEnabled,
 			remoteControlEnabled,
 			openRouterImageApiKey,
@@ -2173,6 +2177,8 @@ export class ClineProvider
 			includeDiagnosticMessages: stateValues.includeDiagnosticMessages ?? true,
 			maxDiagnosticMessages: stateValues.maxDiagnosticMessages ?? 50,
 			includeTaskHistoryInEnhance: stateValues.includeTaskHistoryInEnhance ?? true,
+			includeCurrentTime: stateValues.includeCurrentTime ?? true,
+			includeCurrentCost: stateValues.includeCurrentCost ?? true,
 			taskSyncEnabled,
 			remoteControlEnabled: (() => {
 				try {

+ 8 - 0
src/core/webview/webviewMessageHandler.ts

@@ -1658,6 +1658,14 @@ export const webviewMessageHandler = async (
 			await updateGlobalState("includeDiagnosticMessages", includeValue)
 			await provider.postStateToWebview()
 			break
+		case "includeCurrentTime":
+			await updateGlobalState("includeCurrentTime", message.bool ?? true)
+			await provider.postStateToWebview()
+			break
+		case "includeCurrentCost":
+			await updateGlobalState("includeCurrentCost", message.bool ?? true)
+			await provider.postStateToWebview()
+			break
 		case "maxDiagnosticMessages":
 			await updateGlobalState("maxDiagnosticMessages", message.value ?? 50)
 			await provider.postStateToWebview()

+ 2 - 0
src/shared/ExtensionMessage.ts

@@ -294,6 +294,8 @@ export type ExtensionState = Pick<
 	| "openRouterImageGenerationSelectedModel"
 	| "includeTaskHistoryInEnhance"
 	| "reasoningBlockCollapsed"
+	| "includeCurrentTime"
+	| "includeCurrentCost"
 > & {
 	version: string
 	clineMessages: ClineMessage[]

+ 2 - 0
src/shared/WebviewMessage.ts

@@ -177,6 +177,8 @@ export interface WebviewMessage {
 		| "maxConcurrentFileReads"
 		| "includeDiagnosticMessages"
 		| "maxDiagnosticMessages"
+		| "includeCurrentTime"
+		| "includeCurrentCost"
 		| "searchFiles"
 		| "toggleApiConfigPin"
 		| "setHistoryPreviewCollapsed"

+ 34 - 0
webview-ui/src/components/settings/ContextManagementSettings.tsx

@@ -27,6 +27,8 @@ type ContextManagementSettingsProps = HTMLAttributes<HTMLDivElement> & {
 	includeDiagnosticMessages?: boolean
 	maxDiagnosticMessages?: number
 	writeDelayMs: number
+	includeCurrentTime?: boolean
+	includeCurrentCost?: boolean
 	setCachedStateField: SetCachedStateField<
 		| "autoCondenseContext"
 		| "autoCondenseContextPercent"
@@ -41,6 +43,8 @@ type ContextManagementSettingsProps = HTMLAttributes<HTMLDivElement> & {
 		| "includeDiagnosticMessages"
 		| "maxDiagnosticMessages"
 		| "writeDelayMs"
+		| "includeCurrentTime"
+		| "includeCurrentCost"
 	>
 }
 
@@ -60,6 +64,8 @@ export const ContextManagementSettings = ({
 	includeDiagnosticMessages,
 	maxDiagnosticMessages,
 	writeDelayMs,
+	includeCurrentTime,
+	includeCurrentCost,
 	className,
 	...props
 }: ContextManagementSettingsProps) => {
@@ -356,6 +362,34 @@ export const ContextManagementSettings = ({
 						{t("settings:contextManagement.diagnostics.delayAfterWrite.description")}
 					</div>
 				</div>
+
+				<div>
+					<VSCodeCheckbox
+						checked={includeCurrentTime}
+						onChange={(e: any) => setCachedStateField("includeCurrentTime", e.target.checked)}
+						data-testid="include-current-time-checkbox">
+						<label className="block font-medium mb-1">
+							{t("settings:contextManagement.includeCurrentTime.label")}
+						</label>
+					</VSCodeCheckbox>
+					<div className="text-vscode-descriptionForeground text-sm mt-1 mb-3">
+						{t("settings:contextManagement.includeCurrentTime.description")}
+					</div>
+				</div>
+
+				<div>
+					<VSCodeCheckbox
+						checked={includeCurrentCost}
+						onChange={(e: any) => setCachedStateField("includeCurrentCost", e.target.checked)}
+						data-testid="include-current-cost-checkbox">
+						<label className="block font-medium mb-1">
+							{t("settings:contextManagement.includeCurrentCost.label")}
+						</label>
+					</VSCodeCheckbox>
+					<div className="text-vscode-descriptionForeground text-sm mt-1 mb-3">
+						{t("settings:contextManagement.includeCurrentCost.description")}
+					</div>
+				</div>
 			</Section>
 			<Section className="pt-2">
 				<VSCodeCheckbox

+ 6 - 0
webview-ui/src/components/settings/SettingsView.tsx

@@ -196,6 +196,8 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
 		openRouterImageApiKey,
 		openRouterImageGenerationSelectedModel,
 		reasoningBlockCollapsed,
+		includeCurrentTime,
+		includeCurrentCost,
 	} = cachedState
 
 	const apiConfiguration = useMemo(() => cachedState.apiConfiguration ?? {}, [cachedState.apiConfiguration])
@@ -386,6 +388,8 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
 			vscode.postMessage({ type: "updateSupportPrompt", values: customSupportPrompts || {} })
 			vscode.postMessage({ type: "includeTaskHistoryInEnhance", bool: includeTaskHistoryInEnhance ?? true })
 			vscode.postMessage({ type: "setReasoningBlockCollapsed", bool: reasoningBlockCollapsed ?? true })
+			vscode.postMessage({ type: "includeCurrentTime", bool: includeCurrentTime ?? true })
+			vscode.postMessage({ type: "includeCurrentCost", bool: includeCurrentCost ?? true })
 			vscode.postMessage({ type: "upsertApiConfiguration", text: currentApiConfigName, apiConfiguration })
 			vscode.postMessage({ type: "telemetrySetting", text: telemetrySetting })
 			vscode.postMessage({ type: "profileThresholds", values: profileThresholds })
@@ -747,6 +751,8 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone, t
 							includeDiagnosticMessages={includeDiagnosticMessages}
 							maxDiagnosticMessages={maxDiagnosticMessages}
 							writeDelayMs={writeDelayMs}
+							includeCurrentTime={includeCurrentTime}
+							includeCurrentCost={includeCurrentCost}
 							setCachedStateField={setCachedStateField}
 						/>
 					)}

+ 20 - 0
webview-ui/src/context/ExtensionStateContext.tsx

@@ -161,6 +161,10 @@ export interface ExtensionStateContextType extends ExtensionState {
 	setMaxDiagnosticMessages: (value: number) => void
 	includeTaskHistoryInEnhance?: boolean
 	setIncludeTaskHistoryInEnhance: (value: boolean) => void
+	includeCurrentTime?: boolean
+	setIncludeCurrentTime: (value: boolean) => void
+	includeCurrentCost?: boolean
+	setIncludeCurrentCost: (value: boolean) => void
 }
 
 export const ExtensionStateContext = createContext<ExtensionStateContextType | undefined>(undefined)
@@ -270,6 +274,8 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
 		maxDiagnosticMessages: 50,
 		openRouterImageApiKey: "",
 		openRouterImageGenerationSelectedModel: "",
+		includeCurrentTime: true,
+		includeCurrentCost: true,
 	})
 
 	const [didHydrateState, setDidHydrateState] = useState(false)
@@ -290,6 +296,8 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
 	})
 	const [includeTaskHistoryInEnhance, setIncludeTaskHistoryInEnhance] = useState(true)
 	const [prevCloudIsAuthenticated, setPrevCloudIsAuthenticated] = useState(false)
+	const [includeCurrentTime, setIncludeCurrentTime] = useState(true)
+	const [includeCurrentCost, setIncludeCurrentCost] = useState(true)
 
 	const setListApiConfigMeta = useCallback(
 		(value: ProviderSettingsEntry[]) => setState((prevState) => ({ ...prevState, listApiConfigMeta: value })),
@@ -327,6 +335,14 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
 					if ((newState as any).includeTaskHistoryInEnhance !== undefined) {
 						setIncludeTaskHistoryInEnhance((newState as any).includeTaskHistoryInEnhance)
 					}
+					// Update includeCurrentTime if present in state message
+					if ((newState as any).includeCurrentTime !== undefined) {
+						setIncludeCurrentTime((newState as any).includeCurrentTime)
+					}
+					// Update includeCurrentCost if present in state message
+					if ((newState as any).includeCurrentCost !== undefined) {
+						setIncludeCurrentCost((newState as any).includeCurrentCost)
+					}
 					// Handle marketplace data if present in state message
 					if (newState.marketplaceItems !== undefined) {
 						setMarketplaceItems(newState.marketplaceItems)
@@ -575,6 +591,10 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
 		},
 		includeTaskHistoryInEnhance,
 		setIncludeTaskHistoryInEnhance,
+		includeCurrentTime,
+		setIncludeCurrentTime,
+		includeCurrentCost,
+		setIncludeCurrentCost,
 	}
 
 	return <ExtensionStateContext.Provider value={contextValue}>{children}</ExtensionStateContext.Provider>

+ 8 - 0
webview-ui/src/i18n/locales/ca/settings.json

@@ -609,6 +609,14 @@
 			"label": "Mida total màxima d'imatges",
 			"mb": "MB",
 			"description": "Límit de mida acumulativa màxima (en MB) per a totes les imatges processades en una sola operació read_file. Quan es llegeixen múltiples imatges, la mida de cada imatge s'afegeix al total. Si incloure una altra imatge excediria aquest límit, serà omesa."
+		},
+		"includeCurrentTime": {
+			"label": "Inclou l'hora actual en el context",
+			"description": "Quan està activat, l'hora actual i la informació del fus horari s'inclouran a la indicació del sistema. Desactiveu-ho si els models deixen de funcionar per problemes amb l'hora."
+		},
+		"includeCurrentCost": {
+			"label": "Inclou el cost actual en el context",
+			"description": "Quan està activat, el cost d'ús actual de l'API s'inclourà a la indicació del sistema. Desactiveu-ho si els models deixen de funcionar per problemes amb el cost."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/de/settings.json

@@ -609,6 +609,14 @@
 			"label": "Maximale Gesamtbildgröße",
 			"mb": "MB",
 			"description": "Maximales kumulatives Größenlimit (in MB) für alle Bilder, die in einer einzelnen read_file-Operation verarbeitet werden. Beim Lesen mehrerer Bilder wird die Größe jedes Bildes zur Gesamtsumme addiert. Wenn das Einbeziehen eines weiteren Bildes dieses Limit überschreiten würde, wird es übersprungen."
+		},
+		"includeCurrentTime": {
+			"label": "Aktuelle Uhrzeit in den Kontext einbeziehen",
+			"description": "Wenn aktiviert, werden die aktuelle Uhrzeit und Zeitzoneninformationen in den System-Prompt aufgenommen. Deaktiviere diese Option, wenn Modelle aufgrund von Zeitbedenken die Arbeit einstellen."
+		},
+		"includeCurrentCost": {
+			"label": "Aktuelle Kosten in den Kontext einbeziehen",
+			"description": "Wenn aktiviert, werden die aktuellen API-Nutzungskosten in den System-Prompt aufgenommen. Deaktiviere diese Option, wenn Modelle aufgrund von Kostenbedenken die Arbeit einstellen."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/en/settings.json

@@ -614,6 +614,14 @@
 			"profileDescription": "Custom threshold for this profile only (overrides global default)",
 			"inheritDescription": "This profile inherits the global default threshold ({{threshold}}%)",
 			"usesGlobal": "(uses global {{threshold}}%)"
+		},
+		"includeCurrentTime": {
+			"label": "Include current time in context",
+			"description": "When enabled, the current time and timezone information will be included in the system prompt. Disable this if models are stopping work due to time concerns."
+		},
+		"includeCurrentCost": {
+			"label": "Include current cost in context",
+			"description": "When enabled, the current API usage cost will be included in the system prompt. Disable this if models are stopping work due to cost concerns."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/es/settings.json

@@ -609,6 +609,14 @@
 			"profileDescription": "Umbral personalizado solo para este perfil (anula el predeterminado global)",
 			"inheritDescription": "Este perfil hereda el umbral predeterminado global ({{threshold}}%)",
 			"usesGlobal": "(usa global {{threshold}}%)"
+		},
+		"includeCurrentTime": {
+			"label": "Incluir hora actual en el contexto",
+			"description": "Cuando está habilitado, la hora actual y la información de la zona horaria se incluirán en el prompt del sistema. Deshabilítelo si los modelos dejan de funcionar por problemas de tiempo."
+		},
+		"includeCurrentCost": {
+			"label": "Incluir costo actual en el contexto",
+			"description": "Cuando está habilitado, el costo de uso actual de la API se incluirá en el prompt del sistema. Deshabilítelo si los modelos dejan de funcionar por problemas de costos."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/fr/settings.json

@@ -609,6 +609,14 @@
 			"profileDescription": "Seuil personnalisé pour ce profil uniquement (remplace le défaut global)",
 			"inheritDescription": "Ce profil hérite du seuil par défaut global ({{threshold}}%)",
 			"usesGlobal": "(utilise global {{threshold}}%)"
+		},
+		"includeCurrentTime": {
+			"label": "Inclure l'heure actuelle dans le contexte",
+			"description": "Lorsque cette option est activée, l'heure actuelle et les informations de fuseau horaire seront incluses dans le prompt système. Désactivez cette option si les modèles cessent de fonctionner en raison de problèmes liés à l'heure."
+		},
+		"includeCurrentCost": {
+			"label": "Inclure le coût actuel dans le contexte",
+			"description": "Lorsque cette option est activée, le coût d'utilisation actuel de l'API sera inclus dans le prompt système. Désactivez cette option si les modèles cessent de fonctionner en raison de problèmes de coût."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/hi/settings.json

@@ -610,6 +610,14 @@
 			"label": "अधिकतम कुल छवि आकार",
 			"mb": "MB",
 			"description": "एकल read_file ऑपरेशन में संसाधित सभी छवियों के लिए अधिकतम संचयी आकार सीमा (MB में)। कई छवियों को पढ़ते समय, प्रत्येक छवि का आकार कुल में जोड़ा जाता है। यदि किसी अन्य छवि को शामिल करने से यह सीमा पार हो जाएगी, तो उसे छोड़ दिया जाएगा।"
+		},
+		"includeCurrentTime": {
+			"label": "संदर्भ में वर्तमान समय शामिल करें",
+			"description": "सक्षम होने पर, वर्तमान समय और समयक्षेत्र की जानकारी सिस्टम प्रॉम्प्ट में शामिल की जाएगी। यदि मॉडल समय संबंधी चिंताओं के कारण काम करना बंद कर देते हैं तो इसे अक्षम करें।"
+		},
+		"includeCurrentCost": {
+			"label": "संदर्भ में वर्तमान लागत शामिल करें",
+			"description": "सक्षम होने पर, वर्तमान एपीआई उपयोग लागत सिस्टम प्रॉम्प्ट में शामिल की जाएगी। यदि मॉडल लागत संबंधी चिंताओं के कारण काम करना बंद कर देते हैं तो इसे अक्षम करें।"
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/id/settings.json

@@ -614,6 +614,14 @@
 			"label": "Ukuran total gambar maksimum",
 			"mb": "MB",
 			"description": "Batas ukuran kumulatif maksimum (dalam MB) untuk semua gambar yang diproses dalam satu operasi read_file. Saat membaca beberapa gambar, ukuran setiap gambar ditambahkan ke total. Jika menyertakan gambar lain akan melebihi batas ini, gambar tersebut akan dilewati."
+		},
+		"includeCurrentTime": {
+			"label": "Sertakan waktu saat ini dalam konteks",
+			"description": "Ketika diaktifkan, waktu saat ini dan informasi zona waktu akan disertakan dalam prompt sistem. Nonaktifkan ini jika model berhenti bekerja karena masalah waktu."
+		},
+		"includeCurrentCost": {
+			"label": "Sertakan biaya saat ini dalam konteks",
+			"description": "Ketika diaktifkan, biaya penggunaan API saat ini akan disertakan dalam prompt sistem. Nonaktifkan ini jika model berhenti bekerja karena masalah biaya."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/it/settings.json

@@ -610,6 +610,14 @@
 			"label": "Dimensione totale massima immagini",
 			"mb": "MB",
 			"description": "Limite di dimensione cumulativa massima (in MB) per tutte le immagini elaborate in una singola operazione read_file. Durante la lettura di più immagini, la dimensione di ogni immagine viene aggiunta al totale. Se l'inclusione di un'altra immagine supererebbe questo limite, verrà saltata."
+		},
+		"includeCurrentTime": {
+			"label": "Includi l'ora corrente nel contesto",
+			"description": "Se abilitato, l'ora corrente e le informazioni sul fuso orario verranno incluse nel prompt di sistema. Disabilita questa opzione se i modelli smettono di funzionare a causa di problemi di orario."
+		},
+		"includeCurrentCost": {
+			"label": "Includi il costo corrente nel contesto",
+			"description": "Se abilitato, il costo di utilizzo corrente dell'API verrà incluso nel prompt di sistema. Disabilita questa opzione se i modelli smettono di funzionare a causa di problemi di costo."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/ja/settings.json

@@ -610,6 +610,14 @@
 			"label": "最大合計画像サイズ",
 			"mb": "MB",
 			"description": "単一のread_file操作で処理されるすべての画像の累積サイズ制限(MB単位)。複数の画像を読み取る際、各画像のサイズが合計に加算されます。別の画像を含めるとこの制限を超える場合、その画像はスキップされます。"
+		},
+		"includeCurrentTime": {
+			"label": "現在の時刻をコンテキストに含める",
+			"description": "有効にすると、現在の時刻とタイムゾーン情報がシステムプロンプトに含まれます。モデルが時間に関する懸念で動作を停止する場合は無効にしてください。"
+		},
+		"includeCurrentCost": {
+			"label": "現在のコストをコンテキストに含める",
+			"description": "有効にすると、現在のAPI使用コストがシステムプロンプトに含まれます。モデルがコストに関する懸念で動作を停止する場合は無効にしてください。"
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/ko/settings.json

@@ -610,6 +610,14 @@
 			"label": "최대 총 이미지 크기",
 			"mb": "MB",
 			"description": "단일 read_file 작업에서 처리되는 모든 이미지의 최대 누적 크기 제한(MB 단위)입니다. 여러 이미지를 읽을 때 각 이미지의 크기가 총계에 추가됩니다. 다른 이미지를 포함하면 이 제한을 초과하는 경우 해당 이미지는 건너뜁니다."
+		},
+		"includeCurrentTime": {
+			"label": "컨텍스트에 현재 시간 포함",
+			"description": "활성화하면 현재 시간과 시간대 정보가 시스템 프롬프트에 포함됩니다. 시간 문제로 모델이 작동을 멈추면 비활성화하세요."
+		},
+		"includeCurrentCost": {
+			"label": "컨텍스트에 현재 비용 포함",
+			"description": "활성화하면 현재 API 사용 비용이 시스템 프롬프트에 포함됩니다. 비용 문제로 모델이 작동을 멈추면 비활성화하세요."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/nl/settings.json

@@ -610,6 +610,14 @@
 			"profileDescription": "Aangepaste drempelwaarde alleen voor dit profiel (overschrijft globale standaard)",
 			"inheritDescription": "Dit profiel erft de globale standaard drempelwaarde ({{threshold}}%)",
 			"usesGlobal": "(gebruikt globaal {{threshold}}%)"
+		},
+		"includeCurrentTime": {
+			"label": "Huidige tijd opnemen in context",
+			"description": "Indien ingeschakeld, worden de huidige tijd en tijdzone-informatie opgenomen in de systeemprompt. Schakel dit uit als modellen stoppen met werken vanwege tijdproblemen."
+		},
+		"includeCurrentCost": {
+			"label": "Huidige kosten opnemen in context",
+			"description": "Indien ingeschakeld, worden de huidige API-gebruikskosten opgenomen in de systeemprompt. Schakel dit uit als modellen stoppen met werken vanwege kostenproblemen."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/pl/settings.json

@@ -610,6 +610,14 @@
 			"label": "Maksymalny całkowity rozmiar obrazów",
 			"mb": "MB",
 			"description": "Maksymalny skumulowany limit rozmiaru (w MB) dla wszystkich obrazów przetwarzanych w jednej operacji read_file. Podczas odczytu wielu obrazów rozmiar każdego obrazu jest dodawany do sumy. Jeśli dołączenie kolejnego obrazu przekroczyłoby ten limit, zostanie on pominięty."
+		},
+		"includeCurrentTime": {
+			"label": "Uwzględnij bieżący czas w kontekście",
+			"description": "Gdy włączone, bieżący czas i informacje o strefie czasowej zostaną uwzględnione w promptcie systemowym. Wyłącz, jeśli modele przestają działać z powodu problemów z czasem."
+		},
+		"includeCurrentCost": {
+			"label": "Uwzględnij bieżący koszt w kontekście",
+			"description": "Gdy włączone, bieżący koszt użycia API zostanie uwzględniony w promptcie systemowym. Wyłącz, jeśli modele przestają działać z powodu problemów z kosztami."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/pt-BR/settings.json

@@ -610,6 +610,14 @@
 			"label": "Tamanho total máximo da imagem",
 			"mb": "MB",
 			"description": "Limite máximo de tamanho cumulativo (em MB) para todas as imagens processadas em uma única operação read_file. Ao ler várias imagens, o tamanho de cada imagem é adicionado ao total. Se incluir outra imagem exceder esse limite, ela será ignorada."
+		},
+		"includeCurrentTime": {
+			"label": "Incluir hora atual no contexto",
+			"description": "Quando ativado, a hora atual e as informações de fuso horário serão incluídas no prompt do sistema. Desative se os modelos pararem de funcionar por problemas de tempo."
+		},
+		"includeCurrentCost": {
+			"label": "Incluir custo atual no contexto",
+			"description": "Quando ativado, o custo de uso atual da API será incluído no prompt do sistema. Desative se os modelos pararem de funcionar por problemas de custo."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/ru/settings.json

@@ -610,6 +610,14 @@
 			"label": "Максимальный общий размер изображений",
 			"mb": "МБ",
 			"description": "Максимальный совокупный лимит размера (в МБ) для всех изображений, обрабатываемых в одной операции read_file. При чтении нескольких изображений размер каждого изображения добавляется к общему. Если включение другого изображения превысит этот лимит, оно будет пропущено."
+		},
+		"includeCurrentTime": {
+			"label": "Включить текущее время в контекст",
+			"description": "Если включено, текущее время и информация о часовом поясе будут включены в системную подсказку. Отключите, если модели прекращают работу из-за проблем со временем."
+		},
+		"includeCurrentCost": {
+			"label": "Включить текущую стоимость в контекст",
+			"description": "Если включено, текущая стоимость использования API будет включена в системную подсказку. Отключите, если модели прекращают работу из-за проблем со стоимостью."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/tr/settings.json

@@ -610,6 +610,14 @@
 			"label": "Maksimum toplam görüntü boyutu",
 			"mb": "MB",
 			"description": "Tek bir read_file işleminde işlenen tüm görüntüler için maksimum kümülatif boyut sınırı (MB cinsinden). Birden çok görüntü okurken, her görüntünün boyutu toplama eklenir. Başka bir görüntü eklemek bu sınırı aşacaksa, atlanacaktır."
+		},
+		"includeCurrentTime": {
+			"label": "Mevcut zamanı bağlama dahil et",
+			"description": "Etkinleştirildiğinde, mevcut zaman ve saat dilimi bilgileri sistem istemine dahil edilecektir. Modeller zaman endişeleri nedeniyle çalışmayı durdurursa bunu devre dışı bırakın."
+		},
+		"includeCurrentCost": {
+			"label": "Mevcut maliyeti bağlama dahil et",
+			"description": "Etkinleştirildiğinde, mevcut API kullanım maliyeti sistem istemine dahil edilecektir. Modeller maliyet endişeleri nedeniyle çalışmayı durdurursa bunu devre dışı bırakın."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/vi/settings.json

@@ -610,6 +610,14 @@
 			"label": "Kích thước tổng tối đa của hình ảnh",
 			"mb": "MB",
 			"description": "Giới hạn kích thước tích lũy tối đa (tính bằng MB) cho tất cả hình ảnh được xử lý trong một thao tác read_file duy nhất. Khi đọc nhiều hình ảnh, kích thước của mỗi hình ảnh được cộng vào tổng. Nếu việc thêm một hình ảnh khác sẽ vượt quá giới hạn này, nó sẽ bị bỏ qua."
+		},
+		"includeCurrentTime": {
+			"label": "Bao gồm thời gian hiện tại trong ngữ cảnh",
+			"description": "Khi được bật, thời gian hiện tại và thông tin múi giờ sẽ được bao gồm trong lời nhắc hệ thống. Tắt nếu các mô hình ngừng hoạt động do lo ngại về thời gian."
+		},
+		"includeCurrentCost": {
+			"label": "Bao gồm chi phí hiện tại trong ngữ cảnh",
+			"description": "Khi được bật, chi phí sử dụng API hiện tại sẽ được bao gồm trong lời nhắc hệ thống. Tắt nếu các mô hình ngừng hoạt động do lo ngại về chi phí."
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/zh-CN/settings.json

@@ -610,6 +610,14 @@
 			"label": "图片总大小上限",
 			"mb": "MB",
 			"description": "单次 read_file 操作中处理的所有图片的最大累计大小限制(MB)。读取多张图片时,每张图片的大小会累加到总大小中。如果包含另一张图片会超过此限制,则会跳过该图片。"
+		},
+		"includeCurrentTime": {
+			"label": "在上下文中包含当前时间",
+			"description": "启用后,当前时间和时区信息将包含在系统提示中。如果模型因时间问题停止工作,请禁用此选项。"
+		},
+		"includeCurrentCost": {
+			"label": "在上下文中包含当前成本",
+			"description": "启用后,当前 API 使用成本将包含在系统提示中。如果模型因成本问题停止工作,请禁用此选项。"
 		}
 	},
 	"terminal": {

+ 8 - 0
webview-ui/src/i18n/locales/zh-TW/settings.json

@@ -610,6 +610,14 @@
 			"label": "圖片總大小上限",
 			"mb": "MB",
 			"description": "單次 read_file 操作中處理的所有圖片的最大累計大小限制(MB)。讀取多張圖片時,每張圖片的大小會累加到總大小中。如果包含另一張圖片會超過此限制,則會跳過該圖片。"
+		},
+		"includeCurrentTime": {
+			"label": "在上下文中包含目前時間",
+			"description": "啟用後,目前時間和時區資訊將包含在系統提示中。如果模型因時間問題停止工作,請停用此選項。"
+		},
+		"includeCurrentCost": {
+			"label": "在上下文中包含目前成本",
+			"description": "啟用後,目前 API 使用成本將包含在系統提示中。如果模型因成本問題停止工作,請停用此選項。"
 		}
 	},
 	"terminal": {