@lobehub/chat 1.142.2 → 1.142.4

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 (107) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +8 -8
  3. package/README.zh-CN.md +8 -8
  4. package/changelog/v1.json +18 -0
  5. package/docs/development/database-schema.dbml +1 -0
  6. package/locales/ar/chat.json +4 -4
  7. package/locales/ar/file.json +1 -0
  8. package/locales/ar/models.json +1 -1
  9. package/locales/bg-BG/chat.json +4 -4
  10. package/locales/bg-BG/file.json +1 -0
  11. package/locales/bg-BG/models.json +1 -1
  12. package/locales/de-DE/chat.json +4 -4
  13. package/locales/de-DE/file.json +1 -0
  14. package/locales/de-DE/models.json +1 -1
  15. package/locales/en-US/chat.json +4 -4
  16. package/locales/en-US/file.json +1 -0
  17. package/locales/en-US/models.json +1 -1
  18. package/locales/es-ES/chat.json +4 -4
  19. package/locales/es-ES/file.json +1 -0
  20. package/locales/es-ES/models.json +1 -1
  21. package/locales/fa-IR/chat.json +4 -4
  22. package/locales/fa-IR/file.json +1 -0
  23. package/locales/fa-IR/models.json +1 -1
  24. package/locales/fr-FR/chat.json +4 -4
  25. package/locales/fr-FR/file.json +1 -0
  26. package/locales/fr-FR/models.json +1 -1
  27. package/locales/it-IT/chat.json +4 -4
  28. package/locales/it-IT/file.json +1 -0
  29. package/locales/ja-JP/chat.json +4 -4
  30. package/locales/ja-JP/file.json +1 -0
  31. package/locales/ja-JP/models.json +1 -1
  32. package/locales/ko-KR/chat.json +4 -4
  33. package/locales/ko-KR/file.json +1 -0
  34. package/locales/ko-KR/models.json +1 -1
  35. package/locales/nl-NL/chat.json +4 -4
  36. package/locales/nl-NL/file.json +1 -0
  37. package/locales/nl-NL/models.json +1 -1
  38. package/locales/pl-PL/chat.json +4 -4
  39. package/locales/pl-PL/file.json +1 -0
  40. package/locales/pl-PL/models.json +1 -1
  41. package/locales/pt-BR/chat.json +4 -4
  42. package/locales/pt-BR/file.json +1 -0
  43. package/locales/ru-RU/chat.json +4 -4
  44. package/locales/ru-RU/file.json +1 -0
  45. package/locales/ru-RU/models.json +1 -1
  46. package/locales/tr-TR/chat.json +4 -4
  47. package/locales/tr-TR/file.json +1 -0
  48. package/locales/tr-TR/models.json +1 -1
  49. package/locales/vi-VN/chat.json +4 -4
  50. package/locales/vi-VN/file.json +1 -0
  51. package/locales/vi-VN/models.json +1 -1
  52. package/locales/zh-CN/chat.json +4 -4
  53. package/locales/zh-CN/file.json +1 -0
  54. package/locales/zh-TW/chat.json +4 -4
  55. package/locales/zh-TW/file.json +1 -0
  56. package/locales/zh-TW/models.json +1 -1
  57. package/package.json +3 -2
  58. package/packages/const/src/file.ts +2 -0
  59. package/packages/database/migrations/0039_add_editor_data.sql +1 -0
  60. package/packages/database/migrations/meta/0039_snapshot.json +7586 -0
  61. package/packages/database/migrations/meta/_journal.json +7 -0
  62. package/packages/database/src/core/migrations.json +6 -0
  63. package/packages/database/src/schemas/document.ts +2 -0
  64. package/packages/database/src/utils/__tests__/groupMessages.test.ts +989 -0
  65. package/packages/database/src/utils/groupMessages.ts +359 -0
  66. package/packages/memory-extract/.env.example +3 -0
  67. package/packages/memory-extract/package.json +21 -0
  68. package/packages/memory-extract/vitest.config.mts +10 -0
  69. package/packages/model-runtime/src/core/streams/protocol.ts +3 -3
  70. package/packages/model-runtime/src/types/chat.ts +2 -2
  71. package/packages/obervability-otel/package.json +7 -7
  72. package/packages/types/src/message/common/base.ts +0 -1
  73. package/packages/types/src/message/common/metadata.ts +5 -5
  74. package/packages/types/src/message/common/tools.ts +17 -0
  75. package/packages/types/src/message/db/item.ts +23 -17
  76. package/packages/types/src/message/ui/chat.ts +22 -66
  77. package/packages/types/src/message/ui/index.ts +1 -0
  78. package/packages/types/src/message/ui/params.ts +65 -0
  79. package/packages/types/src/tool/builtin.ts +34 -0
  80. package/packages/types/src/tool/intervention.ts +39 -0
  81. package/packages/utils/src/fetch/fetchSSE.ts +4 -4
  82. package/renovate.json +14 -2
  83. package/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsx +7 -0
  84. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelConfigModal/index.tsx +7 -0
  85. package/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/Checker.tsx +7 -2
  86. package/src/features/ChatInput/ActionBar/components/ActionDropdown.tsx +21 -1
  87. package/src/features/ChatItem/components/Title.tsx +4 -3
  88. package/src/features/Conversation/Messages/Assistant/MessageContent.tsx +3 -16
  89. package/src/features/Conversation/Messages/Assistant/index.tsx +3 -3
  90. package/src/features/Conversation/{utils.test.ts → utils/markdown.test.ts} +1 -1
  91. package/src/features/Conversation/{utils.ts → utils/markdown.ts} +1 -1
  92. package/src/features/FileManager/FileList/FileListItem/index.tsx +3 -2
  93. package/src/features/FileManager/FileList/MasonryFileItem/MasonryItemWrapper.tsx +1 -1
  94. package/src/features/FileManager/FileList/MasonryFileItem/index.tsx +2 -4
  95. package/src/features/FileManager/FileList/MasonrySkeleton.tsx +11 -5
  96. package/src/features/FileManager/FileList/ToolBar/MultiSelectActions.tsx +1 -1
  97. package/src/features/FileManager/FileList/index.tsx +51 -9
  98. package/src/features/ModelSwitchPanel/index.tsx +1 -0
  99. package/src/locales/default/chat.ts +4 -4
  100. package/src/locales/default/file.ts +1 -0
  101. package/src/store/file/slices/fileManager/action.test.ts +136 -1
  102. package/src/store/file/slices/fileManager/action.ts +30 -8
  103. package/src/tools/web-browsing/Render/PageContent/index.tsx +2 -2
  104. package/src/tools/web-browsing/Render/index.tsx +5 -4
  105. package/src/utils/unzipFile.test.ts +128 -0
  106. package/src/utils/unzipFile.ts +122 -0
  107. package/vitest.config.mts +1 -0
