dsh-cyrene-theme-change 0.8.0 → 0.8.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/lib/index.js +8 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2809,6 +2809,8 @@ export function apply(ctx, config) {
|
|
|
2809
2809
|
remountMemory(ctx.systemPrompt)
|
|
2810
2810
|
remountRelationship(ctx.systemPrompt)
|
|
2811
2811
|
disposeTools = registerMemoryTools(ctx)
|
|
2812
|
+
}).catch((error) => {
|
|
2813
|
+
ctx.logger?.warn?.(`${PACKAGE_ID}: 记忆工具注册失败(已跳过)`, error)
|
|
2812
2814
|
})
|
|
2813
2815
|
return () => {
|
|
2814
2816
|
if (disposeTools !== null) {
|
|
@@ -2893,6 +2895,8 @@ export function apply(ctx, config) {
|
|
|
2893
2895
|
void ensureWorldbook(ctx).then(() => {
|
|
2894
2896
|
remountWorldbook(ctx.systemPrompt)
|
|
2895
2897
|
disposeWorldbookTools = registerWorldbookTools(ctx)
|
|
2898
|
+
}).catch((error) => {
|
|
2899
|
+
ctx.logger?.warn?.(`${PACKAGE_ID}: 世界书工具注册失败(已跳过)`, error)
|
|
2896
2900
|
})
|
|
2897
2901
|
return () => {
|
|
2898
2902
|
if (disposeWorldbookTools !== null) {
|
|
@@ -2916,12 +2920,16 @@ export function apply(ctx, config) {
|
|
|
2916
2920
|
|
|
2917
2921
|
// 设定与表情包清单都就绪之后再重挂一次:文件里的版本盖过默认底稿,
|
|
2918
2922
|
// 人格正文也顺带带上表情包约定。
|
|
2923
|
+
// ⚠️ 必须带 catch:Node 18+ 的未处理 rejection 默认会**直接结束进程**,
|
|
2924
|
+
// 那样整个 DSH 宿主(用户的 GUI)都会被这个插件带走。这里降级成一条 warn。
|
|
2919
2925
|
void Promise.all([ensureLoaded(ctx), ensureStickers(ctx), ensureBackgrounds(ctx), ensureHero(ctx), ensureMemories(ctx), ensureWorldbook(ctx)]).then(() => {
|
|
2920
2926
|
remountPersona(ctx.systemPrompt)
|
|
2921
2927
|
remountMemory(ctx.systemPrompt)
|
|
2922
2928
|
remountRelationship(ctx.systemPrompt)
|
|
2923
2929
|
remountWorldbook(ctx.systemPrompt)
|
|
2924
2930
|
ctx.logger?.info?.(`${PACKAGE_ID}: 表情包 ${stickers.items.length} 张(清单 ${STICKER_FILE});欢迎页形象 ${heroAsset.ready === true ? state.hero.image : '未就绪(' + heroAsset.reason + ')'}`)
|
|
2931
|
+
}).catch((error) => {
|
|
2932
|
+
ctx.logger?.warn?.(`${PACKAGE_ID}: 启动初始化失败(已降级,其余功能照常)`, error)
|
|
2925
2933
|
})
|
|
2926
2934
|
|
|
2927
2935
|
// fenced 状态路由。GET /cyrene/state 读,POST /cyrene/state 写。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-cyrene-theme-change",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "昔涟(Cyrene)主题:粉白渐变毛玻璃 UI + 侧边栏可编辑的人格设定 + 表情包 / 背景图 / 世界书 + 认知记忆(L0/L1/L2 分层、成色衰减、语义召回、账本与健康行、压缩反思)与关系情绪 | A Cyrene (Honkai: Star Rail) theme for DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|