@lobehub/lobehub 2.0.0-next.255 → 2.0.0-next.256

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.
Files changed (140) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/changelog/v1.json +9 -0
  3. package/locales/en-US/plugin.json +1 -0
  4. package/locales/zh-CN/plugin.json +1 -0
  5. package/package.json +1 -1
  6. package/packages/builtin-tool-notebook/src/client/Placeholder/CreateDocument.tsx +6 -6
  7. package/packages/builtin-tool-notebook/src/client/Render/CreateDocument/DocumentCard.tsx +23 -10
  8. package/packages/builtin-tool-notebook/src/client/Streaming/CreateDocument/index.tsx +1 -1
  9. package/packages/database/src/models/__tests__/agent.test.ts +91 -4
  10. package/packages/database/src/models/agent.ts +15 -7
  11. package/packages/editor-runtime/src/EditorRuntime.ts +1 -1
  12. package/packages/editor-runtime/src/__tests__/EditorRuntime.real.test.ts +65 -4
  13. package/packages/editor-runtime/src/__tests__/__snapshots__/EditorRuntime.real.test.ts.snap +108 -17
  14. package/packages/editor-runtime/src/__tests__/fixtures/remove-then-add.json +636 -0
  15. package/packages/editor-runtime/src/__tests__/fixtures/remove.json +1 -0
  16. package/packages/types/src/agent/agentConfig.ts +8 -8
  17. package/src/app/[variants]/(main)/chat/features/Portal/_layout/Mobile.tsx +2 -1
  18. package/src/app/[variants]/(main)/group/features/Portal/_layout/Mobile.tsx +2 -1
  19. package/src/app/[variants]/(main)/home/_layout/hooks/useCreateMenuItems.tsx +2 -2
  20. package/src/app/[variants]/(main)/page/{features/PageTitle → PageTitle}/index.tsx +0 -1
  21. package/src/app/[variants]/(main)/page/[id]/index.tsx +43 -1
  22. package/src/app/[variants]/(main)/page/_layout/Body/AllPagesDrawer/Content.tsx +15 -15
  23. package/src/app/[variants]/(main)/page/_layout/Body/List/Item/Editing.tsx +3 -3
  24. package/src/app/[variants]/(main)/page/_layout/Body/List/Item/index.tsx +7 -12
  25. package/src/app/[variants]/(main)/page/_layout/Body/List/Item/useDropdownMenu.tsx +5 -5
  26. package/src/app/[variants]/(main)/page/_layout/Body/List/index.tsx +7 -7
  27. package/src/app/[variants]/(main)/page/_layout/Body/index.tsx +15 -9
  28. package/src/app/[variants]/(main)/page/_layout/Body/useDropdownMenu.tsx +3 -3
  29. package/src/app/[variants]/(main)/page/_layout/DataSync.tsx +15 -0
  30. package/src/app/[variants]/(main)/page/_layout/Header/AddButton.tsx +2 -2
  31. package/src/app/[variants]/(main)/page/_layout/index.tsx +2 -0
  32. package/src/app/[variants]/(main)/page/index.tsx +3 -7
  33. package/src/components/Editor/AutoSaveHint.tsx +1 -1
  34. package/src/features/Conversation/Messages/User/Actions/index.tsx +5 -1
  35. package/src/features/EditorCanvas/AutoSaveHint.tsx +37 -0
  36. package/src/features/{PageEditor → EditorCanvas}/DiffAllToolbar.tsx +57 -16
  37. package/src/features/EditorCanvas/DocumentIdMode.tsx +111 -0
  38. package/src/features/EditorCanvas/EditorCanvas.tsx +148 -0
  39. package/src/features/EditorCanvas/EditorDataMode.tsx +64 -0
  40. package/src/features/EditorCanvas/ErrorBoundary.tsx +66 -0
  41. package/src/features/EditorCanvas/InlineToolbar.tsx +245 -0
  42. package/src/features/EditorCanvas/InternalEditor.tsx +134 -0
  43. package/src/features/{PageEditor/EditorCanvas → EditorCanvas}/actions.ts +10 -8
  44. package/src/features/EditorCanvas/index.ts +9 -0
  45. package/src/features/PageEditor/EditorCanvas/index.tsx +14 -111
  46. package/src/features/PageEditor/EditorCanvas/useAskCopilotItem.tsx +95 -0
  47. package/src/features/PageEditor/EditorCanvas/useSlashItems.tsx +1 -1
  48. package/src/features/PageEditor/Header/Breadcrumb.tsx +2 -2
  49. package/src/features/PageEditor/Header/index.tsx +15 -18
  50. package/src/features/PageEditor/Header/useMenu.tsx +12 -9
  51. package/src/features/PageEditor/PageEditor.tsx +45 -21
  52. package/src/features/PageEditor/PageEditorProvider.tsx +13 -1
  53. package/src/features/PageEditor/PageTitle/index.tsx +2 -2
  54. package/src/features/PageEditor/StoreUpdater.tsx +35 -308
  55. package/src/features/PageEditor/{Body/Title.tsx → TitleSection.tsx} +16 -16
  56. package/src/features/PageEditor/store/action.ts +96 -188
  57. package/src/features/PageEditor/store/initialState.ts +16 -21
  58. package/src/features/PageEditor/store/selectors.ts +3 -4
  59. package/src/features/PageExplorer/PageExplorerPlaceholder.tsx +22 -14
  60. package/src/features/PageExplorer/index.tsx +34 -67
  61. package/src/features/Portal/Artifacts/index.ts +0 -2
  62. package/src/features/Portal/Document/AutoSaveHint.tsx +7 -6
  63. package/src/features/Portal/Document/Body.tsx +1 -3
  64. package/src/features/Portal/Document/EditorCanvas.tsx +7 -50
  65. package/src/features/Portal/Document/Header.tsx +13 -10
  66. package/src/features/Portal/Document/TodoList.tsx +6 -4
  67. package/src/features/Portal/Document/Wrapper.tsx +3 -11
  68. package/src/features/Portal/Document/index.ts +0 -2
  69. package/src/features/Portal/FilePreview/index.ts +0 -2
  70. package/src/features/Portal/GroupThread/index.ts +0 -3
  71. package/src/features/Portal/MessageDetail/index.ts +0 -2
  72. package/src/features/Portal/Notebook/index.ts +0 -2
  73. package/src/features/Portal/Plugins/index.ts +0 -2
  74. package/src/features/Portal/Thread/index.ts +0 -3
  75. package/src/features/Portal/components/Header.tsx +18 -6
  76. package/src/features/Portal/router.tsx +34 -97
  77. package/src/features/Portal/type.ts +0 -2
  78. package/src/locales/default/plugin.ts +1 -0
  79. package/src/store/chat/slices/portal/action.test.ts +218 -15
  80. package/src/store/chat/slices/portal/action.ts +194 -41
  81. package/src/store/chat/slices/portal/initialState.ts +40 -1
  82. package/src/store/chat/slices/portal/selectors/thread.ts +44 -3
  83. package/src/store/chat/slices/portal/selectors.test.ts +119 -17
  84. package/src/store/chat/slices/portal/selectors.ts +117 -36
  85. package/src/store/document/index.ts +17 -5
  86. package/src/store/document/slices/document/action.ts +209 -0
  87. package/src/store/document/slices/document/index.ts +6 -0
  88. package/src/store/document/slices/editor/action.test.ts +340 -0
  89. package/src/store/document/slices/editor/action.ts +133 -149
  90. package/src/store/document/slices/editor/index.ts +9 -2
  91. package/src/store/document/slices/editor/initialState.ts +66 -29
  92. package/src/store/document/slices/editor/reducer.test.ts +217 -0
  93. package/src/store/document/slices/editor/reducer.ts +67 -0
  94. package/src/store/document/slices/editor/selectors.test.ts +395 -0
  95. package/src/store/document/slices/editor/selectors.ts +107 -5
  96. package/src/store/document/store.ts +12 -13
  97. package/src/store/file/slices/document/action.ts +19 -188
  98. package/src/store/file/slices/document/initialState.ts +0 -30
  99. package/src/store/file/slices/document/selectors.ts +25 -59
  100. package/src/store/notebook/index.ts +5 -4
  101. package/src/store/page/index.ts +2 -0
  102. package/src/store/page/initialState.ts +92 -0
  103. package/src/store/page/selectors.ts +5 -0
  104. package/src/store/page/slices/crud/action.ts +477 -0
  105. package/src/store/page/slices/crud/index.ts +2 -0
  106. package/src/store/page/slices/crud/initialState.ts +7 -0
  107. package/src/store/page/slices/internal/action.ts +32 -0
  108. package/src/store/page/slices/internal/index.ts +2 -0
  109. package/src/store/page/slices/internal/reducer.ts +105 -0
  110. package/src/store/page/slices/list/action.ts +206 -0
  111. package/src/store/page/slices/list/index.ts +3 -0
  112. package/src/store/page/slices/list/initialState.ts +29 -0
  113. package/src/store/page/slices/list/selectors.ts +90 -0
  114. package/src/store/page/slices/selection/action.ts +67 -0
  115. package/src/store/page/slices/selection/index.ts +2 -0
  116. package/src/store/page/slices/selection/initialState.ts +11 -0
  117. package/src/store/page/store.ts +29 -0
  118. package/src/store/tool/slices/lobehubSkillStore/selectors.ts +10 -20
  119. package/src/utils/identifier.ts +8 -2
  120. package/src/features/PageEditor/Body/index.tsx +0 -68
  121. package/src/features/PageEditor/EditorCanvas/InlineToolbar.tsx +0 -316
  122. package/src/features/PageEditor/Header/AutoSaveHint.tsx +0 -27
  123. package/src/features/Portal/Artifacts/useEnable.ts +0 -4
  124. package/src/features/Portal/Document/DocumentEditorProvider.tsx +0 -34
  125. package/src/features/Portal/Document/StoreUpdater.tsx +0 -80
  126. package/src/features/Portal/Document/Title.tsx +0 -54
  127. package/src/features/Portal/Document/store/action.ts +0 -114
  128. package/src/features/Portal/Document/store/index.ts +0 -21
  129. package/src/features/Portal/Document/store/initialState.ts +0 -24
  130. package/src/features/Portal/Document/useEnable.ts +0 -8
  131. package/src/features/Portal/FilePreview/useEnable.ts +0 -6
  132. package/src/features/Portal/GroupThread/hook.ts +0 -9
  133. package/src/features/Portal/MessageDetail/useEnable.ts +0 -4
  134. package/src/features/Portal/Notebook/useEnable.ts +0 -6
  135. package/src/features/Portal/Plugins/useEnable.ts +0 -6
  136. package/src/features/Portal/Thread/hook.ts +0 -8
  137. package/src/store/document/slices/notebook/action.ts +0 -119
  138. package/src/store/document/slices/notebook/index.ts +0 -3
  139. package/src/store/document/slices/notebook/initialState.ts +0 -12
  140. package/src/store/document/slices/notebook/selectors.ts +0 -26
