deepseek-plastic-memory 3.3.8 → 3.3.9
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/package.json +1 -1
- package/public/sky/app.js +16 -4
- package/public/sky/app.js.bak +16 -4
package/package.json
CHANGED
package/public/sky/app.js
CHANGED
|
@@ -1613,26 +1613,30 @@ function applyThemeGlyphs() {
|
|
|
1613
1613
|
|
|
1614
1614
|
function applyDim() {
|
|
1615
1615
|
const sel = state.sel
|
|
1616
|
+
const searching = !!state.query
|
|
1616
1617
|
// 只有选中「星辰」才虚化别的星云;点开一条记忆不动星系明暗
|
|
1617
1618
|
const starSel = sel && (sel.kind === 'main' || sel.kind === 'sub')
|
|
1618
1619
|
const focusK = starSel ? (sel.kind === 'main' ? sel.k : (subs.get(sel.k)?.parentK || '')) : ''
|
|
1619
1620
|
const focusMain = focusK ? (subs.has(focusK) ? subs.get(focusK).parentK : focusK) : ''
|
|
1620
1621
|
|
|
1622
|
+
// 搜索是全局的:不管当前选中了哪个分区,命中的记忆都要亮起来
|
|
1621
1623
|
for (const [k, node] of mains) {
|
|
1624
|
+
if (searching) { node.dimTarget = 0.5; continue }
|
|
1622
1625
|
const related = !focusMain || k === focusMain
|
|
1623
1626
|
node.dimTarget = related ? 1 : 0.16
|
|
1624
1627
|
}
|
|
1625
1628
|
for (const [k, node] of subs) {
|
|
1629
|
+
if (searching) { node.dimTarget = 0.4; continue }
|
|
1626
1630
|
const related = !focusMain || node.parentK === focusMain
|
|
1627
1631
|
const onPath = sel && sel.kind === 'sub' ? sel.k === k : related
|
|
1628
1632
|
node.dimTarget = onPath ? 1 : (related ? 0.55 : 0.12)
|
|
1629
1633
|
}
|
|
1630
|
-
const dimMem = !!focusMain || state.pinnedOnly ||
|
|
1634
|
+
const dimMem = !!focusMain || state.pinnedOnly || searching
|
|
1631
1635
|
const onlyMem = !!(sel && sel.kind === 'mem')
|
|
1632
1636
|
for (const [id, node] of mems) {
|
|
1633
1637
|
let target = 1
|
|
1634
|
-
if (
|
|
1635
|
-
else if (state.
|
|
1638
|
+
if (searching) target = state.matches.has(id) ? 1 : 0.1
|
|
1639
|
+
else if (state.pinnedOnly && !node.mem.pinned) target = 0.15
|
|
1636
1640
|
else if (onlyMem) target = sel.id === id ? 1 : 0.55
|
|
1637
1641
|
else if (focusMain && node.folder !== focusK && !(subs.has(node.folder) && subs.get(node.folder).parentK === focusMain)) target = 0.18
|
|
1638
1642
|
node.dimTarget = dimMem || sel ? target : 1
|
|
@@ -2283,7 +2287,15 @@ async function boot() {
|
|
|
2283
2287
|
} else toast(r.error || '没删掉', 'bad')
|
|
2284
2288
|
})
|
|
2285
2289
|
}
|
|
2286
|
-
$('search').addEventListener('
|
|
2290
|
+
$('search').addEventListener('focus', () => {
|
|
2291
|
+
if (state.sel && state.sel.kind !== 'mem') {
|
|
2292
|
+
state.sel = null
|
|
2293
|
+
applyDim()
|
|
2294
|
+
renderPanel()
|
|
2295
|
+
}
|
|
2296
|
+
})
|
|
2297
|
+
|
|
2298
|
+
$('search').addEventListener('input', (e) => {
|
|
2287
2299
|
clearTimeout(searchTimer)
|
|
2288
2300
|
const v = e.target.value
|
|
2289
2301
|
searchTimer = setTimeout(() => onSearch(v), 130)
|
package/public/sky/app.js.bak
CHANGED
|
@@ -1613,26 +1613,30 @@ function applyThemeGlyphs() {
|
|
|
1613
1613
|
|
|
1614
1614
|
function applyDim() {
|
|
1615
1615
|
const sel = state.sel
|
|
1616
|
+
const searching = !!state.query
|
|
1616
1617
|
// 只有选中「星辰」才虚化别的星云;点开一条记忆不动星系明暗
|
|
1617
1618
|
const starSel = sel && (sel.kind === 'main' || sel.kind === 'sub')
|
|
1618
1619
|
const focusK = starSel ? (sel.kind === 'main' ? sel.k : (subs.get(sel.k)?.parentK || '')) : ''
|
|
1619
1620
|
const focusMain = focusK ? (subs.has(focusK) ? subs.get(focusK).parentK : focusK) : ''
|
|
1620
1621
|
|
|
1622
|
+
// 搜索是全局的:不管当前选中了哪个分区,命中的记忆都要亮起来
|
|
1621
1623
|
for (const [k, node] of mains) {
|
|
1624
|
+
if (searching) { node.dimTarget = 0.5; continue }
|
|
1622
1625
|
const related = !focusMain || k === focusMain
|
|
1623
1626
|
node.dimTarget = related ? 1 : 0.16
|
|
1624
1627
|
}
|
|
1625
1628
|
for (const [k, node] of subs) {
|
|
1629
|
+
if (searching) { node.dimTarget = 0.4; continue }
|
|
1626
1630
|
const related = !focusMain || node.parentK === focusMain
|
|
1627
1631
|
const onPath = sel && sel.kind === 'sub' ? sel.k === k : related
|
|
1628
1632
|
node.dimTarget = onPath ? 1 : (related ? 0.55 : 0.12)
|
|
1629
1633
|
}
|
|
1630
|
-
const dimMem = !!focusMain || state.pinnedOnly ||
|
|
1634
|
+
const dimMem = !!focusMain || state.pinnedOnly || searching
|
|
1631
1635
|
const onlyMem = !!(sel && sel.kind === 'mem')
|
|
1632
1636
|
for (const [id, node] of mems) {
|
|
1633
1637
|
let target = 1
|
|
1634
|
-
if (
|
|
1635
|
-
else if (state.
|
|
1638
|
+
if (searching) target = state.matches.has(id) ? 1 : 0.1
|
|
1639
|
+
else if (state.pinnedOnly && !node.mem.pinned) target = 0.15
|
|
1636
1640
|
else if (onlyMem) target = sel.id === id ? 1 : 0.55
|
|
1637
1641
|
else if (focusMain && node.folder !== focusK && !(subs.has(node.folder) && subs.get(node.folder).parentK === focusMain)) target = 0.18
|
|
1638
1642
|
node.dimTarget = dimMem || sel ? target : 1
|
|
@@ -2283,7 +2287,15 @@ async function boot() {
|
|
|
2283
2287
|
} else toast(r.error || '没删掉', 'bad')
|
|
2284
2288
|
})
|
|
2285
2289
|
}
|
|
2286
|
-
$('search').addEventListener('
|
|
2290
|
+
$('search').addEventListener('focus', () => {
|
|
2291
|
+
if (state.sel && state.sel.kind !== 'mem') {
|
|
2292
|
+
state.sel = null
|
|
2293
|
+
applyDim()
|
|
2294
|
+
renderPanel()
|
|
2295
|
+
}
|
|
2296
|
+
})
|
|
2297
|
+
|
|
2298
|
+
$('search').addEventListener('input', (e) => {
|
|
2287
2299
|
clearTimeout(searchTimer)
|
|
2288
2300
|
const v = e.target.value
|
|
2289
2301
|
searchTimer = setTimeout(() => onSearch(v), 130)
|