@geminilight/mindos 0.5.55 → 0.5.56
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/app/components/echo/EchoSegmentPageClient.tsx +27 -11
- package/app/lib/i18n-en.ts +22 -8
- package/app/lib/i18n-zh.ts +24 -8
- package/app/next-env.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useCallback, useEffect, useId, useMemo, useState } from 'react';
|
|
4
4
|
import type { EchoSegment } from '@/lib/echo-segments';
|
|
5
5
|
import { buildEchoInsightUserPrompt } from '@/lib/echo-insight-prompt';
|
|
6
|
-
import type { Locale } from '@/lib/i18n';
|
|
6
|
+
import type { Locale, Messages } from '@/lib/i18n';
|
|
7
7
|
import { useLocale } from '@/lib/LocaleContext';
|
|
8
8
|
import { openAskModal } from '@/hooks/useAskModal';
|
|
9
9
|
import { EchoHero } from './EchoHero';
|
|
@@ -51,6 +51,21 @@ const inputClass =
|
|
|
51
51
|
const cardSectionClass =
|
|
52
52
|
'rounded-xl border border-border bg-card p-5 shadow-sm transition-[border-color,box-shadow] duration-150 ease-out hover:border-[var(--amber)]/20 hover:shadow-md sm:p-6';
|
|
53
53
|
|
|
54
|
+
function echoSnapshotCopy(segment: EchoSegment, p: Messages['echoPages']): { title: string; body: string } {
|
|
55
|
+
switch (segment) {
|
|
56
|
+
case 'about-you':
|
|
57
|
+
return { title: p.snapshotAboutYouTitle, body: p.snapshotAboutYouBody };
|
|
58
|
+
case 'continued':
|
|
59
|
+
return { title: p.snapshotContinuedTitle, body: p.snapshotContinuedBody };
|
|
60
|
+
case 'daily':
|
|
61
|
+
return { title: p.snapshotDailyTitle, body: p.snapshotDailyBody };
|
|
62
|
+
case 'past-you':
|
|
63
|
+
return { title: p.snapshotPastYouTitle, body: p.snapshotPastYouBody };
|
|
64
|
+
case 'growth':
|
|
65
|
+
return { title: p.snapshotGrowthTitle, body: p.snapshotGrowthBody };
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
54
69
|
export default function EchoSegmentPageClient({ segment }: { segment: EchoSegment }) {
|
|
55
70
|
const { t, locale } = useLocale();
|
|
56
71
|
const p = t.echoPages;
|
|
@@ -63,6 +78,8 @@ export default function EchoSegmentPageClient({ segment }: { segment: EchoSegmen
|
|
|
63
78
|
const [dailyLine, setDailyLine] = useState('');
|
|
64
79
|
const [growthIntent, setGrowthIntent] = useState('');
|
|
65
80
|
|
|
81
|
+
const snapshot = useMemo(() => echoSnapshotCopy(segment, p), [segment, p]);
|
|
82
|
+
|
|
66
83
|
useEffect(() => {
|
|
67
84
|
try {
|
|
68
85
|
const d = localStorage.getItem(STORAGE_DAILY);
|
|
@@ -106,8 +123,8 @@ export default function EchoSegmentPageClient({ segment }: { segment: EchoSegmen
|
|
|
106
123
|
segment,
|
|
107
124
|
segmentTitle: title,
|
|
108
125
|
factsHeading: p.factsHeading,
|
|
109
|
-
emptyTitle:
|
|
110
|
-
emptyBody:
|
|
126
|
+
emptyTitle: snapshot.title,
|
|
127
|
+
emptyBody: snapshot.body,
|
|
111
128
|
continuedDrafts: p.continuedDrafts,
|
|
112
129
|
continuedTodos: p.continuedTodos,
|
|
113
130
|
subEmptyHint: p.subEmptyHint,
|
|
@@ -121,8 +138,7 @@ export default function EchoSegmentPageClient({ segment }: { segment: EchoSegmen
|
|
|
121
138
|
segment,
|
|
122
139
|
title,
|
|
123
140
|
p.factsHeading,
|
|
124
|
-
|
|
125
|
-
p.emptyFactsBody,
|
|
141
|
+
snapshot,
|
|
126
142
|
p.continuedDrafts,
|
|
127
143
|
p.continuedTodos,
|
|
128
144
|
p.subEmptyHint,
|
|
@@ -133,8 +149,6 @@ export default function EchoSegmentPageClient({ segment }: { segment: EchoSegmen
|
|
|
133
149
|
],
|
|
134
150
|
);
|
|
135
151
|
|
|
136
|
-
const primaryBtnClass =
|
|
137
|
-
'inline-flex items-center rounded-lg bg-primary px-4 py-2.5 font-sans text-sm font-medium text-primary-foreground transition-opacity duration-150 hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring';
|
|
138
152
|
const secondaryBtnClass =
|
|
139
153
|
'inline-flex items-center rounded-lg border border-border bg-background px-4 py-2.5 font-sans text-sm font-medium text-foreground transition-colors duration-150 hover:border-[var(--amber)]/35 hover:bg-[var(--amber-dim)]/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring';
|
|
140
154
|
|
|
@@ -160,8 +174,8 @@ export default function EchoSegmentPageClient({ segment }: { segment: EchoSegmen
|
|
|
160
174
|
headingId={factsHeadingId}
|
|
161
175
|
heading={p.factsHeading}
|
|
162
176
|
snapshotBadge={p.snapshotBadge}
|
|
163
|
-
emptyTitle={
|
|
164
|
-
emptyBody={
|
|
177
|
+
emptyTitle={snapshot.title}
|
|
178
|
+
emptyBody={snapshot.body}
|
|
165
179
|
actions={
|
|
166
180
|
segment === 'about-you' ? (
|
|
167
181
|
<button type="button" onClick={openSegmentAsk} className={secondaryBtnClass}>
|
|
@@ -198,8 +212,9 @@ export default function EchoSegmentPageClient({ segment }: { segment: EchoSegmen
|
|
|
198
212
|
placeholder={p.dailyLinePlaceholder}
|
|
199
213
|
className={inputClass}
|
|
200
214
|
/>
|
|
215
|
+
<p className="mt-3 font-sans text-2xs text-muted-foreground">{p.dailySavedNote}</p>
|
|
201
216
|
<div className="mt-4">
|
|
202
|
-
<button type="button" onClick={openDailyAsk} className={
|
|
217
|
+
<button type="button" onClick={openDailyAsk} className={secondaryBtnClass}>
|
|
203
218
|
{p.continueAgent}
|
|
204
219
|
</button>
|
|
205
220
|
</div>
|
|
@@ -231,11 +246,12 @@ export default function EchoSegmentPageClient({ segment }: { segment: EchoSegmen
|
|
|
231
246
|
|
|
232
247
|
{segment === 'past-you' ? (
|
|
233
248
|
<section className={`${cardSectionClass} mt-6`}>
|
|
249
|
+
<label className={fieldLabelClass}>{p.pastYouDrawLabel}</label>
|
|
234
250
|
<button
|
|
235
251
|
type="button"
|
|
236
252
|
disabled
|
|
237
253
|
title={p.pastYouDisabledHint}
|
|
238
|
-
className="inline-flex cursor-not-allowed items-center rounded-lg border border-dashed border-border bg-muted/20 px-4 py-2.5 font-sans text-sm text-muted-foreground opacity-85"
|
|
254
|
+
className="mt-2 inline-flex cursor-not-allowed items-center rounded-lg border border-dashed border-border bg-muted/20 px-4 py-2.5 font-sans text-sm text-muted-foreground opacity-85"
|
|
239
255
|
>
|
|
240
256
|
{p.pastYouAnother}
|
|
241
257
|
</button>
|
package/app/lib/i18n-en.ts
CHANGED
|
@@ -204,14 +204,26 @@ export const en = {
|
|
|
204
204
|
segmentNavAria: 'Echo sections',
|
|
205
205
|
snapshotBadge: 'Local · private',
|
|
206
206
|
factsHeading: 'Snapshot',
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
'
|
|
207
|
+
snapshotAboutYouTitle: 'Clues will gather here',
|
|
208
|
+
snapshotAboutYouBody:
|
|
209
|
+
'Soon this will list notes whose paths, links, or titles curve back toward you—each one opens in the editor. Aggregation is still wiring up; for now, use the button below to talk it through in MindOS Agent.',
|
|
210
|
+
snapshotContinuedTitle: 'Drafts and open loops',
|
|
211
|
+
snapshotContinuedBody:
|
|
212
|
+
'This will hold untitled drafts, half-finished pieces, and unchecked tasks. The list feed is on the way; the two columns set the rhythm early.',
|
|
213
|
+
snapshotDailyTitle: 'Start with one line',
|
|
214
|
+
snapshotDailyBody:
|
|
215
|
+
'Your line for today saves in this browser only, as soon as you leave the field. Echo does not have to be an essay—one line is enough; open Agent when you want depth.',
|
|
216
|
+
snapshotPastYouTitle: 'A glance at the past',
|
|
217
|
+
snapshotPastYouBody:
|
|
218
|
+
'We will gently sample an older note so you can see who you were at another point—not a diff tool, just a glimpse. Sampling arrives in a later pass.',
|
|
219
|
+
snapshotGrowthTitle: 'Intent lives here',
|
|
220
|
+
snapshotGrowthBody:
|
|
221
|
+
'Below, write one sentence about what you are steering toward. It stays on this device and can change over time; later you may see how it drifts.',
|
|
210
222
|
insightTitle: 'Insight',
|
|
211
223
|
insightShow: 'Show insight',
|
|
212
224
|
insightHide: 'Hide insight',
|
|
213
225
|
insightHint:
|
|
214
|
-
'
|
|
226
|
+
'Uses only what is visible on this page—including this snapshot and anything you typed here—not your full library. Configure AI under Settings first.',
|
|
215
227
|
generateInsight: 'Generate insight',
|
|
216
228
|
generateInsightNoAi: 'Add an API key under Settings → AI (or set env vars), then refresh this page.',
|
|
217
229
|
insightGenerating: 'Generating…',
|
|
@@ -220,18 +232,20 @@ export const en = {
|
|
|
220
232
|
continueAgent: 'Continue in MindOS Agent',
|
|
221
233
|
continuedDrafts: 'Drafts',
|
|
222
234
|
continuedTodos: 'Open loops',
|
|
223
|
-
subEmptyHint: '
|
|
235
|
+
subEmptyHint: 'Items will appear in each column once the library feed is connected.',
|
|
224
236
|
dailyLineLabel: 'A line for today',
|
|
225
237
|
dailyLinePlaceholder: 'Write one quiet line…',
|
|
238
|
+
dailySavedNote: 'Saved in this browser; visible only on this device.',
|
|
226
239
|
dailyAskPrefill: (line: string) =>
|
|
227
240
|
`Echo / Daily — reflect on this line:\n\n${line.trim() || '(empty line)'}`,
|
|
241
|
+
pastYouDrawLabel: 'A draw from the past',
|
|
228
242
|
pastYouAnother: 'Draw another moment',
|
|
229
|
-
pastYouDisabledHint: '
|
|
243
|
+
pastYouDisabledHint: 'We are connecting time and your library; soon a tap here will surface an old excerpt.',
|
|
230
244
|
growthIntentLabel: 'What you are steering toward',
|
|
231
245
|
growthIntentPlaceholder: 'Write your current intent…',
|
|
232
246
|
growthSavedNote: 'Saved on this device.',
|
|
233
|
-
aboutYouLead: '
|
|
234
|
-
continuedLead: 'Pick up
|
|
247
|
+
aboutYouLead: 'Sense what curves toward you—without digging through every folder.',
|
|
248
|
+
continuedLead: 'Pick up the sentence you left mid-air.',
|
|
235
249
|
dailyLead: 'One quiet line for today — no need to open a full chat.',
|
|
236
250
|
pastYouLead: 'Choices and moods you set down at another point on the timeline.',
|
|
237
251
|
growthLead: 'What you are steering toward, and how it slowly shifts.',
|
package/app/lib/i18n-zh.ts
CHANGED
|
@@ -228,12 +228,26 @@ export const zh = {
|
|
|
228
228
|
segmentNavAria: '回响模块',
|
|
229
229
|
snapshotBadge: '本地 · 私密',
|
|
230
230
|
factsHeading: '所见',
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
snapshotAboutYouTitle: '线索会住在这里',
|
|
232
|
+
snapshotAboutYouBody:
|
|
233
|
+
'以后这里会列出路径、链接或标题里「绕回你」的笔记,点开即读。文库聚合尚在接入;若想现在就着「与我相关」整理或深聊,可用下方按钮打开 MindOS Agent。',
|
|
234
|
+
snapshotContinuedTitle: '草稿与未收口',
|
|
235
|
+
snapshotContinuedBody:
|
|
236
|
+
'这里将汇集未命名草稿、写到一半的稿,以及待办里尚未勾上的项。列表能力正在接入;两栏结构先帮你建立心理预期。',
|
|
237
|
+
snapshotDailyTitle: '今天,从一小行开始',
|
|
238
|
+
snapshotDailyBody:
|
|
239
|
+
'下方「今日一行」写在浏览器本机,离手即存。回响不必写成文章——一行就够,需要展开时再找 Agent。',
|
|
240
|
+
snapshotPastYouTitle: '随机一瞥往日',
|
|
241
|
+
snapshotPastYouBody:
|
|
242
|
+
'我们会从时间轴里温和地抽一篇旧笔记的片段,让你看见那个时间点的自己:不是对比工具,只是一眼。抽样能力随后就到。',
|
|
243
|
+
snapshotGrowthTitle: '意图落在这里',
|
|
244
|
+
snapshotGrowthBody:
|
|
245
|
+
'下方可写一句「此刻最想推进的方向」。它只保存在本机,可随时间改写;日后可在此看见缓慢的变化。',
|
|
233
246
|
insightTitle: '见解',
|
|
234
247
|
insightShow: '展开见解',
|
|
235
248
|
insightHide: '收起见解',
|
|
236
|
-
insightHint:
|
|
249
|
+
insightHint:
|
|
250
|
+
'只会带上本页可见的文字(含「所见」与你在本页输入的内容),不会默认上传整库。需在 设置 → AI 中配置后再用。',
|
|
237
251
|
generateInsight: '生成见解',
|
|
238
252
|
generateInsightNoAi: '请在 设置 → AI 中填写 API Key(或配置环境变量)后刷新本页。',
|
|
239
253
|
insightGenerating: '生成中…',
|
|
@@ -242,20 +256,22 @@ export const zh = {
|
|
|
242
256
|
continueAgent: '在 MindOS Agent 中继续',
|
|
243
257
|
continuedDrafts: '草稿',
|
|
244
258
|
continuedTodos: '未收口',
|
|
245
|
-
subEmptyHint: '
|
|
259
|
+
subEmptyHint: '接入文库后,条目会出现在对应分组里。',
|
|
246
260
|
dailyLineLabel: '今日一行',
|
|
247
261
|
dailyLinePlaceholder: '写下一行轻量的文字…',
|
|
262
|
+
dailySavedNote: '已保存在本机浏览器;仅本设备可见。',
|
|
248
263
|
dailyAskPrefill: (line: string) =>
|
|
249
264
|
`回响 / 每日 — 围绕这一行帮我展开:\n\n${line.trim() || '(空行)'}`,
|
|
265
|
+
pastYouDrawLabel: '往日一瞥',
|
|
250
266
|
pastYouAnother: '再抽一笔',
|
|
251
|
-
pastYouDisabledHint: '
|
|
267
|
+
pastYouDisabledHint: '正在连接时间与文库,稍后在此轻点即可抽读旧笔记片段。',
|
|
252
268
|
growthIntentLabel: '当前意图',
|
|
253
269
|
growthIntentPlaceholder: '写下你正在推进的方向…',
|
|
254
270
|
growthSavedNote: '已保存在本机。',
|
|
255
|
-
aboutYouLead: '
|
|
256
|
-
continuedLead: '
|
|
271
|
+
aboutYouLead: '不经翻找,也能感到有什么在轻轻指向你。',
|
|
272
|
+
continuedLead: '上次停下的句号,在这里接着写。',
|
|
257
273
|
dailyLead: '给今天留一行空白;轻到不必为此开一场对话。',
|
|
258
|
-
pastYouLead: '
|
|
274
|
+
pastYouLead: '在另一个时间刻度上,瞥见你写下的选择与心情。',
|
|
259
275
|
growthLead: '你在推的方向,以及它怎样慢慢偏转。',
|
|
260
276
|
},
|
|
261
277
|
shortcutPanel: {
|
package/app/next-env.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="next" />
|
|
2
2
|
/// <reference types="next/image-types/global" />
|
|
3
|
-
import "./.next/types/routes.d.ts";
|
|
3
|
+
import "./.next/dev/types/routes.d.ts";
|
|
4
4
|
|
|
5
5
|
// NOTE: This file should not be edited
|
|
6
6
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
package/package.json
CHANGED