@@ -0,0 +1,636 @@
1
+ {
2
+ "keepId": true,
3
+ "root": {
4
+ "children": [
5
+ {
6
+ "children": [
7
+ {
8
+ "detail": 0,
9
+ "format": 0,
10
+ "mode": "normal",
11
+ "style": "",
12
+ "text": "杭州是中国著名的旅游城市,素有\"人间天堂\"的美誉。这里既有美丽的自然风光,又有深厚的历史文化底蕴。",
13
+ "type": "text",
14
+ "version": 1,
15
+ "id": "17542"
16
+ }
17
+ ],
18
+ "direction": "ltr",
19
+ "format": "",
20
+ "indent": 0,
21
+ "type": "paragraph",
22
+ "version": 1,
23
+ "textFormat": 0,
24
+ "textStyle": "",
25
+ "id": "17541"
26
+ },
27
+ {
28
+ "children": [
29
+ {
30
+ "detail": 0,
31
+ "format": 0,
32
+ "mode": "normal",
33
+ "style": "",
34
+ "text": "必游景点",
35
+ "type": "text",
36
+ "version": 1,
37
+ "id": "17544"
38
+ }
39
+ ],
40
+ "direction": "ltr",
41
+ "format": "",
42
+ "indent": 0,
43
+ "type": "heading",
44
+ "version": 1,
45
+ "tag": "h2",
46
+ "id": "17543"
47
+ },
48
+ {
49
+ "children": [
50
+ {
51
+ "detail": 0,
52
+ "format": 0,
53
+ "mode": "normal",
54
+ "style": "",
55
+ "text": "西湖风景区",
56
+ "type": "text",
57
+ "version": 1,
58
+ "id": "17546"
59
+ }
60
+ ],
61
+ "direction": "ltr",
62
+ "format": "",
63
+ "indent": 0,
64
+ "type": "heading",
65
+ "version": 1,
66
+ "tag": "h3",
67
+ "id": "17545"
68
+ },
69
+ {
70
+ "children": [
71
+ {
72
+ "detail": 0,
73
+ "format": 0,
74
+ "mode": "normal",
75
+ "style": "",
76
+ "text": "西湖是杭州的灵魂,被联合国教科文组织列为世界文化遗产。主要景点包括:",
77
+ "type": "text",
78
+ "version": 1,
79
+ "id": "17548"
80
+ }
81
+ ],
82
+ "direction": "ltr",
83
+ "format": "",
84
+ "indent": 0,
85
+ "type": "paragraph",
86
+ "version": 1,
87
+ "textFormat": 0,
88
+ "textStyle": "",
89
+ "id": "17547"
90
+ },
91
+ {
92
+ "children": [
93
+ {
94
+ "children": [
95
+ {
96
+ "detail": 0,
97
+ "format": 1,
98
+ "mode": "normal",
99
+ "style": "",
100
+ "text": "苏堤春晓",
101
+ "type": "text",
102
+ "version": 1,
103
+ "id": "17551"
104
+ },
105
+ {
106
+ "detail": 0,
107
+ "format": 0,
108
+ "mode": "normal",
109
+ "style": "",
110
+ "text": ":春季赏花的最佳地点",
111
+ "type": "text",
112
+ "version": 1,
113
+ "id": "17552"
114
+ }
115
+ ],
116
+ "direction": "ltr",
117
+ "format": "",
118
+ "indent": 0,
119
+ "type": "listitem",
120
+ "version": 1,
121
+ "value": 1,
122
+ "id": "17550"
123
+ },
124
+ {
125
+ "children": [
126
+ {
127
+ "detail": 0,
128
+ "format": 1,
129
+ "mode": "normal",
130
+ "style": "",
131
+ "text": "断桥残雪",
132
+ "type": "text",
133
+ "version": 1,
134
+ "id": "17554"
135
+ },
136
+ {
137
+ "detail": 0,
138
+ "format": 0,
139
+ "mode": "normal",
140
+ "style": "",
141
+ "text": ":冬季雪景格外迷人",
142
+ "type": "text",
143
+ "version": 1,
144
+ "id": "17555"
145
+ }
146
+ ],
147
+ "direction": "ltr",
148
+ "format": "",
149
+ "indent": 0,
150
+ "type": "listitem",
151
+ "version": 1,
152
+ "value": 2,
153
+ "id": "17553"
154
+ },
155
+ {
156
+ "children": [
157
+ {
158
+ "detail": 0,
159
+ "format": 1,
160
+ "mode": "normal",
161
+ "style": "",
162
+ "text": "雷峰夕照",
163
+ "type": "text",
164
+ "version": 1,
165
+ "id": "17557"
166
+ },
167
+ {
168
+ "detail": 0,
169
+ "format": 0,
170
+ "mode": "normal",
171
+ "style": "",
172
+ "text": ":傍晚时分观赏日落",
173
+ "type": "text",
174
+ "version": 1,
175
+ "id": "17558"
176
+ }
177
+ ],
178
+ "direction": "ltr",
179
+ "format": "",
180
+ "indent": 0,
181
+ "type": "listitem",
182
+ "version": 1,
183
+ "value": 3,
184
+ "id": "17556"
185
+ },
186
+ {
187
+ "children": [
188
+ {
189
+ "detail": 0,
190
+ "format": 1,
191
+ "mode": "normal",
192
+ "style": "",
193
+ "text": "三潭印月",
194
+ "type": "text",
195
+ "version": 1,
196
+ "id": "17560"
197
+ },
198
+ {
199
+ "detail": 0,
200
+ "format": 0,
201
+ "mode": "normal",
202
+ "style": "",
203
+ "text": ":湖中三座石塔,夜晚灯光璀璨",
204
+ "type": "text",
205
+ "version": 1,
206
+ "id": "17561"
207
+ }
208
+ ],
209
+ "direction": "ltr",
210
+ "format": "",
211
+ "indent": 0,
212
+ "type": "listitem",
213
+ "version": 1,
214
+ "value": 4,
215
+ "id": "17559"
216
+ }
217
+ ],
218
+ "direction": "ltr",
219
+ "format": "",
220
+ "indent": 0,
221
+ "type": "list",
222
+ "version": 1,
223
+ "listType": "bullet",
224
+ "start": 1,
225
+ "tag": "ul",
226
+ "id": "17549"
227
+ },
228
+ {
229
+ "children": [
230
+ {
231
+ "detail": 0,
232
+ "format": 0,
233
+ "mode": "normal",
234
+ "style": "",
235
+ "text": "阿斯达",
236
+ "type": "text",
237
+ "version": 1,
238
+ "id": "17563"
239
+ }
240
+ ],
241
+ "direction": null,
242
+ "format": "",
243
+ "indent": 0,
244
+ "type": "paragraph",
245
+ "version": 1,
246
+ "textFormat": 0,
247
+ "textStyle": "",
248
+ "id": "17562"
249
+ },
250
+ {
251
+ "children": [
252
+ {
253
+ "detail": 0,
254
+ "format": 0,
255
+ "mode": "normal",
256
+ "style": "",
257
+ "text": "灵隐寺",
258
+ "type": "text",
259
+ "version": 1,
260
+ "id": "17565"
261
+ }
262
+ ],
263
+ "direction": "ltr",
264
+ "format": "",
265
+ "indent": 0,
266
+ "type": "heading",
267
+ "version": 1,
268
+ "tag": "h3",
269
+ "id": "17564"
270
+ },
271
+ {
272
+ "children": [
273
+ {
274
+ "detail": 0,
275
+ "format": 0,
276
+ "mode": "normal",
277
+ "style": "",
278
+ "text": "杭州最著名的佛教寺庙,始建于东晋年间。寺内有:",
279
+ "type": "text",
280
+ "version": 1,
281
+ "id": "17567"
282
+ }
283
+ ],
284
+ "direction": "ltr",
285
+ "format": "",
286
+ "indent": 0,
287
+ "type": "paragraph",
288
+ "version": 1,
289
+ "textFormat": 0,
290
+ "textStyle": "",
291
+ "id": "17566"
292
+ },
293
+ {
294
+ "children": [
295
+ {
296
+ "children": [
297
+ {
298
+ "detail": 0,
299
+ "format": 0,
300
+ "mode": "normal",
301
+ "style": "",
302
+ "text": "大雄宝殿",
303
+ "type": "text",
304
+ "version": 1,
305
+ "id": "17570"
306
+ }
307
+ ],
308
+ "direction": "ltr",
309
+ "format": "",
310
+ "indent": 0,
311
+ "type": "listitem",
312
+ "version": 1,
313
+ "value": 1,
314
+ "id": "17569"
315
+ },
316
+ {
317
+ "children": [
318
+ {
319
+ "detail": 0,
320
+ "format": 0,
321
+ "mode": "normal",
322
+ "style": "",
323
+ "text": "飞来峰石窟造像",
324
+ "type": "text",
325
+ "version": 1,
326
+ "id": "17572"
327
+ }
328
+ ],
329
+ "direction": "ltr",
330
+ "format": "",
331
+ "indent": 0,
332
+ "type": "listitem",
333
+ "version": 1,
334
+ "value": 2,
335
+ "id": "17571"
336
+ },
337
+ {
338
+ "children": [
339
+ {
340
+ "detail": 0,
341
+ "format": 0,
342
+ "mode": "normal",
343
+ "style": "",
344
+ "text": "五百罗汉堂",
345
+ "type": "text",
346
+ "version": 1,
347
+ "id": "17574"
348
+ }
349
+ ],
350
+ "direction": "ltr",
351
+ "format": "",
352
+ "indent": 0,
353
+ "type": "listitem",
354
+ "version": 1,
355
+ "value": 3,
356
+ "id": "17573"
357
+ }
358
+ ],
359
+ "direction": "ltr",
360
+ "format": "",
361
+ "indent": 0,
362
+ "type": "list",
363
+ "version": 1,
364
+ "listType": "bullet",
365
+ "start": 1,
366
+ "tag": "ul",
367
+ "id": "17568"
368
+ },
369
+ {
370
+ "children": [
371
+ {
372
+ "detail": 0,
373
+ "format": 0,
374
+ "mode": "normal",
375
+ "style": "",
376
+ "text": "西溪国家湿地公园",
377
+ "type": "text",
378
+ "version": 1,
379
+ "id": "17576"
380
+ }
381
+ ],
382
+ "direction": "ltr",
383
+ "format": "",
384
+ "indent": 0,
385
+ "type": "heading",
386
+ "version": 1,
387
+ "tag": "h3",
388
+ "id": "17575"
389
+ },
390
+ {
391
+ "children": [
392
+ {
393
+ "detail": 0,
394
+ "format": 0,
395
+ "mode": "normal",
396
+ "style": "",
397
+ "text": "中国第一个国家湿地公园,被誉为\"城市之肾\":",
398
+ "type": "text",
399
+ "version": 1,
400
+ "id": "17578"
401
+ }
402
+ ],
403
+ "direction": "ltr",
404
+ "format": "",
405
+ "indent": 0,
406
+ "type": "paragraph",
407
+ "version": 1,
408
+ "textFormat": 0,
409
+ "textStyle": "",
410
+ "id": "17577"
411
+ },
412
+ {
413
+ "children": [
414
+ {
415
+ "children": [
416
+ {
417
+ "detail": 0,
418
+ "format": 0,
419
+ "mode": "normal",
420
+ "style": "",
421
+ "text": "乘船游览湿地风光",
422
+ "type": "text",
423
+ "version": 1,
424
+ "id": "17581"
425
+ }
426
+ ],
427
+ "direction": "ltr",
428
+ "format": "",
429
+ "indent": 0,
430
+ "type": "listitem",
431
+ "version": 1,
432
+ "value": 1,
433
+ "id": "17580"
434
+ },
435
+ {
436
+ "children": [
437
+ {
438
+ "detail": 0,
439
+ "format": 0,
440
+ "mode": "normal",
441
+ "style": "",
442
+ "text": "观鸟和摄影的好去处",
443
+ "type": "text",
444
+ "version": 1,
445
+ "id": "17583"
446
+ }
447
+ ],
448
+ "direction": "ltr",
449
+ "format": "",
450
+ "indent": 0,
451
+ "type": "listitem",
452
+ "version": 1,
453
+ "value": 2,
454
+ "id": "17582"
455
+ },
456
+ {
457
+ "children": [
458
+ {
459
+ "detail": 0,
460
+ "format": 0,
461
+ "mode": "normal",
462
+ "style": "",
463
+ "text": "体验江南水乡风情",
464
+ "type": "text",
465
+ "version": 1,
466
+ "id": "17585"
467
+ }
468
+ ],
469
+ "direction": "ltr",
470
+ "format": "",
471
+ "indent": 0,
472
+ "type": "listitem",
473
+ "version": 1,
474
+ "value": 3,
475
+ "id": "17584"
476
+ }
477
+ ],
478
+ "direction": "ltr",
479
+ "format": "",
480
+ "indent": 0,
481
+ "type": "list",
482
+ "version": 1,
483
+ "listType": "bullet",
484
+ "start": 1,
485
+ "tag": "ul",
486
+ "id": "17579"
487
+ },
488
+ {
489
+ "children": [
490
+ {
491
+ "detail": 0,
492
+ "format": 0,
493
+ "mode": "normal",
494
+ "style": "",
495
+ "text": "宋城",
496
+ "type": "text",
497
+ "version": 1,
498
+ "id": "17587"
499
+ }
500
+ ],
501
+ "direction": "ltr",
502
+ "format": "",
503
+ "indent": 0,
504
+ "type": "heading",
505
+ "version": 1,
506
+ "tag": "h3",
507
+ "id": "17586"
508
+ },
509
+ {
510
+ "children": [
511
+ {
512
+ "detail": 0,
513
+ "format": 0,
514
+ "mode": "normal",
515
+ "style": "",
516
+ "text": "以宋代文化为主题的大型主题公园:",
517
+ "type": "text",
518
+ "version": 1,
519
+ "id": "17589"
520
+ }
521
+ ],
522
+ "direction": "ltr",
523
+ "format": "",
524
+ "indent": 0,
525
+ "type": "paragraph",
526
+ "version": 1,
527
+ "textFormat": 0,
528
+ "textStyle": "",
529
+ "id": "17588"
530
+ },
531
+ {
532
+ "children": [
533
+ {
534
+ "children": [
535
+ {
536
+ "detail": 0,
537
+ "format": 0,
538
+ "mode": "normal",
539
+ "style": "",
540
+ "text": "《宋城千古情》大型实景演出",
541
+ "type": "text",
542
+ "version": 1,
543
+ "id": "17592"
544
+ }
545
+ ],
546
+ "direction": "ltr",
547
+ "format": "",
548
+ "indent": 0,
549
+ "type": "listitem",
550
+ "version": 1,
551
+ "value": 1,
552
+ "id": "17591"
553
+ },
554
+ {
555
+ "children": [
556
+ {
557
+ "detail": 0,
558
+ "format": 0,
559
+ "mode": "normal",
560
+ "style": "",
561
+ "text": "宋代街市体验",
562
+ "type": "text",
563
+ "version": 1,
564
+ "id": "17594"
565
+ }
566
+ ],
567
+ "direction": "ltr",
568
+ "format": "",
569
+ "indent": 0,
570
+ "type": "listitem",
571
+ "version": 1,
572
+ "value": 2,
573
+ "id": "17593"
574
+ },
575
+ {
576
+ "children": [
577
+ {
578
+ "detail": 0,
579
+ "format": 0,
580
+ "mode": "normal",
581
+ "style": "",
582
+ "text": "传统手工艺展示",
583
+ "type": "text",
584
+ "version": 1,
585
+ "id": "17596"
586
+ }
587
+ ],
588
+ "direction": "ltr",
589
+ "format": "",
590
+ "indent": 0,
591
+ "type": "listitem",
592
+ "version": 1,
593
+ "value": 3,
594
+ "id": "17595"
595
+ }
596
+ ],
597
+ "direction": "ltr",
598
+ "format": "",
599
+ "indent": 0,
600
+ "type": "list",
601
+ "version": 1,
602
+ "listType": "bullet",
603
+ "start": 1,
604
+ "tag": "ul",
605
+ "id": "17590"
606
+ },
607
+ {
608
+ "children": [
609
+ {
610
+ "detail": 0,
611
+ "format": 0,
612
+ "mode": "normal",
613
+ "style": "",
614
+ "text": "美食推荐",
615
+ "type": "text",
616
+ "version": 1,
617
+ "id": "17598"
618
+ }
619
+ ],
620
+ "direction": "ltr",
621
+ "format": "",
622
+ "indent": 0,
623
+ "type": "heading",
624
+ "version": 1,
625
+ "tag": "h2",
626
+ "id": "17597"
627
+ }
628
+ ],
629
+ "direction": "ltr",
630
+ "format": "",
631
+ "indent": 0,
632
+ "type": "root",
633
+ "version": 1,
634
+ "id": "root"
635
+ }
636
+ }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "keepId": true,
2
3
  "root": {
3
4
  "children": [
4
5
  {
@@ -1,22 +1,22 @@
1
1
  /**
2
- * Agent 执行模式
3
- * - auto: 自动决定执行策略
4
- * - plan: 先规划后执行,适合复杂任务
5
- * - ask: 执行前询问用户确认
6
- * - implement: 直接执行,不询问
2
+ * Agent execution mode
3
+ * - auto: automatically decide execution strategy
4
+ * - plan: plan first then execute, suitable for complex tasks
5
+ * - ask: ask for user confirmation before execution
6
+ * - implement: execute directly without asking
7
7
  */
8
8
  export type AgentMode = 'auto' | 'plan' | 'ask' | 'implement';
9
9
 
10
10
  /**
11
- * Local System 配置(桌面端专用)
11
+ * Local System configuration (desktop only)
12
12
  */
13
13
  export interface LocalSystemConfig {
14
14
  /**
15
- * Local System 工作目录(桌面端专用)
15
+ * Local System working directory (desktop only)
16
16
  */
17
17
  workingDirectory?: string;
18
18
 
19
- // 未来可扩展:
19
+ // Future extensions:
20
20
  // allowedPaths?: string[];
21
21
  // deniedCommands?: string[];
22
22
  }
@@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next';
7
7
 
8
8
  import { PortalContent } from '@/features/Portal/router';
9
9
  import { useChatStore } from '@/store/chat';
10
+ import { portalThreadSelectors } from '@/store/chat/selectors';
10
11
 
11
12
  const styles = createStaticStyles(({ css, cssVar }) => ({
12
13
  container: css`
@@ -17,7 +18,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
17
18
  const Layout = () => {
18
19
  const [showMobilePortal, isPortalThread, togglePortal] = useChatStore((s) => [
19
20
  s.showPortal,
20
- !!s.portalThreadId,
21
+ portalThreadSelectors.showThread(s),
21
22
  s.togglePortal,
22
23
  ]);
23
24
  const { t } = useTranslation('portal');