MCPcopy Create free account
hub / github.com/OpenAnonymity/oa-chat / _renderFileItem

Method _renderFileItem

chat/components/MemoryEditor.js:406–415  ·  view source on GitHub ↗
(path, displayName, tooltip, isSelected, isNested)

Source from the content-addressed store, hash-verified

404 <input id="memory-new-file-input" type="text" placeholder="path/file.md" value="${this._escapeHtml(this.newFilePath)}"
405 class="w-full text-xs px-2 py-1 rounded border border-border/50 bg-background/50 text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-ring" />
406 </div>
407 `;
408 }
409
410 if (this.files.length === 0 && !this.isCreatingFile && !this.isCreatingFolder) {
411 html = `
412 <div class="flex flex-col items-center justify-center py-10 px-4 text-center gap-3">
413 <svg class="w-8 h-8 text-muted-foreground/10" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1">
414 <path stroke-linecap="round" stroke-linejoin="round" d="M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"></path>
415 </svg>
416 <span class="text-xs text-muted-foreground/40">No memory files yet</span>
417 <button id="memory-empty-new-file-btn" class="text-xs font-medium transition-colors" style="color: hsl(var(--color-accent-primary) / 0.7)">Create your first file</button>
418 </div>

Callers 1

_renderSidebarMethod · 0.95

Calls 1

_escapeHtmlMethod · 0.95

Tested by

no test coverage detected