{memory.scope}:{memory.key} {memory.scope} {mode === 'edit' ? ( Memory value setEditorValue(event.target.value)} ref={editorRef} value={editorValue} /> {editorValueKind === 'text' ? 'Stored as text.' : 'Stored as JSON; the edited value must remain valid JSON.'} {editMutation.isPending ? 'Saving…' : 'Save'} returnToView('edit')} type="button" > Cancel ) : mode === 'archive' ? ( Archive memory {memory.scope}:{memory.key} Archive this memory? It will stop loading in new sessions, while its audit history remains available. archiveMutation.mutate()} ref={confirmArchiveRef} type="button" > {archiveMutation.isPending ? 'Archiving…' : 'Archive'} returnToView('archive')} type="button" > Keep ) : ( Edit { editMutation.reset(); archiveMutation.reset(); setEditorError(null); setArchiveRevision(memory.updatedAt); setMode('archive'); }} ref={archiveButtonRef} type="button" > Archive )} {editorError || mutationError ? ( {editorError ?? queryErrorMessage(mutationError)} ) : null}