dsh-galatea 0.3.10 → 0.3.11
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/store.js +11 -2
- package/package.json +1 -1
package/lib/store.js
CHANGED
|
@@ -107,7 +107,12 @@ export function appendEntry(id, title, body) {
|
|
|
107
107
|
export function renderIndex({ limit = 12 } = {}) {
|
|
108
108
|
const dir = entriesDir();
|
|
109
109
|
if (!existsSync(dir)) {
|
|
110
|
-
return
|
|
110
|
+
return [
|
|
111
|
+
'【Galatea 记忆 · 还没开始】',
|
|
112
|
+
'还没有记下任何事。不是读不到——是还没有人往里写第一条。',
|
|
113
|
+
'你可以说「帮我记住……」,说一次它就记一条;',
|
|
114
|
+
'记下之后这里会列出标题,正文等你问到再读。',
|
|
115
|
+
].join('\n');
|
|
111
116
|
}
|
|
112
117
|
let list;
|
|
113
118
|
try {
|
|
@@ -116,7 +121,11 @@ export function renderIndex({ limit = 12 } = {}) {
|
|
|
116
121
|
return `【Galatea 记忆 · 读不到】\n目录存在,但列不出来:${err && err.message}`;
|
|
117
122
|
}
|
|
118
123
|
if (list.length === 0) {
|
|
119
|
-
return
|
|
124
|
+
return [
|
|
125
|
+
'【Galatea 记忆 · 空】',
|
|
126
|
+
'目录在,里面还没有条目。这是空,不是读不到。',
|
|
127
|
+
'你可以说「帮我记住……」,说一次它就记一条。',
|
|
128
|
+
].join('\n');
|
|
120
129
|
}
|
|
121
130
|
const shown = list.slice(0, limit);
|
|
122
131
|
const more = list.length - shown.length;
|