Skip to content

Commit daee4cc

Browse files
committed
feat: Enable "Continue" button based on config & non-reasoning model type
1 parent f1792e1 commit daee4cc

File tree

5 files changed

+45
-17
lines changed

5 files changed

+45
-17
lines changed

tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessageAssistant.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@
235235
{onCopy}
236236
{onEdit}
237237
{onRegenerate}
238-
{onContinue}
238+
onContinue={currentConfig.enableContinueGeneration && !thinkingContent
239+
? onContinue
240+
: undefined}
239241
{onDelete}
240242
{onConfirmDelete}
241243
{onNavigateToSibling}

tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsDialog.svelte

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
{ value: 'dark', label: 'Dark', icon: Moon }
5353
]
5454
},
55+
{
56+
key: 'pasteLongTextToFileLen',
57+
label: 'Paste long text to file length',
58+
type: 'input'
59+
},
5560
{
5661
key: 'showMessageStats',
5762
label: 'Show message generation statistics',
@@ -68,28 +73,29 @@
6873
type: 'checkbox'
6974
},
7075
{
71-
key: 'askForTitleConfirmation',
72-
label: 'Ask for confirmation before changing conversation title',
76+
key: 'showModelInfo',
77+
label: 'Show model information',
7378
type: 'checkbox'
7479
},
7580
{
76-
key: 'pasteLongTextToFileLen',
77-
label: 'Paste long text to file length',
78-
type: 'input'
81+
key: 'enableContinueGeneration',
82+
label: 'Enable "Continue" button',
83+
type: 'checkbox',
84+
isExperimental: true
7985
},
8086
{
8187
key: 'pdfAsImage',
8288
label: 'Parse PDF as image',
8389
type: 'checkbox'
8490
},
8591
{
86-
key: 'showModelInfo',
87-
label: 'Show model information',
92+
key: 'renderUserContentAsMarkdown',
93+
label: 'Render user content as Markdown',
8894
type: 'checkbox'
8995
},
9096
{
91-
key: 'renderUserContentAsMarkdown',
92-
label: 'Render user content as Markdown',
97+
key: 'askForTitleConfirmation',
98+
label: 'Ask for confirmation before changing conversation title',
9399
type: 'checkbox'
94100
}
95101
]

tools/server/webui/src/lib/components/app/chat/ChatSettings/ChatSettingsFields.svelte

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { RotateCcw } from '@lucide/svelte';
2+
import { RotateCcw, FlaskConical } from '@lucide/svelte';
33
import { Checkbox } from '$lib/components/ui/checkbox';
44
import { Input } from '$lib/components/ui/input';
55
import Label from '$lib/components/ui/label/label.svelte';
@@ -55,8 +55,12 @@
5555
})()}
5656

5757
<div class="flex items-center gap-2">
58-
<Label for={field.key} class="text-sm font-medium">
58+
<Label for={field.key} class="flex items-center gap-1.5 text-sm font-medium">
5959
{field.label}
60+
61+
{#if field.isExperimental}
62+
<FlaskConical class="h-3.5 w-3.5 text-muted-foreground" />
63+
{/if}
6064
</Label>
6165
{#if isCustomRealTime}
6266
<ParameterSourceIndicator />
@@ -97,8 +101,12 @@
97101
</p>
98102
{/if}
99103
{:else if field.type === 'textarea'}
100-
<Label for={field.key} class="block text-sm font-medium">
104+
<Label for={field.key} class="block flex items-center gap-1.5 text-sm font-medium">
101105
{field.label}
106+
107+
{#if field.isExperimental}
108+
<FlaskConical class="h-3.5 w-3.5 text-muted-foreground" />
109+
{/if}
102110
</Label>
103111

104112
<Textarea
@@ -129,8 +137,12 @@
129137
})()}
130138

131139
<div class="flex items-center gap-2">
132-
<Label for={field.key} class="text-sm font-medium">
140+
<Label for={field.key} class="flex items-center gap-1.5 text-sm font-medium">
133141
{field.label}
142+
143+
{#if field.isExperimental}
144+
<FlaskConical class="h-3.5 w-3.5 text-muted-foreground" />
145+
{/if}
134146
</Label>
135147
{#if isCustomRealTime}
136148
<ParameterSourceIndicator />
@@ -214,9 +226,13 @@
214226
for={field.key}
215227
class="cursor-pointer text-sm leading-none font-medium {isDisabled
216228
? 'text-muted-foreground'
217-
: ''}"
229+
: ''} flex items-center gap-1.5"
218230
>
219231
{field.label}
232+
233+
{#if field.isExperimental}
234+
<FlaskConical class="h-3.5 w-3.5 text-muted-foreground" />
235+
{/if}
220236
</label>
221237

222238
{#if field.help || SETTING_CONFIG_INFO[field.key]}

tools/server/webui/src/lib/constants/settings-config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export const SETTING_CONFIG_DEFAULT: Record<string, string | number | boolean> =
3737
max_tokens: -1,
3838
custom: '', // custom json-stringified object
3939
// experimental features
40-
pyInterpreterEnabled: false
40+
pyInterpreterEnabled: false,
41+
enableContinueGeneration: false
4142
};
4243

4344
export const SETTING_CONFIG_INFO: Record<string, string> = {
@@ -93,5 +94,7 @@ export const SETTING_CONFIG_INFO: Record<string, string> = {
9394
modelSelectorEnabled:
9495
'Enable the model selector in the chat input to choose the inference model. Sends the associated model field in API requests.',
9596
pyInterpreterEnabled:
96-
'Enable Python interpreter using Pyodide. Allows running Python code in markdown code blocks.'
97+
'Enable Python interpreter using Pyodide. Allows running Python code in markdown code blocks.',
98+
enableContinueGeneration:
99+
'Enable "Continue" button for assistant messages. Currently works only with non-reasoning models.'
97100
};

tools/server/webui/src/lib/types/settings.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export interface SettingsFieldConfig {
77
key: string;
88
label: string;
99
type: 'input' | 'textarea' | 'checkbox' | 'select';
10+
isExperimental?: boolean;
1011
help?: string;
1112
options?: Array<{ value: string; label: string; icon?: typeof import('@lucide/svelte').Icon }>;
1213
}

0 commit comments

Comments
 (0)