agent-knowledge 1.3.11 → 1.3.13
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/agent-desk-plugin.json +1 -1
- package/dist/ui/app.js +70 -64
- package/dist/ui/render-panel.js +2 -1
- package/dist/ui/ui-utils.js +6 -3
- package/package.json +1 -1
package/agent-desk-plugin.json
CHANGED
package/dist/ui/app.js
CHANGED
|
@@ -26,54 +26,57 @@
|
|
|
26
26
|
|
|
27
27
|
// ── DOM refs ───────────────────────────────────────────────────────────────
|
|
28
28
|
const $ = K.$;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
29
|
+
function _buildEl() {
|
|
30
|
+
return {
|
|
31
|
+
tabs: {
|
|
32
|
+
knowledge: $('tab-knowledge'),
|
|
33
|
+
search: $('tab-search'),
|
|
34
|
+
sessions: $('tab-sessions'),
|
|
35
|
+
embeddings: $('tab-embeddings'),
|
|
36
|
+
},
|
|
37
|
+
views: {
|
|
38
|
+
knowledge: $('view-knowledge'),
|
|
39
|
+
search: $('view-search'),
|
|
40
|
+
sessions: $('view-sessions'),
|
|
41
|
+
embeddings: $('view-embeddings'),
|
|
42
|
+
},
|
|
43
|
+
knowledgeGrid: $('knowledge-grid'),
|
|
44
|
+
knowledgeEmpty: $('knowledge-empty'),
|
|
45
|
+
knowledgeCategories: $('knowledge-categories'),
|
|
46
|
+
knowledgeSearchInput: $('knowledge-search-input'),
|
|
47
|
+
knowledgeSearchResults: $('knowledge-search-results'),
|
|
48
|
+
btnConsolidate: $('btn-consolidate'),
|
|
49
|
+
btnReflect: $('btn-reflect'),
|
|
50
|
+
searchInput: $('search-input'),
|
|
51
|
+
searchResults: $('search-results'),
|
|
52
|
+
searchEmpty: $('search-empty'),
|
|
53
|
+
searchRoleFilters: $('search-role-filters'),
|
|
54
|
+
modeRanked: $('mode-ranked'),
|
|
55
|
+
modeSemantic: $('mode-semantic'),
|
|
56
|
+
modeRegex: $('mode-regex'),
|
|
57
|
+
sessionsList: $('sessions-list'),
|
|
58
|
+
sessionsEmpty: $('sessions-empty'),
|
|
59
|
+
sessionProjectFilter: $('session-project-filter'),
|
|
60
|
+
searchScopes: $('search-scopes'),
|
|
61
|
+
sidePanel: $('side-panel'),
|
|
62
|
+
panelTitle: $('panel-title'),
|
|
63
|
+
panelBody: $('panel-body'),
|
|
64
|
+
panelClose: $('panel-close'),
|
|
65
|
+
connectionStatus: $('connection-status'),
|
|
66
|
+
statKnowledge: $('stat-knowledge'),
|
|
67
|
+
statSessions: $('stat-sessions'),
|
|
68
|
+
statVectors: $('stat-vectors'),
|
|
69
|
+
embeddingsStatsGrid: $('embedding-stats-grid'),
|
|
70
|
+
embeddingsEmpty: $('embeddings-empty'),
|
|
71
|
+
embeddingsStatus: $('embeddings-status'),
|
|
72
|
+
themeToggle: $('theme-toggle'),
|
|
73
|
+
version: $('version'),
|
|
74
|
+
loadingOverlay: $('loading-overlay'),
|
|
75
|
+
toastContainer: $('toast-container'),
|
|
76
|
+
contentWrapper: $('content-wrapper'),
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
let el = _buildEl();
|
|
77
80
|
|
|
78
81
|
// Expose state and el for module access
|
|
79
82
|
K._state = state;
|
|
@@ -207,7 +210,7 @@
|
|
|
207
210
|
function switchTab(name, updateHash = true) {
|
|
208
211
|
if (state.activeTab === name) return;
|
|
209
212
|
state.activeTab = name;
|
|
210
|
-
if (updateHash) location.hash = '#' + name;
|
|
213
|
+
if (updateHash && K._root === document) location.hash = '#' + name;
|
|
211
214
|
|
|
212
215
|
Object.keys(el.tabs).forEach((k) => {
|
|
213
216
|
const active = k === name;
|
|
@@ -485,23 +488,26 @@
|
|
|
485
488
|
// ── Init ───────────────────────────────────────────────────────────────────
|
|
486
489
|
|
|
487
490
|
async function init() {
|
|
491
|
+
el = _buildEl();
|
|
488
492
|
K.initTheme();
|
|
489
493
|
bindEvents();
|
|
490
494
|
K.initSessionScroll(state, el);
|
|
491
495
|
wsConnect();
|
|
492
496
|
|
|
493
|
-
// Restore tab from URL hash
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
497
|
+
// Restore tab from URL hash (standalone mode only)
|
|
498
|
+
if (K._root === document) {
|
|
499
|
+
const hash = location.hash.replace('#', '');
|
|
500
|
+
const validTabs = Object.keys(el.tabs);
|
|
501
|
+
if (hash && validTabs.includes(hash)) {
|
|
502
|
+
switchTab(hash, false);
|
|
503
|
+
}
|
|
499
504
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
+
// Listen for back/forward navigation
|
|
506
|
+
window.addEventListener('hashchange', () => {
|
|
507
|
+
const h = location.hash.replace('#', '');
|
|
508
|
+
if (h && validTabs.includes(h)) switchTab(h, false);
|
|
509
|
+
});
|
|
510
|
+
}
|
|
505
511
|
|
|
506
512
|
// Load initial data in parallel
|
|
507
513
|
try {
|
|
@@ -513,7 +519,7 @@
|
|
|
513
519
|
// Hide loading overlay after a short delay if ws hasn't connected
|
|
514
520
|
setTimeout(() => {
|
|
515
521
|
el.loadingOverlay.classList.add('hidden');
|
|
516
|
-
},
|
|
522
|
+
}, 2000);
|
|
517
523
|
}
|
|
518
524
|
|
|
519
525
|
// ── Plugin mount / unmount ─────────────────────────────────────────────────
|
|
@@ -546,13 +552,13 @@
|
|
|
546
552
|
var pluginStyle = document.createElement('style');
|
|
547
553
|
pluginStyle.textContent =
|
|
548
554
|
':host { display:block; width:100%; height:100%; overflow:hidden; }' +
|
|
549
|
-
'.ak-wrapper { font-family:var(--font-sans); font-size:14px; color:var(--text); background:var(--bg); line-height:1.5; width:100%; height:100%; overflow:hidden; }'
|
|
550
|
-
'.ak-wrapper #app { height:100%; }';
|
|
555
|
+
'.ak-wrapper { font-family:var(--font-sans); font-size:14px; color:var(--text); background:var(--bg); line-height:1.5; width:100%; height:100%; overflow:hidden; display:flex; flex-direction:column; }';
|
|
551
556
|
shadow.appendChild(pluginStyle);
|
|
552
557
|
|
|
553
558
|
if (typeof K._template === 'function') {
|
|
554
559
|
var wrapper = document.createElement('div');
|
|
555
|
-
wrapper.className = '
|
|
560
|
+
wrapper.className = 'ak-wrapper';
|
|
561
|
+
wrapper.setAttribute('data-theme', 'dark');
|
|
556
562
|
wrapper.innerHTML = K._template();
|
|
557
563
|
shadow.appendChild(wrapper);
|
|
558
564
|
}
|
package/dist/ui/render-panel.js
CHANGED
|
@@ -28,9 +28,10 @@
|
|
|
28
28
|
function closePanel() {
|
|
29
29
|
const state = K._state;
|
|
30
30
|
const el = K._el;
|
|
31
|
+
if (!el || !el.sidePanel) return;
|
|
31
32
|
state.panel = { open: false, type: null, data: null };
|
|
32
33
|
el.sidePanel.classList.remove('open');
|
|
33
|
-
el.contentWrapper.classList.remove('panel-visible');
|
|
34
|
+
if (el.contentWrapper) el.contentWrapper.classList.remove('panel-visible');
|
|
34
35
|
el.sidePanel.addEventListener(
|
|
35
36
|
'transitionend',
|
|
36
37
|
function handler() {
|
package/dist/ui/ui-utils.js
CHANGED
|
@@ -127,10 +127,13 @@
|
|
|
127
127
|
t.innerHTML = `<span class="material-symbols-outlined toast-icon">${icons[type] || 'info'}</span>
|
|
128
128
|
<span class="toast-msg">${esc(msg)}</span>`;
|
|
129
129
|
container.appendChild(t);
|
|
130
|
-
requestAnimationFrame(() => t.classList.add('show'));
|
|
131
130
|
setTimeout(() => {
|
|
132
|
-
t.classList.
|
|
133
|
-
t.addEventListener('
|
|
131
|
+
t.classList.add('fade-out');
|
|
132
|
+
t.addEventListener('animationend', () => t.remove());
|
|
133
|
+
// Fallback removal if animationend doesn't fire
|
|
134
|
+
setTimeout(() => {
|
|
135
|
+
if (t.parentNode) t.remove();
|
|
136
|
+
}, 500);
|
|
134
137
|
}, duration);
|
|
135
138
|
}
|
|
136
139
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-knowledge",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.13",
|
|
4
4
|
"description": "Cross-session memory and recall for AI agents — git-synced knowledge base, knowledge graph, confidence scoring, hybrid semantic+TF-IDF search, auto-distillation with secrets scrubbing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|