style updates for system prompt

This commit is contained in:
Mike Fortman 2025-09-18 14:32:33 -05:00
parent 1d44fc4658
commit 0c75eab6b5

View file

@ -488,7 +488,7 @@ function KnowledgeSourcesPage() {
</div> </div>
<div className="flex gap-2"> <div className="flex gap-2">
<ConfirmationDialog <ConfirmationDialog
trigger={<Button variant="secondary">Restore flow</Button>} trigger={<Button variant="outline">Restore flow</Button>}
title="Restore default Agent flow" title="Restore default Agent flow"
description="This restores defaults and discards all custom settings and overrides. This can't be undone." description="This restores defaults and discards all custom settings and overrides. This can't be undone."
confirmText="Restore" confirmText="Restore"
@ -497,7 +497,7 @@ function KnowledgeSourcesPage() {
/> />
<ConfirmationDialog <ConfirmationDialog
trigger={ trigger={
<Button variant="secondary"> <Button>
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
width="24" width="24"
@ -537,7 +537,7 @@ function KnowledgeSourcesPage() {
<div className="space-y-6"> <div className="space-y-6">
<div className="space-y-2"> <div className="space-y-2">
<Label htmlFor="model-select" className="text-base font-medium"> <Label htmlFor="model-select" className="text-base font-medium">
Model Language Model
</Label> </Label>
<Select <Select
value={settings.agent?.llm_model || "gpt-4"} value={settings.agent?.llm_model || "gpt-4"}
@ -560,23 +560,29 @@ function KnowledgeSourcesPage() {
</div> </div>
<div className="space-y-2"> <div className="space-y-2">
<Label htmlFor="system-prompt" className="text-base font-medium"> <Label htmlFor="system-prompt" className="text-base font-medium">
System Prompt Agent Instructions
</Label> </Label>
<Textarea <Textarea
id="system-prompt" id="system-prompt"
placeholder="Enter your system prompt here..." placeholder="Enter your agent instructions here..."
value={systemPrompt} value={systemPrompt}
onChange={(e) => setSystemPrompt(e.target.value)} onChange={(e) => setSystemPrompt(e.target.value)}
rows={6} rows={6}
className="resize-none" className={`resize-none ${systemPrompt.length > 2000 ? 'border-red-500 focus:border-red-500' : ''}`}
/> />
<div className="flex justify-start">
<span className={`text-xs ${systemPrompt.length > 2000 ? 'text-red-500' : 'text-muted-foreground'}`}>
{systemPrompt.length}/2000 characters
</span>
</div>
</div> </div>
<div className="flex justify-end pt-2"> <div className="flex justify-end pt-2">
<Button <Button
onClick={handleSystemPromptSave} onClick={handleSystemPromptSave}
disabled={updateFlowSettingMutation.isPending} disabled={updateFlowSettingMutation.isPending || systemPrompt.length > 2000}
className="min-w-[120px]" className="min-w-[120px]"
size="sm" size="sm"
variant="outline"
> >
{updateFlowSettingMutation.isPending ? ( {updateFlowSettingMutation.isPending ? (
<> <>
@ -584,7 +590,7 @@ function KnowledgeSourcesPage() {
Saving... Saving...
</> </>
) : ( ) : (
"Save Prompt" "Save Agent Instructions"
)} )}
</Button> </Button>
</div> </div>
@ -604,7 +610,7 @@ function KnowledgeSourcesPage() {
</div> </div>
<div className="flex gap-2"> <div className="flex gap-2">
<ConfirmationDialog <ConfirmationDialog
trigger={<Button variant="secondary">Restore flow</Button>} trigger={<Button variant="outline">Restore flow</Button>}
title="Restore default Ingest flow" title="Restore default Ingest flow"
description="This restores defaults and discards all custom settings and overrides. This can't be undone." description="This restores defaults and discards all custom settings and overrides. This can't be undone."
confirmText="Restore" confirmText="Restore"
@ -613,7 +619,7 @@ function KnowledgeSourcesPage() {
/> />
<ConfirmationDialog <ConfirmationDialog
trigger={ trigger={
<Button variant="secondary"> <Button>
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
width="24" width="24"