diff --git a/packages/chat-client/src/components/ProjectModal.jsx b/packages/chat-client/src/components/ProjectModal.jsx
index bf63b22..71adef5 100644
--- a/packages/chat-client/src/components/ProjectModal.jsx
+++ b/packages/chat-client/src/components/ProjectModal.jsx
@@ -6,6 +6,7 @@ export default function ProjectModal({ project, mode, onSave, onDelete, onClose
const [name, setName] = useState(project?.name ?? '');
const [description, setDescription] = useState(project?.description ?? '');
const [colour, setColour] = useState(project?.colour ?? COLOURS[0]);
+ const [systemPrompt, setSystemPrompt] = useState(project?.system_prompt ?? '');
const inputRef = useRef(null);
useEffect(() => {
@@ -15,13 +16,20 @@ export default function ProjectModal({ project, mode, onSave, onDelete, onClose
function handleSubmit() {
const trimmed = name.trim();
if (!trimmed) return;
- onSave({ name: trimmed, description: description.trim() || null, colour, icon: null, isolated: 1 });
+ onSave({
+ name: trimmed,
+ description: description.trim() || null,
+ colour,
+ icon: null,
+ isolated: 1,
+ system_prompt: systemPrompt.trim() || null,
+ });
onClose();
}
function handleKeyDown(e) {
- if (e.key === 'Enter' && mode !== 'confirm-delete') handleSubmit();
if (e.key === 'Escape') onClose();
+ // Don't submit on Enter — textarea fields make Enter ambiguous
}
return (
@@ -35,7 +43,8 @@ export default function ProjectModal({ project, mode, onSave, onDelete, onClose
background: 'var(--bg-surface)',
border: '1px solid var(--border)',
borderRadius: 'var(--radius-lg)',
- padding: '24px', width: '380px',
+ padding: '24px', width: '420px',
+ maxHeight: '90vh', overflowY: 'auto',
display: 'flex', flexDirection: 'column', gap: '16px',
}}>
{mode === 'confirm-delete' ? (
@@ -122,6 +131,32 @@ export default function ProjectModal({ project, mode, onSave, onDelete, onClose
+ {/* System Prompt */}
+
+
+
+ Overrides the global system prompt for conversations in this project.
+ Leave blank to use the global default.
+
+
+
)}
{unassigned.map(session => (
-
+
))}
>
)}