-
+
{selectedFile?.path ?? t('settings.memory.noFileSelected')}
{isDirty && {t('settings.memory.unsaved')}}
@@ -279,7 +308,7 @@ export function MemorySettings() {
value={draftContent}
onChange={(event) => updateDraft(event.target.value)}
spellCheck={false}
- className="h-[calc(100%-36px)] w-full resize-none overflow-auto bg-transparent p-4 font-mono text-[13px] leading-6 text-[var(--color-text-primary)] outline-none placeholder:text-[var(--color-text-tertiary)]"
+ className="h-[calc(100%-36px)] w-full resize-none overflow-auto bg-transparent p-5 font-mono text-[13px] leading-6 text-[var(--color-text-primary)] outline-none placeholder:text-[var(--color-text-tertiary)]"
/>
@@ -287,8 +316,8 @@ export function MemorySettings() {
{t('settings.memory.preview')}
{selectedFile.updatedAt ? formatDate(selectedFile.updatedAt) : ''}
-
@@ -303,6 +332,89 @@ export function MemorySettings() {
)
}
+function SearchField({
+ value,
+ onChange,
+ placeholder,
+ ariaLabel,
+ clearLabel,
+}: {
+ value: string
+ onChange: (value: string) => void
+ placeholder: string
+ ariaLabel: string
+ clearLabel: string
+}) {
+ return (
+
+
+ onChange(event.target.value)}
+ placeholder={placeholder}
+ className="h-10 w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] pl-9 pr-9 text-sm text-[var(--color-text-primary)] outline-none transition-colors duration-150 placeholder:text-[var(--color-text-tertiary)] focus:border-[var(--color-border-focus)] focus:shadow-[var(--shadow-focus-ring)]"
+ />
+ {value ? (
+
+ ) : null}
+
+ )
+}
+
+function CreateFileControl({
+ value,
+ onChange,
+ onCreate,
+ disabled,
+ loading,
+ placeholder,
+ label,
+}: {
+ value: string
+ onChange: (value: string) => void
+ onCreate: () => void
+ disabled: boolean
+ loading: boolean
+ placeholder: string
+ label: string
+}) {
+ return (
+
+
onChange(event.target.value)}
+ onKeyDown={(event) => {
+ if (event.key === 'Enter') onCreate()
+ }}
+ placeholder={placeholder}
+ aria-label={label}
+ className="h-11 min-w-0 rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-3 text-sm text-[var(--color-text-primary)] outline-none transition-colors duration-150 placeholder:text-[var(--color-text-tertiary)] focus:border-[var(--color-border-focus)] focus:shadow-[var(--shadow-focus-ring)]"
+ />
+
+
+ )
+}
+
function PanelHeader({ title, meta }: { title: string; meta: string }) {
return (
@@ -322,21 +434,24 @@ function ProjectRow({
onSelect: () => void
}) {
const t = useTranslation()
+ const display = projectDisplayName(project.label)
return (