@@ -273,6 +273,13 @@
273
273
  "when": 1760108430562,
274
274
  "tag": "0038_add_image_user_settings",
275
275
  "breakpoints": true
276
+ },
277
+ {
278
+ "idx": 39,
279
+ "version": "7",
280
+ "when": 1761554153406,
281
+ "tag": "0039_add_editor_data",
282
+ "breakpoints": true
276
283
  }
277
284
  ],
278
285
  "version": "6"
@@ -682,5 +682,11 @@
682
682
  "bps": true,
683
683
  "folderMillis": 1760108430562,
684
684
  "hash": "ce09b301abb80f6563abc2f526bdd20b4f69bae430f09ba2179b9e3bfec43067"
685
+ },
686
+ {
687
+ "sql": ["ALTER TABLE \"documents\" ADD COLUMN IF NOT EXISTS \"editor_data\" jsonb;"],
688
+ "bps": true,
689
+ "folderMillis": 1761554153406,
690
+ "hash": "bf2f21293e90e11cf60a784cf3ec219eafa95f7545d7d2f9d1449c0b0949599a"
685
691
  }
686
692
  ]
@@ -59,6 +59,8 @@ export const documents = pgTable(
59
59
  .notNull(),
60
60
  clientId: text('client_id'),
61
61
 
62
+ editorData: jsonb('editor_data').$type<Record<string, any>>(),
63
+
62
64
  // 时间戳
63
65
  ...timestamps,
64
66
  },