Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
929683d
fix(generic): derive ColumnType support flags from JDBC TypeInfo in I…
HandSonic Jul 28, 2026
be6e481
fix(core-tools): pagination off-by-one, orderBy NPE, BIT padding, par…
HandSonic Jul 28, 2026
8ab83f8
fix(ui): align chart icon and page-size chevron (#2284)
openai0229 Jul 28, 2026
c574115
feat(sql-editor): use table icon for result tabs
openai0229 Jul 28, 2026
83bd7c1
Merge pull request #2285 from OtterMind/feat/2283-neutral-result-tab-…
openai0229 Jul 28, 2026
ae975e8
feat(workspace): enhance file previews and integrated terminal
auenger Jul 27, 2026
630b59b
fix(generic): derive length/scale support from CREATE_PARAMS; enable …
HandSonic Jul 28, 2026
7279bad
feat(workspace): open history in editable console (#2299)
openai0229 Jul 28, 2026
32bbc67
feat(workspace): support automatic tab split dragging
auenger Jul 28, 2026
11958a3
feat(workspace): name SQL on initial save (#2305)
openai0229 Jul 28, 2026
705e4e2
style(settings): align terminal page with new layout
openai0229 Jul 28, 2026
6625c1a
Merge branch 'main' into feat/workspace-file-preview-terminal
openai0229 Jul 28, 2026
3a9fabe
test(tools): prove 5-part identifier fix with a genuine 5-part input …
HandSonic Jul 28, 2026
f6f3f09
fix(oscar): wrap first page in outer select so CHAT2DB_AUTO_ROW_ID is…
HandSonic Jul 28, 2026
03917e9
feat(table-editor): default new table columns to nullable (#2312)
liulipengju Jul 28, 2026
4cd1fe1
fix(opengauss): mark system databases/schemas instead of removing the…
HandSonic Jul 28, 2026
9d42ff2
fix(mariadb): quote/escape unmapped JDBC values and keep now()/defaul…
HandSonic Jul 28, 2026
a9a93b8
fix(informix): make INFORMIXSERVER URL rewrite idempotent to avoid ev…
HandSonic Jul 28, 2026
9fef6d7
fix(xugudb): use OracleSqlParser instead of MysqlSqlParser for Oracle…
HandSonic Jul 28, 2026
ff851d0
fix(datasource): persist project, email, and keyfile fields for BigQu…
Hamza-ali1223 Jul 28, 2026
cb0394e
feat(sql-editor): improve result history controls (#2344)
openai0229 Jul 28, 2026
5d952ba
fix(history): preserve full SQL behind previews (#2311)
HanawaBanana Jul 28, 2026
5b68494
fix(export): restore desktop connection export and feedback (#2254)
AlcoholTobaccoCode Jul 28, 2026
88b4bdc
[codex] fix(result-grid): preserve change tracking after no-op undo (…
HanawaBanana Jul 28, 2026
6693185
fix(clickhouse): preserve Decimal precision when scale is null (#2192…
liulipengju Jul 28, 2026
7379139
fix(ui): use stable treeNodeType as React key in SelectBoundInfo (#2313)
liulipengju Jul 28, 2026
0b9cdc6
fix(workspace): shorten local file tab labels
openai0229 Jul 28, 2026
eda171e
fix(ui): use semantic sidebar icons
openai0229 Jul 28, 2026
d4802de
fix(ui): compact output tab width
openai0229 Jul 29, 2026
5dc400d
Merge pull request #2353 from OtterMind/fix/2351-local-file-tab-name
openai0229 Jul 29, 2026
5c70406
feat(spi): add quoteIdentifierAlways to ISQLIdentifierProcessor (#2234)
Aias00 Jul 29, 2026
9367029
fix(mysql): escape SQL identifiers and literals in metadata/DDL paths…
HandSonic Jul 29, 2026
3cb8af5
fix(h2): escape SQL identifiers and literals in metadata/DDL paths (#…
HandSonic Jul 29, 2026
d1f377b
fix(db2): escape SQL identifiers and literals in metadata/DDL paths (…
HandSonic Jul 29, 2026
fd98d8e
feat(client): add line and block comment shortcuts for SQL editor (#2…
iamraydoan Jul 29, 2026
8f01377
feat(database-tree): add configurable shortcuts (#2356)
openai0229 Jul 29, 2026
6186b8c
fix(clickhouse): escape SQL identifiers and literals in metadata/DDL …
HandSonic Jul 29, 2026
4eb7cf5
fix(oracle): escape SQL identifiers and literals in metadata/DDL path…
HandSonic Jul 29, 2026
a28ca03
fix(sqlserver): escape SQL identifiers and literals in metadata/DDL p…
HandSonic Jul 29, 2026
81f78f9
fix(xugudb): escape SQL identifiers and literals in metadata/DDL path…
HandSonic Jul 29, 2026
c696609
fix(postgresql): escape SQL identifiers and literals in metadata/DDL …
HandSonic Jul 29, 2026
b4a900d
fix(kingbase): escape SQL identifiers and literals in metadata/DDL pa…
HandSonic Jul 29, 2026
d276a0f
fix(sqlite): escape SQL identifiers and literals in metadata/DDL path…
HandSonic Jul 29, 2026
4984294
fix(redshift): escape SQL identifiers and literals in metadata/DDL pa…
HandSonic Jul 29, 2026
7f993d6
fix(sundb): escape SQL identifiers and literals in metadata/DDL paths…
HandSonic Jul 29, 2026
22288d9
fix(dm): escape SQL identifiers and literals in metadata/DDL paths (#…
HandSonic Jul 29, 2026
8431346
fix(snowflake): escape SQL identifiers and literals in metadata/DDL p…
HandSonic Jul 29, 2026
94f723d
fix(hive): escape SQL identifiers and literals in metadata/DDL paths …
HandSonic Jul 29, 2026
244590e
fix(generic): escape SQL identifiers and literals in metadata/DDL pat…
HandSonic Jul 29, 2026
a6b07c2
fix(oscar): escape SQL identifiers and literals in metadata/DDL paths…
HandSonic Jul 29, 2026
cfc4c04
fix(oceanbase-oracle): escape SQL identifiers and literals in metadat…
HandSonic Jul 29, 2026
a99ecf1
fix(mongodb): escape generated shell command contexts (#1914) (#2206)
HandSonic Jul 29, 2026
c188500
fix(core-domain-api): volatile async state, escape quoted SQL values,…
HandSonic Jul 29, 2026
20cf9c5
fix(domain-core): escape identifiers/comments in Excel-import DDL; pr…
HandSonic Jul 30, 2026
f6d44c1
fix(redis): quote key names in DEL/RENAME, apply grid edits atomicall…
HandSonic Jul 30, 2026
4e82a52
fix(spi): guard empty UPDATE SET clause, quote-aware now() replacemen…
HandSonic Jul 30, 2026
44fad89
fix(snowflake): use valid syntax for quoted column rename (#2262)
Aias00 Jul 30, 2026
9d3015d
feat(workspace): add quick terminal launcher
auenger Jul 30, 2026
41a6fe1
fix(h2): log SET SCHEMA failure instead of swallowing (#2155)
Aias00 Aug 3, 2026
ae36e00
fix(on-mount): guard more async fetches against setState after unmoun…
Aias00 Aug 3, 2026
5943b84
fix(sqlite): preserve column size when decimalDigits is null (#2170)
Aias00 Aug 3, 2026
43539e3
fix(redis-stream): map displayed row index to valueList correctly in …
Aias00 Aug 3, 2026
d717c87
fix(bi): make chart sort comparator return 0 for equal values (#2158)
Aias00 Aug 3, 2026
6472df9
fix(bi): adjust ComboAxisSelect splice index when both isFirst and is…
Aias00 Aug 3, 2026
e5bd63f
fix(sql-generate): render count fallback with the parsed dbType, not …
Aias00 Aug 3, 2026
d9ffe3e
fix(er-position): persist the new position, not the old record (#2163)
Aias00 Aug 3, 2026
d62f565
Add MiniMax provider support (#2374)
Aug 3, 2026
44ab021
Merge origin/main into feat/workspace-file-preview-terminal
openai0229 Aug 3, 2026
250813e
fix(bi): restore chart fields after desktop query (#2376)
openai0229 Aug 3, 2026
203834b
Merge remote-tracking branch 'origin/main' into codex/pr-2273-termina…
openai0229 Aug 3, 2026
638482d
feat: add terminal workspace preferences
openai0229 Aug 3, 2026
2b3e940
fix(workspace): localize markdown preview controls
openai0229 Aug 3, 2026
b07a4d6
fix(workspace): report PDF preview failures
openai0229 Aug 3, 2026
be35411
fix(workspace): refresh local file tabs immutably
openai0229 Aug 3, 2026
72bb2bc
fix(sql-editor): enable completion for local sql files
openai0229 Aug 3, 2026
94b4161
fix(console): support Pro chart SQL first save
openai0229 Aug 3, 2026
444fe48
fix(bi): measure actual X-axis labels instead of 'undefined' in useLa…
Aias00 Aug 3, 2026
19e87a7
fix(bi): guard empty data array in EditorChartSql before destructurin…
Aias00 Aug 3, 2026
8d4c274
perf(desktop): optimize previews and terminal lifecycle
openai0229 Aug 3, 2026
1d4409f
fix(mysql): preserve DECIMAL precision when scale is null (#2181)
Aias00 Aug 3, 2026
3af3635
fix(hive): preserve column precision when scale is null (#2191)
Aias00 Aug 3, 2026
9fa87d0
fix(snowflake): preserve column precision when scale is null (#2190)
Aias00 Aug 3, 2026
3289bf3
fix(oracle): match index_owner in index metadata joins to avoid cross…
HandSonic Aug 3, 2026
917b6ef
Merge branch 'main' into feat/workspace-file-preview-terminal
openai0229 Aug 3, 2026
8113c04
Merge pull request #2273 from auenger/feat/workspace-file-preview-ter…
openai0229 Aug 3, 2026
b111eb6
fix(postgresql): render PostGIS spatial values as WKT
openai0229 Aug 3, 2026
fad87d1
Merge remote-tracking branch 'origin/main' into fix/chart-console-sav…
openai0229 Aug 3, 2026
837b06e
fix(dml): add @Valid to DbDmlController @RequestBody parameters (#2381)
Aias00 Aug 3, 2026
215dd7f
Merge remote-tracking branch 'origin/main' into fix/chart-console-sav…
openai0229 Aug 3, 2026
9a57685
fix(release): add set -euo pipefail to generate_metadata.sh (#2389) (…
Aias00 Aug 3, 2026
3a45dba
Merge remote-tracking branch 'origin/main' into fix/chart-console-sav…
openai0229 Aug 3, 2026
6679950
fix(datasource): parse driverConfig not ssh in rs2Request (#2392)
Aias00 Aug 3, 2026
6004e54
Merge pull request #2415 from OtterMind/fix/chart-console-save-pro
openai0229 Aug 3, 2026
9f187b3
fix(connection): log swallowed custom-connection-resolution exception…
Aias00 Aug 3, 2026
d0eab5c
fix(postgresql): bound spatial value formatting
openai0229 Aug 3, 2026
daa6491
fix(oscar): uppercase identifier in isReservedKeyword before lookup (…
Aias00 Aug 3, 2026
1d4a432
Merge branch 'main' into fix/2417-postgis-geometry-display
openai0229 Aug 3, 2026
e2485e0
Merge pull request #2419 from OtterMind/fix/2417-postgis-geometry-dis…
openai0229 Aug 3, 2026
af014ca
fix(xugudb): add CHECK to XugudbSqlGuards COLUMN_CLAUSE_KEYWORDS (#2387)
Aias00 Aug 3, 2026
70ad686
fix(xugudb): preserve NUMERIC precision and scale in buildDataType (#…
Aias00 Aug 3, 2026
39cc45f
fix(spi): make ConnectionPool cleanup thread a named daemon (#2386)
Aias00 Aug 3, 2026
d1d35f1
fix(view): /api/rdb/view/delete drops the view instead of the table (…
Aias00 Aug 3, 2026
dd9bd12
fix(converter): delete temp files after DbConverter uploads (#2398)
Aias00 Aug 3, 2026
4fad37a
fix(rdb): null-guard view/function/procedure list endpoints (#2404)
Aias00 Aug 3, 2026
647b59a
fix(chat): write correct shape in setCurrentChat (#2402)
Aias00 Aug 3, 2026
ab81376
fix(workspace): cap persisted tabs to reduce localStorage quota risk …
Aias00 Aug 3, 2026
b632754
fix(result-grid): stop infinite recursion when editing large-value ce…
Aias00 Aug 3, 2026
b0da181
fix(result-grid): re-apply create/delete highlights after arrangement…
Aias00 Aug 3, 2026
33fa0bc
fix(org-settings): move hooks above early return to satisfy Rules-of-…
Aias00 Aug 3, 2026
3a72dc7
fix(tree): guard updateTreeData against null list (#2423)
Aias00 Aug 3, 2026
0182738
fix(tree): make findNode/getParentNode null-tolerant (#2425)
Aias00 Aug 3, 2026
8b95661
fix(sql): escape single quotes in COMMENT text (#2431)
Aias00 Aug 3, 2026
5f76e26
fix(sql): clamp pageNo/pageSize to prevent paging offset int overflow…
Aias00 Aug 3, 2026
53d8477
fix(mongodb): avoid Collectors.toMap NPE on null document values (#2427)
Aias00 Aug 3, 2026
68e26c6
fix(oceanbase-oracle): COMMENT DDL use quoteStringLiteral to stop bac…
Aias00 Aug 3, 2026
11eed11
fix(ai-config): synchronize resolveTestApiKey read of shared userConf…
Aias00 Aug 3, 2026
a8a4d4a
fix(postgresql): buildDataType NPE for NUMERIC when precision null bu…
Aias00 Aug 3, 2026
9ef5ad4
fix(sql-parser): tolerate duplicate table names in context parse (#2441)
Aias00 Aug 3, 2026
eb9393a
fix(sql): clamp buildPageLimit offset/pageSize to valid range (#2445)
Aias00 Aug 3, 2026
e90d306
fix(sql): bound format/valid_select SQL size (#2447)
Aias00 Aug 3, 2026
eb7065a
fix(release): remove -noverify from desktop launchers (#2450) (#2451)
Aias00 Aug 3, 2026
f316cfc
fix(storage): do not persist transient Namespace.dataSources (#2453)
Aias00 Aug 3, 2026
70f5dbb
fix(bigquery): strip managed extendInfo keys before re-injecting on r…
Aias00 Aug 3, 2026
0ee15f8
fix(export): gate SET FOREIGN_KEY_CHECKS on the MySQL-protocol family…
Aias00 Aug 3, 2026
454bc98
fix(tree-storage): make deleteNode atomic (#2459)
Aias00 Aug 3, 2026
0448b8c
fix(storage): make SmallDataStorage.saveDataList atomic (#2467)
Aias00 Aug 3, 2026
2dd1d04
fix(tree): show error and unblock delete-table modal on failure (#2469)
Aias00 Aug 3, 2026
00a528e
fix(cockroachdb): use PostgreSQL grammar for parser and align dbType …
HandSonic Aug 4, 2026
ea7aca4
fix(tools): handle utility edge cases
openai0229 Aug 4, 2026
fce8101
Merge remote-tracking branch 'origin/main' into maintainer/pr-2295-fix
openai0229 Aug 4, 2026
adff9ad
Merge remote-tracking branch 'origin/main' into maintainer/pr-2278-ge…
openai0229 Aug 4, 2026
2af21b9
Merge pull request #2295 from HandSonic/fix/review-core-tools
openai0229 Aug 4, 2026
113c7cb
fix(generic): infer only reported JDBC type capabilities
openai0229 Aug 4, 2026
6943ce4
Merge remote-tracking branch 'origin/main' into maintainer/pr-2278-ge…
openai0229 Aug 4, 2026
7fe42ac
test(generic): verify unsupported JDBC clauses
openai0229 Aug 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
- name: Run active workspace tab locator contract
run: yarn run test:active-tab-locator

- name: Run local file tab title contract
run: yarn run test:local-file-tab-title

- name: Run saved console tree refresh contract
run: yarn run test:saved-console-tree-refresh

Expand All @@ -63,15 +66,48 @@ jobs:
- name: Run database object sorting contract
run: yarn run test:database-object-sorting

- name: Run BI chart sorting contract
run: yarn run test:bi-chart-sorting

- name: Run BI chart SQL execution result contract
run: yarn run test:bi-sql-result

- name: Run ComboAxisSelect action filter contract
run: yarn run test:combo-axis-actions

- name: Run BI label rotation contract
run: yarn run test:label-rotation

- name: Run Redis explorer contract
run: yarn run test:redis-explorer

- name: Run CreateStream index mapping contract
run: yarn run test:create-stream-index

- name: Run result inspector contract
run: yarn run test:result-inspector

- name: Run result operation record contract
run: yarn run test:result-operation-record

- name: Run result tab preference contract
run: yarn run test:result-tab-preferences

- name: Run execution console preference contract
run: yarn run test:execution-console

- name: Run SQL execution log contract
run: yarn run test:sql-execution-log

- name: Run SQL execution batch contract
run: yarn run test:sql-execution-batch

- name: Run SQL execution request tracker contract
run: yarn run test:sql-execution-request-tracker

- name: Run SQL execution stream contract
run: yarn run test:sql-execution-stream

- name: Run verification-code countdown lifecycle contract
run: yarn run test:verification-code-countdown

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ package-lock.json
/chat2db-community-server/.apifox-helper.properties
/chat2db-community-server/.easy.api.config
/chat2db-community-server/latest_version.json
.java-version
38 changes: 32 additions & 6 deletions chat2db-community-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build:desktop": "npm run build:web:desktop",
"build:prod": "npm run build:web:prod",
"build:web": "umi build",
"prebuild:web:community": "yarn test:chat-answer-update && yarn test:tree-title-highlight && yarn test:ai-model-select",
"prebuild:web:community": "yarn test:chat-answer-update && yarn test:tree-title-highlight && yarn test:tree-data-update && yarn test:tree-node-lookup && yarn test:ai-model-config && yarn test:ai-model-select && yarn test:export-connections",
"build:web:2java": "yarn run build:web:prod && rm -rf ../chat2db-community-server/chat2db-community-start/src/main/resources/thymeleaf/* && cp -r dist/index.html ../chat2db-community-server/chat2db-community-start/src/main/resources/thymeleaf/",
"build:web:desktop": "cross-env UMI_ENV=desktop cross-env APP_NAME=chat2db-pro cross-env APP_VERSION=${npm_config_app_version} cross-env PRINT_LOGS=${npm_config_print_logs} cross-env APP_PORT=${npm_config_app_port} umi build",
"build:web:desktop:test": "cross-env UMI_ENV=desktop cross-env APP_NAME=chat2db-pro-test cross-env APP_VERSION=${npm_config_app_version} cross-env PRINT_LOGS=${npm_config_print_logs} cross-env APP_PORT=${npm_config_app_port} umi build",
Expand All @@ -28,23 +28,42 @@
"lint:eslint": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --max-warnings=0",
"lint:style": "stylelint \"src/**/*.{css,less}\" --max-warnings=0",
"test:i18n": "node ./scripts/validate-i18n.cjs",
"test:ai-model-config": "tsx src/blocks/AI/components/AIModelConfigModal/modelConfigDefaults.test.ts",
"test:ai-model-select": "tsx src/blocks/AI/components/AIModelSelect/modelSelectOptions.test.ts",
"test:active-tab-locator": "tsx src/pages/main/workspace/utils/activeTabLocator.test.ts",
"test:base-table-interaction": "tsx src/components/BaseTable/treeInteraction.test.ts",
"test:bi-chart-sorting": "tsx src/blocks/BI/Chart/charts/BarChart/dataTreating.test.ts",
"test:bi-sql-result": "tsx src/blocks/BI/ChartCardBox/EditorChartSql/executionResult.test.ts",
"test:chat-answer-update": "tsx src/store/chat/slices/chatDetails/answerUpdates.test.ts",
"test:combo-axis-actions": "tsx src/blocks/BI/Chart/form/components/ComboAxisSelect/comboAxisSelect.test.ts",
"test:database-object-sorting": "tsx src/blocks/NewTree/utils/sortTreeNodes.test.ts",
"test:execution-console": "tsx src/blocks/SearchResult/components/ExecutionConsole/executionConsolePreferences.test.ts",
"test:export-connections": "tsx src/pages/main/workspace/components/WorkspaceLeftActionBar/components/TreeSetting/exportConnectionsFlow.test.ts",
"test:label-rotation": "tsx src/blocks/BI/Chart/components/EChartsContainer/hooks/useLabelRotate.test.ts",
"test:redis-explorer": "tsx src/blocks/RedisAllData/redisExplorer.test.ts",
"test:result-markdown": "tsx src/blocks/SearchResult/components/ResultSetTable/event/onContextmenuCell/handleCopyAsMarkdown.test.ts",
"test:result-tab-preferences": "tsx src/blocks/SearchResult/resultTabPreferences.test.ts && tsx src/service/resultTabShortcut.test.ts",
"test:result-inspector": "tsx src/store/workspace/utils/resultInspector.test.ts && yarn test:search-result-tab-selection",
"test:result-operation-record": "tsx src/blocks/SearchResult/components/ResultSetTable/hooks/useOperationRecord.test.tsx && tsx src/blocks/SearchResult/components/ResultSetTable/event/onChangeCellValue/index.test.ts",
"test:search-result-query-composer": "tsx src/blocks/SearchResult/components/ScreeningResult/queryComposer.test.ts",
"test:search-result-tab-selection": "tsx src/blocks/SearchResult/tabSelection.test.ts",
"test:saved-console-tree-refresh": "tsx src/store/tree/savedConsoleTreeRefresh.test.ts",
"test:saved-console-lifecycle": "tsx src/store/workspace/utils/savedConsoleLifecycle.test.ts",
"test:saved-console-lifecycle": "tsx src/store/workspace/utils/savedConsoleLifecycle.test.ts && tsx src/store/workspace/utils/workspaceTabPersistence.test.ts",
"test:settings-layout": "tsx src/blocks/Setting/navigation.test.ts && tsx src/blocks/Setting/search.test.ts && tsx src/blocks/Setting/BaseSetting/model.test.ts && tsx src/blocks/Setting/settingsLayout.test.ts",
"test:shortcut": "tsx src/constants/shortcut.test.ts",
"test:sql-execution-log": "tsx src/service/sqlExecutionLog.test.ts",
"test:sql-execution-batch": "tsx src/service/sqlExecutionBatch.test.ts",
"test:sql-execution-request-tracker": "tsx src/service/sqlExecutionRequestTracker.test.ts",
"test:sql-execution-stream": "tsx src/service/sqlExecutionStream.test.ts",
"test:local-file-tab-title": "tsx src/pages/main/workspace/utils/localTextFile.test.ts",
"test:local-file-tab-refresh": "tsx src/store/workspace/utils/localFileWorkspaceTab.test.ts",
"test:sql-completion-context": "tsx src/components/SQLEditor/core/sqlCompletionContext.test.ts",
"test:sql-in-clipboard": "tsx src/utils/sqlInClipboard.test.ts && tsx src/components/SQLEditor/helper/sqlInsertValueDefaults.test.ts",
"test:tree-title-highlight": "tsx src/blocks/NewTree/components/TitleRender/highlightSearchText.test.ts",
"test:tree-data-update": "tsx src/store/tree/treeDataUpdate.test.ts",
"test:tree-node-lookup": "tsx src/utils/treeNodeLookup.test.ts",
"test:terminal": "tsx src/constants/terminal.test.ts && tsx src/pages/main/workspace/components/WorkspaceExtend/WorkspaceExtendNav/quickTerminal.test.ts && tsx src/pages/main/workspace/components/WorkspaceTabs/terminalTabPlacement.test.ts",
"test:workspace-tab-drag": "tsx src/pages/main/workspace/components/WorkspaceTabs/workspaceTabDrop.test.ts",
"test:verification-code-countdown": "tsx src/utils/verificationCodeCountdown.test.ts && tsx src/utils/latestRequest.test.ts",
"modify:package:name": "node ./scripts/modify-package-name.js",
"start": "APP_VERSION=${npm_config_app_version} UMI_DEV_SERVER_COMPRESS=none umi dev",
Expand All @@ -53,7 +72,8 @@
"start:community:hot": "cross-env UMI_ENV=community cross-env APP_NAME=chat2db-community cross-env DISABLE_MFSU=true cross-env UMI_DEV_SERVER_COMPRESS=none cross-env PORT=8889 umi dev --public_path=/",
"start:offline:hot": "cross-env UMI_ENV=offline cross-env PORT=8888 umi dev",
"start:proxy:online": "cross-env HMR=none umi dev --webapp=true --public_path=http://localhost:8000/",
"ui": "yarn add @chat2db/ui"
"ui": "yarn add @chat2db/ui",
"test:create-stream-index": "tsx src/blocks/RedisAllData/CreateStream/mapDisplayedIndex.test.ts"
},
"dependencies": {
"@chat2db/ui": "^1.45.3",
Expand All @@ -66,6 +86,9 @@
"@visactor/vtable-editors": "^1.10.1",
"@visactor/vtable-search": "^1.13.0",
"@xyflow/react": "^12.4.2",
"@xterm/addon-fit": "^0.11.0",
"@xterm/addon-serialize": "^0.14.0",
"@xterm/xterm": "^6.0.0",
"ahooks": "^3.7.8",
"ali-oss": "^6.20.0",
"ali-react-table": "^2.6.1",
Expand All @@ -85,10 +108,12 @@
"html2canvas": "^1.4.1",
"idb-keyval": "^6.2.1",
"is-online": "^11.0.0",
"katex": "^0.16.21",
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"lottie-react": "^2.4.0",
"lucide-react": "^0.356.0",
"mermaid": "^11.12.0",
"monaco-editor": "^0.52.0",
"node-schedule": "^2.1.1",
"pako": "^2.1.0",
Expand All @@ -98,16 +123,17 @@
"react-infinite-scroll-component": "^6.1.0",
"react-mentions": "^4.4.10",
"react-resizable": "^3.0.5",
"react-markdown": "^9.0.3",
"react-sortablejs": "^6.1.4",
"react-split-pane": "^0.1.92",
"rehype-katex": "^7.0.1",
"remark-gfm": "^4.0.1",
"remark-math": "^6.0.0",
"umi": "^4.0.87",
"umi-request": "^1.4.0",
"url-parse": "^1.5.10",
"utility-types": "^3.11.0",
"uuid": "^9.0.0",
"xterm": "^5.3.0",
"xterm-addon-fit": "^0.8.0",
"xterm-addon-web-links": "^0.9.0",
"zod": "^3.24.2",
"zustand": "^4.4.4"
},
Expand Down
20 changes: 10 additions & 10 deletions chat2db-community-client/scripts/i18n-source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"es-ES": {
"ai.ts": "391a6e14c58d8401bf3bc245eca5bdd4b66efd8225a877bfbbcae01a1c1c019a",
"chat.ts": "0cbe009eacbaa95a9a29bbc69588cb547e90b563667c53edec3e54ee64f5667b",
"common.ts": "1f70d1ba81aecbbd985a9dd9d1ae8b18ddfb3d209982a2ca17fbe3e4bf883a1f",
"connection.ts": "41d07fd10c9550ae51995620cc998de5e99add35edb31c2bb592864c76c13688",
"common.ts": "94c74ecece9c1ad0853468ee9b334c8221af9c4c44a73989704dacff4f41e401",
"connection.ts": "d70578a3444978b60ea41c670e8b180849eaab297e33325db56c891e1058e899",
"dashboard.ts": "b217bbe260c7674d4efad1dd1b61136653858884f5b9b2134cfdf7d1de5a44ee",
"editTable.ts": "0f7a808f50053cd52b183d156bb4fd46bb125b8058f8774deb61c7f02894a350",
"editTableData.ts": "95261152bcd5a627dad2e82cba3603faeafc33965da6ebe4a8862090a19ad6e5",
Expand All @@ -16,24 +16,24 @@
"license.ts": "6aff8c38b1a7475264aa1e16e88d9b9731ecef112af70fe53edab449788ea788",
"login.ts": "d6b15f2b4db713711c093108372027ad65899aec6dd963d3f954231a9ce5b890",
"menu.ts": "1f9adabb7465ed545bdaa57fd2a0c10913e04979e710f65c6822f295c4d3e6ed",
"monaco.ts": "da4d9ea1a29de505f94ca9c49d125805fbef1c3132c7aa0f49f1c278b8cb1e93",
"monaco.ts": "b4c3df44f674093f2ad58ad76b7c94bd4c74443e38435f4867b92e5fe7bb6b0b",
"notification.ts": "500751da2f02391622f074448eb46611fd41da2e5530d6c7d65f17a1382bd236",
"plugin.ts": "01f15b6342cc5b29899ee4144d67b04bb4bc02c6bb10779806be322dc5e9a2bc",
"price.ts": "26e35cb96368585f83a29adbb14e300da9b7f5278a4320063e81a1d1dd0adee9",
"redis.ts": "a73e4fca6d783031370060e20bb1bbba13f663a0773cd031e1744be1cb4e93af",
"setting.ts": "447e759e9842d790e80e6d5680032bf150ec259c6d48daa87458277a78a9ba1f",
"setting.ts": "9728c7f38cd3a20fda257a304366cc9493e490c6e941fe455f1b3d11522ef3ca",
"spaceSetting.ts": "defdf3138e5e1782f0282760bcef4ce1b8550cc80b03052fea468d97165cb980",
"sqlEditor.ts": "5c41e5f24d5ba78909795bcc681cabb8460cca075233b665dc4940afe82ce0c9",
"stream.ts": "8418dd25b0fd54b2ef2b15a2573edf0a4876efb4e69936ff82a157ea5cf42be4",
"team.ts": "eb1fb03bdfeb93169ef1d2e347deb5b95071c10c8c93c35cfe2cb5b6606779ea",
"userGuide.ts": "0103ba35af95a3a0ff7a414130b68a7dd5f5f8196e59cd951631ac2090cb04fe",
"workspace.ts": "846c4ea2acd392fa026473cf216bfaf3f62c1a4355be872efa939aa199468c8d"
"workspace.ts": "fd9c276d878e08b73fce53188b0a190c01b2367bac43fd43812a5085554a545b"
},
"ko-KR": {
"ai.ts": "391a6e14c58d8401bf3bc245eca5bdd4b66efd8225a877bfbbcae01a1c1c019a",
"chat.ts": "0cbe009eacbaa95a9a29bbc69588cb547e90b563667c53edec3e54ee64f5667b",
"common.ts": "1f70d1ba81aecbbd985a9dd9d1ae8b18ddfb3d209982a2ca17fbe3e4bf883a1f",
"connection.ts": "41d07fd10c9550ae51995620cc998de5e99add35edb31c2bb592864c76c13688",
"common.ts": "94c74ecece9c1ad0853468ee9b334c8221af9c4c44a73989704dacff4f41e401",
"connection.ts": "d70578a3444978b60ea41c670e8b180849eaab297e33325db56c891e1058e899",
"dashboard.ts": "b217bbe260c7674d4efad1dd1b61136653858884f5b9b2134cfdf7d1de5a44ee",
"editTable.ts": "0f7a808f50053cd52b183d156bb4fd46bb125b8058f8774deb61c7f02894a350",
"editTableData.ts": "95261152bcd5a627dad2e82cba3603faeafc33965da6ebe4a8862090a19ad6e5",
Expand All @@ -43,18 +43,18 @@
"license.ts": "6aff8c38b1a7475264aa1e16e88d9b9731ecef112af70fe53edab449788ea788",
"login.ts": "d6b15f2b4db713711c093108372027ad65899aec6dd963d3f954231a9ce5b890",
"menu.ts": "1f9adabb7465ed545bdaa57fd2a0c10913e04979e710f65c6822f295c4d3e6ed",
"monaco.ts": "da4d9ea1a29de505f94ca9c49d125805fbef1c3132c7aa0f49f1c278b8cb1e93",
"monaco.ts": "b4c3df44f674093f2ad58ad76b7c94bd4c74443e38435f4867b92e5fe7bb6b0b",
"notification.ts": "500751da2f02391622f074448eb46611fd41da2e5530d6c7d65f17a1382bd236",
"plugin.ts": "01f15b6342cc5b29899ee4144d67b04bb4bc02c6bb10779806be322dc5e9a2bc",
"price.ts": "26e35cb96368585f83a29adbb14e300da9b7f5278a4320063e81a1d1dd0adee9",
"redis.ts": "a73e4fca6d783031370060e20bb1bbba13f663a0773cd031e1744be1cb4e93af",
"setting.ts": "447e759e9842d790e80e6d5680032bf150ec259c6d48daa87458277a78a9ba1f",
"setting.ts": "9728c7f38cd3a20fda257a304366cc9493e490c6e941fe455f1b3d11522ef3ca",
"spaceSetting.ts": "defdf3138e5e1782f0282760bcef4ce1b8550cc80b03052fea468d97165cb980",
"sqlEditor.ts": "5c41e5f24d5ba78909795bcc681cabb8460cca075233b665dc4940afe82ce0c9",
"stream.ts": "8418dd25b0fd54b2ef2b15a2573edf0a4876efb4e69936ff82a157ea5cf42be4",
"team.ts": "eb1fb03bdfeb93169ef1d2e347deb5b95071c10c8c93c35cfe2cb5b6606779ea",
"userGuide.ts": "0103ba35af95a3a0ff7a414130b68a7dd5f5f8196e59cd951631ac2090cb04fe",
"workspace.ts": "846c4ea2acd392fa026473cf216bfaf3f62c1a4355be872efa939aa199468c8d"
"workspace.ts": "fd9c276d878e08b73fce53188b0a190c01b2367bac43fd43812a5085554a545b"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
saveAIModelConfig,
testAIModelConfig,
} from '@/service/aiModelConfig';
import { resolveBaseUrlOnProviderChange, resolveProviderBaseUrl } from './modelConfigDefaults';
import { useStyles } from './style';

interface AIModelConfigModalProps {
Expand All @@ -23,6 +24,7 @@ const providerOptions = [
{ label: 'OpenAI', value: 'OPENAI' },
{ label: 'Claude', value: 'CLAUDE' },
{ label: 'Gemini', value: 'GEMINI' },
{ label: 'MiniMax', value: 'MINIMAX' },
];

const emptyFormValues: IAIModelConfigSaveRequest = {
Expand All @@ -39,6 +41,18 @@ const emptyFormValues: IAIModelConfigSaveRequest = {
defaultConfig: false,
};

const toFormValues = (config?: Partial<IAIModelConfigSaveRequest>): IAIModelConfigSaveRequest => {
const values = {
...emptyFormValues,
...config,
apiKey: '',
};
return {
...values,
baseUrl: resolveProviderBaseUrl(values.provider, values.baseUrl),
};
};

export default function AIModelConfigModal({ open, onClose, onChanged }: AIModelConfigModalProps) {
const { styles, cx } = useStyles();
const [modal, modalContextHolder] = Modal.useModal();
Expand Down Expand Up @@ -70,11 +84,7 @@ export default function AIModelConfigModal({ open, onClose, onChanged }: AIModel
const activeId = editingId && list.some((item) => item.id === editingId) ? editingId : list[0].id;
setEditingId(activeId);
const activeConfig = list.find((item) => item.id === activeId);
form.setFieldsValue({
...emptyFormValues,
...activeConfig,
apiKey: '',
});
form.setFieldsValue(toFormValues(activeConfig));
} else {
resetForm();
}
Expand All @@ -91,11 +101,11 @@ export default function AIModelConfigModal({ open, onClose, onChanged }: AIModel

const handleSelectConfig = (config: IAIModelConfigItem) => {
setEditingId(config.id);
form.setFieldsValue({
...emptyFormValues,
...config,
apiKey: '',
});
form.setFieldsValue(toFormValues(config));
};

const handleProviderChange = (provider: AIProvider) => {
form.setFieldValue('baseUrl', resolveBaseUrlOnProviderChange(provider, form.getFieldValue('baseUrl')));
};

const handleSave = async () => {
Expand Down Expand Up @@ -264,7 +274,11 @@ export default function AIModelConfigModal({ open, onClose, onChanged }: AIModel
label={i18n('setting.modelConfig.provider')}
rules={[{ required: true, message: i18n('setting.modelConfig.validation.provider') }]}
>
<Select options={providerOptions} placeholder={i18n('setting.modelConfig.placeholder.provider')} />
<Select
options={providerOptions}
placeholder={i18n('setting.modelConfig.placeholder.provider')}
onChange={handleProviderChange}
/>
</Form.Item>
<Form.Item
name="model"
Expand All @@ -279,7 +293,11 @@ export default function AIModelConfigModal({ open, onClose, onChanged }: AIModel
tooltip={currentConfig?.apiKeyMasked || undefined}
rules={[
{
required: (currentProvider === 'OPENAI' || currentProvider === 'CLAUDE') && !currentConfig?.hasApiKey,
required:
(currentProvider === 'OPENAI' ||
currentProvider === 'CLAUDE' ||
currentProvider === 'MINIMAX') &&
!currentConfig?.hasApiKey,
message: i18n('setting.modelConfig.validation.apiKey'),
},
]}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import assert from 'node:assert/strict';
import {
DEFAULT_MINIMAX_BASE_URL,
resolveBaseUrlOnProviderChange,
resolveProviderBaseUrl,
} from './modelConfigDefaults';

assert.equal(resolveProviderBaseUrl('MINIMAX', ''), DEFAULT_MINIMAX_BASE_URL);
assert.equal(resolveProviderBaseUrl('MINIMAX', ' '), DEFAULT_MINIMAX_BASE_URL);
assert.equal(resolveProviderBaseUrl('MINIMAX', 'https://api.minimax.chat/v1'), 'https://api.minimax.chat/v1');
assert.equal(resolveProviderBaseUrl('OPENAI', ''), '');

assert.equal(resolveBaseUrlOnProviderChange('MINIMAX', ''), DEFAULT_MINIMAX_BASE_URL);
assert.equal(resolveBaseUrlOnProviderChange('OPENAI', DEFAULT_MINIMAX_BASE_URL), '');
assert.equal(
resolveBaseUrlOnProviderChange('OPENAI', 'https://proxy.example.com/v1'),
'https://proxy.example.com/v1',
);

console.log('AI model config default tests passed.');
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { AIProvider } from '@/service/aiModelConfig';

export const DEFAULT_MINIMAX_BASE_URL = 'https://api.minimax.io/v1';

export const resolveProviderBaseUrl = (provider: AIProvider, baseUrl?: string): string => {
if (provider === 'MINIMAX' && !baseUrl?.trim()) {
return DEFAULT_MINIMAX_BASE_URL;
}
return baseUrl || '';
};

export const resolveBaseUrlOnProviderChange = (provider: AIProvider, baseUrl?: string): string => {
if (provider === 'MINIMAX') {
return resolveProviderBaseUrl(provider, baseUrl);
}
if (baseUrl?.trim() === DEFAULT_MINIMAX_BASE_URL) {
return '';
}
return baseUrl || '';
};
Loading
Loading