Compare commits

..

29 Commits

Author SHA1 Message Date
semantic-release-bot 9c5341e098 🔖 chore(release): v2.0.0-next.77 [skip ci]
## [Version 2.0.0-next.77](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.76...v2.0.0-next.77)
<sup>Released on **2025-11-18**</sup>

#### ♻ Code Refactoring

- **misc**: Delete /settings/newapi pages in nextjs build.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Delete /settings/newapi pages in nextjs build, closes [#10278](https://github.com/lobehub/lobe-chat/issues/10278) ([9d06753](https://github.com/lobehub/lobe-chat/commit/9d06753))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
2025-11-18 04:04:16 +00:00
Shinji-Li 9d067534ae ♻️ refactor: delete /settings/newapi pages in nextjs build (#10278)
refactor: delete /settings/newapi pages in nextjs build
2025-11-18 11:52:50 +08:00
lobehubbot 6c095a6652 📝 docs(bot): Auto sync agents & plugin to readme 2025-11-18 03:32:23 +00:00
semantic-release-bot d74f424518 🔖 chore(release): v2.0.0-next.76 [skip ci]
## [Version&nbsp;2.0.0-next.76](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.75...v2.0.0-next.76)
<sup>Released on **2025-11-18**</sup>

####  Features

- **misc**: Support Interleaved thinking in MiniMax.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Support Interleaved thinking in MiniMax, closes [#10255](https://github.com/lobehub/lobe-chat/issues/10255) ([13ca8e1](https://github.com/lobehub/lobe-chat/commit/13ca8e1))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
2025-11-18 03:31:09 +00:00
LobeHub Bot 992f4e5ad7 test: add unit tests for colorUtils (#10268)
Added comprehensive unit tests for convertAlphaToSolid function covering:
- Fully opaque and transparent colors
- Various opacity levels (25%, 50%, 75%, 99%)
- Different color formats (hex, rgba, named colors)
- Complex color blending scenarios
- Edge cases with very low/high alpha values
- Complementary colors blending
- Grayscale blending
- Input format consistency

Total: 21 test cases, all passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-18 11:20:11 +08:00
sxjeru 13ca8e18c8 feat: Support Interleaved thinking in MiniMax (#10255)
feat: Enhance LobeMinimaxAI with interleaved thinking and message processing

- Updated LobeMinimaxAI to handle new message structure including reasoning details.
- Added logic to process messages for reasoning content and signatures.
- Resolved parameters with constraints and included reasoning_split in the payload.

test: Update snapshots for NovitaAI, OpenAI, and PPIO models

- Added new models and updated existing model descriptions in snapshots for NovitaAI.
- Updated OpenAI model snapshots to reflect new model additions and descriptions.
- Included new DeepSeek models in PPIO snapshots with detailed descriptions.

fix: Improve error messages for quota and permission issues

- Enhanced error messages for quota limits and permissions to improve clarity and user experience.
2025-11-18 11:19:53 +08:00
lobehubbot fbcd04696e 📝 docs(bot): Auto sync agents & plugin to readme 2025-11-18 01:49:45 +00:00
semantic-release-bot 037c8b5fae 🔖 chore(release): v2.0.0-next.75 [skip ci]
## [Version&nbsp;2.0.0-next.75](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.74...v2.0.0-next.75)
<sup>Released on **2025-11-18**</sup>

#### 💄 Styles

- **misc**: Update i18n.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Styles

* **misc**: Update i18n, closes [#10277](https://github.com/lobehub/lobe-chat/issues/10277) ([7563b62](https://github.com/lobehub/lobe-chat/commit/7563b62))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
2025-11-18 01:48:39 +00:00
LobeHub Bot 7563b62b80 🤖 style: update i18n (#10277) 2025-11-18 09:37:27 +08:00
lobehubbot 3edeb21bb7 📝 docs(bot): Auto sync agents & plugin to readme 2025-11-17 18:23:17 +00:00
semantic-release-bot 9c4780c82e 🔖 chore(release): v2.0.0-next.74 [skip ci]
## [Version&nbsp;2.0.0-next.74](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.73...v2.0.0-next.74)
<sup>Released on **2025-11-17**</sup>

####  Features

- **misc**: Edit local file render & intervention.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Edit local file render & intervention, closes [#10269](https://github.com/lobehub/lobe-chat/issues/10269) ([3785a71](https://github.com/lobehub/lobe-chat/commit/3785a71))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
2025-11-17 18:22:01 +00:00
Arvin Xu 3785a7109a feat: edit local file render & intervention (#10269)
* support editFile render

* clean and add tests

* improve hover state

* support edit local file

* fix tests

* fix desktop build

* fix desktop build

* Revert "fix desktop build"

This reverts commit 6ce58b2eeb.
2025-11-18 02:07:58 +08:00
Arvin Xu 3f4313095f 🔨 chore: update desktop build workflow (#10276)
* fix desktop build

* Revert "fix desktop build"

This reverts commit 455996af6b.

* fix desktop build
2025-11-18 01:20:28 +08:00
lobehubbot 05aeae1b14 📝 docs(bot): Auto sync agents & plugin to readme 2025-11-17 16:13:10 +00:00
semantic-release-bot 2cedca58fe 🔖 chore(release): v2.0.0-next.73 [skip ci]
## [Version&nbsp;2.0.0-next.73](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.72...v2.0.0-next.73)
<sup>Released on **2025-11-17**</sup>

####  Features

- **misc**: Support parallel topic agent runtime.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Support parallel topic agent runtime, closes [#10273](https://github.com/lobehub/lobe-chat/issues/10273) ([02eba3c](https://github.com/lobehub/lobe-chat/commit/02eba3c))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
2025-11-17 16:11:54 +00:00
Arvin Xu 02eba3ce64 feat: support parallel topic agent runtime (#10273)
* add

* refactor to support split topic running

* refactor to support split topic running

* support loading

* fix tests

* fix tests

* fix tests

* fix getDbMessageById
2025-11-18 00:00:17 +08:00
lobehubbot 7461d4e486 📝 docs(bot): Auto sync agents & plugin to readme 2025-11-17 13:06:05 +00:00
Shinji-Li f445ab013c ♻️ refactor: refactor the root from nextjs router to react-router-dom (#10094)
* feat: change the root path to react-router-dom to render spa

* feat: disable / to /chat rewrite

* feat: change /settings labs image profile changelog to spa mode

* feat: use loading to dynamic loading

* fix: change the goback & knowledge/base url

* feat: change some nextjs router to react-router-dom use

* feat: link replace to react-router-dom

* fix: delete useless code

* feat: fix mobile agent settings page not work problem

* fix: fix the test

* fix: slove the router back

* fix: slove ts problem

* fix: change the router judge by servers

* feat: change AppRouter to Desktop Router & mobile Router to dynamic import

* fix: refactor the memory router to browser router

* feat: /chat delete pages & layouts dir

* feat: change all discover page to the spa

* feat: discover pages layout & pages routers get done

* feat: change all routes to outer routes

* feat: change the :slug to react-router loader to get

* feat: change NextJs Link useRouter useSearchParams change to react-router way

* fix: delete some layout tsx & update the ts

* feat: change local params get use ReactRouter Outlet context

* fix: fix hydrateFallback problem

* fix: fix build problem

* fix: change the changelog pages render

* feat: delete all nuqs

* feat: change the mobile me layout back

* chore: add mobile me layout back

* fix: discover find more  link error fixed

* fix: add nuqs back & useQueryState back in oath

* fix: add files back

* fix: add files back

* feat: use starTransition to navigate url

* fix: close the loading in the layout loading

* chore: update test.ts in TopActions.tsx

* fix: delete useless code

* fix: fix mobile router goback fc

* fix: delete the changelog modal page

* feat: fix a lot router problem

* fix: fix useNav in discover page error problem

* feat: rollback some changes about layout

* fix: fixed the desktop knowledge page router

* fix: fixed usage router error

* fix: fixed router link error

* fix: fixed the url & new url not path problem

* fix: fixed the test

* feat: update the useQueryParams throttleMs params

* feat: use more simple way to update session hydration

* fix: delete useless code

* fix: delete uesless code

* fix: mobile chat settings go back

* fix: fix the reload was loading page problem

* fix: fixed the test error

* fix: add router ErrorBoundary

* test: test the loading error

* fix: try to fixed

* fix: test mobile

* feat: add loading back
2025-11-17 20:54:37 +08:00
lobehubbot f88e01e59b 📝 docs(bot): Auto sync agents & plugin to readme 2025-11-17 11:56:28 +00:00
semantic-release-bot 8b5fc3656b 🔖 chore(release): v2.0.0-next.72 [skip ci]
## [Version&nbsp;2.0.0-next.72](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.71...v2.0.0-next.72)
<sup>Released on **2025-11-17**</sup>

#### 💄 Styles

- **misc**: Add model information for the Qiniu provider.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Styles

* **misc**: Add model information for the Qiniu provider, closes [#10270](https://github.com/lobehub/lobe-chat/issues/10270) ([06af793](https://github.com/lobehub/lobe-chat/commit/06af793))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
2025-11-17 11:55:22 +00:00
yliu7949 06af7939e4 💄 style: Add model information for the Qiniu provider (#10270)
style(): update qiniu.ts
2025-11-17 19:43:13 +08:00
lobehubbot e12965c7df 📝 docs(bot): Auto sync agents & plugin to readme 2025-11-17 10:26:09 +00:00
semantic-release-bot 7afd1318db 🔖 chore(release): v2.0.0-next.71 [skip ci]
## [Version&nbsp;2.0.0-next.71](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.70...v2.0.0-next.71)
<sup>Released on **2025-11-17**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix desktop user panel.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Fix desktop user panel, closes [#10272](https://github.com/lobehub/lobe-chat/issues/10272) ([6a374d2](https://github.com/lobehub/lobe-chat/commit/6a374d2))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
2025-11-17 10:24:55 +00:00
Arvin Xu 6a374d2f32 🐛 fix: fix desktop user panel (#10272)
fix desktop
2025-11-17 18:13:34 +08:00
renovate[bot] cec034721f Update opentelemetry-js monorepo to ^0.208.0 (#10253)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-17 13:08:48 +08:00
lobehubbot 2d70632d3e 📝 docs(bot): Auto sync agents & plugin to readme 2025-11-17 04:14:39 +00:00
semantic-release-bot 41c554d748 🔖 chore(release): v2.0.0-next.70 [skip ci]
## [Version&nbsp;2.0.0-next.70](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.69...v2.0.0-next.70)
<sup>Released on **2025-11-17**</sup>

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
2025-11-17 04:13:23 +00:00
LobeHub Bot 4e4933d861 🌐 chore: translate non-English comments to English in packages/types and packages/web-crawler (#10267)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-17 12:01:06 +08:00
René Wang a5bb31b844 ️ perf: improve Chat Screenshot and fix image geneartion (#10261)
* feat: Support narrow mode export

* feat: Replace `modern-screenshot` with `snapDom`

* feat: Add CORS proxy
2025-11-17 12:00:44 +08:00
134 changed files with 6264 additions and 802 deletions
+7 -3
View File
@@ -1,7 +1,7 @@
name: Desktop PR Build
on:
pull_request_target:
pull_request:
types: [synchronize, labeled, unlabeled] # PR 更新或标签变化时触发
# 确保同一 PR 同一时间只运行一个相同的 workflow,取消正在进行的旧的运行
@@ -126,6 +126,7 @@ jobs:
run: npm run workflow:set-desktop-version ${{ needs.version.outputs.version }} nightly
# macOS 构建处理
# 注意:fork 的 PR 无法访问 secrets,会构建未签名版本
- name: Build artifact on macOS
if: runner.os == 'macOS'
run: npm run desktop:build
@@ -136,7 +137,7 @@ jobs:
DATABASE_URL: "postgresql://postgres@localhost:5432/postgres"
# 默认添加一个加密 SECRET
KEY_VAULTS_SECRET: "oLXWIiR/AKF+rWaqy9lHkrYgzpATbW3CtJp3UfkVgpE="
# macOS 签名和公证配置
# macOS 签名和公证配置fork 的 PR 访问不到 secrets,会跳过签名)
CSC_LINK: ${{ secrets.APPLE_CERTIFICATE_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
NEXT_PUBLIC_DESKTOP_PROJECT_ID: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_PROJECT_ID }}
@@ -148,7 +149,8 @@ jobs:
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
# Windows 平台构建处理
# Windows 平台构建处理
# 注意:fork 的 PR 无法访问 secrets,会构建未签名版本
- name: Build artifact on Windows
if: runner.os == 'Windows'
run: npm run desktop:build
@@ -275,6 +277,8 @@ jobs:
publish-pr:
needs: [merge-mac-files, version]
name: Publish PR Build
# 只为非 fork 的 PR 发布(fork 的 PR 没有写权限)
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
# Grant write permissions for creating release and commenting on PR
permissions:
+192
View File
@@ -2,6 +2,198 @@
# Changelog
## [Version 2.0.0-next.77](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.76...v2.0.0-next.77)
<sup>Released on **2025-11-18**</sup>
#### ♻ Code Refactoring
- **misc**: Delete /settings/newapi pages in nextjs build.
<br/>
<details>
<summary><kbd>Improvements and Fixes</kbd></summary>
#### Code refactoring
- **misc**: Delete /settings/newapi pages in nextjs build, closes [#10278](https://github.com/lobehub/lobe-chat/issues/10278) ([9d06753](https://github.com/lobehub/lobe-chat/commit/9d06753))
</details>
<div align="right">
[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
</div>
## [Version 2.0.0-next.76](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.75...v2.0.0-next.76)
<sup>Released on **2025-11-18**</sup>
#### ✨ Features
- **misc**: Support Interleaved thinking in MiniMax.
<br/>
<details>
<summary><kbd>Improvements and Fixes</kbd></summary>
#### What's improved
- **misc**: Support Interleaved thinking in MiniMax, closes [#10255](https://github.com/lobehub/lobe-chat/issues/10255) ([13ca8e1](https://github.com/lobehub/lobe-chat/commit/13ca8e1))
</details>
<div align="right">
[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
</div>
## [Version 2.0.0-next.75](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.74...v2.0.0-next.75)
<sup>Released on **2025-11-18**</sup>
#### 💄 Styles
- **misc**: Update i18n.
<br/>
<details>
<summary><kbd>Improvements and Fixes</kbd></summary>
#### Styles
- **misc**: Update i18n, closes [#10277](https://github.com/lobehub/lobe-chat/issues/10277) ([7563b62](https://github.com/lobehub/lobe-chat/commit/7563b62))
</details>
<div align="right">
[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
</div>
## [Version 2.0.0-next.74](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.73...v2.0.0-next.74)
<sup>Released on **2025-11-17**</sup>
#### ✨ Features
- **misc**: Edit local file render & intervention.
<br/>
<details>
<summary><kbd>Improvements and Fixes</kbd></summary>
#### What's improved
- **misc**: Edit local file render & intervention, closes [#10269](https://github.com/lobehub/lobe-chat/issues/10269) ([3785a71](https://github.com/lobehub/lobe-chat/commit/3785a71))
</details>
<div align="right">
[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
</div>
## [Version 2.0.0-next.73](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.72...v2.0.0-next.73)
<sup>Released on **2025-11-17**</sup>
#### ✨ Features
- **misc**: Support parallel topic agent runtime.
<br/>
<details>
<summary><kbd>Improvements and Fixes</kbd></summary>
#### What's improved
- **misc**: Support parallel topic agent runtime, closes [#10273](https://github.com/lobehub/lobe-chat/issues/10273) ([02eba3c](https://github.com/lobehub/lobe-chat/commit/02eba3c))
</details>
<div align="right">
[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
</div>
## [Version 2.0.0-next.72](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.71...v2.0.0-next.72)
<sup>Released on **2025-11-17**</sup>
#### 💄 Styles
- **misc**: Add model information for the Qiniu provider.
<br/>
<details>
<summary><kbd>Improvements and Fixes</kbd></summary>
#### Styles
- **misc**: Add model information for the Qiniu provider, closes [#10270](https://github.com/lobehub/lobe-chat/issues/10270) ([06af793](https://github.com/lobehub/lobe-chat/commit/06af793))
</details>
<div align="right">
[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
</div>
## [Version 2.0.0-next.71](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.70...v2.0.0-next.71)
<sup>Released on **2025-11-17**</sup>
#### 🐛 Bug Fixes
- **misc**: Fix desktop user panel.
<br/>
<details>
<summary><kbd>Improvements and Fixes</kbd></summary>
#### What's fixed
- **misc**: Fix desktop user panel, closes [#10272](https://github.com/lobehub/lobe-chat/issues/10272) ([6a374d2](https://github.com/lobehub/lobe-chat/commit/6a374d2))
</details>
<div align="right">
[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
</div>
## [Version 2.0.0-next.70](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.69...v2.0.0-next.70)
<sup>Released on **2025-11-17**</sup>
<br/>
<details>
<summary><kbd>Improvements and Fixes</kbd></summary>
</details>
<div align="right">
[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
</div>
## [Version 2.0.0-next.69](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.68...v2.0.0-next.69)
<sup>Released on **2025-11-17**</sup>
+1
View File
@@ -52,6 +52,7 @@
"@typescript/native-preview": "7.0.0-dev.20250711.1",
"consola": "^3.4.2",
"cookie": "^1.0.2",
"diff": "^8.0.2",
"electron": "^38.7.0",
"electron-builder": "^26.0.12",
"electron-is": "^3.0.0",
@@ -18,6 +18,7 @@ import {
WriteLocalFileParams,
} from '@lobechat/electron-client-ipc';
import { SYSTEM_FILES_TO_IGNORE, loadFile } from '@lobechat/file-loaders';
import { createPatch } from 'diff';
import { shell } from 'electron';
import fg from 'fast-glob';
import { Stats, constants } from 'node:fs';
@@ -94,26 +95,45 @@ export default class LocalFileCtr extends ControllerModule {
}
@ipcClientEvent('readLocalFile')
async readFile({ path: filePath, loc }: LocalReadFileParams): Promise<LocalReadFileResult> {
const effectiveLoc = loc ?? [0, 200];
logger.debug('Starting to read file:', { filePath, loc: effectiveLoc });
async readFile({
path: filePath,
loc,
fullContent,
}: LocalReadFileParams): Promise<LocalReadFileResult> {
const effectiveLoc = fullContent ? undefined : (loc ?? [0, 200]);
logger.debug('Starting to read file:', { filePath, fullContent, loc: effectiveLoc });
try {
const fileDocument = await loadFile(filePath);
const [startLine, endLine] = effectiveLoc;
const lines = fileDocument.content.split('\n');
const totalLineCount = lines.length;
const totalCharCount = fileDocument.content.length;
// Adjust slice indices to be 0-based and inclusive/exclusive
const selectedLines = lines.slice(startLine, endLine);
const content = selectedLines.join('\n');
const charCount = content.length;
const lineCount = selectedLines.length;
let content: string;
let charCount: number;
let lineCount: number;
let actualLoc: [number, number];
if (effectiveLoc === undefined) {
// Return full content
content = fileDocument.content;
charCount = totalCharCount;
lineCount = totalLineCount;
actualLoc = [0, totalLineCount];
} else {
// Return specified range
const [startLine, endLine] = effectiveLoc;
const selectedLines = lines.slice(startLine, endLine);
content = selectedLines.join('\n');
charCount = content.length;
lineCount = selectedLines.length;
actualLoc = effectiveLoc;
}
logger.debug('File read successfully:', {
filePath,
fullContent,
selectedLineCount: lineCount,
totalCharCount,
totalLineCount,
@@ -128,7 +148,7 @@ export default class LocalFileCtr extends ControllerModule {
fileType: fileDocument.fileType,
filename: fileDocument.filename,
lineCount,
loc: effectiveLoc,
loc: actualLoc,
// Line count for the selected range
modifiedTime: fileDocument.modifiedTime,
@@ -711,8 +731,32 @@ export default class LocalFileCtr extends ControllerModule {
// Write back to file
await writeFile(filePath, newContent, 'utf8');
logger.info(`${logPrefix} File edited successfully`, { replacements });
// Generate diff for UI display
const patch = createPatch(filePath, content, newContent, '', '');
const diffText = `diff --git a${filePath} b${filePath}\n${patch}`;
// Calculate lines added and deleted from patch
const patchLines = patch.split('\n');
let linesAdded = 0;
let linesDeleted = 0;
for (const line of patchLines) {
if (line.startsWith('+') && !line.startsWith('+++')) {
linesAdded++;
} else if (line.startsWith('-') && !line.startsWith('---')) {
linesDeleted++;
}
}
logger.info(`${logPrefix} File edited successfully`, {
linesAdded,
linesDeleted,
replacements,
});
return {
diffText,
linesAdded,
linesDeleted,
replacements,
success: true,
};
@@ -183,6 +183,26 @@ describe('LocalFileCtr', () => {
expect(result.totalLineCount).toBe(5);
});
it('should read full file content when fullContent is true', async () => {
const mockFileContent = 'line1\nline2\nline3\nline4\nline5';
vi.mocked(mockLoadFile).mockResolvedValue({
content: mockFileContent,
filename: 'test.txt',
fileType: 'txt',
createdTime: new Date('2024-01-01'),
modifiedTime: new Date('2024-01-02'),
});
const result = await localFileCtr.readFile({ path: '/test/file.txt', fullContent: true });
expect(result.content).toBe(mockFileContent);
expect(result.lineCount).toBe(5);
expect(result.charCount).toBe(mockFileContent.length);
expect(result.totalLineCount).toBe(5);
expect(result.totalCharCount).toBe(mockFileContent.length);
expect(result.loc).toEqual([0, 5]);
});
it('should handle file read error', async () => {
vi.mocked(mockLoadFile).mockRejectedValue(new Error('File not found'));
@@ -392,4 +412,137 @@ describe('LocalFileCtr', () => {
});
});
});
describe('handleEditFile', () => {
it('should replace first occurrence successfully', async () => {
const originalContent = 'Hello world\nHello again\nGoodbye world';
vi.mocked(mockFsPromises.readFile).mockResolvedValue(originalContent);
vi.mocked(mockFsPromises.writeFile).mockResolvedValue(undefined);
const result = await localFileCtr.handleEditFile({
file_path: '/test/file.txt',
old_string: 'Hello',
new_string: 'Hi',
replace_all: false,
});
expect(result.success).toBe(true);
expect(result.replacements).toBe(1);
expect(result.linesAdded).toBe(1);
expect(result.linesDeleted).toBe(1);
expect(result.diffText).toContain('diff --git a/test/file.txt b/test/file.txt');
expect(mockFsPromises.writeFile).toHaveBeenCalledWith(
'/test/file.txt',
'Hi world\nHello again\nGoodbye world',
'utf8',
);
});
it('should replace all occurrences when replace_all is true', async () => {
const originalContent = 'Hello world\nHello again\nHello there';
vi.mocked(mockFsPromises.readFile).mockResolvedValue(originalContent);
vi.mocked(mockFsPromises.writeFile).mockResolvedValue(undefined);
const result = await localFileCtr.handleEditFile({
file_path: '/test/file.txt',
old_string: 'Hello',
new_string: 'Hi',
replace_all: true,
});
expect(result.success).toBe(true);
expect(result.replacements).toBe(3);
expect(result.linesAdded).toBe(3);
expect(result.linesDeleted).toBe(3);
expect(mockFsPromises.writeFile).toHaveBeenCalledWith(
'/test/file.txt',
'Hi world\nHi again\nHi there',
'utf8',
);
});
it('should handle multiline replacement correctly', async () => {
const originalContent = 'function test() {\n console.log("old");\n}';
vi.mocked(mockFsPromises.readFile).mockResolvedValue(originalContent);
vi.mocked(mockFsPromises.writeFile).mockResolvedValue(undefined);
const result = await localFileCtr.handleEditFile({
file_path: '/test/file.js',
old_string: 'console.log("old");',
new_string: 'console.log("new");\n console.log("added");',
replace_all: false,
});
expect(result.success).toBe(true);
expect(result.replacements).toBe(1);
expect(result.linesAdded).toBe(2);
expect(result.linesDeleted).toBe(1);
});
it('should return error when old_string is not found', async () => {
const originalContent = 'Hello world';
vi.mocked(mockFsPromises.readFile).mockResolvedValue(originalContent);
const result = await localFileCtr.handleEditFile({
file_path: '/test/file.txt',
old_string: 'NonExistent',
new_string: 'New',
replace_all: false,
});
expect(result.success).toBe(false);
expect(result.error).toBe('The specified old_string was not found in the file');
expect(result.replacements).toBe(0);
expect(mockFsPromises.writeFile).not.toHaveBeenCalled();
});
it('should handle file read error', async () => {
vi.mocked(mockFsPromises.readFile).mockRejectedValue(new Error('Permission denied'));
const result = await localFileCtr.handleEditFile({
file_path: '/test/file.txt',
old_string: 'Hello',
new_string: 'Hi',
replace_all: false,
});
expect(result.success).toBe(false);
expect(result.error).toBe('Permission denied');
expect(result.replacements).toBe(0);
});
it('should handle file write error', async () => {
const originalContent = 'Hello world';
vi.mocked(mockFsPromises.readFile).mockResolvedValue(originalContent);
vi.mocked(mockFsPromises.writeFile).mockRejectedValue(new Error('Disk full'));
const result = await localFileCtr.handleEditFile({
file_path: '/test/file.txt',
old_string: 'Hello',
new_string: 'Hi',
replace_all: false,
});
expect(result.success).toBe(false);
expect(result.error).toBe('Disk full');
});
it('should generate correct diff format', async () => {
const originalContent = 'line 1\nline 2\nline 3';
vi.mocked(mockFsPromises.readFile).mockResolvedValue(originalContent);
vi.mocked(mockFsPromises.writeFile).mockResolvedValue(undefined);
const result = await localFileCtr.handleEditFile({
file_path: '/test/file.txt',
old_string: 'line 2',
new_string: 'modified line 2',
replace_all: false,
});
expect(result.success).toBe(true);
expect(result.diffText).toContain('diff --git a/test/file.txt b/test/file.txt');
expect(result.diffText).toContain('-line 2');
expect(result.diffText).toContain('+modified line 2');
});
});
});
+47
View File
@@ -1,4 +1,51 @@
[
{
"children": {
"features": ["Support Interleaved thinking in MiniMax."]
},
"date": "2025-11-18",
"version": "2.0.0-next.76"
},
{
"children": {
"improvements": ["Update i18n."]
},
"date": "2025-11-18",
"version": "2.0.0-next.75"
},
{
"children": {
"features": ["Edit local file render & intervention."]
},
"date": "2025-11-17",
"version": "2.0.0-next.74"
},
{
"children": {
"features": ["Support parallel topic agent runtime."]
},
"date": "2025-11-17",
"version": "2.0.0-next.73"
},
{
"children": {
"improvements": ["Add model information for the Qiniu provider."]
},
"date": "2025-11-17",
"version": "2.0.0-next.72"
},
{
"children": {
"fixes": ["Fix desktop user panel."]
},
"date": "2025-11-17",
"version": "2.0.0-next.71"
},
{
"children": {},
"date": "2025-11-17",
"version": "2.0.0-next.70"
},
{
"children": {
"improvements": ["Remove language_model_settings and remove isDeprecatedEdition."]
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "لقطة شاشة",
"settings": "إعدادات التصدير",
"text": "نص",
"widthMode": {
"label": "وضع العرض",
"narrow": "وضع الشاشة الضيقة",
"wide": "وضع الشاشة الواسعة"
},
"withBackground": "تضمين صورة الخلفية",
"withFooter": "تضمين تذييل",
"withPluginInfo": "تضمين معلومات البرنامج المساعد",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct هو نموذج صغير الحجم وعالي الكفاءة أطلقته شركة Wuwen Xinqiong."
},
"meituan/longcat-flash-chat": {
"description": "نموذج أساسي غير تأملي مفتوح المصدر من Meituan، مُحسَّن للتفاعل الحواري ومهام الوكلاء الذكيين، ويتميز في استدعاء الأدوات وسيناريوهات التفاعل المعقدة متعددة الجولات."
},
"meta-llama-3-70b-instruct": {
"description": "نموذج قوي بحجم 70 مليار معلمة يتفوق في التفكير، والترميز، وتطبيقات اللغة الواسعة."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 هو نموذج لغوي كبير وفعّال، تم تطويره خصيصًا لتلبية احتياجات الترميز وتدفقات عمل الوكلاء."
},
"minimax/minimax-m2": {
"description": "مصمم خصيصًا للترميز الفعّال وتدفقات عمل الوكلاء."
},
"ministral-3b-latest": {
"description": "Ministral 3B هو نموذج حافة عالمي المستوى من Mistral."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 هو نموذج لغوي تقدمه Microsoft AI، يتميز بأداء ممتاز في الحوار المعقد، واللغات المتعددة، والاستدلال، والمساعدين الذكيين."
},
"x-ai/grok-4-fast": {
"description": "يسعدنا أن نعلن عن إصدار Grok 4 Fast، وهو أحدث تقدم لنا في نماذج الاستدلال الفعّالة من حيث التكلفة."
},
"x-ai/grok-code-fast-1": {
"description": "يسعدنا إطلاق grok-code-fast-1، وهو نموذج استدلال سريع وفعّال من حيث التكلفة يتميز في ترميز الوكلاء."
},
"x1": {
"description": "سيتم ترقية نموذج Spark X1 بشكل أكبر، حيث ستحقق المهام العامة مثل الاستدلال، وتوليد النصوص، وفهم اللغة نتائج تتماشى مع OpenAI o1 و DeepSeek R1."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "نموذج مهام بصرية معقدة، يوفر فهمًا عالي الأداء وقدرات تحليلية بناءً على صور متعددة."
},
"z-ai/glm-4.6": {
"description": "GLM-4.6 هو النموذج الرائد الأحدث من Zhipu، ويتفوق على الجيل السابق في الترميز المتقدم، ومعالجة النصوص الطويلة، والاستدلال، وقدرات الوكلاء الذكيين."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 هو نموذج أساسي مصمم لتطبيقات الوكلاء الذكية، يستخدم بنية Mixture-of-Experts (MoE). تم تحسينه بعمق في مجالات استدعاء الأدوات، تصفح الويب، هندسة البرمجيات، وبرمجة الواجهة الأمامية، ويدعم التكامل السلس مع وكلاء الكود مثل Claude Code وRoo Code. يستخدم وضع استدلال مختلط ليتكيف مع سيناريوهات الاستدلال المعقدة والاستخدام اليومي."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "كلمة تلميح"
},
"localFiles": {
"editFile": {
"newString": "استبدال بـ",
"oldString": "البحث عن",
"replaceAll": "استبدال جميع المطابقات",
"replaceFirst": "استبدال أول مطابقة فقط"
},
"file": "ملف",
"folder": "مجلد",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "قراءة الملف",
"readFileError": "فشل في قراءة الملف، يرجى التحقق من صحة مسار الملف",
"readFiles": "قراءة الملفات",
"readFilesError": "فشل في قراءة الملفات، يرجى التحقق من صحة مسار الملف"
"readFilesError": "فشل في قراءة الملفات، يرجى التحقق من صحة مسار الملف",
"writeFile": {
"characters": "أحرف",
"preview": "معاينة المحتوى",
"truncated": "تم الاقتطاع"
}
},
"search": {
"createNewSearch": "إنشاء سجل بحث جديد",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "Екранна снимка",
"settings": "Настройки за експортиране",
"text": "Текст",
"widthMode": {
"label": "Режим на ширина",
"narrow": "Режим за тесен екран",
"wide": "Режим за широк екран"
},
"withBackground": "Включи фоново изображение",
"withFooter": "Включи долен колонтитул",
"withPluginInfo": "Включи информация за плъгина",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct е ефективен модел с малък брой параметри, разработен от Wuwen Xinqiong."
},
"meituan/longcat-flash-chat": {
"description": "Longcat Flash Chat е с отворен код от Meituan и представлява базов модел без мисловни процеси, оптимизиран за диалогови взаимодействия и задачи на интелигентни агенти, с изключителна ефективност при използване на инструменти и в сложни многократни взаимодействия."
},
"meta-llama-3-70b-instruct": {
"description": "Мощен модел с 70 милиарда параметри, отличаващ се в разсъждения, кодиране и широки езикови приложения."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 е ефективен голям езиков модел, създаден специално за кодиране и работни процеси с агенти."
},
"minimax/minimax-m2": {
"description": "Създаден специално за ефективно кодиране и работни потоци с агенти."
},
"ministral-3b-latest": {
"description": "Ministral 3B е световен лидер сред моделите на Mistral."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 е езиков модел, предоставен от Microsoft AI, който се отличава в сложни диалози, многоезичност, разсъждение и интелигентни асистенти."
},
"x-ai/grok-4-fast": {
"description": "С радост представяме Grok 4 Fast — нашият най-нов напредък в модели за ефективно и икономично извеждане."
},
"x-ai/grok-code-fast-1": {
"description": "С гордост представяме grok-code-fast-1 — бърз и икономичен модел за извеждане, който се отличава в агентно кодиране."
},
"x1": {
"description": "Моделът Spark X1 ще бъде допълнително обновен, като на базата на водещите в страната резултати в математически задачи, ще постигне ефекти в общи задачи като разсъждение, генериране на текст и разбиране на език, сравними с OpenAI o1 и DeepSeek R1."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "Модел за сложни визуални задачи, предлагащ висока производителност в разбирането и анализа на базата на множество изображения."
},
"z-ai/glm-4.6": {
"description": "GLM-4.6 е най-новият флагмански модел на Zhipu, който значително надминава предшествениците си в напреднало кодиране, обработка на дълги текстове, извеждане и способности на интелигентни агенти."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 е базов модел, специално създаден за интелигентни агенти, използващ архитектура с микс от експерти (Mixture-of-Experts). Той е дълбоко оптимизиран за използване на инструменти, уеб браузване, софтуерно инженерство и фронтенд програмиране, и поддържа безпроблемна интеграция с кодови агенти като Claude Code и Roo Code. GLM-4.5 използва смесен режим на разсъждение, подходящ за сложни и ежедневни приложения."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "подсказка"
},
"localFiles": {
"editFile": {
"newString": "Замени с",
"oldString": "Търсене на съдържание",
"replaceAll": "Замени всички съвпадения",
"replaceFirst": "Замени само първото съвпадение"
},
"file": "Файл",
"folder": "Папка",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "Прочети файл",
"readFileError": "Неуспешно четене на файла, моля, проверете дали пътят към файла е правилен",
"readFiles": "Прочети файлове",
"readFilesError": "Неуспешно четене на файловете, моля, проверете дали пътят към файловете е правилен"
"readFilesError": "Неуспешно четене на файловете, моля, проверете дали пътят към файловете е правилен",
"writeFile": {
"characters": "Знаци",
"preview": "Преглед на съдържанието",
"truncated": "Съкратено"
}
},
"search": {
"createNewSearch": "Създаване на нова търсене",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "Screenshot",
"settings": "Exporteinstellungen",
"text": "Text",
"widthMode": {
"label": "Breitenmodus",
"narrow": "Schmalbildmodus",
"wide": "Breitbildmodus"
},
"withBackground": "Mit Hintergrundbild",
"withFooter": "Mit Fußzeile",
"withPluginInfo": "Mit Plugin-Informationen",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct ist ein effizientes Modell mit geringer Parameteranzahl, entwickelt von Wuwen Xinqiong."
},
"meituan/longcat-flash-chat": {
"description": "Ein von Meituan entwickeltes Open-Source-Basismodell, das speziell für dialogorientierte Interaktionen und agentenbasierte Aufgaben optimiert wurde und sich besonders bei Werkzeugaufrufen und komplexen mehrstufigen Dialogszenarien auszeichnet."
},
"meta-llama-3-70b-instruct": {
"description": "Ein leistungsstarkes Modell mit 70 Milliarden Parametern, das in den Bereichen Schlussfolgerungen, Programmierung und breiten Sprachanwendungen herausragt."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 ist ein leistungsstarkes, effizientes Sprachmodell, das speziell für Programmier- und Agenten-Workflows entwickelt wurde."
},
"minimax/minimax-m2": {
"description": "Speziell entwickelt für effizientes Codieren und Agenten-Workflows."
},
"ministral-3b-latest": {
"description": "Ministral 3B ist das weltbeste Edge-Modell von Mistral."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 ist ein Sprachmodell von Microsoft AI, das in komplexen Dialogen, mehrsprachigen Anwendungen, Schlussfolgerungen und intelligenten Assistenten besonders gut abschneidet."
},
"x-ai/grok-4-fast": {
"description": "Wir freuen uns, Grok 4 Fast vorzustellen unseren neuesten Fortschritt im Bereich kosteneffizienter Inferenzmodelle."
},
"x-ai/grok-code-fast-1": {
"description": "Wir freuen uns, grok-code-fast-1 zu präsentieren ein schnelles und kosteneffizientes Inferenzmodell mit hervorragender Leistung im Bereich Agenten-Codierung."
},
"x1": {
"description": "Das Spark X1 Modell wird weiter verbessert und erreicht in allgemeinen Aufgaben wie Schlussfolgerungen, Textgenerierung und Sprachverständnis Ergebnisse, die mit OpenAI o1 und DeepSeek R1 vergleichbar sind, basierend auf der bereits führenden Leistung in mathematischen Aufgaben."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "Ein Modell für komplexe visuelle Aufgaben, das leistungsstarke Verständnis- und Analysefähigkeiten auf der Grundlage mehrerer Bilder bietet."
},
"z-ai/glm-4.6": {
"description": "Das neueste Flaggschiffmodell von Zhipu, GLM-4.6, übertrifft seine Vorgänger deutlich in den Bereichen fortgeschrittenes Codieren, Verarbeitung langer Texte, logisches Schließen und agentenbasierte Fähigkeiten."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 ist ein speziell für Agentenanwendungen entwickeltes Basismodell mit Mixture-of-Experts-Architektur. Es ist tief optimiert für Werkzeugaufrufe, Web-Browsing, Softwareentwicklung und Frontend-Programmierung und unterstützt nahtlos die Integration in Code-Agenten wie Claude Code und Roo Code. GLM-4.5 verwendet einen hybriden Inferenzmodus und ist für komplexe Schlussfolgerungen sowie den Alltagsgebrauch geeignet."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "Hinweiswort"
},
"localFiles": {
"editFile": {
"newString": "Ersetzen durch",
"oldString": "Suchbegriff",
"replaceAll": "Alle Vorkommen ersetzen",
"replaceFirst": "Nur erstes Vorkommen ersetzen"
},
"file": "Datei",
"folder": "Ordner",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "Datei lesen",
"readFileError": "Fehler beim Lesen der Datei, bitte überprüfen Sie den Dateipfad",
"readFiles": "Dateien lesen",
"readFilesError": "Fehler beim Lesen der Dateien, bitte überprüfen Sie den Dateipfad"
"readFilesError": "Fehler beim Lesen der Dateien, bitte überprüfen Sie den Dateipfad",
"writeFile": {
"characters": "Zeichen",
"preview": "Vorschau des Inhalts",
"truncated": "Abgeschnitten"
}
},
"search": {
"createNewSearch": "Neue Suchanfrage erstellen",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "Screenshot",
"settings": "Export Settings",
"text": "Text",
"widthMode": {
"label": "Width Mode",
"narrow": "Narrow",
"wide": "Wide"
},
"withBackground": "Include Background Image",
"withFooter": "Include Footer",
"withPluginInfo": "Include Plugin Information",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct is a compact and efficient model developed by Wuwen Xinqiong."
},
"meituan/longcat-flash-chat": {
"description": "An open-source foundational model from Meituan, optimized for conversational interactions and agent-based tasks. Excels in tool usage and complex multi-turn dialogue scenarios."
},
"meta-llama-3-70b-instruct": {
"description": "A powerful 70-billion parameter model excelling in reasoning, coding, and broad language applications."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 is a high-efficiency large language model built for coding and agent-based workflows."
},
"minimax/minimax-m2": {
"description": "Purpose-built for efficient coding and agent workflows."
},
"ministral-3b-latest": {
"description": "Ministral 3B is Mistral's top-tier edge model."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 is a language model provided by Microsoft AI, excelling in complex dialogues, multilingual capabilities, reasoning, and intelligent assistant applications."
},
"x-ai/grok-4-fast": {
"description": "Were excited to introduce Grok 4 Fast, our latest advancement in cost-effective reasoning models."
},
"x-ai/grok-code-fast-1": {
"description": "Were proud to launch grok-code-fast-1, a fast and cost-efficient reasoning model that excels in agent-based coding tasks."
},
"x1": {
"description": "The Spark X1 model will undergo further upgrades, achieving results in reasoning, text generation, and language understanding tasks that match OpenAI o1 and DeepSeek R1, building on its leading position in domestic mathematical tasks."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "A complex visual task model that provides high-performance understanding and analysis capabilities based on multiple images."
},
"z-ai/glm-4.6": {
"description": "GLM-4.6, the latest flagship model from Zhipu AI, delivers significant improvements over its predecessor in advanced coding, long-form text processing, reasoning, and agent capabilities."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 is a foundational model designed specifically for agent applications, using a Mixture-of-Experts (MoE) architecture. It is deeply optimized for tool invocation, web browsing, software engineering, and front-end programming, supporting seamless integration with code agents like Claude Code and Roo Code. GLM-4.5 employs a hybrid inference mode, adaptable to complex reasoning and everyday use scenarios."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "Prompt"
},
"localFiles": {
"editFile": {
"newString": "Replace with",
"oldString": "Find",
"replaceAll": "Replace all occurrences",
"replaceFirst": "Replace first occurrence only"
},
"file": "File",
"folder": "Folder",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "Read File",
"readFileError": "Failed to read file, please check if the file path is correct",
"readFiles": "Read Files",
"readFilesError": "Failed to read files, please check if the file path is correct"
"readFilesError": "Failed to read files, please check if the file path is correct",
"writeFile": {
"characters": "characters",
"preview": "Content Preview",
"truncated": "truncated"
}
},
"search": {
"createNewSearch": "Create a new search record",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "Captura de pantalla",
"settings": "Configuración de exportación",
"text": "Texto",
"widthMode": {
"label": "Modo de ancho",
"narrow": "Modo de pantalla estrecha",
"wide": "Modo de pantalla ancha"
},
"withBackground": "Incluir imagen de fondo",
"withFooter": "Incluir pie de página",
"withPluginInfo": "Incluir información del plugin",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct es un modelo eficiente de bajo número de parámetros desarrollado por Wuwen Xinqiong."
},
"meituan/longcat-flash-chat": {
"description": "Modelo base no reflexivo de código abierto de Meituan, optimizado para interacciones conversacionales y tareas de agentes inteligentes, con un rendimiento destacado en llamadas a herramientas y escenarios complejos de múltiples turnos."
},
"meta-llama-3-70b-instruct": {
"description": "Un poderoso modelo de 70 mil millones de parámetros que sobresale en razonamiento, codificación y amplias aplicaciones de lenguaje."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 es un modelo de lenguaje grande y eficiente, diseñado para flujos de trabajo de codificación y agentes."
},
"minimax/minimax-m2": {
"description": "Diseñado para una codificación eficiente y flujos de trabajo de agentes."
},
"ministral-3b-latest": {
"description": "Ministral 3B es el modelo de borde de primer nivel mundial de Mistral."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 es un modelo de lenguaje proporcionado por Microsoft AI, que destaca en diálogos complejos, multilingües, razonamiento y asistentes inteligentes."
},
"x-ai/grok-4-fast": {
"description": "Nos complace presentar Grok 4 Fast, nuestro último avance en modelos de inferencia rentables."
},
"x-ai/grok-code-fast-1": {
"description": "Nos complace lanzar grok-code-fast-1, un modelo de inferencia rápido y rentable con un rendimiento sobresaliente en codificación para agentes."
},
"x1": {
"description": "El modelo Spark X1 se actualizará aún más, logrando resultados en tareas generales como razonamiento, generación de texto y comprensión del lenguaje que se comparan con OpenAI o1 y DeepSeek R1, además de liderar en tareas matemáticas en el país."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "Modelo para tareas visuales complejas, que ofrece capacidades de comprensión y análisis de alto rendimiento basadas en múltiples imágenes."
},
"z-ai/glm-4.6": {
"description": "El nuevo modelo insignia de Zhipu, GLM-4.6, supera ampliamente a su predecesor en codificación avanzada, procesamiento de textos largos, razonamiento y capacidades de agentes inteligentes."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 es un modelo base diseñado para aplicaciones de agentes inteligentes, utilizando arquitectura Mixture-of-Experts (MoE). Está profundamente optimizado para llamadas a herramientas, navegación web, ingeniería de software y programación frontend, soportando integración fluida con agentes de código como Claude Code y Roo Code. GLM-4.5 emplea un modo de inferencia híbrido que se adapta a escenarios de razonamiento complejo y uso cotidiano."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "Palabra de aviso"
},
"localFiles": {
"editFile": {
"newString": "Reemplazar con",
"oldString": "Buscar",
"replaceAll": "Reemplazar todas las coincidencias",
"replaceFirst": "Reemplazar solo la primera coincidencia"
},
"file": "Archivo",
"folder": "Carpeta",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "Leer archivo",
"readFileError": "Error al leer el archivo, por favor verifica si la ruta del archivo es correcta",
"readFiles": "Leer archivos",
"readFilesError": "Error al leer los archivos, por favor verifica si la ruta del archivo es correcta"
"readFilesError": "Error al leer los archivos, por favor verifica si la ruta del archivo es correcta",
"writeFile": {
"characters": "caracteres",
"preview": "Vista previa del contenido",
"truncated": "Truncado"
}
},
"search": {
"createNewSearch": "Crear un nuevo registro de búsqueda",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "اسکرین‌شات",
"settings": "تنظیمات خروجی",
"text": "متن",
"widthMode": {
"label": "حالت عرض",
"narrow": "حالت صفحه باریک",
"wide": "حالت صفحه عریض"
},
"withBackground": "شامل تصویر پس‌زمینه",
"withFooter": "شامل پاورقی",
"withPluginInfo": "شامل اطلاعات افزونه",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct یک مدل کم‌پارامتر و کارآمد است که توسط Wuwen Xinqiong ارائه شده است."
},
"meituan/longcat-flash-chat": {
"description": "مدل پایه غیرتفکری متن‌باز Meituan که به‌طور ویژه برای تعاملات گفت‌وگویی و وظایف عامل‌ها بهینه‌سازی شده است و در فراخوانی ابزارها و سناریوهای پیچیده چندمرحله‌ای عملکرد برجسته‌ای دارد."
},
"meta-llama-3-70b-instruct": {
"description": "یک مدل قدرتمند با ۷۰ میلیارد پارامتر که در استدلال، کدنویسی و کاربردهای گسترده زبانی عملکرد برجسته‌ای دارد."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 یک مدل زبانی بزرگ و کارآمد است که به‌طور خاص برای کدنویسی و جریان‌های کاری عامل‌محور طراحی شده است."
},
"minimax/minimax-m2": {
"description": "ویژه طراحی شده برای کدنویسی کارآمد و جریان‌های کاری عامل‌ها."
},
"ministral-3b-latest": {
"description": "Ministral 3B مدل پیشرفته و برتر Mistral در سطح جهانی است."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 یک مدل زبانی ارائه شده توسط مایکروسافت AI است که در زمینه‌های مکالمات پیچیده، چندزبانه، استدلال و دستیارهای هوشمند عملکرد برجسته‌ای دارد."
},
"x-ai/grok-4-fast": {
"description": "ما با خوشحالی Grok 4 Fast را معرفی می‌کنیم، جدیدترین پیشرفت ما در زمینه مدل‌های استنتاجی مقرون‌به‌صرفه."
},
"x-ai/grok-code-fast-1": {
"description": "ما با افتخار grok-code-fast-1 را معرفی می‌کنیم، مدلی سریع و اقتصادی برای استنتاج که در کدنویسی عامل‌ها عملکردی عالی دارد."
},
"x1": {
"description": "مدل Spark X1 به‌زودی ارتقا خواهد یافت و در زمینه وظایف ریاضی که در کشور پیشرو است، عملکردهای استدلال، تولید متن و درک زبان را با OpenAI o1 و DeepSeek R1 مقایسه خواهد کرد."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "مدل‌های پیچیده بصری که قابلیت‌های درک و تحلیل با عملکرد بالا را بر اساس چندین تصویر ارائه می‌دهند."
},
"z-ai/glm-4.6": {
"description": "جدیدترین مدل پرچم‌دار Zhipu به نام GLM-4.6 که در کدنویسی پیشرفته، پردازش متون طولانی، استنتاج و توانایی‌های عامل‌ها به‌طور کامل از نسل قبلی پیشی گرفته است."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 یک مدل پایه طراحی شده برای کاربردهای عامل هوشمند است که از معماری Mixture-of-Experts استفاده می‌کند. این مدل در زمینه‌های فراخوانی ابزار، مرور وب، مهندسی نرم‌افزار و برنامه‌نویسی فرانت‌اند بهینه‌سازی عمیق شده و از ادغام بی‌وقفه با عامل‌های کد مانند Claude Code و Roo Code پشتیبانی می‌کند. GLM-4.5 از حالت استدلال ترکیبی بهره می‌برد و می‌تواند در سناریوهای استدلال پیچیده و استفاده روزمره به خوبی عمل کند."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "کلمات کلیدی"
},
"localFiles": {
"editFile": {
"newString": "جایگزین با",
"oldString": "یافتن محتوا",
"replaceAll": "جایگزینی تمام موارد",
"replaceFirst": "فقط اولین مورد را جایگزین کن"
},
"file": "فایل",
"folder": "پوشه",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "خواندن فایل",
"readFileError": "خطا در خواندن فایل، لطفاً مسیر فایل را بررسی کنید",
"readFiles": "خواندن فایل‌ها",
"readFilesError": "خطا در خواندن فایل‌ها، لطفاً مسیر فایل‌ها را بررسی کنید"
"readFilesError": "خطا در خواندن فایل‌ها، لطفاً مسیر فایل‌ها را بررسی کنید",
"writeFile": {
"characters": "کاراکتر",
"preview": "پیش‌نمایش محتوا",
"truncated": "بریده شده"
}
},
"search": {
"createNewSearch": "ایجاد جستجوی جدید",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "Capture d'écran",
"settings": "Paramètres d'exportation",
"text": "Texte",
"widthMode": {
"label": "Mode de largeur",
"narrow": "Mode écran étroit",
"wide": "Mode écran large"
},
"withBackground": "Avec image de fond",
"withFooter": "Avec pied de page",
"withPluginInfo": "Avec informations sur le plugin",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct est un modèle efficace à faible nombre de paramètres lancé par Wuwen Xinqiong."
},
"meituan/longcat-flash-chat": {
"description": "Modèle de base non réflexif open source de Meituan, optimisé pour les interactions conversationnelles et les tâches d'agents intelligents, offrant d'excellentes performances dans les appels d'outils et les scénarios d'interactions complexes à plusieurs tours."
},
"meta-llama-3-70b-instruct": {
"description": "Un puissant modèle de 70 milliards de paramètres excelling dans le raisonnement, le codage et les applications linguistiques larges."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 est un modèle de langage de grande taille, efficace et conçu pour les flux de travail en codage et en automatisation."
},
"minimax/minimax-m2": {
"description": "Conçu pour un codage efficace et des flux de travail d'agents performants."
},
"ministral-3b-latest": {
"description": "Ministral 3B est le modèle de pointe de Mistral sur le marché."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 est un modèle de langage proposé par Microsoft AI, particulièrement performant dans les domaines des dialogues complexes, du multilinguisme, du raisonnement et des assistants intelligents."
},
"x-ai/grok-4-fast": {
"description": "Nous sommes ravis de présenter Grok 4 Fast, notre dernière avancée en matière de modèles de raisonnement rentables."
},
"x-ai/grok-code-fast-1": {
"description": "Nous sommes heureux de lancer grok-code-fast-1, un modèle de raisonnement rapide et économique, particulièrement performant pour le codage assisté par agent."
},
"x1": {
"description": "Le modèle Spark X1 sera mis à niveau, et sur la base de ses performances déjà leaders dans les tâches mathématiques, il atteindra des résultats comparables dans des tâches générales telles que le raisonnement, la génération de texte et la compréhension du langage, en se mesurant à OpenAI o1 et DeepSeek R1."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "Modèle pour des tâches visuelles complexes, offrant des capacités de compréhension et d'analyse de haute performance basées sur plusieurs images."
},
"z-ai/glm-4.6": {
"description": "GLM-4.6, le tout dernier modèle phare de Zhipu, surpasse son prédécesseur dans les domaines du codage avancé, du traitement de longs textes, du raisonnement et des capacités d'agents intelligents."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 est un modèle de base conçu pour les applications d'agents intelligents, utilisant une architecture Mixture-of-Experts (MoE). Il est profondément optimisé pour l'appel d'outils, la navigation web, l'ingénierie logicielle et la programmation front-end, supportant une intégration transparente avec des agents de code tels que Claude Code et Roo Code. GLM-4.5 utilise un mode d'inférence hybride, adapté à des scénarios variés allant du raisonnement complexe à l'usage quotidien."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "Mot de rappel"
},
"localFiles": {
"editFile": {
"newString": "Remplacer par",
"oldString": "Rechercher",
"replaceAll": "Remplacer toutes les occurrences",
"replaceFirst": "Remplacer uniquement la première occurrence"
},
"file": "Fichier",
"folder": "Dossier",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "Lire le fichier",
"readFileError": "Échec de la lecture du fichier, veuillez vérifier si le chemin du fichier est correct",
"readFiles": "Lire les fichiers",
"readFilesError": "Échec de la lecture des fichiers, veuillez vérifier si le chemin du fichier est correct"
"readFilesError": "Échec de la lecture des fichiers, veuillez vérifier si le chemin du fichier est correct",
"writeFile": {
"characters": "caractères",
"preview": "Aperçu du contenu",
"truncated": "Tronqué"
}
},
"search": {
"createNewSearch": "Créer un nouvel enregistrement de recherche",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "Screenshot",
"settings": "Impostazioni di esportazione",
"text": "Testo",
"widthMode": {
"label": "Modalità larghezza",
"narrow": "Modalità schermo stretto",
"wide": "Modalità schermo ampio"
},
"withBackground": "Con immagine di sfondo",
"withFooter": "Con piè di pagina",
"withPluginInfo": "Con informazioni sul plugin",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct è un modello efficiente a basso numero di parametri sviluppato da Wuwen Xinqiong."
},
"meituan/longcat-flash-chat": {
"description": "Modello base non riflessivo open source di Meituan, ottimizzato per l'interazione dialogica e i compiti degli agenti intelligenti, eccelle nell'uso di strumenti e in scenari complessi di conversazione multi-turno."
},
"meta-llama-3-70b-instruct": {
"description": "Un potente modello con 70 miliardi di parametri che eccelle nel ragionamento, nella codifica e nelle ampie applicazioni linguistiche."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 è un modello linguistico di grandi dimensioni, efficiente e progettato per flussi di lavoro di codifica e agenti intelligenti."
},
"minimax/minimax-m2": {
"description": "Progettato per una codifica efficiente e flussi di lavoro con agenti."
},
"ministral-3b-latest": {
"description": "Ministral 3B è il modello di punta di Mistral per edge computing."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 è un modello di linguaggio fornito da Microsoft AI, particolarmente efficace in dialoghi complessi, multilingue, ragionamento e assistenti intelligenti."
},
"x-ai/grok-4-fast": {
"description": "Siamo lieti di presentare Grok 4 Fast, il nostro ultimo progresso nei modelli di inferenza ad alta efficienza in termini di costi."
},
"x-ai/grok-code-fast-1": {
"description": "Siamo entusiasti di lanciare grok-code-fast-1, un modello di inferenza rapido ed economico, eccellente nella codifica per agenti."
},
"x1": {
"description": "Il modello Spark X1 sarà ulteriormente aggiornato, raggiungendo risultati in compiti generali come ragionamento, generazione di testo e comprensione del linguaggio, in linea con OpenAI o1 e DeepSeek R1, partendo da una posizione di leadership nei compiti matematici."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "Modello per compiti visivi complessi, che offre capacità di comprensione e analisi ad alte prestazioni basate su più immagini."
},
"z-ai/glm-4.6": {
"description": "GLM-4.6, il nuovo modello di punta di Zhipu, supera ampiamente la generazione precedente in codifica avanzata, gestione di testi lunghi, capacità di ragionamento e competenze degli agenti."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 è un modello base progettato per applicazioni agenti intelligenti, che utilizza un'architettura Mixture-of-Experts (MoE). Ottimizzato profondamente per chiamate a strumenti, navigazione web, ingegneria del software e programmazione frontend, supporta integrazioni fluide con agenti di codice come Claude Code e Roo Code. Adotta una modalità di inferenza ibrida per adattarsi a scenari di ragionamento complessi e uso quotidiano."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "parola chiave"
},
"localFiles": {
"editFile": {
"newString": "Sostituisci con",
"oldString": "Trova",
"replaceAll": "Sostituisci tutte le occorrenze",
"replaceFirst": "Sostituisci solo la prima occorrenza"
},
"file": "File",
"folder": "Cartella",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "Leggi file",
"readFileError": "Impossibile leggere il file, controlla se il percorso del file è corretto",
"readFiles": "Leggi file",
"readFilesError": "Impossibile leggere i file, controlla se il percorso del file è corretto"
"readFilesError": "Impossibile leggere i file, controlla se il percorso del file è corretto",
"writeFile": {
"characters": "Caratteri",
"preview": "Anteprima contenuto",
"truncated": "Troncato"
}
},
"search": {
"createNewSearch": "Crea una nuova registrazione di ricerca",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "スクリーンショット",
"settings": "エクスポート設定",
"text": "テキスト",
"widthMode": {
"label": "幅のモード",
"narrow": "ナローモード",
"wide": "ワイドモード"
},
"withBackground": "背景画像を含む",
"withFooter": "フッターを含む",
"withPluginInfo": "プラグイン情報を含む",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct は WuWenXinQiong によって開発された小規模パラメータの高効率モデルです。"
},
"meituan/longcat-flash-chat": {
"description": "美団がオープンソースで提供する、対話型インタラクションとエージェントタスクに最適化された非推論型基盤モデルであり、ツールの呼び出しや複雑なマルチターン対話シナリオにおいて優れた性能を発揮します。"
},
"meta-llama-3-70b-instruct": {
"description": "推論、コーディング、広範な言語アプリケーションに優れた70億パラメータの強力なモデルです。"
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2は、コーディングおよびエージェントワークフローのために構築された高効率な大規模言語モデルです。"
},
"minimax/minimax-m2": {
"description": "効率的なコーディングとエージェントワークフローのために設計されたモデルです。"
},
"ministral-3b-latest": {
"description": "Ministral 3BはMistralの世界トップクラスのエッジモデルです。"
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2は、Microsoft AIが提供する言語モデルであり、複雑な対話、多言語、推論、インテリジェントアシスタントの分野で特に優れた性能を発揮します。"
},
"x-ai/grok-4-fast": {
"description": "Grok 4 Fast をリリースできることを嬉しく思います。これは、コスト効率の高い推論モデルにおける最新の進展です。"
},
"x-ai/grok-code-fast-1": {
"description": "grok-code-fast-1 を発表できることを嬉しく思います。これは、高速かつ経済的な推論モデルであり、エージェントによるコーディングにおいて優れた性能を発揮します。"
},
"x1": {
"description": "Spark X1 モデルはさらにアップグレードされ、元の数学タスクで国内のリーダーシップを維持しつつ、推論、テキスト生成、言語理解などの一般的なタスクで OpenAI o1 および DeepSeek R1 に匹敵する効果を実現します。"
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "複雑な視覚タスクモデルで、複数の画像に基づく高性能な理解と分析能力を提供します。"
},
"z-ai/glm-4.6": {
"description": "智譜の最新フラッグシップモデル GLM-4.6 は、高度なコーディング、長文処理、推論およびエージェント能力において前世代を大きく上回る性能を実現しています。"
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5はエージェントアプリケーション向けに設計された基盤モデルで、混合専門家(Mixture-of-Experts)アーキテクチャを採用。ツール呼び出し、ウェブブラウジング、ソフトウェア工学、フロントエンドプログラミング分野で深く最適化され、Claude CodeやRoo Codeなどのコードエージェントへのシームレスな統合をサポートします。混合推論モードを採用し、複雑な推論や日常利用など多様なシナリオに適応可能です。"
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "プロンプト"
},
"localFiles": {
"editFile": {
"newString": "置換後の文字列",
"oldString": "検索文字列",
"replaceAll": "すべて置換",
"replaceFirst": "最初の一致のみ置換"
},
"file": "ファイル",
"folder": "フォルダー",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "ファイルを読み込む",
"readFileError": "ファイルの読み込みに失敗しました。ファイルパスが正しいか確認してください。",
"readFiles": "ファイルを読み込む",
"readFilesError": "ファイルの読み込みに失敗しました。ファイルパスが正しいか確認してください。"
"readFilesError": "ファイルの読み込みに失敗しました。ファイルパスが正しいか確認してください。",
"writeFile": {
"characters": "文字数",
"preview": "内容プレビュー",
"truncated": "切り捨てられました"
}
},
"search": {
"createNewSearch": "新しい検索記録を作成",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "스크린샷",
"settings": "내보내기 설정",
"text": "텍스트",
"widthMode": {
"label": "너비 모드",
"narrow": "좁은 화면 모드",
"wide": "넓은 화면 모드"
},
"withBackground": "배경 이미지 포함",
"withFooter": "푸터 포함",
"withPluginInfo": "플러그인 정보 포함",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct는 Wuwen Xinqiong에서 출시한 소형 파라미터 고효율 모델입니다."
},
"meituan/longcat-flash-chat": {
"description": "메이투안이 오픈소스로 공개한 비사고형 기반 모델로, 대화 상호작용과 에이전트 작업에 최적화되어 있으며, 도구 호출 및 복잡한 다중 회화 시나리오에서 뛰어난 성능을 발휘합니다."
},
"meta-llama-3-70b-instruct": {
"description": "추론, 코딩 및 광범위한 언어 응용 프로그램에서 뛰어난 성능을 발휘하는 강력한 70억 매개변수 모델입니다."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2는 코딩 및 에이전트 워크플로우를 위해 설계된 효율적인 대형 언어 모델입니다."
},
"minimax/minimax-m2": {
"description": "효율적인 코딩과 에이전트 워크플로우를 위해 설계되었습니다."
},
"ministral-3b-latest": {
"description": "Ministral 3B는 Mistral의 세계적 수준의 엣지 모델입니다."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2는 Microsoft AI에서 제공하는 언어 모델로, 복잡한 대화, 다국어, 추론 및 스마트 어시스턴트 분야에서 특히 뛰어난 성능을 발휘합니다."
},
"x-ai/grok-4-fast": {
"description": "Grok 4 Fast를 출시하게 되어 매우 기쁩니다. 이는 비용 효율적인 추론 모델 분야에서 우리의 최신 성과입니다."
},
"x-ai/grok-code-fast-1": {
"description": "grok-code-fast-1을 출시하게 되어 기쁩니다. 이 모델은 빠르고 경제적인 추론 성능을 제공하며, 에이전트 기반 코딩 작업에서 탁월한 성능을 보입니다."
},
"x1": {
"description": "Spark X1 모델은 추가 업그레이드를 통해 기존의 수학 과제에서 국내 선두를 유지하며, 추론, 텍스트 생성, 언어 이해 등 일반 과제에서 OpenAI o1 및 DeepSeek R1과 동등한 성과를 달성합니다."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "복잡한 시각적 작업 모델로, 여러 이미지를 기반으로 한 고성능 이해 및 분석 능력을 제공합니다."
},
"z-ai/glm-4.6": {
"description": "Zhipu의 최신 플래그십 모델 GLM-4.6은 고급 코딩, 장문 처리, 추론 및 에이전트 능력에서 전 세대를 뛰어넘는 성능을 자랑합니다."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5는 에이전트 애플리케이션을 위해 설계된 기본 모델로, 혼합 전문가(Mixture-of-Experts) 아키텍처를 사용합니다. 도구 호출, 웹 브라우징, 소프트웨어 엔지니어링, 프론트엔드 프로그래밍 분야에서 깊이 최적화되었으며, Claude Code, Roo Code 등 코드 에이전트에 원활히 통합될 수 있습니다. GLM-4.5는 혼합 추론 모드를 채택하여 복잡한 추론과 일상 사용 등 다양한 응용 시나리오에 적응할 수 있습니다."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "프롬프트"
},
"localFiles": {
"editFile": {
"newString": "다음으로 바꾸기",
"oldString": "찾을 내용",
"replaceAll": "모든 항목 바꾸기",
"replaceFirst": "첫 번째 항목만 바꾸기"
},
"file": "파일",
"folder": "폴더",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "파일 읽기",
"readFileError": "파일을 읽는 데 실패했습니다. 파일 경로가 올바른지 확인하세요.",
"readFiles": "파일 읽기",
"readFilesError": "파일을 읽는 데 실패했습니다. 파일 경로가 올바른지 확인하세요."
"readFilesError": "파일을 읽는 데 실패했습니다. 파일 경로가 올바른지 확인하세요.",
"writeFile": {
"characters": "문자 수",
"preview": "내용 미리보기",
"truncated": "잘림"
}
},
"search": {
"createNewSearch": "새 검색 기록 만들기",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "Screenshot",
"settings": "Exportinstellingen",
"text": "Tekst",
"widthMode": {
"label": "Breedtemodus",
"narrow": "Smalle schermmodus",
"wide": "Brede schermmodus"
},
"withBackground": "Met achtergrondafbeelding",
"withFooter": "Met voettekst",
"withPluginInfo": "Met plug-in informatie",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct is een efficiënt model met een klein aantal parameters, ontwikkeld door Wuwen Xinqiong."
},
"meituan/longcat-flash-chat": {
"description": "Longcat Flash Chat is een open-source basismodel van Meituan, geoptimaliseerd voor dialooginteractie en agent-taken. Het blinkt uit in gereedschapsgebruik en complexe meerstapsgesprekken."
},
"meta-llama-3-70b-instruct": {
"description": "Een krachtig model met 70 miljard parameters dat uitblinkt in redeneren, coderen en brede taaltoepassingen."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 is een efficiënt groot taalmodel dat speciaal is ontwikkeld voor programmeer- en agentworkflows."
},
"minimax/minimax-m2": {
"description": "Speciaal ontworpen voor efficiënte codering en agent-workflows."
},
"ministral-3b-latest": {
"description": "Ministral 3B is het toonaangevende edge-model van Mistral."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 is een taalmodel van Microsoft AI dat uitblinkt in complexe gesprekken, meertaligheid, inferentie en intelligente assistentie."
},
"x-ai/grok-4-fast": {
"description": "We zijn verheugd om Grok 4 Fast te introduceren, onze nieuwste vooruitgang op het gebied van kostenefficiënte redeneermodellen."
},
"x-ai/grok-code-fast-1": {
"description": "We zijn trots om grok-code-fast-1 te lanceren, een snel en kostenefficiënt redeneermodel dat uitblinkt in agentgebaseerde codering."
},
"x1": {
"description": "Het Spark X1-model zal verder worden geüpgraded, met verbeterde prestaties in redenering, tekstgeneratie en taalbegrip, ter vergelijking met OpenAI o1 en DeepSeek R1."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "Complex visietakenmodel dat hoge prestaties biedt in begrip en analyse op basis van meerdere afbeeldingen."
},
"z-ai/glm-4.6": {
"description": "GLM-4.6 is het nieuwste vlaggenschipmodel van Zhipu AI en overtreft zijn voorgangers op het gebied van geavanceerde codering, lange tekstverwerking, redeneren en agentcapaciteiten."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 is een basis model speciaal ontworpen voor agenttoepassingen, gebruikmakend van een Mixture-of-Experts (MoE) architectuur. Het is diep geoptimaliseerd voor toolaanroepen, web browsing, software engineering en frontend programmeren, en ondersteunt naadloze integratie met code-agents zoals Claude Code en Roo Code. GLM-4.5 gebruikt een hybride redeneermodus en is geschikt voor complexe redenering en dagelijks gebruik."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "prompt"
},
"localFiles": {
"editFile": {
"newString": "Vervangen door",
"oldString": "Zoekterm",
"replaceAll": "Alles vervangen",
"replaceFirst": "Alleen eerste vervangen"
},
"file": "Bestand",
"folder": "Map",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "Bestand lezen",
"readFileError": "Fout bij het lezen van het bestand, controleer of het bestandspad correct is",
"readFiles": "Bestanden lezen",
"readFilesError": "Fout bij het lezen van bestanden, controleer of het bestandspad correct is"
"readFilesError": "Fout bij het lezen van bestanden, controleer of het bestandspad correct is",
"writeFile": {
"characters": "Tekens",
"preview": "Voorbeeld van inhoud",
"truncated": "Afgekapt"
}
},
"search": {
"createNewSearch": "Maak een nieuwe zoekopdracht",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "Zrzut ekranu",
"settings": "Ustawienia eksportu",
"text": "Tekst",
"widthMode": {
"label": "Tryb szerokości",
"narrow": "Tryb wąskiego ekranu",
"wide": "Tryb szerokiego ekranu"
},
"withBackground": "Z tłem",
"withFooter": "Z stopką",
"withPluginInfo": "Z informacjami o wtyczce",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct to kompaktowy i wydajny model opracowany przez Wuwen Xinqiong."
},
"meituan/longcat-flash-chat": {
"description": "Longcat Flash Chat to otwartoźródłowy model bazowy od Meituan, zoptymalizowany pod kątem interakcji dialogowych i zadań agentowych, wyróżniający się w scenariuszach wymagających użycia narzędzi i złożonych wieloetapowych konwersacji."
},
"meta-llama-3-70b-instruct": {
"description": "Potężny model z 70 miliardami parametrów, doskonały w rozumowaniu, kodowaniu i szerokich zastosowaniach językowych."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 to wydajny duży model językowy stworzony z myślą o kodowaniu i zautomatyzowanych przepływach pracy."
},
"minimax/minimax-m2": {
"description": "Stworzony z myślą o wydajnym kodowaniu i przepływach pracy agentów."
},
"ministral-3b-latest": {
"description": "Ministral 3B to czołowy model brzegowy Mistrala."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 to model językowy dostarczany przez Microsoft AI, który wyróżnia się w złożonych dialogach, wielojęzyczności, wnioskowaniu i inteligentnych asystentach."
},
"x-ai/grok-4-fast": {
"description": "Z radością przedstawiamy Grok 4 Fast — nasze najnowsze osiągnięcie w dziedzinie modeli wnioskowania zoptymalizowanych pod względem kosztów."
},
"x-ai/grok-code-fast-1": {
"description": "Z dumą prezentujemy grok-code-fast-1 — szybki i ekonomiczny model wnioskowania, który doskonale sprawdza się w kodowaniu przez agentów."
},
"x1": {
"description": "Model Spark X1 zostanie dalej ulepszony, osiągając wyniki w zadaniach ogólnych, takich jak rozumowanie, generowanie tekstu i rozumienie języka, które będą porównywalne z OpenAI o1 i DeepSeek R1."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "Model do złożonych zadań wizualnych, oferujący wysokowydajną zdolność rozumienia i analizy na podstawie wielu obrazów."
},
"z-ai/glm-4.6": {
"description": "GLM-4.6 to najnowszy flagowy model od Zhipu AI, który znacząco przewyższa poprzednie wersje w zakresie zaawansowanego kodowania, przetwarzania długich tekstów, wnioskowania i zdolności agentowych."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 to podstawowy model zaprojektowany specjalnie do zastosowań agentowych, wykorzystujący architekturę mieszanych ekspertów (Mixture-of-Experts). Model jest głęboko zoptymalizowany pod kątem wywoływania narzędzi, przeglądania stron internetowych, inżynierii oprogramowania i programowania frontendowego, wspierając bezproblemową integrację z inteligentnymi agentami kodu takimi jak Claude Code i Roo Code. GLM-4.5 stosuje hybrydowy tryb wnioskowania, dostosowując się do złożonych i codziennych scenariuszy użycia."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "słowo kluczowe"
},
"localFiles": {
"editFile": {
"newString": "Zamień na",
"oldString": "Szukany tekst",
"replaceAll": "Zamień wszystkie wystąpienia",
"replaceFirst": "Zamień tylko pierwsze wystąpienie"
},
"file": "Plik",
"folder": "Folder",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "Odczytaj plik",
"readFileError": "Błąd odczytu pliku, sprawdź, czy ścieżka do pliku jest poprawna",
"readFiles": "Odczytaj pliki",
"readFilesError": "Błąd odczytu plików, sprawdź, czy ścieżka do plików jest poprawna"
"readFilesError": "Błąd odczytu plików, sprawdź, czy ścieżka do plików jest poprawna",
"writeFile": {
"characters": "Znaki",
"preview": "Podgląd treści",
"truncated": "Obcięto"
}
},
"search": {
"createNewSearch": "Utwórz nową historię wyszukiwania",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "Captura de Tela",
"settings": "Configurações de Exportação",
"text": "Texto",
"widthMode": {
"label": "Modo de largura",
"narrow": "Modo de tela estreita",
"wide": "Modo de tela larga"
},
"withBackground": "Com Imagem de Fundo",
"withFooter": "Com Rodapé",
"withPluginInfo": "Com Informações do Plugin",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct é um modelo eficiente com poucos parâmetros desenvolvido pela Wuwen Xinqiong."
},
"meituan/longcat-flash-chat": {
"description": "Modelo base não reflexivo de código aberto da Meituan, otimizado para interações em diálogos e tarefas de agentes inteligentes, com desempenho excepcional em chamadas de ferramentas e cenários complexos de múltiplas rodadas."
},
"meta-llama-3-70b-instruct": {
"description": "Um poderoso modelo com 70 bilhões de parâmetros, destacando-se em raciocínio, codificação e amplas aplicações linguísticas."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 é um modelo de linguagem de grande escala, eficiente e desenvolvido para fluxos de trabalho de codificação e agentes."
},
"minimax/minimax-m2": {
"description": "Projetado para codificação eficiente e fluxos de trabalho com agentes."
},
"ministral-3b-latest": {
"description": "Ministral 3B é o modelo de ponta da Mistral para aplicações de edge computing."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 é um modelo de linguagem fornecido pela Microsoft AI, destacando-se em diálogos complexos, multilíngue, raciocínio e assistentes inteligentes."
},
"x-ai/grok-4-fast": {
"description": "Temos o prazer de apresentar o Grok 4 Fast, nosso mais recente avanço em modelos de raciocínio com excelente custo-benefício."
},
"x-ai/grok-code-fast-1": {
"description": "Temos o prazer de lançar o grok-code-fast-1, um modelo de raciocínio rápido e econômico, com desempenho excepcional em codificação assistida por agentes."
},
"x1": {
"description": "O modelo Spark X1 será aprimorado ainda mais, mantendo a liderança em tarefas matemáticas no país, e alcançando resultados em tarefas gerais como raciocínio, geração de texto e compreensão de linguagem que se comparam ao OpenAI o1 e DeepSeek R1."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "Modelo para tarefas visuais complexas, oferecendo alta performance em compreensão e análise baseadas em múltiplas imagens."
},
"z-ai/glm-4.6": {
"description": "GLM-4.6, o mais novo modelo carro-chefe da Zhipu, supera amplamente a geração anterior em codificação avançada, processamento de textos longos, raciocínio e capacidades de agentes inteligentes."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 é um modelo base projetado para aplicações de agentes inteligentes, utilizando arquitetura Mixture-of-Experts (MoE). Otimizado para chamadas de ferramentas, navegação web, engenharia de software e programação front-end, suporta integração perfeita com agentes de código como Claude Code e Roo Code. Adota modo de raciocínio híbrido, adaptando-se a cenários de raciocínio complexo e uso cotidiano."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "Palavra-chave"
},
"localFiles": {
"editFile": {
"newString": "Substituir por",
"oldString": "Procurar por",
"replaceAll": "Substituir todas as correspondências",
"replaceFirst": "Substituir apenas a primeira correspondência"
},
"file": "Arquivo",
"folder": "Pasta",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "Ler arquivo",
"readFileError": "Falha ao ler o arquivo, verifique se o caminho do arquivo está correto",
"readFiles": "Ler arquivos",
"readFilesError": "Falha ao ler os arquivos, verifique se o caminho do arquivo está correto"
"readFilesError": "Falha ao ler os arquivos, verifique se o caminho do arquivo está correto",
"writeFile": {
"characters": "Caracteres",
"preview": "Pré-visualização do conteúdo",
"truncated": "Truncado"
}
},
"search": {
"createNewSearch": "Criar nova pesquisa",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "Скриншот",
"settings": "Настройки экспорта",
"text": "Текст",
"widthMode": {
"label": "Режим ширины",
"narrow": "Режим узкого экрана",
"wide": "Режим широкого экрана"
},
"withBackground": "С фоном",
"withFooter": "С нижним колонтитулом",
"withPluginInfo": "С информацией о плагинах",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct — это компактная и эффективная модель с малым числом параметров, разработанная компанией Wuwen Xinqiong."
},
"meituan/longcat-flash-chat": {
"description": "Открытая модель от Meituan, оптимизированная для диалогового взаимодействия и задач интеллектуальных агентов, демонстрирует выдающиеся результаты в использовании инструментов и сложных многоходовых диалогах."
},
"meta-llama-3-70b-instruct": {
"description": "Мощная модель с 70 миллиардами параметров, превосходящая в области рассуждений, кодирования и широких языковых приложений."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 — это высокоэффективная крупная языковая модель, созданная специально для задач программирования и автоматизации рабочих процессов."
},
"minimax/minimax-m2": {
"description": "Создана для эффективного кодирования и рабочих процессов агентов."
},
"ministral-3b-latest": {
"description": "Ministral 3B - это выдающаяся модель от Mistral."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 — это языковая модель, предоставляемая Microsoft AI, которая особенно хорошо проявляет себя в сложных диалогах, многоязычных задачах, выводе и интеллектуальных помощниках."
},
"x-ai/grok-4-fast": {
"description": "Мы рады представить Grok 4 Fast — наш последний прорыв в области экономически эффективных моделей рассуждения."
},
"x-ai/grok-code-fast-1": {
"description": "С радостью представляем grok-code-fast-1 — быструю и экономичную модель рассуждения, отлично подходящую для кодирования с помощью агентов."
},
"x1": {
"description": "Модель Spark X1 будет дополнительно обновлена, и на основе уже существующих лидерских позиций в математических задачах, достигнет сопоставимых результатов в общих задачах, таких как рассуждение, генерация текста и понимание языка, с OpenAI o1 и DeepSeek R1."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "Модель для сложных визуальных задач, обеспечивающая высокопроизводительное понимание и анализ на основе нескольких изображений."
},
"z-ai/glm-4.6": {
"description": "Флагманская модель нового поколения от Zhipu — GLM-4.6, значительно превосходящая предыдущую версию в продвинутом кодировании, обработке длинных текстов, рассуждении и возможностях интеллектуальных агентов."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 — базовая модель, специально созданная для приложений с агентами, использующая архитектуру смешанных экспертов (Mixture-of-Experts). Модель глубоко оптимизирована для вызова инструментов, веб-браузинга, программной инженерии и фронтенд-разработки, поддерживает бесшовную интеграцию с кодовыми агентами, такими как Claude Code и Roo Code. GLM-4.5 использует смешанный режим вывода, адаптируясь к сложным рассуждениям и повседневным задачам."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "подсказка"
},
"localFiles": {
"editFile": {
"newString": "Заменить на",
"oldString": "Найти",
"replaceAll": "Заменить все совпадения",
"replaceFirst": "Заменить только первое совпадение"
},
"file": "Файл",
"folder": "Папка",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "Читать файл",
"readFileError": "Ошибка чтения файла, проверьте правильность пути к файлу",
"readFiles": "Читать файлы",
"readFilesError": "Ошибка чтения файлов, проверьте правильность пути к файлам"
"readFilesError": "Ошибка чтения файлов, проверьте правильность пути к файлам",
"writeFile": {
"characters": "Символы",
"preview": "Предварительный просмотр содержимого",
"truncated": "Обрезано"
}
},
"search": {
"createNewSearch": "Создать новую запись поиска",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "Ekran Görüntüsü",
"settings": "Ayarlar",
"text": "Metin",
"widthMode": {
"label": "Genişlik Modu",
"narrow": "Dar Ekran Modu",
"wide": "Geniş Ekran Modu"
},
"withBackground": "Arka Plan",
"withFooter": "Footer",
"withPluginInfo": "Plugin Bilgileri",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct, Wuwen Xinqiong tarafından geliştirilen düşük parametreli, yüksek verimli bir modeldir."
},
"meituan/longcat-flash-chat": {
"description": "Meituan tarafından açık kaynak olarak sunulan, diyalog etkileşimi ve yapay zeka görevleri için optimize edilmiş düşünce içermeyen temel model; araç kullanımı ve karmaşık çok turlu etkileşim senaryolarında üstün performans gösterir."
},
"meta-llama-3-70b-instruct": {
"description": "Akıl yürütme, kodlama ve geniş dil uygulamalarında mükemmel bir 70 milyar parametreli model."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2, kodlama ve yardımcı iş akışları için özel olarak geliştirilmiş, verimli bir büyük dil modelidir."
},
"minimax/minimax-m2": {
"description": "Verimli kodlama ve Agent iş akışları için özel olarak tasarlanmıştır."
},
"ministral-3b-latest": {
"description": "Ministral 3B, Mistral'ın dünya çapında en üst düzey kenar modelidir."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2, Microsoft AI tarafından sunulan bir dil modelidir, karmaşık diyaloglar, çok dilli, akıl yürütme ve akıllı asistan alanlarında özellikle başarılıdır."
},
"x-ai/grok-4-fast": {
"description": "Grok 4 Fast'i sunmaktan mutluluk duyuyoruz; bu, maliyet etkin çıkarım modelleri konusundaki en son ilerlememizdir."
},
"x-ai/grok-code-fast-1": {
"description": "Hızlı ve ekonomik bir çıkarım modeli olan grok-code-fast-1'i tanıtmaktan memnuniyet duyuyoruz; özellikle temsilci tabanlı kodlamada üstün performans sergiler."
},
"x1": {
"description": "Spark X1 modeli daha da geliştirilecek; önceki matematik görevlerinde ulusal liderlik temelinde, akıl yürütme, metin üretimi, dil anlama gibi genel görevlerde OpenAI o1 ve DeepSeek R1 ile karşılaştırılabilir sonuçlar elde edilecektir."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "Karmaşık görsel görevler için model, birden fazla resme dayalı yüksek performanslı anlama ve analiz yetenekleri sunar."
},
"z-ai/glm-4.6": {
"description": "Zhipu'nun en yeni amiral gemisi modeli GLM-4.6; ileri düzey kodlama, uzun metin işleme, çıkarım ve yapay zeka yeteneklerinde seleflerini tamamen geride bırakıyor."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5, akıllı ajan uygulamaları için tasarlanmış temel modeldir ve Mixture-of-Experts (MoE) mimarisi kullanır. Araç çağrısı, web tarama, yazılım mühendisliği ve ön uç programlama alanlarında derin optimizasyonlar içerir. Claude Code, Roo Code gibi kod ajanlarına sorunsuz entegrasyon destekler. GLM-4.5, karmaşık çıkarım ve günlük kullanım gibi çeşitli senaryolara uyum sağlayan hibrit çıkarım moduna sahiptir."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "İpucu"
},
"localFiles": {
"editFile": {
"newString": "Şununla değiştir",
"oldString": "Aranacak içerik",
"replaceAll": "Tüm eşleşmeleri değiştir",
"replaceFirst": "Yalnızca ilk eşleşmeyi değiştir"
},
"file": "Dosya",
"folder": "Klasör",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "Dosyayı Oku",
"readFileError": "Dosya okunamadı, lütfen dosya yolunu kontrol edin",
"readFiles": "Dosyaları Oku",
"readFilesError": "Dosyalar okunamadı, lütfen dosya yolunu kontrol edin"
"readFilesError": "Dosyalar okunamadı, lütfen dosya yolunu kontrol edin",
"writeFile": {
"characters": "Karakter",
"preview": "İçerik Önizlemesi",
"truncated": "Kısaltıldı"
}
},
"search": {
"createNewSearch": "Yeni bir arama kaydı oluştur",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "Ảnh chụp màn hình",
"settings": "Cài đặt xuất",
"text": "Văn bản",
"widthMode": {
"label": "Chế độ chiều rộng",
"narrow": "Chế độ màn hình hẹp",
"wide": "Chế độ màn hình rộng"
},
"withBackground": "Bao gồm hình nền",
"withFooter": "Bao gồm chân trang",
"withPluginInfo": "Bao gồm thông tin plugin",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct là mô hình hiệu quả với số lượng tham số nhỏ do Wuwen Xinqiong phát triển."
},
"meituan/longcat-flash-chat": {
"description": "Longcat Flash Chat là mô hình nền không tư duy do Meituan mã nguồn mở, được tối ưu hóa cho tương tác hội thoại và nhiệm vụ của tác nhân, nổi bật trong việc gọi công cụ và các tình huống tương tác nhiều vòng phức tạp."
},
"meta-llama-3-70b-instruct": {
"description": "Mô hình 70 tỷ tham số mạnh mẽ, xuất sắc trong lý luận, lập trình và các ứng dụng ngôn ngữ rộng lớn."
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 là một mô hình ngôn ngữ lớn hiệu quả, được xây dựng dành riêng cho quy trình làm việc liên quan đến lập trình và tác vụ đại lý."
},
"minimax/minimax-m2": {
"description": "Được sinh ra để phục vụ mã hóa hiệu quả và quy trình làm việc của Agent."
},
"ministral-3b-latest": {
"description": "Ministral 3B là mô hình hàng đầu thế giới của Mistral về hiệu suất cạnh biên."
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 là mô hình ngôn ngữ do Microsoft AI cung cấp, đặc biệt xuất sắc trong các lĩnh vực đối thoại phức tạp, đa ngôn ngữ, suy luận và trợ lý thông minh."
},
"x-ai/grok-4-fast": {
"description": "Chúng tôi rất vui mừng ra mắt Grok 4 Fast, bước tiến mới nhất của chúng tôi trong các mô hình suy luận hiệu quả về chi phí."
},
"x-ai/grok-code-fast-1": {
"description": "Chúng tôi rất vui mừng giới thiệu grok-code-fast-1, một mô hình suy luận nhanh và tiết kiệm chi phí, nổi bật trong mã hóa cho tác nhân."
},
"x1": {
"description": "Mô hình Spark X1 sẽ được nâng cấp thêm, trên nền tảng dẫn đầu trong các nhiệm vụ toán học trong nước, đạt được hiệu quả trong các nhiệm vụ chung như suy luận, tạo văn bản, hiểu ngôn ngữ tương đương với OpenAI o1 và DeepSeek R1."
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "Mô hình nhiệm vụ thị giác phức tạp, cung cấp khả năng hiểu và phân tích hiệu suất cao dựa trên nhiều hình ảnh."
},
"z-ai/glm-4.6": {
"description": "GLM-4.6, mô hình hàng đầu mới nhất của Zhipu AI, vượt trội hoàn toàn so với thế hệ trước về mã hóa nâng cao, xử lý văn bản dài, suy luận và năng lực tác nhân."
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 là mô hình nền tảng dành cho ứng dụng tác nhân thông minh, sử dụng kiến trúc chuyên gia hỗn hợp (Mixture-of-Experts). Được tối ưu sâu trong các lĩnh vực gọi công cụ, duyệt web, kỹ thuật phần mềm và lập trình front-end, hỗ trợ tích hợp liền mạch vào các tác nhân mã như Claude Code, Roo Code. GLM-4.5 sử dụng chế độ suy luận hỗn hợp, thích ứng với nhiều kịch bản ứng dụng như suy luận phức tạp và sử dụng hàng ngày."
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "Từ khóa"
},
"localFiles": {
"editFile": {
"newString": "Thay thế bằng",
"oldString": "Nội dung tìm kiếm",
"replaceAll": "Thay thế tất cả các mục khớp",
"replaceFirst": "Chỉ thay thế mục khớp đầu tiên"
},
"file": "Tệp",
"folder": "Thư mục",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "Đọc tệp",
"readFileError": "Đọc tệp thất bại, vui lòng kiểm tra đường dẫn tệp có đúng không",
"readFiles": "Đọc tệp",
"readFilesError": "Đọc tệp thất bại, vui lòng kiểm tra đường dẫn tệp có đúng không"
"readFilesError": "Đọc tệp thất bại, vui lòng kiểm tra đường dẫn tệp có đúng không",
"writeFile": {
"characters": "Ký tự",
"preview": "Xem trước nội dung",
"truncated": "Đã bị cắt bớt"
}
},
"search": {
"createNewSearch": "Tạo mới tìm kiếm",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "截图",
"settings": "导出设置",
"text": "文本",
"widthMode": {
"label": "宽度模式",
"narrow": "窄屏模式",
"wide": "宽屏模式"
},
"withBackground": "包含背景图片",
"withFooter": "包含页脚",
"withPluginInfo": "包含插件信息",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct 是无问芯穹推出的小参数量高效模型。"
},
"meituan/longcat-flash-chat": {
"description": "美团开源的专为对话交互和智能体任务优化的非思维型基础模型,在工具调用和复杂多轮交互场景中表现突出"
},
"meta-llama-3-70b-instruct": {
"description": "一个强大的700亿参数模型,在推理、编码和广泛的语言应用方面表现出色。"
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 是专为编码和代理工作流程构建的高效大型语言模型。"
},
"minimax/minimax-m2": {
"description": "专为高效编码与 Agent 工作流而生"
},
"ministral-3b-latest": {
"description": "Ministral 3B 是Mistral的世界顶级边缘模型。"
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 是微软AI提供的语言模型,在复杂对话、多语言、推理和智能助手领域表现尤为出色。"
},
"x-ai/grok-4-fast": {
"description": "我们很高兴发布 Grok 4 Fast,这是我们在成本效益推理模型方面的最新进展。"
},
"x-ai/grok-code-fast-1": {
"description": "我们很高兴推出 grok-code-fast-1,这是一款快速且经济高效的推理模型,在代理编码方面表现出色。"
},
"x1": {
"description": "Spark X1 模型将进一步升级,在原来数学任务国内领先基础上,推理、文本生成、语言理解等通用任务实现效果对标 OpenAI o1 和 DeepSeek R1。"
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "复杂视觉任务模型,提供基于多张图片的高性能理解、分析能力。"
},
"z-ai/glm-4.6": {
"description": "智谱最新旗舰模型 GLM-4.6,在高级编码、长文本处理、推理与智能体能力上全面超越前代。"
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 是一款专为智能体应用打造的基础模型,使用了混合专家(Mixture-of-Experts)架构。在工具调用、网页浏览、软件工程、前端编程领域进行了深度优化,支持无缝接入 Claude Code、Roo Code 等代码智能体中使用。GLM-4.5 采用混合推理模式,可以适应复杂推理和日常使用等多种应用场景。"
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "提示词"
},
"localFiles": {
"editFile": {
"newString": "替换为",
"oldString": "查找内容",
"replaceAll": "替换全部匹配项",
"replaceFirst": "仅替换第一个匹配项"
},
"file": "文件",
"folder": "文件夹",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "读取文件",
"readFileError": "读取文件失败,请检查文件路径是否正确",
"readFiles": "读取文件",
"readFilesError": "读取文件失败,请检查文件路径是否正确"
"readFilesError": "读取文件失败,请检查文件路径是否正确",
"writeFile": {
"characters": "字符",
"preview": "内容预览",
"truncated": "已截断"
}
},
"search": {
"createNewSearch": "创建新的搜索记录",
+5
View File
@@ -330,6 +330,11 @@
"screenshot": "截圖",
"settings": "導出設置",
"text": "文本",
"widthMode": {
"label": "寬度模式",
"narrow": "窄螢幕模式",
"wide": "寬螢幕模式"
},
"withBackground": "包含背景圖片",
"withFooter": "包含頁腳",
"withPluginInfo": "包含插件信息",
+15
View File
@@ -2225,6 +2225,9 @@
"megrez-3b-instruct": {
"description": "Megrez 3B Instruct 是無問芯穹推出的小參數量高效模型。"
},
"meituan/longcat-flash-chat": {
"description": "美團開源的專為對話互動與智慧體任務優化的非思維型基礎模型,在工具調用與複雜多輪互動場景中表現出色"
},
"meta-llama-3-70b-instruct": {
"description": "一個強大的70億參數模型,在推理、編碼和廣泛的語言應用中表現出色。"
},
@@ -2456,6 +2459,9 @@
"minimax-m2": {
"description": "MiniMax M2 是專為編碼與代理工作流程打造的高效大型語言模型。"
},
"minimax/minimax-m2": {
"description": "專為高效編碼與 Agent 工作流程而設計"
},
"ministral-3b-latest": {
"description": "Ministral 3B 是 Mistral 的全球頂尖邊緣模型。"
},
@@ -3371,6 +3377,12 @@
"wizardlm2:8x22b": {
"description": "WizardLM 2 是微軟 AI 提供的語言模型,在複雜對話、多語言、推理和智能助手領域表現尤為出色。"
},
"x-ai/grok-4-fast": {
"description": "我們很高興推出 Grok 4 Fast,這是我們在成本效益推理模型方面的最新進展。"
},
"x-ai/grok-code-fast-1": {
"description": "我們很高興推出 grok-code-fast-1,這是一款快速且具成本效益的推理模型,在代理編碼方面表現優異。"
},
"x1": {
"description": "Spark X1 模型將進一步升級,在原來數學任務國內領先的基礎上,推理、文本生成、語言理解等通用任務實現效果對標 OpenAI o1 和 DeepSeek R1。"
},
@@ -3431,6 +3443,9 @@
"yi-vision-v2": {
"description": "複雜視覺任務模型,提供基於多張圖片的高性能理解、分析能力。"
},
"z-ai/glm-4.6": {
"description": "智譜最新旗艦模型 GLM-4.6,在高階編碼、長文本處理、推理與智慧體能力上全面超越前代。"
},
"zai-org/GLM-4.5": {
"description": "GLM-4.5 是一款專為智能體應用打造的基礎模型,使用了混合專家(Mixture-of-Experts)架構。在工具調用、網頁瀏覽、軟體工程、前端程式設計領域進行了深度優化,支持無縫接入 Claude Code、Roo Code 等程式碼智能體中使用。GLM-4.5 採用混合推理模式,可以適應複雜推理和日常使用等多種應用場景。"
},
+12 -1
View File
@@ -15,6 +15,12 @@
"prompt": "提示詞"
},
"localFiles": {
"editFile": {
"newString": "取代為",
"oldString": "尋找內容",
"replaceAll": "取代所有符合項目",
"replaceFirst": "僅取代第一個符合項目"
},
"file": "檔案",
"folder": "資料夾",
"moveFiles": {
@@ -34,7 +40,12 @@
"readFile": "讀取檔案",
"readFileError": "讀取檔案失敗,請檢查檔案路徑是否正確",
"readFiles": "讀取檔案",
"readFilesError": "讀取檔案失敗,請檢查檔案路徑是否正確"
"readFilesError": "讀取檔案失敗,請檢查檔案路徑是否正確",
"writeFile": {
"characters": "字元",
"preview": "內容預覽",
"truncated": "已截斷"
}
},
"search": {
"createNewSearch": "建立新的搜尋紀錄",
+4 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@lobehub/lobehub",
"version": "2.0.0-next.69",
"version": "2.0.0-next.77",
"description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
"keywords": [
"framework",
@@ -191,6 +191,7 @@
"@vercel/speed-insights": "^1.2.0",
"@virtuoso.dev/masonry": "^1.3.5",
"@xterm/xterm": "^5.5.0",
"@zumer/snapdom": "^1.9.14",
"ahooks": "^3.9.6",
"antd": "^5.28.1",
"antd-style": "^3.7.1",
@@ -228,7 +229,6 @@
"marked": "^16.4.2",
"mdast-util-to-markdown": "^2.1.2",
"model-bank": "workspace:*",
"modern-screenshot": "^4.6.6",
"nanoid": "^5.1.6",
"next": "^16.0.3",
"next-auth": "5.0.0-beta.30",
@@ -258,6 +258,7 @@
"random-words": "^2.0.1",
"react": "19.2.0",
"react-confetti": "^6.4.0",
"react-diff-view": "^3.3.2",
"react-dom": "19.2.0",
"react-fast-marquee": "^1.6.5",
"react-hotkeys-hook": "^5.2.1",
@@ -397,4 +398,4 @@
"@vercel/speed-insights"
]
}
}
}
@@ -48,6 +48,7 @@ export interface RenameLocalFileResult {
}
export interface LocalReadFileParams {
fullContent?: boolean;
loc?: [number, number];
path: string;
}
@@ -217,7 +218,10 @@ export interface EditLocalFileParams {
}
export interface EditLocalFileResult {
diffText?: string;
error?: string;
linesAdded?: number;
linesDeleted?: number;
replacements: number;
success: boolean;
}
+126
View File
@@ -27,6 +27,132 @@ const qiniuChatModels: AIChatModelCard[] = [
id: 'deepseek-r1',
type: 'chat',
},
{
abilities: {
functionCall: true,
reasoning: true,
search: true,
},
contextWindowTokens: 204_800,
description: '专为高效编码与 Agent 工作流而生',
displayName: 'MiniMax M2',
enabled: true,
id: 'minimax/minimax-m2',
maxOutput: 131_072,
pricing: {
currency: 'CNY',
units: [
{ name: 'textInput', rate: 2.1, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textOutput', rate: 8.4, strategy: 'fixed', unit: 'millionTokens' },
],
},
releasedAt: '2025-10-27',
settings: {
searchImpl: 'params',
},
type: 'chat',
},
{
abilities: {
functionCall: true,
reasoning: true,
},
contextWindowTokens: 131_072,
description: '美团开源的专为对话交互和智能体任务优化的非思维型基础模型,在工具调用和复杂多轮交互场景中表现突出',
displayName: 'LongCat Flash Chat',
enabled: true,
id: 'meituan/longcat-flash-chat',
maxOutput: 65536,
pricing: {
currency: 'CNY',
units: [
{ name: 'textInput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textOutput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
],
},
releasedAt: '2025-09-01',
settings: {
extendParams: ['enableReasoning'],
searchImpl: 'params',
},
type: 'chat',
},
{
abilities: {
functionCall: true,
reasoning: true,
search: true,
},
contextWindowTokens: 200_000,
description: '智谱最新旗舰模型 GLM-4.6,在高级编码、长文本处理、推理与智能体能力上全面超越前代。',
displayName: 'GLM-4.6',
enabled: true,
id: 'z-ai/glm-4.6',
maxOutput: 128_000,
pricing: {
currency: 'CNY',
units: [
{ name: 'textInput', rate: 7.2, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textOutput', rate: 12.6, strategy: 'fixed', unit: 'millionTokens' },
],
},
releasedAt: '2025-09-30',
settings: {
extendParams: ['enableReasoning'],
searchImpl: 'params',
},
type: 'chat',
},
{
abilities: {
functionCall: true,
reasoning: true,
search: true,
vision: true,
},
contextWindowTokens: 2_000_000,
description:
'我们很高兴发布 Grok 4 Fast,这是我们在成本效益推理模型方面的最新进展。',
displayName: 'Grok 4 Fast',
enabled: true,
id: 'x-ai/grok-4-fast',
pricing: {
currency: 'CNY',
units: [
{ name: 'textInput', rate: 7.2, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textOutput', rate: 12.6, strategy: 'fixed', unit: 'millionTokens' },
],
},
releasedAt: '2025-09-09',
settings: {
searchImpl: 'params',
},
type: 'chat',
},
{
abilities: {
functionCall: true,
reasoning: true,
},
contextWindowTokens: 256_000,
description:
'我们很高兴推出 grok-code-fast-1,这是一款快速且经济高效的推理模型,在代理编码方面表现出色。',
displayName: 'Grok Code Fast 1',
id: 'x-ai/grok-code-fast-1',
pricing: {
units: [
{ name: 'textInput_cacheRead', rate: 0.02, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textInput', rate: 0.2, strategy: 'fixed', unit: 'millionTokens' },
{ name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
],
},
releasedAt: '2025-08-27',
// settings: {
// reasoning_effort is not supported by grok-code. Specifying reasoning_effort parameter will get an error response.
// extendParams: ['reasoningEffort'],
// },
type: 'chat',
},
];
export const allModels = [...qiniuChatModels];
@@ -51,6 +51,8 @@ export const convertOpenAIMessages = async (messages: OpenAI.ChatCompletionMessa
// it's compatible for DeepSeek
if (msg.reasoning_content !== undefined) result.reasoning_content = msg.reasoning_content;
// MiniMax uses reasoning_details for historical thinking, so forward it unchanged
if (msg.reasoning_details !== undefined) result.reasoning_details = msg.reasoning_details;
return result;
}),
@@ -2317,6 +2317,155 @@ describe('OpenAIStream', () => {
);
});
it('should handle reasoning_details array format from MiniMax M2', async () => {
const data = [
{
id: '055ccc4cbe1ca0dc18037256237d0823',
object: 'chat.completion.chunk',
created: 1762498892,
model: 'MiniMax-M2',
choices: [
{
index: 0,
delta: {
content: '',
role: 'assistant',
name: 'MiniMax AI',
audio_content: '',
reasoning_details: [
{
type: 'reasoning.text',
id: 'reasoning-text-1',
format: 'MiniMax-response-v1',
index: 0,
text: '中文打招呼说"你好"',
},
],
},
finish_reason: null,
},
],
usage: null,
},
{
id: '055ccc4cbe1ca0dc18037256237d0823',
object: 'chat.completion.chunk',
created: 1762498892,
model: 'MiniMax-M2',
choices: [
{
index: 0,
delta: {
reasoning_details: [
{
type: 'reasoning.text',
id: 'reasoning-text-2',
format: 'MiniMax-response-v1',
index: 0,
text: '我需要用中文回复。',
},
],
},
finish_reason: null,
},
],
usage: null,
},
{
id: '055ccc4cbe1ca0dc18037256237d0823',
object: 'chat.completion.chunk',
created: 1762498892,
model: 'MiniMax-M2',
choices: [
{
index: 0,
delta: {
content: '你好',
},
finish_reason: null,
},
],
usage: null,
},
{
id: '055ccc4cbe1ca0dc18037256237d0823',
object: 'chat.completion.chunk',
created: 1762498892,
model: 'MiniMax-M2',
choices: [
{
index: 0,
delta: {
content: '',
},
finish_reason: null,
},
],
usage: null,
},
{
id: '055ccc4cbe1ca0dc18037256237d0823',
object: 'chat.completion.chunk',
created: 1762498892,
model: 'MiniMax-M2',
choices: [
{
index: 0,
delta: {
content: '',
},
finish_reason: 'stop',
},
],
usage: {
prompt_tokens: 10,
completion_tokens: 20,
total_tokens: 30,
},
},
];
const mockOpenAIStream = new ReadableStream({
start(controller) {
data.forEach((chunk) => {
controller.enqueue(chunk);
});
controller.close();
},
});
const protocolStream = OpenAIStream(mockOpenAIStream);
const decoder = new TextDecoder();
const chunks = [];
// @ts-ignore
for await (const chunk of protocolStream) {
chunks.push(decoder.decode(chunk, { stream: true }));
}
expect(chunks).toEqual(
[
'id: 055ccc4cbe1ca0dc18037256237d0823',
'event: reasoning',
`data: "中文打招呼说\\"你好\\""\n`,
'id: 055ccc4cbe1ca0dc18037256237d0823',
'event: reasoning',
`data: "我需要用中文回复。"\n`,
'id: 055ccc4cbe1ca0dc18037256237d0823',
'event: text',
`data: "你好"\n`,
'id: 055ccc4cbe1ca0dc18037256237d0823',
'event: text',
`data: ""\n`,
'id: 055ccc4cbe1ca0dc18037256237d0823',
'event: usage',
`data: {"inputTextTokens":10,"outputTextTokens":20,"totalInputTokens":10,"totalOutputTokens":20,"totalTokens":30}\n`,
].map((i) => `${i}\n`),
);
});
it('should handle claude reasoning in litellm openai mode', async () => {
const data = [
{
@@ -3346,5 +3495,166 @@ describe('OpenAIStream', () => {
'chat response streaming chunk parse error, please contact your API Provider to fix it.',
);
});
it('should handle MiniMax base_resp error with insufficient quota (1008)', async () => {
const mockOpenAIStream = new ReadableStream({
start(controller) {
controller.enqueue({
id: 'minimax-error-1008',
choices: null,
base_resp: {
status_code: 1008,
status_msg: 'insufficient balance',
},
});
controller.close();
},
});
const protocolStream = OpenAIStream(mockOpenAIStream);
const decoder = new TextDecoder();
const chunks = [];
// @ts-ignore
for await (const chunk of protocolStream) {
chunks.push(decoder.decode(chunk, { stream: true }));
}
expect(chunks[0]).toBe('id: minimax-error-1008\n');
expect(chunks[1]).toBe('event: error\n');
expect(chunks[2]).toContain('InsufficientQuota');
expect(chunks[2]).toContain('insufficient balance');
expect(chunks[2]).toContain('minimax');
});
it('should handle MiniMax base_resp error with invalid API key (2049)', async () => {
const mockOpenAIStream = new ReadableStream({
start(controller) {
controller.enqueue({
id: 'minimax-error-2049',
choices: null,
base_resp: {
status_code: 2049,
status_msg: 'invalid API Key',
},
});
controller.close();
},
});
const protocolStream = OpenAIStream(mockOpenAIStream);
const decoder = new TextDecoder();
const chunks = [];
// @ts-ignore
for await (const chunk of protocolStream) {
chunks.push(decoder.decode(chunk, { stream: true }));
}
expect(chunks[0]).toBe('id: minimax-error-2049\n');
expect(chunks[1]).toBe('event: error\n');
expect(chunks[2]).toContain('InvalidProviderAPIKey');
expect(chunks[2]).toContain('invalid API Key');
});
it('should handle MiniMax base_resp error with rate limit (1002)', async () => {
const mockOpenAIStream = new ReadableStream({
start(controller) {
controller.enqueue({
id: 'minimax-error-1002',
choices: null,
base_resp: {
status_code: 1002,
status_msg: 'request frequency exceeds limit',
},
});
controller.close();
},
});
const protocolStream = OpenAIStream(mockOpenAIStream);
const decoder = new TextDecoder();
const chunks = [];
// @ts-ignore
for await (const chunk of protocolStream) {
chunks.push(decoder.decode(chunk, { stream: true }));
}
expect(chunks[0]).toBe('id: minimax-error-1002\n');
expect(chunks[1]).toBe('event: error\n');
expect(chunks[2]).toContain('QuotaLimitReached');
expect(chunks[2]).toContain('request frequency exceeds limit');
});
it('should handle MiniMax base_resp error with context window exceeded (1039)', async () => {
const mockOpenAIStream = new ReadableStream({
start(controller) {
controller.enqueue({
id: 'minimax-error-1039',
choices: null,
base_resp: {
status_code: 1039,
status_msg: 'token limit exceeded',
},
});
controller.close();
},
});
const protocolStream = OpenAIStream(mockOpenAIStream);
const decoder = new TextDecoder();
const chunks = [];
// @ts-ignore
for await (const chunk of protocolStream) {
chunks.push(decoder.decode(chunk, { stream: true }));
}
expect(chunks[0]).toBe('id: minimax-error-1039\n');
expect(chunks[1]).toBe('event: error\n');
expect(chunks[2]).toContain('ExceededContextWindow');
expect(chunks[2]).toContain('token limit exceeded');
});
it('should handle MiniMax base_resp error with fallback to ProviderBizError', async () => {
const mockOpenAIStream = new ReadableStream({
start(controller) {
controller.enqueue({
id: 'minimax-error-unknown',
choices: null,
base_resp: {
status_code: 9999,
status_msg: 'unknown error',
},
});
controller.close();
},
});
const protocolStream = OpenAIStream(mockOpenAIStream);
const decoder = new TextDecoder();
const chunks = [];
// @ts-ignore
for await (const chunk of protocolStream) {
chunks.push(decoder.decode(chunk, { stream: true }));
}
expect(chunks[0]).toBe('id: minimax-error-unknown\n');
expect(chunks[1]).toBe('event: error\n');
expect(chunks[2]).toContain('ProviderBizError');
expect(chunks[2]).toContain('unknown error');
});
});
});
@@ -71,6 +71,55 @@ const transformOpenAIStream = (
return { data: errorData, id: 'first_chunk_error', type: 'error' };
}
// MiniMax 会在 base_resp 中返回业务错误(如余额不足),但不走 FIRST_CHUNK_ERROR_KEY
// 典型返回:{ id: '...', choices: null, base_resp: { status_code: 1008, status_msg: 'insufficient balance' }, usage: {...} }
if ((chunk as any).base_resp && typeof (chunk as any).base_resp.status_code === 'number') {
const baseResp = (chunk as any).base_resp as {
message?: string;
status_code: number;
status_msg?: string;
};
if (baseResp.status_code !== 0) {
// 根据 MiniMax 错误码映射到对应的错误类型
let errorType: ILobeAgentRuntimeErrorType = AgentRuntimeErrorType.ProviderBizError;
switch (baseResp.status_code) {
// 1004 - 未授权 / Token 不匹配 / 2049 - 无效的 API Key
case 1004:
case 2049: {
errorType = AgentRuntimeErrorType.InvalidProviderAPIKey;
break;
}
// 1008 - 余额不足
case 1008: {
errorType = AgentRuntimeErrorType.InsufficientQuota;
break;
}
// 1002 - 请求频率超限 / 1041 - 连接数限制 / 2045 - 请求频率增长超限
case 1002:
case 1041:
case 2045: {
errorType = AgentRuntimeErrorType.QuotaLimitReached;
break;
}
// 1039 - Token 限制
case 1039: {
errorType = AgentRuntimeErrorType.ExceededContextWindow;
break;
}
}
const errorData: ChatMessageError = {
body: { ...baseResp, provider: 'minimax' },
message: baseResp.status_msg || baseResp.message || 'MiniMax provider error',
type: errorType,
};
return { data: errorData, id: chunk.id, type: 'error' };
}
}
try {
// maybe need another structure to add support for multiple choices
if (!Array.isArray(chunk.choices) || chunk.choices.length === 0) {
@@ -265,6 +314,24 @@ const transformOpenAIStream = (
let reasoning_content = (() => {
if ('reasoning_content' in item.delta) return item.delta.reasoning_content;
if ('reasoning' in item.delta) return item.delta.reasoning;
// Handle MiniMax M2 reasoning_details format (array of objects with text field)
if ('reasoning_details' in item.delta) {
const details = item.delta.reasoning_details;
if (Array.isArray(details)) {
return details
.filter((detail: any) => detail.text)
.map((detail: any) => detail.text)
.join('');
}
if (typeof details === 'string') {
return details;
}
if (typeof details === 'object' && details !== null && 'text' in details) {
return details.text;
}
// Fallback for unexpected types
return '';
}
// Handle content array format with thinking blocks (e.g. mistral AI Magistral model)
if ('content' in item.delta && Array.isArray(item.delta.content)) {
return item.delta.content
@@ -13,17 +13,45 @@ export const LobeMinimaxAI = createOpenAICompatibleRuntime({
baseURL: 'https://api.minimaxi.com/v1',
chatCompletion: {
handlePayload: (payload) => {
const { enabledSearch, max_tokens, temperature, tools, top_p, ...params } = payload;
const { enabledSearch, max_tokens, messages, temperature, tools, top_p, ...params } = payload;
const minimaxTools = enabledSearch
? [
...(tools || []),
{
type: 'web_search',
},
]
...(tools || []),
{
type: 'web_search',
},
]
: tools;
// Interleaved thinking
const processedMessages = messages.map((message: any) => {
if (message.role === 'assistant' && message.reasoning) {
// 只处理没有 signature 的历史推理内容
if (!message.reasoning.signature && message.reasoning.content) {
const { reasoning, ...messageWithoutReasoning } = message;
return {
...messageWithoutReasoning,
reasoning_details: [
{
format: 'MiniMax-response-v1',
id: 'reasoning-text-0',
index: 0,
text: reasoning.content,
type: 'reasoning.text',
},
],
};
}
// 有 signature 或没有 content 的情况,移除 reasoning 字段
// eslint-disable-next-line unused-imports/no-unused-vars, @typescript-eslint/no-unused-vars
const { reasoning, ...messageWithoutReasoning } = message;
return messageWithoutReasoning;
}
return message;
});
// Resolve parameters with constraints
const resolvedParams = resolveParameters(
{
@@ -46,6 +74,8 @@ export const LobeMinimaxAI = createOpenAICompatibleRuntime({
return {
...params,
max_tokens: resolvedParams.max_tokens,
messages: processedMessages,
reasoning_split: true,
temperature: finalTemperature,
tools: minimaxTools,
top_p: resolvedParams.top_p,
@@ -581,3 +581,587 @@ Designed for a wide variety of tasks, it empowers developers and researchers to
},
]
`;
exports[`NovitaAI models should get models 1`] = `
[
{
"contextWindowTokens": 8192,
"description": "Meta's latest class of model (Llama 3) launched with a variety of sizes & flavors. This 8B instruct-tuned version was optimized for high quality dialogue usecases. It has demonstrated strong performance compared to leading closed-source models in human evaluations.",
"displayName": "meta-llama/llama-3-8b-instruct",
"enabled": false,
"functionCall": false,
"id": "meta-llama/llama-3-8b-instruct",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.063,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.063,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-04-25",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 8192,
"description": "Meta's latest class of model (Llama 3) launched with a variety of sizes & flavors. This 70B instruct-tuned version was optimized for high quality dialogue usecases. It has demonstrated strong performance compared to leading closed-source models in human evaluations.",
"displayName": "meta-llama/llama-3-70b-instruct",
"enabled": false,
"functionCall": false,
"id": "meta-llama/llama-3-70b-instruct",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.55,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.76,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-04-25",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 8192,
"description": "Meta's latest class of models, Llama 3.1, launched with a variety of sizes and configurations. The 8B instruct-tuned version is particularly fast and efficient. It has demonstrated strong performance in human evaluations, outperforming several leading closed-source models.",
"displayName": "meta-llama/llama-3.1-8b-instruct",
"enabled": false,
"functionCall": false,
"id": "meta-llama/llama-3.1-8b-instruct",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.1,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.1,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-07-24",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 8192,
"description": "Meta's latest class of models, Llama 3.1, has launched with a variety of sizes and configurations. The 70B instruct-tuned version is optimized for high-quality dialogue use cases. It has demonstrated strong performance in human evaluations compared to leading closed-source models.",
"displayName": "meta-llama/llama-3.1-70b-instruct",
"enabled": false,
"functionCall": false,
"id": "meta-llama/llama-3.1-70b-instruct",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.55,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.76,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-07-24",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 32768,
"description": "Meta's latest class of models, Llama 3.1, launched with a variety of sizes and configurations. This 405B instruct-tuned version is optimized for high-quality dialogue use cases. It has demonstrated strong performance compared to leading closed-source models, including GPT-4o and Claude 3.5 Sonnet, in evaluations.",
"displayName": "meta-llama/llama-3.1-405b-instruct",
"enabled": false,
"functionCall": false,
"id": "meta-llama/llama-3.1-405b-instruct",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 3,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 5,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-07-24",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 8192,
"description":
"Gemma 2 9B by Google is an advanced, open-source language model that sets a new standard for efficiency and performance in its size class.
Designed for a wide variety of tasks, it empowers developers and researchers to build innovative applications, while maintaining accessibility, safety, and cost-effectiveness."
,
"displayName": "google/gemma-2-9b-it",
"enabled": false,
"functionCall": false,
"id": "google/gemma-2-9b-it",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.08,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.08,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-07-18",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 4096,
"description": "This is a fine-tuned Llama-2 model designed to support longer and more detailed writing prompts, as well as next-chapter generation. It also includes an experimental role-playing instruction set with multi-round dialogues, character interactions, and varying numbers of participants",
"displayName": "jondurbin/airoboros-l2-70b",
"enabled": false,
"functionCall": false,
"id": "jondurbin/airoboros-l2-70b",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.5,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.5,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-07-17",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 8192,
"description": "Hermes 2 Pro is an upgraded, retrained version of Nous Hermes 2, consisting of an updated and cleaned version of the OpenHermes 2.5 Dataset, as well as a newly introduced Function Calling and JSON Mode dataset developed in-house.",
"displayName": "nousresearch/hermes-2-pro-llama-3-8b",
"enabled": false,
"functionCall": false,
"id": "nousresearch/hermes-2-pro-llama-3-8b",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.14,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.14,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-06-27",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 32768,
"description": "A high-performing, industry-standard 7.3B parameter model, with optimizations for speed and context length.",
"displayName": "mistralai/mistral-7b-instruct",
"enabled": false,
"functionCall": false,
"id": "mistralai/mistral-7b-instruct",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.065,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.065,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-06-27",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 16000,
"description": "Dolphin 2.9 is designed for instruction following, conversational, and coding. This model is a finetune of Mixtral 8x22B Instruct. It features a 64k context length and was fine-tuned with a 16k sequence length using ChatML templates.The model is uncensored and is stripped of alignment and bias. It requires an external alignment layer for ethical use.",
"displayName": "cognitivecomputations/dolphin-mixtral-8x22b",
"enabled": false,
"functionCall": false,
"id": "cognitivecomputations/dolphin-mixtral-8x22b",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.9,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.9,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-06-27",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 16000,
"description": "The uncensored llama3 model is a powerhouse of creativity, excelling in both roleplay and story writing. It offers a liberating experience during roleplays, free from any restrictions. This model stands out for its immense creativity, boasting a vast array of unique ideas and plots, truly a treasure trove for those seeking originality. Its unrestricted nature during roleplays allows for the full breadth of imagination to unfold, akin to an enhanced, big-brained version of Stheno. Perfect for creative minds seeking a boundless platform for their imaginative expressions, the uncensored llama3 model is an ideal choice",
"displayName": "sao10k/l3-70b-euryale-v2.1",
"enabled": false,
"functionCall": false,
"id": "sao10k/l3-70b-euryale-v2.1",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 1.48,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 1.48,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-06-18",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 4096,
"description": "A merge with a complex family tree, this model was crafted for roleplaying and storytelling. Midnight Rose is a successor to Rogue Rose and Aurora Nights and improves upon them both. It wants to produce lengthy output by default and is the best creative writing merge produced so far by sophosympatheia.",
"displayName": "sophosympatheia/midnight-rose-70b",
"enabled": false,
"functionCall": false,
"id": "sophosympatheia/midnight-rose-70b",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.8,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.8,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-06-17",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 4096,
"description": "The idea behind this merge is that each layer is composed of several tensors, which are in turn responsible for specific functions. Using MythoLogic-L2's robust understanding as its input and Huginn's extensive writing capability as its output seems to have resulted in a model that exceeds at both, confirming my theory. (More details to be released at a later time).",
"displayName": "gryphe/mythomax-l2-13b",
"enabled": false,
"functionCall": false,
"id": "gryphe/mythomax-l2-13b",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.119,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.119,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-04-25",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 4096,
"description": "Nous-Hermes-Llama2-13b is a state-of-the-art language model fine-tuned on over 300,000 instructions. This model was fine-tuned by Nous Research, with Teknium and Emozilla leading the fine tuning process and dataset curation, Redmond AI sponsoring the compute, and several other contributors.",
"displayName": "nousresearch/nous-hermes-llama2-13b",
"enabled": false,
"functionCall": false,
"id": "nousresearch/nous-hermes-llama2-13b",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.17,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.17,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-04-25",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 32768,
"description": "Nous Hermes 2 Mixtral 8x7B DPO is the new flagship Nous Research model trained over the Mixtral 8x7B MoE LLM. The model was trained on over 1,000,000 entries of primarily GPT-4 generated data, as well as other high quality data from open datasets across the AI landscape, achieving state of the art performance on a variety of tasks.",
"displayName": "Nous-Hermes-2-Mixtral-8x7B-DPO",
"enabled": false,
"functionCall": false,
"id": "Nous-Hermes-2-Mixtral-8x7B-DPO",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.27,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.27,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-04-25",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 4096,
"description": "A Mythomax/MLewd_13B-style merge of selected 70B models. A multi-model merge of several LLaMA2 70B finetunes for roleplaying and creative work. The goal was to create a model that combines creativity with intelligence for an enhanced experience.",
"displayName": "lzlv_70b",
"enabled": false,
"functionCall": false,
"id": "lzlv_70b",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.58,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.78,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-04-25",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 4096,
"description": "OpenHermes 2.5 Mistral 7B is a state of the art Mistral Fine-tune, a continuation of OpenHermes 2 model, which trained on additional code datasets.",
"displayName": "teknium/openhermes-2.5-mistral-7b",
"enabled": false,
"functionCall": false,
"id": "teknium/openhermes-2.5-mistral-7b",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.17,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.17,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-04-24",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 65535,
"description": "WizardLM-2 8x22B is Microsoft AI's most advanced Wizard model. It demonstrates highly competitive performance compared to leading proprietary models, and it consistently outperforms all existing state-of-the-art opensource models.",
"displayName": "microsoft/wizardlm-2-8x22b",
"enabled": false,
"functionCall": false,
"id": "microsoft/wizardlm-2-8x22b",
"imageOutput": false,
"maxOutput": undefined,
"pricing": {
"units": [
{
"name": "textInput",
"rate": 0.64,
"strategy": "fixed",
"unit": "millionTokens",
},
{
"name": "textOutput",
"rate": 0.64,
"strategy": "fixed",
"unit": "millionTokens",
},
],
},
"reasoning": false,
"releasedAt": "2024-04-24",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
]
`;
@@ -516,3 +516,520 @@ exports[`LobeOpenAI > models > should get models 1`] = `
},
]
`;
exports[`LobeOpenAI models should get models 1`] = `
[
{
"contextWindowTokens": undefined,
"description": "通用语音识别模型,支持多语言语音识别、语音翻译和语言识别。",
"displayName": "Whisper",
"enabled": false,
"functionCall": false,
"id": "whisper-1",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-02-27",
"search": false,
"type": "stt",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "",
"displayName": "davinci-002",
"enabled": false,
"functionCall": false,
"id": "davinci-002",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-08-21",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 16384,
"description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125",
"displayName": "GPT-3.5 Turbo",
"enabled": false,
"functionCall": true,
"id": "gpt-3.5-turbo",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-02-28",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "第二代 DALL·E 模型,支持更真实、准确的图像生成,分辨率是第一代的4倍",
"displayName": "DALL·E 2",
"enabled": false,
"functionCall": false,
"id": "dall-e-2",
"imageOutput": false,
"maxOutput": undefined,
"parameters": {
"imageUrl": {
"default": null,
},
"prompt": {
"default": "",
},
"size": {
"default": "1024x1024",
"enum": [
"256x256",
"512x512",
"1024x1024",
],
},
},
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-11-01",
"search": false,
"type": "image",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "",
"displayName": "gpt-3.5-turbo-16k",
"enabled": false,
"functionCall": false,
"id": "gpt-3.5-turbo-16k",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-05-10",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "",
"displayName": "tts-1-hd-1106",
"enabled": false,
"functionCall": false,
"id": "tts-1-hd-1106",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-11-03",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "最新的文本转语音模型,针对质量进行优化",
"displayName": "TTS-1 HD",
"enabled": false,
"functionCall": false,
"id": "tts-1-hd",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-11-03",
"search": false,
"type": "tts",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "",
"displayName": "gpt-3.5-turbo-16k-0613",
"enabled": false,
"functionCall": false,
"id": "gpt-3.5-turbo-16k-0613",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-05-30",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 8192,
"description": "最强大的向量化模型,适用于英文和非英文任务",
"displayName": "Text Embedding 3 Large",
"enabled": false,
"functionCall": false,
"id": "text-embedding-3-large",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2024-01-22",
"search": false,
"type": "embedding",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "",
"displayName": "gpt-4-1106-vision-preview",
"enabled": false,
"functionCall": false,
"id": "gpt-4-1106-vision-preview",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2024-03-26",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "",
"displayName": "gpt-3.5-turbo-instruct-0914",
"enabled": false,
"functionCall": false,
"id": "gpt-3.5-turbo-instruct-0914",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-09-07",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 128000,
"description": "最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。",
"displayName": "GPT-4 Turbo Preview 0125",
"enabled": false,
"functionCall": true,
"id": "gpt-4-0125-preview",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2024-01-23",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 128000,
"description": "最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。",
"displayName": "GPT-4 Turbo Preview",
"enabled": false,
"functionCall": true,
"id": "gpt-4-turbo-preview",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2024-01-23",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 4096,
"description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,对指令遵循的优化",
"displayName": "GPT-3.5 Turbo Instruct",
"enabled": false,
"functionCall": false,
"id": "gpt-3.5-turbo-instruct",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-08-24",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "",
"displayName": "gpt-3.5-turbo-0301",
"enabled": false,
"functionCall": false,
"id": "gpt-3.5-turbo-0301",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-03-01",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "",
"displayName": "gpt-3.5-turbo-0613",
"enabled": false,
"functionCall": false,
"id": "gpt-3.5-turbo-0613",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-06-12",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "最新的文本转语音模型,针对实时场景优化速度",
"displayName": "TTS-1",
"enabled": false,
"functionCall": false,
"id": "tts-1",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-04-19",
"search": false,
"type": "tts",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "最新的 DALL·E 模型,于2023年11月发布。支持更真实、准确的图像生成,具有更强的细节表现力",
"displayName": "DALL·E 3",
"enabled": false,
"functionCall": false,
"id": "dall-e-3",
"imageOutput": false,
"maxOutput": undefined,
"parameters": {
"prompt": {
"default": "",
},
"quality": {
"default": "standard",
"enum": [
"standard",
"hd",
],
},
"size": {
"default": "1024x1024",
"enum": [
"1024x1024",
"1792x1024",
"1024x1792",
],
},
},
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-10-31",
"search": false,
"type": "image",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 16384,
"description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125",
"displayName": "GPT-3.5 Turbo 1106",
"enabled": false,
"functionCall": true,
"id": "gpt-3.5-turbo-1106",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-11-02",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 128000,
"description": "最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。",
"displayName": "GPT-4 Turbo Preview 1106",
"enabled": false,
"functionCall": true,
"id": "gpt-4-1106-preview",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-11-02",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "",
"displayName": "babbage-002",
"enabled": false,
"functionCall": false,
"id": "babbage-002",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-08-21",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "",
"displayName": "tts-1-1106",
"enabled": false,
"functionCall": false,
"id": "tts-1-1106",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-11-03",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 128000,
"description": "GPT-4 视觉预览版,专为图像分析和处理任务设计。",
"displayName": "GPT 4 Turbo with Vision Preview",
"enabled": false,
"functionCall": false,
"id": "gpt-4-vision-preview",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-11-02",
"search": false,
"type": "chat",
"video": false,
"vision": true,
},
{
"contextWindowTokens": 8192,
"description": "高效且经济的新一代 Embedding 模型,适用于知识检索、RAG 应用等场景",
"displayName": "Text Embedding 3 Small",
"enabled": false,
"functionCall": false,
"id": "text-embedding-3-small",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2024-01-22",
"search": false,
"type": "embedding",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 8192,
"description": "GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。",
"displayName": "GPT-4",
"enabled": false,
"functionCall": true,
"id": "gpt-4",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-06-27",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": undefined,
"description": "",
"displayName": "text-embedding-ada-002",
"enabled": false,
"functionCall": false,
"id": "text-embedding-ada-002",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2022-12-16",
"search": false,
"type": "embedding",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 16384,
"description": "GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125",
"displayName": "GPT-3.5 Turbo 0125",
"enabled": false,
"functionCall": true,
"id": "gpt-3.5-turbo-0125",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2024-01-23",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
{
"contextWindowTokens": 8192,
"description": "GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。",
"displayName": "GPT-4 0613",
"enabled": false,
"functionCall": true,
"id": "gpt-4-0613",
"imageOutput": false,
"maxOutput": undefined,
"pricing": undefined,
"reasoning": false,
"releasedAt": "2023-06-12",
"search": false,
"type": "chat",
"video": false,
"vision": false,
},
]
`;
@@ -26,3 +26,30 @@ exports[`PPIO > models > should get models 1`] = `
},
]
`;
exports[`PPIO models should get models 1`] = `
[
{
"contextWindowTokens": 64000,
"description": "DeepSeek R1是DeepSeek团队发布的最新开源模型,具备非常强悍的推理性能,尤其在数学、编程和推理任务上达到了与OpenAI的o1模型相当的水平。",
"displayName": "DeepSeek: DeepSeek R1 (community)",
"enabled": true,
"functionCall": false,
"id": "deepseek/deepseek-r1/community",
"reasoning": true,
"type": "chat",
"vision": false,
},
{
"contextWindowTokens": 64000,
"description": "DeepSeek-V3在推理速度方面实现了比之前模型的重大突破。在开源模型中排名第一,并可与全球最先进的闭源模型相媲美。DeepSeek-V3 采用了多头潜在注意力 MLA 和 DeepSeekMoE 架构,这些架构在 DeepSeek-V2 中得到了全面验证。此外,DeepSeek-V3 开创了一种用于负载均衡的辅助无损策略,并设定了多标记预测训练目标以获得更强的性能。",
"displayName": "DeepSeek: DeepSeek V3 (community)",
"enabled": true,
"functionCall": false,
"id": "deepseek/deepseek-v3/community",
"reasoning": false,
"type": "chat",
"vision": false,
},
]
`;
+5 -5
View File
@@ -10,14 +10,14 @@
"dependencies": {
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/auto-instrumentations-node": "^0.66.0",
"@opentelemetry/exporter-metrics-otlp-http": "^0.207.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.207.0",
"@opentelemetry/instrumentation": "^0.207.0",
"@opentelemetry/instrumentation-http": "^0.207.0",
"@opentelemetry/exporter-metrics-otlp-http": "^0.208.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.208.0",
"@opentelemetry/instrumentation": "^0.208.0",
"@opentelemetry/instrumentation-http": "^0.208.0",
"@opentelemetry/instrumentation-pg": "^0.60.0",
"@opentelemetry/resources": "^2.2.0",
"@opentelemetry/sdk-metrics": "^2.2.0",
"@opentelemetry/sdk-node": "^0.207.0",
"@opentelemetry/sdk-node": "^0.208.0",
"@opentelemetry/sdk-trace-node": "^2.2.0",
"@opentelemetry/semantic-conventions": "^1.38.0",
"@vercel/otel": "^2.1.0"
+8 -8
View File
@@ -17,16 +17,16 @@ export interface LobeAgentChatConfig {
enableMaxTokens?: boolean;
/**
* 是否开启流式输出
* Whether to enable streaming output
*/
enableStreaming?: boolean;
/**
* 是否开启推理
* Whether to enable reasoning
*/
enableReasoning?: boolean;
/**
* 自定义推理强度
* Custom reasoning effort level
*/
enableReasoningEffort?: boolean;
reasoningBudgetToken?: number;
@@ -34,25 +34,25 @@ export interface LobeAgentChatConfig {
gpt5ReasoningEffort?: 'minimal' | 'low' | 'medium' | 'high';
gpt5_1ReasoningEffort?: 'none' | 'low' | 'medium' | 'high';
/**
* 输出文本详细程度控制
* Output text verbosity control
*/
textVerbosity?: 'low' | 'medium' | 'high';
thinking?: 'disabled' | 'auto' | 'enabled';
thinkingBudget?: number;
/**
* 禁用上下文缓存
* Disable context caching
*/
disableContextCaching?: boolean;
/**
* 历史消息条数
* Number of historical messages
*/
historyCount?: number;
/**
* 开启历史记录条数
* Enable historical message count
*/
enableHistoryCount?: boolean;
/**
* 历史消息长度压缩阈值
* Enable history message compression threshold
*/
enableCompressHistory?: boolean;
+4 -4
View File
@@ -56,12 +56,12 @@ export interface LobeDocument {
source: string;
/**
* 文档来源类型
* Document source type
*/
sourceType: DocumentSourceType;
/**
* 文档标题 (如果可用)。
* Document title (if available)
*/
title?: string;
@@ -168,12 +168,12 @@ export enum DocumentSourceType {
API = 'api',
/**
* 编辑器创建的文档
* Document created in editor
*/
EDITOR = 'editor',
/**
* 本地或上传的文件
* Local or uploaded file
*/
FILE = 'file',
+9 -9
View File
@@ -2,15 +2,15 @@
import type { ILobeAgentRuntimeErrorType } from '@lobechat/model-runtime';
export const ChatErrorType = {
// ******* 业务错误语义 ******* //
// ******* Business Error Semantics ******* //
InvalidAccessCode: 'InvalidAccessCode', // is in valid password
InvalidClerkUser: 'InvalidClerkUser', // is not Clerk User
FreePlanLimit: 'FreePlanLimit', // is not Clerk User
SubscriptionPlanLimit: 'SubscriptionPlanLimit', // 订阅用户超限
SubscriptionKeyMismatch: 'SubscriptionKeyMismatch', // 订阅 key 不匹配
SubscriptionPlanLimit: 'SubscriptionPlanLimit', // Subscription user limit exceeded
SubscriptionKeyMismatch: 'SubscriptionKeyMismatch', // Subscription key mismatch
SupervisorDecisionFailed: 'SupervisorDecisionFailed', // 主持人决策失败
SupervisorDecisionFailed: 'SupervisorDecisionFailed', // Supervisor decision failed
InvalidUserKey: 'InvalidUserKey', // is not valid User key
CreateMessageError: 'CreateMessageError',
@@ -18,20 +18,20 @@ export const ChatErrorType = {
* @deprecated
*/
NoOpenAIAPIKey: 'NoOpenAIAPIKey',
OllamaServiceUnavailable: 'OllamaServiceUnavailable', // 未启动/检测到 Ollama 服务
OllamaServiceUnavailable: 'OllamaServiceUnavailable', // Ollama service not started/detected
PluginFailToTransformArguments: 'PluginFailToTransformArguments',
UnknownChatFetchError: 'UnknownChatFetchError',
SystemTimeNotMatchError: 'SystemTimeNotMatchError',
// ******* 客户端错误 ******* //
// ******* Client Errors ******* //
BadRequest: 400,
Unauthorized: 401,
Forbidden: 403,
ContentNotFound: 404, // 没找到接口
MethodNotAllowed: 405, // 不支持
ContentNotFound: 404, // Endpoint not found
MethodNotAllowed: 405, // Method not supported
TooManyRequests: 429,
// ******* 服务端错误 ******* //InvalidPluginArgumentsTransform
// ******* Server Errors ******* //InvalidPluginArgumentsTransform
InternalServerError: 500,
BadGateway: 502,
ServiceUnavailable: 503,
+5 -5
View File
@@ -84,7 +84,7 @@ export const HotkeyGroupEnum = {
export const HotkeyScopeEnum = {
Chat: 'chat',
Files: 'files',
// 默认全局注册的快捷键 scope
// Default globally registered hotkey scope
// https://react-hotkeys-hook.vercel.app/docs/documentation/hotkeys-provider
Global: 'global',
@@ -96,13 +96,13 @@ export type HotkeyGroupId = (typeof HotkeyGroupEnum)[keyof typeof HotkeyGroupEnu
export type HotkeyScopeId = (typeof HotkeyScopeEnum)[keyof typeof HotkeyScopeEnum];
export interface HotkeyItem {
// 快捷键分组用于展示
// Hotkey grouping for display purposes
group: HotkeyGroupId;
id: HotkeyId;
keys: string;
// 是否为不可编辑的快捷键
// Whether the hotkey is non-editable
nonEditable?: boolean;
// 快捷键作用域
// Hotkey scope
scopes?: HotkeyScopeId[];
}
@@ -119,7 +119,7 @@ export interface DesktopHotkeyItem {
id: DesktopHotkeyId;
keys: string;
// 是否为不可编辑的快捷键
// Whether the hotkey is non-editable
nonEditable?: boolean;
}
+2 -2
View File
@@ -26,11 +26,11 @@ export interface ImportMessage {
createdAt: number;
error?: ChatMessageError;
// 扩展字段
// Extended fields
extra?: {
model?: string;
provider?: string;
// 翻译
// Translation
translate?: ChatTranslate | false | null;
// TTS
tts?: ChatTTS;
@@ -109,8 +109,8 @@ export interface MessageMetadata extends ModelUsage, ModelPerformance {
activeBranchIndex?: number;
activeColumn?: boolean;
/**
* 消息折叠状态
* true: 折叠, false/undefined: 展开
* Message collapse state
* true: collapsed, false/undefined: expanded
*/
collapsed?: boolean;
compare?: boolean;
+1 -1
View File
@@ -112,7 +112,7 @@ export const ChatToolPayloadSchema = z.object({
});
/**
* 聊天消息错误对象
* Chat message error object
*/
export interface ChatMessagePluginError {
body?: any;
+3 -3
View File
@@ -2,11 +2,11 @@ import { z } from 'zod';
export const LobeMetaDataSchema = z.object({
/**
* 角色头像
* Character avatar
*/
avatar: z.string().optional(),
/**
* 背景色
* Background color
*/
backgroundColor: z.string().optional(),
description: z.string().optional(),
@@ -17,7 +17,7 @@ export const LobeMetaDataSchema = z.object({
tags: z.array(z.string()).optional(),
/**
* 名称
* Name
*/
title: z.string().optional(),
});
+1 -1
View File
@@ -1,6 +1,6 @@
import type { BaseDataModel } from '../meta';
// 类型定义
// Type definitions
export type TimeGroupId =
| 'today'
| 'yesterday'
+167
View File
@@ -0,0 +1,167 @@
import { describe, expect, it } from 'vitest';
import { convertAlphaToSolid } from './colorUtils';
describe('colorUtils', () => {
describe('convertAlphaToSolid', () => {
it('should convert fully opaque color to same color', () => {
// Fully opaque (alpha = 1.0)
const result = convertAlphaToSolid('rgba(255, 0, 0, 1.0)', '#ffffff');
expect(result).toBe('#ff0000');
});
it('should convert fully transparent color to background color', () => {
// Fully transparent (alpha = 0.0)
const result = convertAlphaToSolid('rgba(255, 0, 0, 0.0)', '#0000ff');
expect(result).toBe('#0000ff');
});
it('should blend semi-transparent red over white background', () => {
// 50% transparent red over white
const result = convertAlphaToSolid('rgba(255, 0, 0, 0.5)', '#ffffff');
// Expected: (255*0.5 + 255*0.5, 0*0.5 + 255*0.5, 0*0.5 + 255*0.5) = (255, 127.5, 127.5)
expect(result).toBe('#ff8080');
});
it('should blend semi-transparent blue over black background', () => {
// 50% transparent blue over black
const result = convertAlphaToSolid('rgba(0, 0, 255, 0.5)', '#000000');
// Expected: (0*0.5 + 0*0.5, 0*0.5 + 0*0.5, 255*0.5 + 0*0.5) = (0, 0, 127.5)
expect(result).toBe('#000080');
});
it('should handle hex color format for foreground', () => {
// Using hex with alpha
const result = convertAlphaToSolid('#ff000080', '#ffffff');
// #ff000080 is red with 50% opacity (80 in hex = 128/255 ≈ 0.5)
expect(result).toBe('#ff8080');
});
it('should handle named colors', () => {
const result = convertAlphaToSolid('rgba(255, 0, 0, 0.5)', 'white');
expect(result).toBe('#ff8080');
});
it('should blend with 25% opacity', () => {
// 25% opacity red over white
const result = convertAlphaToSolid('rgba(255, 0, 0, 0.25)', '#ffffff');
// Expected: (255*0.25 + 255*0.75, 0*0.25 + 255*0.75, 0*0.25 + 255*0.75) = (255, 191.25, 191.25)
expect(result).toBe('#ffbfbf');
});
it('should blend with 75% opacity', () => {
// 75% opacity red over white
const result = convertAlphaToSolid('rgba(255, 0, 0, 0.75)', '#ffffff');
// Expected: (255*0.75 + 255*0.25, 0*0.75 + 255*0.25, 0*0.75 + 255*0.25) = (255, 63.75, 63.75)
expect(result).toBe('#ff4040');
});
it('should handle complex color blending', () => {
// Green with 60% opacity over blue
const result = convertAlphaToSolid('rgba(0, 255, 0, 0.6)', '#0000ff');
// Expected: (0*0.6 + 0*0.4, 255*0.6 + 0*0.4, 0*0.6 + 255*0.4) = (0, 153, 102)
expect(result).toBe('#009966');
});
it('should blend gray colors', () => {
// 50% gray over black
const result = convertAlphaToSolid('rgba(128, 128, 128, 0.5)', '#000000');
// Expected: (128*0.5 + 0*0.5, 128*0.5 + 0*0.5, 128*0.5 + 0*0.5) = (64, 64, 64)
expect(result).toBe('#404040');
});
it('should handle white foreground over colored background', () => {
// 30% white over red
const result = convertAlphaToSolid('rgba(255, 255, 255, 0.3)', '#ff0000');
// Expected: (255*0.3 + 255*0.7, 255*0.3 + 0*0.7, 255*0.3 + 0*0.7) = (255, 76.5, 76.5)
expect(result).toBe('#ff4d4d');
});
it('should handle both colors with uppercase hex format', () => {
const result = convertAlphaToSolid('rgba(255, 0, 0, 0.5)', '#FFFFFF');
expect(result).toBe('#ff8080');
});
it('should handle RGB format for background', () => {
const result = convertAlphaToSolid('rgba(0, 255, 0, 0.5)', 'rgb(0, 0, 255)');
expect(result).toBe('#008080');
});
it('should blend dark color over light background', () => {
// Dark gray (20, 20, 20) with 80% opacity over white
const result = convertAlphaToSolid('rgba(20, 20, 20, 0.8)', '#ffffff');
// Expected: (20*0.8 + 255*0.2, 20*0.8 + 255*0.2, 20*0.8 + 255*0.2) = (67, 67, 67)
expect(result).toBe('#434343');
});
it('should blend light color over dark background', () => {
// Light gray (200, 200, 200) with 20% opacity over black
const result = convertAlphaToSolid('rgba(200, 200, 200, 0.2)', '#000000');
// Expected: (200*0.2 + 0*0.8, 200*0.2 + 0*0.8, 200*0.2 + 0*0.8) = (40, 40, 40)
expect(result).toBe('#282828');
});
it('should handle three-digit hex codes', () => {
// #f00 is red, expanded to #ff0000
const result = convertAlphaToSolid('rgba(255, 0, 0, 0.5)', '#fff');
expect(result).toBe('#ff8080');
});
it('should return lowercase hex format', () => {
const result = convertAlphaToSolid('rgba(255, 165, 0, 1.0)', '#000000');
// Orange color
expect(result).toMatch(/^#[0-9a-f]{6}$/);
expect(result).toBe('#ffa500');
});
it('should handle edge case with very low alpha value', () => {
// Nearly transparent
const result = convertAlphaToSolid('rgba(255, 0, 0, 0.01)', '#0000ff');
// Should be very close to blue background
expect(result).toBe('#0300fc');
});
it('should handle edge case with very high alpha value', () => {
// Nearly opaque
const result = convertAlphaToSolid('rgba(255, 0, 0, 0.99)', '#0000ff');
// Should be very close to red foreground
expect(result).toBe('#fc0003');
});
it('should handle blending complementary colors', () => {
// Cyan with 50% opacity over red
const result = convertAlphaToSolid('rgba(0, 255, 255, 0.5)', '#ff0000');
// Expected: (0*0.5 + 255*0.5, 255*0.5 + 0*0.5, 255*0.5 + 0*0.5) = (127.5, 127.5, 127.5)
expect(result).toBe('#808080');
});
it('should produce same result regardless of input color format', () => {
const result1 = convertAlphaToSolid('#ff000080', '#ffffff');
const result2 = convertAlphaToSolid('rgba(255, 0, 0, 0.5)', 'white');
const result3 = convertAlphaToSolid('rgba(255, 0, 0, 0.5)', '#fff');
expect(result1).toBe(result2);
expect(result2).toBe(result3);
});
});
});
+4 -4
View File
@@ -16,7 +16,7 @@ export interface CrawlErrorResult {
}
export interface FilterOptions {
// 是否启用Readability
// Whether to enable Readability
enableReadability?: boolean;
pureText?: boolean;
@@ -34,12 +34,12 @@ export type CrawlImpl<Params = object> = (
) => Promise<CrawlSuccessResult | undefined>;
export interface CrawlUrlRule {
// 内容过滤配置(可选)
// Content filtering configuration (optional)
filterOptions?: FilterOptions;
impls?: CrawlImplType[];
// URL匹配模式,仅支持正则表达式
// URL matching pattern, only supports regular expressions
urlPattern: string;
// URL转换模板(可选),如果提供则进行URL转换
// URL transformation template (optional), performs URL conversion if provided
urlTransform?: string;
}
+15 -5
View File
@@ -20,11 +20,11 @@ const partialBuildPages = [
disabled: isDesktop,
paths: ['src/app/[variants]/(auth)'],
},
{
name: 'mobile',
disabled: isDesktop,
paths: ['src/app/[variants]/(main)/(mobile)'],
},
// {
// name: 'mobile',
// disabled: isDesktop,
// paths: ['src/app/[variants]/(main)/(mobile)'],
// },
{
name: 'oauth',
disabled: isDesktop,
@@ -35,6 +35,16 @@ const partialBuildPages = [
disabled: isDesktop,
paths: ['src/app/(backend)/api/webhooks'],
},
{
name: 'market-auth',
disabled: isDesktop,
paths: ['src/app/market-auth-callback'],
},
{
name: 'pwa',
disabled: isDesktop,
paths: ['src/manifest.ts', 'src/sitemap.tsx', 'src/robots.tsx', 'src/sw'],
},
// no need for web
{
name: 'desktop-devtools',
@@ -97,15 +97,15 @@ const TopicContent = memo<TopicContentProps>(({ id, title, fav, showMore }) => {
},
...(isDesktop
? [
{
icon: <Icon icon={ExternalLink} />,
key: 'openInNewWindow',
label: t('actions.openInNewWindow'),
onClick: () => {
openTopicInNewWindow(activeId, id);
{
icon: <Icon icon={ExternalLink} />,
key: 'openInNewWindow',
label: t('actions.openInNewWindow'),
onClick: () => {
openTopicInNewWindow(activeId, id);
},
},
},
]
]
: []),
{
type: 'divider',
@@ -153,7 +153,16 @@ const TopicContent = memo<TopicContentProps>(({ id, title, fav, showMore }) => {
},
},
],
[id, activeId, autoRenameTopicTitle, duplicateTopic, removeTopic, t, toggleEditing, openTopicInNewWindow],
[
id,
activeId,
autoRenameTopicTitle,
duplicateTopic,
removeTopic,
t,
toggleEditing,
openTopicInNewWindow,
],
);
return (
@@ -180,7 +189,7 @@ const TopicContent = memo<TopicContentProps>(({ id, title, fav, showMore }) => {
spin={isLoading}
/>
{!editing ? (
title === LOADING_FLAT ? (
title === LOADING_FLAT || (isLoading && !title) ? (
<Flexbox flex={1} height={28} justify={'center'}>
<BubblesLoading />
</Flexbox>
@@ -190,7 +199,7 @@ const TopicContent = memo<TopicContentProps>(({ id, title, fav, showMore }) => {
ellipsis={{ rows: 1, tooltip: { placement: 'left', title } }}
onDoubleClick={() => {
if (isDesktop) {
openTopicInNewWindow(activeId, id)
openTopicInNewWindow(activeId, id);
}
}}
style={{ margin: 0 }}
@@ -1,3 +1,4 @@
import NewAPI from './newapi';
import ProviderGrid from '../(list)/ProviderGrid';
import Azure from './azure';
import AzureAI from './azureai';
@@ -38,6 +39,9 @@ const ProviderDetailPage = (props: { id?: string | null }) => {
case 'ollama': {
return <Ollama />;
}
case 'newapi': {
return <NewAPI />;
}
case 'openai': {
return <OpenAI />;
}
+2 -19
View File
@@ -1,13 +1,12 @@
'use client';
import { useEffect } from 'react';
import { createBrowserRouter, redirect, type LoaderFunction, useNavigate } from 'react-router-dom';
import { type LoaderFunction, createBrowserRouter, redirect, useNavigate } from 'react-router-dom';
import Loading from '@/components/Loading/BrandTextLoading';
import { useGlobalStore } from '@/store/global';
import type { Locales } from '@/types/locale';
import DesktopChangelogLayout from './(main)/changelog/_layout/Desktop';
import DesktopMainLayout from './(main)/layouts/desktop';
import { idLoader, slugLoader } from './loaders/routeParams';
@@ -65,7 +64,6 @@ export const createDesktopRouter = (locale: Locales) =>
createBrowserRouter([
{
HydrateFallback: () => <Loading />,
loader: hydrationGateLoader,
children: [
// Chat routes
{
@@ -301,22 +299,6 @@ export const createDesktopRouter = (locale: Locales) =>
path: 'labs',
},
// Changelog routes
{
children: [
{
index: true,
lazy: () =>
import('./(main)/changelog').then((m) => ({
Component: m.DesktopPage,
})),
path: '*',
},
],
element: <DesktopChangelogLayout locale={locale} />,
path: 'changelog',
},
// Profile routes
{
children: [
@@ -376,6 +358,7 @@ export const createDesktopRouter = (locale: Locales) =>
},
],
element: <RootLayout locale={locale} />,
loader: hydrationGateLoader,
path: '/',
},
]);
+2 -4
View File
@@ -1,6 +1,7 @@
import { SpeedInsights } from '@vercel/speed-insights/next';
import { ThemeAppearance } from 'antd-style';
import { ResolvingViewport } from 'next';
import { NuqsAdapter } from 'nuqs/adapters/next/app';
import { ReactNode } from 'react';
import { isRtlLang } from 'rtl-detect';
@@ -13,16 +14,14 @@ import GlobalProvider from '@/layout/GlobalProvider';
import { Locales } from '@/locales/resources';
import { DynamicLayoutProps } from '@/types/next';
import { RouteVariants } from '@/utils/server/routeVariants';
import { NuqsAdapter } from 'nuqs/adapters/next/app';
const inVercel = process.env.VERCEL === '1';
interface RootLayoutProps extends DynamicLayoutProps {
children: ReactNode;
modal: ReactNode;
}
const RootLayout = async ({ children, params, modal }: RootLayoutProps) => {
const RootLayout = async ({ children, params }: RootLayoutProps) => {
const { variants } = await params;
const { locale, isMobile, theme, primaryColor, neutralColor } =
@@ -50,7 +49,6 @@ const RootLayout = async ({ children, params, modal }: RootLayoutProps) => {
>
<AuthProvider>
{children}
{!isMobile && modal}
</AuthProvider>
<PWAInstall />
</GlobalProvider>
+12 -26
View File
@@ -1,13 +1,12 @@
'use client';
import { useEffect } from 'react';
import { redirect, createBrowserRouter, type LoaderFunction, useNavigate } from 'react-router-dom';
import { type LoaderFunction, createBrowserRouter, redirect, useNavigate } from 'react-router-dom';
import Loading from '@/components/Loading/BrandTextLoading';
import { useGlobalStore } from '@/store/global';
import type { Locales } from '@/types/locale';
import MobileChangelogLayout from './(main)/changelog/_layout/Mobile';
import { MobileMainLayout } from './(main)/layouts/mobile';
import { idLoader, slugLoader } from './loaders/routeParams';
@@ -63,7 +62,6 @@ export const createMobileRouter = (locale: Locales) =>
createBrowserRouter([
{
HydrateFallback: () => <Loading />,
loader: hydrationGateLoader,
children: [
// Chat routes
{
@@ -288,21 +286,6 @@ export const createMobileRouter = (locale: Locales) =>
path: 'labs',
},
// Changelog routes
{
children: [
{
index: true,
lazy: () =>
import('./(main)/changelog').then((m) => ({
Component: m.MobilePage,
})),
},
],
element: <MobileChangelogLayout locale={locale} />,
path: 'changelog',
},
// Profile routes
{
children: [
@@ -361,13 +344,15 @@ export const createMobileRouter = (locale: Locales) =>
})),
},
{
children: [{
lazy: () =>
import('./(main)/(mobile)/me/profile').then((m) => ({
Component: m.default,
})),
path: 'profile',
}],
children: [
{
lazy: () =>
import('./(main)/(mobile)/me/profile').then((m) => ({
Component: m.default,
})),
path: 'profile',
},
],
lazy: () =>
import('./(main)/(mobile)/me/profile/layout').then((m) => ({
Component: m.default,
@@ -387,7 +372,7 @@ export const createMobileRouter = (locale: Locales) =>
import('./(main)/(mobile)/me/settings/layout').then((m) => ({
Component: m.default,
})),
}
},
],
path: 'me',
},
@@ -405,6 +390,7 @@ export const createMobileRouter = (locale: Locales) =>
},
],
element: <RootLayout locale={locale} />,
loader: hydrationGateLoader,
path: '/',
},
]);
+5 -4
View File
@@ -1,7 +1,10 @@
import { DynamicLayoutProps } from '@/types/next';
import { RouteVariants } from '@/utils/server/routeVariants';
export default async function Page(props: DynamicLayoutProps) {
import DesktopRouter from './DesktopRouter';
import MobileRouter from './MobileRouter';
export default async (props: DynamicLayoutProps) => {
// Get isMobile from variants parameter on server side
const isMobile = await RouteVariants.getIsMobile(props);
const { locale } = await RouteVariants.getVariantsFromProps(props);
@@ -10,10 +13,8 @@ export default async function Page(props: DynamicLayoutProps) {
// Using native dynamic import ensures complete code splitting
// Mobile and Desktop bundles will be completely separate
if (isMobile) {
const { default: MobileRouter } = await import('./MobileRouter');
return <MobileRouter locale={locale} />;
}
const { default: DesktopRouter } = await import('./DesktopRouter');
return <DesktopRouter locale={locale} />;
}
};
+6 -2
View File
@@ -80,12 +80,16 @@ class BootErrorBoundary extends Component<BootErrorBoundaryProps, BootErrorBound
if (attempts >= maxReloads) {
// eslint-disable-next-line no-console
console.warn('BootErrorBoundary reached max reload attempts', { attempts, maxReloads, href });
console.warn('BootErrorBoundary reached max reload attempts', {
attempts,
href,
maxReloads,
});
return false;
}
// eslint-disable-next-line no-console
console.info('BootErrorBoundary forcing hard reload', { attempts, maxReloads, href });
console.info('BootErrorBoundary forcing hard reload', { attempts, href, maxReloads });
window.sessionStorage.setItem(RELOAD_SESSION_KEY, String(attempts + 1));
} catch (error) {
// If sessionStorage is unavailable, we still attempt a reload once.
@@ -11,7 +11,7 @@ import {
Trash2,
X,
} from 'lucide-react';
import { CSSProperties, memo, useState } from 'react';
import { CSSProperties, memo, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Flexbox } from 'react-layout-kit';
@@ -97,7 +97,6 @@ const Inspectors = memo<InspectorProps>(
apiName,
id,
arguments: requestArgs,
showRender,
result,
setShowRender,
showPluginRender,
@@ -109,6 +108,8 @@ const Inspectors = memo<InspectorProps>(
const { styles, theme } = useStyles();
const [showDebug, setShowDebug] = useState(false);
const [isPinned, setIsPinned] = useState(false);
const [isHovered, setIsHovered] = useState(false);
const [deleteAssistantMessage] = useChatStore((s) => [s.deleteAssistantMessage]);
@@ -121,7 +122,15 @@ const Inspectors = memo<InspectorProps>(
const isReject = intervention?.status === 'rejected';
const isTitleLoading = !hasResult && !isPending;
const showCustomPluginRender = showRender && !isPending && !isReject;
// Compute actual render state based on pinned or hovered
const shouldShowRender = isPinned || isHovered;
// Sync with parent state
useEffect(() => {
setShowRender(shouldShowRender);
}, [shouldShowRender, setShowRender]);
const showCustomPluginRender = shouldShowRender && !isPending && !isReject;
return (
<Flexbox className={styles.container} gap={4}>
<Flexbox align={'center'} distribution={'space-between'} gap={8} horizontal>
@@ -131,7 +140,17 @@ const Inspectors = memo<InspectorProps>(
gap={8}
horizontal
onClick={() => {
setShowRender(!showRender);
setIsPinned(!isPinned);
}}
onMouseEnter={() => {
if (!isPinned) {
setIsHovered(true);
}
}}
onMouseLeave={() => {
if (!isPinned) {
setIsHovered(false);
}
}}
paddingInline={4}
>
@@ -1,9 +1,9 @@
import { copyImageToClipboard, sanitizeSVGContent } from '@lobechat/utils/client';
import { Button, Dropdown, Tooltip } from '@lobehub/ui';
import { snapdom } from '@zumer/snapdom';
import { App, Space } from 'antd';
import { css, cx } from 'antd-style';
import { CopyIcon, DownloadIcon } from 'lucide-react';
import { domToPng } from 'modern-screenshot';
import { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { Center, Flexbox } from 'react-layout-kit';
@@ -41,12 +41,29 @@ const SVGRenderer = ({ content }: SVGRendererProps) => {
const sanitizedContent = useMemo(() => sanitizeSVGContent(content), [content]);
const generatePng = async () => {
return domToPng(document.querySelector(`#${DOM_ID}`) as HTMLDivElement, {
features: {
// 不启用移除控制符,否则会导致 safari emoji 报错
removeControlCharacter: false,
},
const blob = await snapdom.toBlob(document.querySelector(`#${DOM_ID}`) as HTMLDivElement, {
scale: 2,
type: 'png',
});
if (!blob) {
throw new Error('Failed to generate PNG blob');
}
// Convert blob to data URL
return new Promise<string>((resolve, reject) => {
const reader = new FileReader();
reader.addEventListener('load', () => {
if (typeof reader.result === 'string') {
resolve(reader.result);
} else {
reject(new Error('FileReader result is not a string'));
}
});
reader.addEventListener('error', () =>
reject(reader.error || new Error('Failed to read blob as data URL')),
);
reader.readAsDataURL(blob);
});
};
@@ -19,7 +19,7 @@ import { useStyles } from './style';
import { FieldType } from './type';
const Preview = memo<FieldType & { title?: string }>(
({ title, withSystemRole, withBackground, withFooter }) => {
({ title, withSystemRole, withBackground, withFooter, widthMode }) => {
const [model, plugins, systemRole] = useAgentStore((s) => [
agentSelectors.currentAgentModel(s),
agentSelectors.displayableAgentPlugins(s),
@@ -34,7 +34,7 @@ const Preview = memo<FieldType & { title?: string }>(
const { t } = useTranslation('chat');
const { styles } = useStyles(withBackground);
const { styles: containerStyles } = useContainerStyles();
const { styles: containerStyles } = useContainerStyles(widthMode);
const displayTitle = isInbox ? t('inbox.title') : title;
const displayDesc = isInbox ? t('inbox.desc') : description;
+15 -1
View File
@@ -14,10 +14,11 @@ import { sessionMetaSelectors } from '@/store/session/selectors';
import { useStyles } from '../style';
import Preview from './Preview';
import { FieldType } from './type';
import { FieldType, WidthMode } from './type';
const DEFAULT_FIELD_VALUE: FieldType = {
imageType: ImageType.JPG,
widthMode: WidthMode.Wide,
withBackground: true,
withFooter: true,
withPluginInfo: false,
@@ -34,7 +35,20 @@ const ShareImage = memo<{ mobile?: boolean }>(() => {
title: currentAgentTitle,
});
const { loading: copyLoading, onCopy } = useImgToClipboard();
const widthModeOptions = [
{ label: t('shareModal.widthMode.wide'), value: WidthMode.Wide },
{ label: t('shareModal.widthMode.narrow'), value: WidthMode.Narrow },
];
const settings: FormItemProps[] = [
{
children: <Segmented options={widthModeOptions} />,
label: t('shareModal.widthMode.label'),
layout: 'horizontal',
minWidth: undefined,
name: 'widthMode',
},
{
children: <Switch />,
label: t('shareModal.withSystemRole'),
@@ -1,7 +1,13 @@
import { ImageType } from '@/hooks/useScreenshot';
export enum WidthMode {
Narrow = 'narrow',
Wide = 'wide'
}
export type FieldType = {
imageType: ImageType;
widthMode: WidthMode;
withBackground: boolean;
withFooter: boolean;
withPluginInfo: boolean;
+36 -26
View File
@@ -1,36 +1,46 @@
import { createStyles } from 'antd-style';
export const useContainerStyles = createStyles(({ css, token, stylish, cx, responsive }) => ({
preview: cx(
stylish.noScrollbar,
css`
overflow: hidden scroll;
import { WidthMode } from './ShareImage/type';
width: 100%;
max-height: 70dvh;
border: 1px solid ${token.colorBorder};
border-radius: ${token.borderRadiusLG}px;
export const useContainerStyles = createStyles(
({ css, token, stylish, cx, responsive }, widthMode?: WidthMode) => {
const isNarrow = widthMode === WidthMode.Narrow;
background: ${token.colorBgLayout};
return {
preview: cx(
stylish.noScrollbar,
css`
overflow: hidden scroll;
/* stylelint-disable selector-class-pattern */
.react-pdf__Document *,
.react-pdf__Page * {
pointer-events: none;
}
/* stylelint-enable selector-class-pattern */
width: 100%;
max-width: ${isNarrow ? '480px' : 'none'};
max-height: 70dvh;
margin: ${isNarrow ? '0 auto' : '0'};
border: 1px solid ${token.colorBorder};
border-radius: ${token.borderRadiusLG}px;
::-webkit-scrollbar {
width: 0 !important;
height: 0 !important;
}
background: ${token.colorBgLayout};
${responsive.mobile} {
max-height: 40dvh;
}
`,
),
}));
/* stylelint-disable selector-class-pattern */
.react-pdf__Document *,
.react-pdf__Page * {
pointer-events: none;
}
/* stylelint-enable selector-class-pattern */
::-webkit-scrollbar {
width: 0 !important;
height: 0 !important;
}
${responsive.mobile} {
max-height: 40dvh;
}
`,
),
};
},
);
export const useStyles = createStyles(({ responsive, token, css }) => ({
body: css`
+2 -1
View File
@@ -15,6 +15,7 @@ import LangButton from './LangButton';
import ThemeButton from './ThemeButton';
import { useMenu } from './useMenu';
import { enableNextAuth } from '@/const/auth';
import { isDesktop } from '@/const/version';
const PanelContent = memo<{ closePopover: () => void }>(({ closePopover }) => {
const router = useRouter();
@@ -37,7 +38,7 @@ const PanelContent = memo<{ closePopover: () => void }>(({ closePopover }) => {
return (
<Flexbox gap={2} style={{ minWidth: 300 }}>
{isLoginWithAuth ? (
{isDesktop || isLoginWithAuth ? (
<>
<UserInfo avatarProps={{ clickable: false }} />
+44 -28
View File
@@ -1,6 +1,6 @@
import type { SegmentedProps } from '@lobehub/ui';
import { snapdom } from '@zumer/snapdom';
import dayjs from 'dayjs';
import { domToJpeg, domToPng, domToSvg, domToWebp } from 'modern-screenshot';
import { useCallback, useState } from 'react';
import { BRANDING_NAME } from '@/const/branding';
@@ -40,26 +40,6 @@ export const getImageUrl = async ({
imageType: ImageType;
width?: number;
}) => {
let screenshotFn: any;
switch (imageType) {
case ImageType.JPG: {
screenshotFn = domToJpeg;
break;
}
case ImageType.PNG: {
screenshotFn = domToPng;
break;
}
case ImageType.SVG: {
screenshotFn = domToSvg;
break;
}
case ImageType.WEBP: {
screenshotFn = domToWebp;
break;
}
}
const dom: HTMLDivElement = document.querySelector(id) as HTMLDivElement;
let copy: HTMLDivElement = dom;
@@ -69,18 +49,54 @@ export const getImageUrl = async ({
document.body.append(copy);
}
const dataUrl = await screenshotFn(width ? copy : dom, {
features: {
// 不启用移除控制符,否则会导致 safari emoji 报错
removeControlCharacter: false,
},
const baseOptions = {
scale: 2,
width,
});
};
let blob: Blob;
if (imageType === ImageType.SVG) {
// For SVG, we need to use the full snapdom API to get the raw SVG string
const result = await snapdom(width ? copy : dom, baseOptions);
const svgString = result.toRaw();
blob = new Blob([svgString], { type: 'image/svg+xml' });
} else {
// For raster formats, use toBlob directly with type option
const blobType = (imageType === ImageType.JPG ? 'jpg' : imageType) as 'png' | 'jpg' | 'webp';
const blobResult = await snapdom.toBlob(width ? copy : dom, {
type: blobType,
useProxy: 'https://proxy.corsfix.com/?',
});
if (!blobResult) {
throw new Error('Failed to generate blob from snapdom');
}
blob = blobResult;
}
if (width && copy) copy?.remove();
return dataUrl;
if (!blob) {
throw new Error('Blob is undefined');
}
// Convert blob to data URL using FileReader
return new Promise<string>((resolve, reject) => {
const reader = new FileReader();
reader.addEventListener('load', () => {
if (typeof reader.result === 'string') {
resolve(reader.result);
} else {
reject(new Error('FileReader result is not a string'));
}
});
reader.addEventListener('error', () =>
reject(reader.error || new Error('Failed to read blob as data URL')),
);
reader.readAsDataURL(blob);
});
};
export const useScreenshot = ({

Some files were not shown because too many files have changed in this diff Show More