dsh-mini-remote 0.1.8 → 0.2.0
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/CHANGELOG.md +62 -0
- package/README.en.md +13 -7
- package/README.md +13 -7
- package/lib/commands.js +6 -0
- package/lib/events.js +8 -3
- package/lib/history.js +7 -2
- package/lib/index.js +818 -18
- package/lib/mirror.js +1422 -0
- package/lib/page.html +2818 -152
- package/lib/page.js +3 -1
- package/lib/permissions.js +1 -0
- package/lib/server.js +641 -7
- package/lib/session-meta-cache.js +100 -0
- package/lib/store.js +273 -3
- package/lib/subagent-cache.js +63 -0
- package/lib/trajectory.js +570 -0
- package/lib/tree.js +30 -8
- package/package.json +2 -2
package/lib/page.js
CHANGED
|
@@ -19,7 +19,9 @@ let template = null
|
|
|
19
19
|
export function renderPage({ defaultMode = 'minimal', needsToken = false, build = '', maxUpload = 0 } = {}) {
|
|
20
20
|
if (template === null) template = readFileSync(PAGE_PATH, 'utf8')
|
|
21
21
|
return template
|
|
22
|
-
|
|
22
|
+
// 三种显示模式都认(单帧/聊天/完整);不认识的值一律回落单帧——回落要卡在这一处,
|
|
23
|
+
// 各处自己挑认哪几个,迟早出现「存得进去、刷新就变回去」的对不上。
|
|
24
|
+
.replace('__DEFAULT_MODE__', ['chat', 'full'].includes(defaultMode) ? defaultMode : 'minimal')
|
|
23
25
|
.replace('__NEEDS_TOKEN__', needsToken ? 'true' : 'false')
|
|
24
26
|
// 立绘地址带上构建指纹(页面自己拼 ?v=__BUILD__),换了图浏览器就不会一直
|
|
25
27
|
// 拿缓存里那张。只留字母数字,别让它有机会往 HTML 里塞东西。
|