Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,18 @@ export function MemoriesTab() {

const handleUpdate = () => {
if (!selectedMemory) return;
// context_type has no null/blank state on the server -- it's a required
// non-empty string there (and downstream recall code assumes as much),
// so clearing the field falls back to the same 'general' default used
// for new memories, not the previous value and not null.
updateMemory.mutate({
id: selectedMemory.id,
data: {
content: editContent,
session_name: selectedMemory.session_name,
project: editProject.trim() || null,
platform: editPlatform.trim() || null,
context_type: editContextType.trim() || null,
context_type: editContextType.trim() || 'general',
metadata: selectedMemory.metadata,
}
}, {
Expand All @@ -165,7 +169,7 @@ export function MemoriesTab() {
content: editContent,
project: editProject.trim() || null,
platform: editPlatform.trim() || null,
context_type: editContextType.trim() || null,
context_type: editContextType.trim() || 'general',
});
setActionNotice({ kind: 'success', message: 'Memory updated.' });
},
Expand Down Expand Up @@ -365,7 +369,7 @@ export function MemoriesTab() {
<div className="grid grid-cols-3 gap-2">
<Input placeholder="Project (blank = null)" value={editProject} onChange={e => setEditProject(e.target.value)} className="text-xs" />
<Input placeholder="Platform (blank = null)" value={editPlatform} onChange={e => setEditPlatform(e.target.value)} className="text-xs" />
<Input placeholder="Context type (blank = null)" value={editContextType} onChange={e => setEditContextType(e.target.value)} className="text-xs" />
<Input placeholder="Context type (blank = general)" value={editContextType} onChange={e => setEditContextType(e.target.value)} className="text-xs" />
</div>
<div className="flex justify-end gap-2">
<Button variant="outline" size="sm" onClick={() => setEditMode(false)}>Cancel</Button>
Expand Down
Loading