Lincoln Minto
83e6ff6d96
Refactor: Simplify mask data processing using Object.values and flat
...
💻 变更类型 | Change Type
feat
🔀 变更说明 | Description of Change
This PR refactors the code handling mask data processing by simplifying the logic and improving scalability and type safety.
Code Enhancements:
Refactored the mask processing logic in app/masks/index.ts:
Replaced manual destructuring of cn, tw, and en keys with Object.values to dynamically handle all mask data.
Used .flat() to simplify merging mask arrays into a single collection.
Added explicit type casting (as BuiltinMask) for improved type safety.
Benefits:
Improved Maintainability: By eliminating hardcoded destructuring, the code can adapt automatically to new mask keys without modification.
Enhanced Readability: The use of Object.values and flat provides a cleaner, more concise approach.
Scalability: The updated implementation supports dynamic mask additions without breaking functionality.
📝 补充信息 | Additional Information
This change ensures the mask processing code is robust and easier to extend in future updates.
Release Notes:
New Features:
Simplified mask data processing using dynamic Object.values and .flat() methods.
Enhanced type safety with explicit type casting (as BuiltinMask).
2025-01-07 09:53:54 -03:00
DDMeaqua
d184eb6458
chore: cmd + shift+ backspace
2024-12-31 14:50:54 +08:00
DDMeaqua
c5d9b1131e
fix: merge bug
2024-12-31 14:38:58 +08:00
DDMeaqua
e13408dd24
Merge branch 'main' into feat-shortcutkey
2024-12-31 14:30:09 +08:00
DDMeaqua
aba4baf384
chore: update
2024-12-31 14:25:43 +08:00
DDMeaqua
6d84f9d3ae
chore: update
2024-12-31 13:27:15 +08:00
Dogtiti
63c5baaa80
Merge pull request #6010 from code-october/fix-visionModels
...
修复 VISION_MDOELS 在 docker 运行阶段不生效的问题
2024-12-31 09:56:46 +08:00
suruiqiang
90c531c224
fix issue #6009 add setting items for deepseek
2024-12-30 18:23:18 +08:00
code-october
266e9efd2e
rename the function
2024-12-30 09:13:12 +00:00
code-october
57c88c0717
修复 VISION_MDOELS 在 docker 运行阶段不生效的问题
2024-12-30 08:58:41 +00:00
DDMeaqua
5b5dea1c59
chore: 更换快捷键
2024-12-30 12:11:50 +08:00
suruiqiang
b948d6bf86
bug fix
2024-12-29 11:24:57 +08:00
suruiqiang
67338ff9b7
add KnowledgeCutOffDate for deepseek
2024-12-29 08:58:45 +08:00
suruiqiang
7380c8a2c1
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web into add_deepseek
2024-12-29 08:43:25 +08:00
dupl
39e593da48
Use regular expressions to make the code more concise.
2024-12-28 23:49:28 +08:00
Dogtiti
8a22c9d6db
feature: support glm-4v
2024-12-28 23:33:06 +08:00
RiverRay
5f96804f3b
Merge pull request #5920 from fishshi/i18n
...
Use i18n for DISCOVERY
2024-12-28 22:05:37 +08:00
RiverRay
13430ea3e2
Merge pull request #5965 from zmhuanf/temp
...
Fix issue #5964 : Prevents character loss in gemini-2.0-flash-thinking-exp-1219 responses
2024-12-28 22:02:02 +08:00
Dogtiti
9df24e568b
Merge pull request #5996 from ChatGPTNextWeb/feature/cogview
...
Feature/cogview
2024-12-28 20:25:25 +08:00
Dogtiti
bc322be448
fix: type error
2024-12-28 20:24:08 +08:00
Dogtiti
a867adaf04
fix: size
2024-12-28 20:23:51 +08:00
Dogtiti
0cb186846a
feature: support glm Cogview
2024-12-28 20:23:44 +08:00
Dogtiti
cdfe907fb5
fix: failed unit test
2024-12-28 17:54:21 +08:00
Dogtiti
d91af7f983
Merge pull request #5883 from code-october/fix/model-leak
...
Run Tests / test (push) Waiting to run
fix model leak issue
2024-12-28 14:47:35 +08:00
suruiqiang
081daf937e
since #5984 , add DeepSeek as a new ModelProvider (with deepseek-chat&deepseek-corder models), so that user can use openai and deepseek at same time with different api url&key
2024-12-27 16:57:26 +08:00
zmhuanf
87b5e3bf62
修复bug;
2024-12-22 15:44:47 +08:00
Yiming Zhang
ea1329f73e
fix: add optional chaining to prevent errors when accessing visionModels
2024-12-21 04:07:58 -05:00
Yiming Zhang
149d732cb7
Merge remote-tracking branch 'upstream/main' into feature/flexible-visual-model
2024-12-21 03:53:05 -05:00
Yiming Zhang
210b29bfbe
refactor: remove NEXT_PUBLIC_ prefix from VISION_MODELS env var
2024-12-21 03:51:54 -05:00
dupl
93ac0e5017
Reorganized the Gemini model
2024-12-21 15:26:33 +08:00
dupl
0a056a7c5c
add gemini-exp-1206, gemini-2.0-flash-thinking-exp-1219
2024-12-21 08:00:37 +08:00
Yiming Zhang
74c4711cdd
Merge remote-tracking branch 'upstream/main' into feature/flexible-visual-model
2024-12-20 18:34:07 -05:00
Dogtiti
eceec092cf
Merge pull request #5932 from fengzai6/update-google-models
...
Run Tests / test (push) Waiting to run
Update google models to add gemini-2.0
2024-12-21 00:43:02 +08:00
InitialXKO
e939ce5a02
面具“以文搜图”改成“AI文生图”,微调提示让图片生成更稳定无水印
2024-12-13 22:29:14 +08:00
Nacho.L
46a0b100f7
Update versionKeywords
2024-12-13 08:29:43 +08:00
Nacho.L
e27e8fb0e1
Update google models
2024-12-13 07:22:16 +08:00
fishshi
93c5320bf2
Use i18n for DISCOVERY
2024-12-10 15:56:04 +08:00
Yiming Zhang
a433d1606c
feat: use regex patterns for vision models and allow adding capabilities to models through env var NEXT_PUBLIC_VISION_MODELS.
2024-12-10 00:22:45 -05:00
code-october
1a678cb4d8
fix model leak issue
2024-11-29 15:47:28 +00:00
frostime
759a09a76c
🎨 style(setting): Place custom-model's input a seperated row.
2024-11-27 13:11:18 +08:00
Dogtiti
2623a92763
Merge pull request #5850 from code-october/fix-o1
...
Run Tests / test (push) Has been cancelled
Fix o1
2024-11-25 12:31:36 +08:00
code-october
b7acb89096
update new model for gpt-4o and gemini-exp
2024-11-22 09:48:50 +00:00
code-october
ef24d3e633
use stream when request o1
2024-11-21 03:46:10 +00:00
code-october
23350c842b
fix o1 in disableGPT4
2024-11-21 03:45:07 +00:00
Dogtiti
a2adfbbd32
Merge pull request #5821 from Sherlocksuper/scroll
...
Run Tests / test (push) Has been cancelled
feat: support more user-friendly scrolling
2024-11-16 15:24:46 +08:00
opchips
e56216549e
fix: 代码块嵌入小代码块时渲染错误
2024-11-15 11:56:26 +08:00
Sherlock
19facc7c85
feat: support mort user-friendly scrolling
2024-11-14 21:31:45 +08:00
Lloyd Zhou
b08ce5630c
Merge pull request #5819 from ConnectAI-E/fix-gemini-summary
...
Run Tests / test (push) Has been cancelled
Fix gemini summary
2024-11-13 15:17:44 +08:00
DDMeaqua
b41c012d27
chore: shouldStream
2024-11-13 15:12:46 +08:00
Lloyd Zhou
a392daab71
Merge pull request #5816 from ConnectAI-E/feature/artifacts-svg
...
artifacts support svg
2024-11-13 14:58:33 +08:00