@ -268,7 +268,8 @@ window.__ModuleLoader__.load({
fontSize : "12px" ,
maxWidth : "100%" ,
whiteSpace : "nowrap" ,
flex : "0 0 auto"
overflow : "hidden" ,
flex : "0 1 auto"
} ,
table : {
width : "100%" ,
@ -485,7 +486,15 @@ window.__ModuleLoader__.load({
const h$13 = react . createElement ;
function Pill$1 ( props ) {
var tone = styles [ props . tone ] === void 0 ? styles . muted : styles [ props . tone ] ;
return h$13 ( "span" , { style : Object . assign ( { } , styles . pill , tone ) } , h$13 ( "span" , { style : { opacity : . 75 } } , props . label ) , h$13 ( "span" , { style : { fontWeight : 600 } } , String ( props . value ) ) ) ;
return h$13 ( "span" , { style : Object . assign ( { } , styles . pill , tone ) } , h$13 ( "span" , { style : {
opacity : . 75 ,
flex : "0 0 auto"
} } , props . label ) , h$13 ( "span" , { style : {
fontWeight : 600 ,
overflow : "hidden" ,
textOverflow : "ellipsis" ,
minWidth : 0
} } , String ( props . value ) ) ) ;
}
function Banner ( props ) {
var tone = styles [ props . tone ] === void 0 ? styles . muted : styles [ props . tone ] ;
@ -4131,7 +4140,7 @@ window.__ModuleLoader__.load({
} ) ) ) ;
}
// \0dsh-brain-css:src-client/panel/BrainPanel.module.css.mjs
const css = "/* Adapted from dsh-mnemon MnemonWorkspace.dshbrain_1xedgey.dshbrain_holtzx (MIT), see vendor/dsh-mnemon/LICENSE. */\n.dshbrain_1y11fqi {\n box-sizing: border-box;\n position: relative;\n z-index: 2;\n display: flex;\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n flex: 1 1 auto;\n padding-block-start: var(--dsh-frame-top-clearance, 0px);\n}\n\n.dshbrain_1y11fqi > * {\n min-width: 0;\n flex: 1 1 auto;\n}\n\n.dshbrain_131vunv {\n position: absolute;\n inset: 0 0 auto;\n height: var(--dsh-frame-top-clearance, 0px);\n}\n\n.dshbrain_oyvdy4 {\n display: flex;\n flex-direction: column;\n gap: 14px;\n padding: 18px 20px 24px;\n overflow: auto;\n font-size: 13px;\n line-height: 1.55;\n color: var(--dsw-alias-label-primary, inherit);\n}\n\n.dshbrain_of3f1r {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.dshbrain_vnw8w9 {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.dshbrain_g8fis8 {\n margin: 0;\n font-size: 16px;\n font-weight: 650;\n letter-spacing: 0.01em;\n}\n\n.dshbrain_1milhhm {\n margin: 0;\n font-size: 11.5px;\n opacity: 0.58;\n}\n\n.dshbrain_xnx8bm {\n display: flex;\n gap: 4px;\n padding: 3px;\n border-radius: 13px;\n border: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.22));\n background: var(--dsw-alias-bg-subtle, rgba(127,127,127,0.06));\n flex-wrap: wrap;\n}\n\n.dshbrain_7mndvh {\n flex: 1 1 auto;\n min-width: 88px;\n font: inherit;\n font-size: 12.5px;\n padding: 7px 12px;\n border-radius: 10px;\n border: 1px solid transparent;\n background: transparent;\n color: inherit;\n cursor: pointer;\n white-space: nowrap;\n}\n\n.dshbrain_rvx7lj {\n border: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.30));\n background: var(--dsw-alias-interactive-bg-hover, rgba(127,127,127,0.14));\n box-shadow: 0 1px 3px rgba(0,0,0,0.10);\n font-weight: 600;\n}\n\n.dshbrain_1rfmkcf {\n display: flex;\n flex-direction: column;\n gap: 12px;\n min-width: 0;\n}\n\n.dshbrain_c36neh {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.dshbrain_1a7ley4 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n border: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.22));\n border-radius: 16px;\n padding: 16px 18px;\n min-width: 0;\n}\n\n.dshbrain_1f1qv8u {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.dshbrain_1t5691m {\n margin: 0;\n font-size: 13.5px;\n font-weight: 650;\n}\n\n.dshbrain_updgou {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.dshbrain_xwrsl5 {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 3px 10px;\n border-radius: 999px;\n border: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.35));\n font-size: 12px;\n white-space: nowrap;\n }\n\n.dshbrain_mvsf69 {\n opacity: 0.75;\n}\n\n.dshbrain_1xby9uu {\n font-weight: 600;\n}\n\n.dshbrain_1bzyta0 { border-color: rgba(22,163,74,0.55); background: rgba(22,163,74,0.12); }\n.dshbrain_1hx5ob5 { border-color: rgba(220,38,38,0.55); background: rgba(220,38,38,0.12); }\n.dshbrain_amukxq { border-color: rgba(217,119,6,0.55); background: rgba(217,119,6,0.12); }\n.dshbrain_uf6ztt { }\n\n.dshbrain_1vi102j {\n margin: 0;\n font-size: 11.5px;\n opacity: 0.58;\n}\n\n.dshbrain_qmj948 {\n padding: 10px 13px;\n border-radius: 11px;\n border: 1px solid rgba(220,38,38,0.55);\n background: rgba(220,38,38,0.12);\n font-size: 12.5px;\n}\n\n.dshbrain_1ex8b80 {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n}\n\n.dshbrain_1048ygk {\n display: inline-flex;\n align-items: baseline;\n gap: 6px;\n padding-right: 18px;\n margin-right: 18px;\n border-right: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.20));\n}\n\n.dshbrain_1bvujjo {\n display: inline-flex;\n align-items: baseline;\n gap: 6px;\n}\n\n.dshbrain_d75ahw {\n font-size: 17px;\n font-weight: 700;\n}\n";
const css = " /* Adapted from dsh-mnemon MnemonWorkspace.dshbrain_1xedgey.dshbrain_holtzx (MIT), see vendor/dsh-mnemon/LICENSE. */\n.dshbrain_1y11fqi {\n box-sizing: border-box;\n position: relative;\n z-index: 2;\n display: flex;\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n flex: 1 1 auto;\n padding-block-start: var(--dsh-frame-top-clearance, 0px);\n}\n\n.dshbrain_1y11fqi > * {\n min-width: 0;\n flex: 1 1 auto;\n}\n\n.dshbrain_131vunv {\n position: absolute;\n inset: 0 0 auto;\n height: var(--dsh-frame-top-clearance, 0px);\n}\n\n.dshbrain_oyvdy4 {\n display: flex;\n flex-direction: column;\n gap: 14px;\n padding: 18px 20px 24px;\n overflow: auto;\n font-size: 13px;\n line-height: 1.55;\n color: var(--dsw-alias-label-primary, inherit);\n}\n\n.dshbrain_of3f1r {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.dshbrain_vnw8w9 {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.dshbrain_g8fis8 {\n margin: 0;\n font-size: 16px;\n font-weight: 650;\n letter-spacing: 0.01em;\n}\n\n.dshbrain_1milhhm {\n margin: 0;\n font-size: 11.5px;\n opacity: 0.58;\n}\n\n.dshbrain_xnx8bm {\n display: flex;\n gap: 4px;\n padding: 3px;\n border-radius: 13px;\n border: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.22));\n background: var(--dsw-alias-bg-subtle, rgba(127,127,127,0.06));\n flex-wrap: wrap;\n}\n\n.dshbrain_7mndvh {\n flex: 1 1 auto;\n min-width: 88px;\n font: inherit;\n font-size: 12.5px;\n padding: 7px 12px;\n border-radius: 10px;\n border: 1px solid transparent;\n background: transparent;\n color: inherit;\n cursor: pointer;\n white-space: nowrap;\n}\n\n.dshbrain_rvx7lj {\n border: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.30));\n background: var(--dsw-alias-interactive-bg-hover, rgba(127,127,127,0.14));\n box-shadow: 0 1px 3px rgba(0,0,0,0.10);\n font-weight: 600;\n}\n\n.dshbrain_1rfmkcf {\n display: flex;\n flex-direction: column;\n gap: 12px;\n min-width: 0;\n}\n\n.dshbrain_c36neh {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.dshbrain_1a7ley4 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n border: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.22));\n border-radius: 16px;\n padding: 16px 18px;\n min-width: 0;\n}\n\n.dshbrain_1f1qv8u {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.dshbrain_1t5691m {\n margin: 0;\n font-size: 13.5px;\n font-weight: 650;\n}\n\n.dshbrain_updgou {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.dshbrain_xwrsl5 {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 3px 10px;\n border-radius: 999px;\n border: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.35));\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n max-width: 100%;\n}\n\n.dshbrain_mvsf69 {\n opacity: 0.75;\n flex: 0 0 auto;\n}\n\n.dshbrain_1xby9uu {\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n}\n\n.dshbrain_1bzyta0 { border-color: rgba(22,163,74,0.55); background: rgba(22,163,74,0.12); }\n.dshbrain_1hx5ob5 { border-color: rgba(220,38,38,0.55); background: rgba(220,38,38,0.12); }\n.dshbrain_amukxq { border-color: rgba(217,119,6,0.55); background: rgba(217,119,6,0.12); }\n.dshbrain_uf6ztt { }\n\n.dshbrain_1vi102j {\n margin: 0;\n font-size: 11.5px;\n opacity: 0.58;\n}\n\n.dshbrain_qmj948 {\n padding: 10px 13px;\n border-radius: 11px;\n border: 1px solid rgba(220,38,38,0.55);\n background: rgba(220,38,38,0.12);\n font-size: 12.5px;\n}\n\n.dshbrain_1ex8b80 {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n}\n\n.dshbrain_1048ygk {\n display: inline-flex;\n align-items: baseline;\n gap: 6px;\n padding-right: 18px;\n margin-right: 18px;\n border-right: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.20));\n}\n\n.dshbrain_1bvujjo {\n display: inline-flex;\n align-items: baseline;\n gap: 6px;\n}\n\n.dshbrain_d75ahw {\n font-size: 17px;\n font-weight: 700;\n}\n ";
const tagId = "src-client/panel/BrainPanel.module.css" ;
if ( typeof document !== "undefined" && typeof document . querySelector === "function" && typeof document . createElement === "function" ) {
let tag = document . querySelector ( "style[data-plugin-css=" + JSON . stringify ( tagId ) + "]" ) ;
@ -4202,23 +4211,25 @@ window.__ModuleLoader__.load({
if ( ! active ) return ;
let cancelled = false ;
const load = async ( ) => {
try {
const [ statusResult , capabilitiesResult , memoryResult ] = await Promise . all ( [
request ( API . status ) ,
request ( API . capabilities ) ,
request ( "/dsh-brain/local-memory/status?scope=global" )
] ) ;
if ( cancelled ) return ;
if ( statusResult . status === 200 && statusResult . body !== null && statusResult . body . ok === true ) {
setStatus ( statusResult . body ) ;
const [ statusSettled , capabilitiesSettled , memorySettled ] = await Promise . allSettled ( [
request ( API . status ) ,
request ( API . capabilities ) ,
request ( "/dsh-brain/local-memory/status?scope=global" )
] ) ;
if ( cancelled ) return ;
if ( statusSettled . status === "fulfilled" ) {
const result = statusSettled . value ;
if ( result . status === 200 && result . body !== null && result . body . ok === true ) {
setStatus ( result . body ) ;
setError ( null ) ;
} else setError ( "读取插件状态失败( HTTP " + String ( statusResult . status ) + ") " ) ;
if ( capabilitiesResult . status === 200 && capabilitiesResult . body !== null && capabilitiesResult . body . ok === true ) setCapabilities ( capabilitiesResult . body ) ;
if ( memoryResult . status === 200 && memoryResult . body !== null && memoryResult . body . ok === true ) setMemory ( memoryResult . body ) ;
else setMemory ( null ) ;
} catch ( failure ) {
if ( ! cancelled ) setError ( messageOf ( failure ) ) ;
} else setError ( "读取插件状态失败( HTTP " + String ( result . status ) + ") " ) ;
} else setError ( messageOf ( statusSettled . reason ) ) ;
if ( capabilitiesSettled . status === "fulfilled" ) {
const result = capabilitiesSettled . value ;
if ( result . status === 200 && result . body !== null && result . body . ok === true ) setCapabilities ( result . body ) ;
}
if ( memorySettled . status === "fulfilled" && memorySettled . value . status === 200 && memorySettled . value . body !== null && memorySettled . value . body . ok === true ) setMemory ( memorySettled . value . body ) ;
else setMemory ( null ) ;
} ;
load ( ) ;
const timer = setInterval ( ( ) => {
@ -4446,7 +4457,7 @@ window.__ModuleLoader__.load({
variant : "small" ,
onClick : ( ) => memories . reload ( )
} ) )
} , notice === null ? null : h$4 ( Banner , { tone : notice . tone } , notice . text ) , memories . error === null ? null : h$4 ( Banner , { tone : "bad" } , memories . error ) , memories . status === "loading" && items . length === 0 ? h$4 ( "p" , { style : styles . hint } , "正在读取记忆…" ) : null , filtered . length === 0 ? h$4 ( "p" , { style : styles . hint } , "当前页没有匹配的记忆条目。" ) : h$4 ( "div" , { style : {
} , notice === null ? null : h$4 ( Banner , { tone : notice . tone } , notice . text ) , memories . error === null ? null : h$4 ( Banner , { tone : "bad" } , memories . error ) , memories . status === "loading" && items . length === 0 ? h$4 ( "p" , { style : styles . hint } , "正在读取记忆…" ) : null , filtered . length === 0 ? h$4 ( "p" , { style : styles . hint } , total === 0 && needle === "" ? "还没有记忆条目。对话中让助手记住,或用 memory_add 写入。" : "当前页没有匹配的记忆条目。" ) : h$4 ( "div" , { style : {
display : "flex" ,
flexDirection : "column" ,
gap : "8px"
@ -4666,7 +4677,7 @@ window.__ModuleLoader__.load({
} ,
layout : {
display : "grid" ,
gridTemplateColumns : " minmax(240px, .78fr) minmax(0, 1.55fr )",
gridTemplateColumns : " repeat(auto-fit, minmax(min(240px, 100%), 1fr) )",
gap : "12px" ,
alignItems : "start"
} ,