Skip to content

Commit bb8efd2

Browse files
committed
Always display the temperature setting for API tool configurations, indicating if it's the default value
1 parent 43934c3 commit bb8efd2

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

packages/vscode/src/commands/open-settings-command/setup-api-tool-multi-config.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,9 @@ export const setup_api_tool_multi_config = async (params: {
205205
? `Reasoning effort: ${config.reasoning_effort}`
206206
: ''
207207
}${
208-
config.temperature &&
209-
config.temperature != DEFAULT_TEMPERATURE[params.tool]
210-
? config.reasoning_effort
211-
? ` · Temperature: ${config.temperature}`
212-
: `Temperature: ${config.temperature}`
213-
: ''
208+
config.reasoning_effort
209+
? ` · Temperature: ${config.temperature}`
210+
: `Temperature: ${config.temperature}`
214211
}`,
215212
detail: config.provider_name,
216213
buttons,
@@ -386,7 +383,11 @@ export const setup_api_tool_multi_config = async (params: {
386383
{ label: MODEL_LABEL, description: config.model },
387384
{
388385
label: TEMPERATURE_LABEL,
389-
description: config.temperature.toString()
386+
description: `${config.temperature.toString()}${
387+
config.temperature == DEFAULT_TEMPERATURE[params.tool]
388+
? ' (default)'
389+
: ''
390+
}`
390391
},
391392
{
392393
label: REASONING_EFFORT_LABEL,

packages/vscode/src/commands/open-settings-command/setup-api-tool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export const setup_api_tool = async (params: {
290290
value: temperature.toString(),
291291
placeHolder: 'Leave empty to restore default',
292292
validateInput: (value) => {
293-
if (value === '') return null // Allow empty to restore default
293+
if (value == '') return null // Allow empty to restore default
294294
const num = Number(value)
295295
if (isNaN(num)) return 'Please enter a valid number'
296296
if (num < 0 || num > 1) return 'Temperature must be between 0 and 1'

0 commit comments

Comments
 (0)