kyp-mem 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kyp_mem/static/index.html +27 -8
- package/package.json +1 -1
- package/pyproject.toml +1 -1
|
@@ -889,21 +889,40 @@ function renderSidebar(sessionsData) {
|
|
|
889
889
|
const group = document.createElement('div');
|
|
890
890
|
const folder = document.createElement('div');
|
|
891
891
|
folder.className = 'tree-folder';
|
|
892
|
-
folder.innerHTML = `<span class="tf-arrow"
|
|
892
|
+
folder.innerHTML = `<span class="tf-arrow closed">▸</span><span class="tf-icon">≡</span><span class="tf-label">${project}</span><span class="tf-count">${sessions.length}</span><button class="tf-graph-btn ghost-btn" title="Open graph for ${project}" data-project="${project}">▦</button>`;
|
|
893
893
|
|
|
894
894
|
const list = document.createElement('div');
|
|
895
|
-
list.style.cssText = 'display:
|
|
895
|
+
list.style.cssText = 'display:none;flex-direction:column;gap:1px;padding-left:16px;margin-top:2px;';
|
|
896
896
|
|
|
897
897
|
sessions.sort((a, b) => b.path.localeCompare(a.path));
|
|
898
|
-
|
|
898
|
+
const MAX_VISIBLE = 5;
|
|
899
|
+
sessions.forEach((s, idx) => {
|
|
899
900
|
const row = document.createElement('button');
|
|
900
901
|
row.className = 'sidebar-row';
|
|
901
902
|
row.dataset.path = s.path;
|
|
903
|
+
if (idx >= MAX_VISIBLE) row.style.display = 'none';
|
|
904
|
+
if (idx >= MAX_VISIBLE) row.dataset.overflow = 'true';
|
|
902
905
|
const displayTime = formatSessionTime(s.path.split('/').pop());
|
|
903
906
|
row.innerHTML = `<span class="sr-dot" style="color:var(--dim)">●</span><span class="sr-label">${displayTime}</span>`;
|
|
904
907
|
row.addEventListener('click', () => openSession(s.path));
|
|
905
908
|
list.appendChild(row);
|
|
906
909
|
});
|
|
910
|
+
if (sessions.length > MAX_VISIBLE) {
|
|
911
|
+
const expandBtn = document.createElement('button');
|
|
912
|
+
expandBtn.className = 'sidebar-row expand-sessions-btn';
|
|
913
|
+
expandBtn.innerHTML = `<span class="sr-dot" style="color:var(--dim)">⋯</span><span class="sr-label" style="color:var(--dim);font-style:italic">show ${sessions.length - MAX_VISIBLE} more</span>`;
|
|
914
|
+
expandBtn.addEventListener('click', (e) => {
|
|
915
|
+
e.stopPropagation();
|
|
916
|
+
const hidden = list.querySelectorAll('[data-overflow]');
|
|
917
|
+
const isExpanded = expandBtn.dataset.expanded === 'true';
|
|
918
|
+
hidden.forEach(r => r.style.display = isExpanded ? 'none' : 'flex');
|
|
919
|
+
expandBtn.dataset.expanded = isExpanded ? '' : 'true';
|
|
920
|
+
expandBtn.innerHTML = isExpanded
|
|
921
|
+
? `<span class="sr-dot" style="color:var(--dim)">⋯</span><span class="sr-label" style="color:var(--dim);font-style:italic">show ${sessions.length - MAX_VISIBLE} more</span>`
|
|
922
|
+
: `<span class="sr-dot" style="color:var(--dim)">⋯</span><span class="sr-label" style="color:var(--dim);font-style:italic">show less</span>`;
|
|
923
|
+
});
|
|
924
|
+
list.appendChild(expandBtn);
|
|
925
|
+
}
|
|
907
926
|
|
|
908
927
|
folder.querySelector('.tf-graph-btn').addEventListener('click', (e) => {
|
|
909
928
|
e.stopPropagation();
|
|
@@ -940,14 +959,14 @@ function renderSidebar(sessionsData) {
|
|
|
940
959
|
|
|
941
960
|
// Tags section
|
|
942
961
|
const tagSection = document.createElement('section');
|
|
943
|
-
let tagsOpen =
|
|
962
|
+
let tagsOpen = false;
|
|
944
963
|
tagSection.innerHTML = `
|
|
945
964
|
<div class="side-section-header">
|
|
946
|
-
<button class="side-section-title" id="tags-toggle"><span class="side-dot" style="background:var(--muted);opacity:0.4"></span>tags<span class="side-collapse-arrow">▾</span></button>
|
|
965
|
+
<button class="side-section-title" id="tags-toggle"><span class="side-dot" style="background:var(--muted);opacity:0.4"></span>tags<span class="side-collapse-arrow collapsed">▾</span></button>
|
|
947
966
|
</div>
|
|
948
967
|
`;
|
|
949
968
|
const tagBody = document.createElement('div');
|
|
950
|
-
tagBody.style.cssText = 'display:
|
|
969
|
+
tagBody.style.cssText = 'display:none;flex-wrap:wrap;gap:5px;';
|
|
951
970
|
renderTagCloud(tagBody);
|
|
952
971
|
tagSection.appendChild(tagBody);
|
|
953
972
|
container.appendChild(tagSection);
|
|
@@ -973,9 +992,9 @@ function renderProjectTree(container) {
|
|
|
973
992
|
const folder = document.createElement('div');
|
|
974
993
|
folder.className = 'tree-folder';
|
|
975
994
|
const isTopLevel = depth === 0;
|
|
976
|
-
folder.innerHTML = `<span class="tf-arrow"
|
|
995
|
+
folder.innerHTML = `<span class="tf-arrow closed">▸</span><span class="tf-icon">≡</span><span class="tf-label">${node.name}</span>${isTopLevel ? `<button class="tf-graph-btn ghost-btn" title="Open graph for ${node.name}" data-project="${node.name}">▦</button>` : ''}`;
|
|
977
996
|
const children = document.createElement('div');
|
|
978
|
-
children.style.cssText = 'display:
|
|
997
|
+
children.style.cssText = 'display:none;flex-direction:column;gap:1px;padding-left:16px;margin-top:2px;';
|
|
979
998
|
|
|
980
999
|
folder.addEventListener('click', () => {
|
|
981
1000
|
const arrow = folder.querySelector('.tf-arrow');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kyp-mem",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Know Your Project — Persistent & Session level knowledge base for AI agents. MCP-powered with wikilinks, backlinks, auto-learning, and neon web UI.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"kyp-mem": "bin/cli.mjs"
|
package/pyproject.toml
CHANGED
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "kyp-mem"
|
|
7
|
-
version = "0.7.
|
|
7
|
+
version = "0.7.1"
|
|
8
8
|
description = "Know Your Project — Persistent knowledge base for AI agents. MCP-powered with wikilinks, backlinks, auto-learning, and neon web UI."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|