2024-01-29 15:02:27 +08:00
|
|
|
{
|
2026-01-04 19:14:20 +08:00
|
|
|
"version": "1.0.0",
|
2024-01-29 15:02:27 +08:00
|
|
|
"private": true,
|
2026-01-04 19:14:20 +08:00
|
|
|
"description": "RAGFlow Web Frontend migrated to Vite",
|
2024-06-06 11:01:14 +08:00
|
|
|
"author": "bill",
|
2026-01-04 19:14:20 +08:00
|
|
|
"type": "module",
|
2024-01-29 15:02:27 +08:00
|
|
|
"scripts": {
|
2026-01-04 19:14:20 +08:00
|
|
|
"build": "vite build --mode production",
|
2025-09-04 17:03:36 +08:00
|
|
|
"build-storybook": "storybook build",
|
2026-01-05 15:28:57 +08:00
|
|
|
"dev": "vite --host",
|
2026-04-17 21:02:41 +08:00
|
|
|
"lint": "eslint src --ext .ts,.tsx --report-unused-disable-directives",
|
2024-06-24 14:48:21 +08:00
|
|
|
"prepare": "cd .. && husky web/.husky",
|
2026-01-04 19:14:20 +08:00
|
|
|
"preview": "vite preview",
|
2025-09-04 17:03:36 +08:00
|
|
|
"storybook": "storybook dev -p 6006",
|
2026-04-17 21:02:41 +08:00
|
|
|
"test": "jest --no-cache --coverage",
|
|
|
|
|
"type-check": "tsc --noEmit"
|
2024-01-29 15:02:27 +08:00
|
|
|
},
|
2024-06-24 14:48:21 +08:00
|
|
|
"lint-staged": {
|
2026-04-17 21:02:41 +08:00
|
|
|
"*.{css,less,json}": "prettier --write --ignore-unknown",
|
|
|
|
|
"*.{js,jsx,ts,tsx}": [
|
|
|
|
|
"prettier --write --ignore-unknown",
|
|
|
|
|
"eslint"
|
2024-06-24 14:48:21 +08:00
|
|
|
]
|
|
|
|
|
},
|
2026-01-04 19:14:20 +08:00
|
|
|
"overrides": {
|
2026-03-12 11:04:26 +00:00
|
|
|
"@radix-ui/react-dismissable-layer": "1.1.4",
|
|
|
|
|
"monaco-editor": {
|
|
|
|
|
"dompurify": "3.3.2"
|
|
|
|
|
}
|
2026-01-04 19:14:20 +08:00
|
|
|
},
|
2024-01-29 15:02:27 +08:00
|
|
|
"dependencies": {
|
|
|
|
|
"@ant-design/icons": "^5.2.6",
|
2025-01-07 18:03:41 +08:00
|
|
|
"@antv/g2": "^5.2.10",
|
2026-04-14 10:02:00 +08:00
|
|
|
"@antv/g6": "^5.1.0",
|
2026-06-11 20:43:58 +08:00
|
|
|
"@extend-ai/react-docx": "^0.6.7",
|
2026-04-15 18:42:02 +08:00
|
|
|
"@floating-ui/react": "^0.27.19",
|
2024-11-06 11:13:04 +08:00
|
|
|
"@hookform/resolvers": "^3.9.1",
|
2025-08-29 10:57:29 +08:00
|
|
|
"@js-preview/excel": "^1.7.14",
|
2025-02-08 18:09:13 +08:00
|
|
|
"@lexical/react": "^0.23.1",
|
2026-01-04 19:14:20 +08:00
|
|
|
"@mdx-js/rollup": "^3.1.1",
|
2024-10-28 18:56:38 +08:00
|
|
|
"@monaco-editor/react": "^4.6.0",
|
2025-03-18 14:03:12 +08:00
|
|
|
"@radix-ui/react-accordion": "^1.2.3",
|
2025-01-03 09:47:05 +08:00
|
|
|
"@radix-ui/react-alert-dialog": "^1.1.4",
|
2024-11-15 19:18:23 +08:00
|
|
|
"@radix-ui/react-aspect-ratio": "^1.1.0",
|
2024-11-11 19:29:56 +08:00
|
|
|
"@radix-ui/react-avatar": "^1.1.1",
|
2024-11-06 11:13:04 +08:00
|
|
|
"@radix-ui/react-checkbox": "^1.1.2",
|
2025-02-24 15:43:20 +08:00
|
|
|
"@radix-ui/react-collapsible": "^1.1.3",
|
2025-03-14 17:36:24 +08:00
|
|
|
"@radix-ui/react-dialog": "1.1.4",
|
|
|
|
|
"@radix-ui/react-dropdown-menu": "2.1.4",
|
2025-04-24 11:45:37 +08:00
|
|
|
"@radix-ui/react-hover-card": "^1.1.11",
|
2024-11-06 11:13:04 +08:00
|
|
|
"@radix-ui/react-icons": "^1.3.1",
|
|
|
|
|
"@radix-ui/react-label": "^2.1.0",
|
2024-11-20 11:14:21 +08:00
|
|
|
"@radix-ui/react-navigation-menu": "^1.2.1",
|
2025-03-14 17:36:24 +08:00
|
|
|
"@radix-ui/react-popover": "1.1.4",
|
2025-01-02 16:10:41 +08:00
|
|
|
"@radix-ui/react-progress": "^1.1.1",
|
2025-03-28 10:20:49 +08:00
|
|
|
"@radix-ui/react-radio-group": "^1.2.3",
|
2025-01-02 16:10:41 +08:00
|
|
|
"@radix-ui/react-scroll-area": "^1.2.2",
|
2025-03-14 17:36:24 +08:00
|
|
|
"@radix-ui/react-select": "2.1.4",
|
2026-02-27 22:26:19 +08:00
|
|
|
"@radix-ui/react-separator": "^1.1.8",
|
2024-12-02 19:33:20 +08:00
|
|
|
"@radix-ui/react-slider": "^1.2.1",
|
2026-02-27 22:26:19 +08:00
|
|
|
"@radix-ui/react-slot": "^1.2.4",
|
2024-11-06 11:13:04 +08:00
|
|
|
"@radix-ui/react-switch": "^1.1.1",
|
2024-11-11 19:29:56 +08:00
|
|
|
"@radix-ui/react-tabs": "^1.1.1",
|
2025-02-24 19:30:33 +08:00
|
|
|
"@radix-ui/react-toast": "^1.2.6",
|
2025-06-11 09:22:07 +08:00
|
|
|
"@radix-ui/react-toggle": "^1.1.9",
|
|
|
|
|
"@radix-ui/react-toggle-group": "^1.1.10",
|
2024-12-06 13:43:17 +08:00
|
|
|
"@radix-ui/react-tooltip": "^1.1.4",
|
2024-11-26 16:55:44 +08:00
|
|
|
"@tailwindcss/line-clamp": "^0.4.4",
|
2024-06-05 10:46:06 +08:00
|
|
|
"@tanstack/react-query": "^5.40.0",
|
2024-07-19 09:07:36 +08:00
|
|
|
"@tanstack/react-query-devtools": "^5.51.5",
|
2024-11-28 18:44:36 +08:00
|
|
|
"@tanstack/react-table": "^8.20.5",
|
2025-12-10 16:44:06 +08:00
|
|
|
"@types/papaparse": "^5.5.1",
|
2024-11-05 15:00:07 +08:00
|
|
|
"@uiw/react-markdown-preview": "^5.1.3",
|
2026-01-04 19:14:20 +08:00
|
|
|
"@welldone-software/why-did-you-render": "^8.0.3",
|
2024-12-30 18:19:58 +08:00
|
|
|
"@xyflow/react": "^12.3.6",
|
2024-03-01 11:28:58 +08:00
|
|
|
"ahooks": "^3.7.10",
|
2025-10-29 12:19:24 +08:00
|
|
|
"ajv": "^8.17.1",
|
|
|
|
|
"ajv-formats": "^3.0.1",
|
2025-10-16 09:40:18 +08:00
|
|
|
"axios": "^1.12.0",
|
2026-02-27 22:26:19 +08:00
|
|
|
"class-variance-authority": "^0.7.1",
|
2024-01-29 15:02:27 +08:00
|
|
|
"classnames": "^2.5.1",
|
2024-11-06 11:13:04 +08:00
|
|
|
"clsx": "^2.1.1",
|
2024-12-18 14:51:24 +08:00
|
|
|
"cmdk": "^1.0.4",
|
2024-04-16 19:06:47 +08:00
|
|
|
"dayjs": "^1.11.10",
|
2026-03-12 11:04:26 +00:00
|
|
|
"dompurify": "^3.3.2",
|
2025-12-19 19:13:18 +08:00
|
|
|
"embla-carousel-react": "^8.6.0",
|
2024-05-16 20:15:02 +08:00
|
|
|
"eventsource-parser": "^1.1.2",
|
2024-06-11 11:58:49 +08:00
|
|
|
"human-id": "^4.1.1",
|
2024-01-29 15:02:27 +08:00
|
|
|
"i18next": "^23.7.16",
|
2024-05-17 15:38:28 +08:00
|
|
|
"i18next-browser-languagedetector": "^8.0.0",
|
2024-07-08 16:29:54 +08:00
|
|
|
"immer": "^10.1.1",
|
2024-11-06 11:13:04 +08:00
|
|
|
"input-otp": "^1.4.1",
|
2024-01-29 15:02:27 +08:00
|
|
|
"js-base64": "^3.7.5",
|
|
|
|
|
"jsencrypt": "^3.3.2",
|
2025-11-20 12:44:32 +08:00
|
|
|
"jsoneditor": "^10.4.2",
|
2025-02-08 18:09:13 +08:00
|
|
|
"lexical": "^0.23.1",
|
2026-03-12 11:04:26 +00:00
|
|
|
"lodash": "^4.17.23",
|
2026-03-27 19:24:52 +08:00
|
|
|
"lucide-react": "^1.7.0",
|
2025-04-09 17:21:01 +08:00
|
|
|
"next-themes": "^0.4.6",
|
2024-09-03 09:55:19 +08:00
|
|
|
"openai-speech-stream-player": "^1.0.8",
|
2025-12-10 16:44:06 +08:00
|
|
|
"papaparse": "^5.5.3",
|
Fix:Added support for preview of txt, md, excel, csv, ppt, image, doc and other files (#8712)
### What problem does this PR solve?
Added support for preview of txt, md, excel, csv, ppt, image, doc and
other files [#3221](https://github.com/infiniflow/ragflow/issues/3221)
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-08 10:39:18 +08:00
|
|
|
"pptx-preview": "^1.0.5",
|
2024-02-07 18:04:25 +08:00
|
|
|
"rc-tween-one": "^3.0.6",
|
2025-07-17 12:10:58 +08:00
|
|
|
"react": "^18.2.0",
|
2025-12-02 19:39:43 +08:00
|
|
|
"react-audio-voice-recorder": "^2.2.0",
|
2024-04-16 19:06:47 +08:00
|
|
|
"react-copy-to-clipboard": "^5.1.0",
|
2025-07-21 10:26:41 +08:00
|
|
|
"react-day-picker": "^9.8.0",
|
2025-07-17 12:10:58 +08:00
|
|
|
"react-dom": "^18.2.0",
|
2025-01-02 16:10:41 +08:00
|
|
|
"react-dropzone": "^14.3.5",
|
2024-09-12 13:34:33 +08:00
|
|
|
"react-error-boundary": "^4.0.13",
|
2025-05-26 12:21:19 +08:00
|
|
|
"react-hook-form": "^7.56.4",
|
2024-01-29 15:02:27 +08:00
|
|
|
"react-i18next": "^14.0.0",
|
2024-11-28 15:25:38 +08:00
|
|
|
"react-infinite-scroll-component": "^6.1.0",
|
2024-02-26 18:38:54 +08:00
|
|
|
"react-markdown": "^9.0.1",
|
2024-03-01 18:49:21 +08:00
|
|
|
"react-pdf-highlighter": "^6.1.0",
|
2025-12-26 12:11:19 +08:00
|
|
|
"react-photo-view": "^1.2.7",
|
2025-11-25 11:17:39 +08:00
|
|
|
"react-resizable-panels": "^3.0.6",
|
2026-01-04 19:14:20 +08:00
|
|
|
"react-router": "^7.10.1",
|
2024-02-26 18:38:54 +08:00
|
|
|
"react-string-replace": "^1.1.1",
|
2024-03-18 18:39:00 +08:00
|
|
|
"react-syntax-highlighter": "^15.5.0",
|
2024-07-09 16:34:59 +08:00
|
|
|
"react18-json-view": "^0.2.8",
|
2024-04-16 19:06:47 +08:00
|
|
|
"recharts": "^2.12.4",
|
2024-11-29 16:34:30 +08:00
|
|
|
"rehype-katex": "^7.0.1",
|
2024-08-28 19:05:15 +08:00
|
|
|
"rehype-raw": "^7.0.0",
|
2026-05-15 22:29:44 +08:00
|
|
|
"remark-breaks": "^4.0.0",
|
2024-03-15 14:34:09 +08:00
|
|
|
"remark-gfm": "^4.0.0",
|
2024-11-29 16:34:30 +08:00
|
|
|
"remark-math": "^6.0.0",
|
2025-04-09 17:21:01 +08:00
|
|
|
"sonner": "^1.7.4",
|
2026-02-27 22:26:19 +08:00
|
|
|
"tailwind-merge": "^2.6.1",
|
2025-06-27 12:11:29 +08:00
|
|
|
"tailwind-scrollbar": "^3.1.0",
|
2024-11-06 11:13:04 +08:00
|
|
|
"tailwindcss-animate": "^1.0.7",
|
2024-02-19 19:16:23 +08:00
|
|
|
"umi-request": "^1.4.0",
|
2024-02-26 18:38:54 +08:00
|
|
|
"unist-util-visit-parents": "^6.0.1",
|
2024-06-05 10:46:06 +08:00
|
|
|
"uuid": "^9.0.1",
|
2025-11-03 09:52:23 +08:00
|
|
|
"xlsx": "^0.18.5",
|
2024-11-06 11:13:04 +08:00
|
|
|
"zod": "^3.23.8",
|
2024-06-05 10:46:06 +08:00
|
|
|
"zustand": "^4.5.2"
|
2024-01-29 15:02:27 +08:00
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
2025-11-17 19:45:58 +08:00
|
|
|
"@hookform/devtools": "^4.4.0",
|
2026-01-04 19:14:20 +08:00
|
|
|
"@react-router/dev": "^7.10.1",
|
2024-06-05 10:46:06 +08:00
|
|
|
"@redux-devtools/extension": "^3.3.0",
|
2025-09-04 17:03:36 +08:00
|
|
|
"@storybook/addon-docs": "^9.1.4",
|
|
|
|
|
"@storybook/addon-onboarding": "^9.1.4",
|
|
|
|
|
"@storybook/addon-styling-webpack": "^2.0.0",
|
|
|
|
|
"@storybook/addon-webpack5-compiler-swc": "^4.0.1",
|
|
|
|
|
"@storybook/react-webpack5": "^9.1.4",
|
2025-12-25 19:02:49 +08:00
|
|
|
"@tailwindcss/container-queries": "^0.1.1",
|
2024-05-27 19:35:14 +08:00
|
|
|
"@testing-library/jest-dom": "^6.4.5",
|
|
|
|
|
"@testing-library/react": "^15.0.7",
|
2024-07-15 04:24:23 +02:00
|
|
|
"@types/dompurify": "^3.0.5",
|
2024-05-27 19:35:14 +08:00
|
|
|
"@types/jest": "^29.5.12",
|
2024-01-29 15:02:27 +08:00
|
|
|
"@types/lodash": "^4.14.202",
|
2025-09-04 17:03:36 +08:00
|
|
|
"@types/node": "^24.3.0",
|
2024-01-29 15:02:27 +08:00
|
|
|
"@types/react": "^18.0.33",
|
2024-04-16 19:06:47 +08:00
|
|
|
"@types/react-copy-to-clipboard": "^5.0.7",
|
2024-01-29 15:02:27 +08:00
|
|
|
"@types/react-dom": "^18.0.11",
|
2024-03-18 18:39:00 +08:00
|
|
|
"@types/react-syntax-highlighter": "^15.5.11",
|
2024-05-27 19:35:14 +08:00
|
|
|
"@types/testing-library__jest-dom": "^6.0.0",
|
2024-02-19 19:16:23 +08:00
|
|
|
"@types/uuid": "^9.0.8",
|
2024-03-21 16:45:03 +08:00
|
|
|
"@types/webpack-env": "^1.18.4",
|
2026-01-07 14:32:17 +08:00
|
|
|
"@typescript-eslint/eslint-plugin": "^8.52.0",
|
|
|
|
|
"@typescript-eslint/parser": "^8.52.0",
|
2026-01-04 19:14:20 +08:00
|
|
|
"@vitejs/plugin-react": "^5.1.2",
|
2025-09-04 17:03:36 +08:00
|
|
|
"autoprefixer": "^10.4.21",
|
2024-01-29 15:02:27 +08:00
|
|
|
"cross-env": "^7.0.3",
|
2026-01-04 19:14:20 +08:00
|
|
|
"eslint": "^8.56.0",
|
2025-08-11 15:31:38 +08:00
|
|
|
"eslint-plugin-check-file": "^2.8.0",
|
2026-01-07 14:32:17 +08:00
|
|
|
"eslint-plugin-react": "^7.37.5",
|
2026-01-04 19:14:20 +08:00
|
|
|
"eslint-plugin-react-hooks": "^4.6.0",
|
2026-01-07 14:32:17 +08:00
|
|
|
"eslint-plugin-react-refresh": "^0.4.26",
|
2025-09-04 17:03:36 +08:00
|
|
|
"eslint-plugin-storybook": "^9.1.4",
|
2024-10-16 15:57:39 +08:00
|
|
|
"html-loader": "^5.1.0",
|
2024-06-24 14:48:21 +08:00
|
|
|
"husky": "^9.0.11",
|
2024-05-27 19:35:14 +08:00
|
|
|
"jest": "^29.7.0",
|
|
|
|
|
"jest-environment-jsdom": "^29.7.0",
|
2026-01-04 19:14:20 +08:00
|
|
|
"less": "^4.4.2",
|
2024-06-24 14:48:21 +08:00
|
|
|
"lint-staged": "^15.2.7",
|
2025-09-04 17:03:36 +08:00
|
|
|
"postcss": "^8.5.6",
|
|
|
|
|
"postcss-loader": "^8.2.0",
|
2024-01-29 15:02:27 +08:00
|
|
|
"prettier": "^3.2.4",
|
|
|
|
|
"prettier-plugin-organize-imports": "^3.2.4",
|
|
|
|
|
"prettier-plugin-packagejson": "^2.4.9",
|
|
|
|
|
"react-dev-inspector": "^2.0.1",
|
2024-10-16 15:57:39 +08:00
|
|
|
"remark-loader": "^6.0.0",
|
Feat: chat channels — connect assistants to external messaging bots (#15850)
### What problem does this PR solve?
#15844
Adds a **Chat channels** capability so a RAGFlow assistant (Dialog) can
be exposed as a bot on external messaging platforms (Feishu/Lark,
Discord, Telegram, Slack, WeCom, LINE, etc.). An admin configures a bot
in the UI, connects it to an assistant, and inbound messages are
answered from that assistant's knowledge base — replies are delivered
back on the channel.
**Feishu/Lark is implemented and tested end-to-end.** Discord, Telegram,
LINE, and WeCom are scaffolded against the same interface; the remaining
listed channels are tracked as follow-ups.
### Design
**Backend**
- New `chat_channel` table (`tenant_id`, `name`, `channel`, `config`
JSON holding `{credential: {...}}`, `dialog_id`, `status`) +
`ChatChannelService` and RESTful CRUD under `/api/v1/chat_channels`.
- Channel framework under `api/channels/`: a `core` registry +
per-channel packages that self-register a builder and implement a common
`Channel` interface (`start`/`stop`/`send` + inbound normalization) over
`IncomingMessage`/`OutgoingMessage`.
- Embedded **reconcile loop** in `ragflow_server`
(`api/channels/bootstrap.py`): loads enabled bots, and
starts/stops/restarts them as rows change (no server restart needed).
Inbound messages run the connected dialog via the non-streaming
completion path, keeping per-end-user conversation history.
- Missing optional channel SDKs degrade gracefully (channel skipped with
a warning; others unaffected). Channel-level errors are logged, not
crashed.
- Feishu's WebSocket client runs in a dedicated thread with its own
event loop to avoid cross-loop/contextvars conflicts with the channel
runtime.
**Frontend**
- **Settings → Chat channels** panel: available-channels grid +
configured-bots list with add/edit/delete and a **Connect assistant**
popup that binds a bot to a dialog.
- Brand icons via simple-icons / reused shared data-source assets, with
colored fallbacks for brands not available.
- Route, sidebar entry, i18n (en/zh), and a top-nav segment-boundary fix
so the settings page no longer highlights the Chat tab.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
### Notes
- DB: new `chat_channel` table is auto-created; `chat_channel.dialog_id`
is also covered by a `migrate_db` `alter_db_add_column` for existing
installs.
- Channel SDKs (`lark-oapi`, `discord.py`, `python-telegram-bot`,
`line-bot-sdk`, `wechatpy`, `aiohttp`) added to dependencies.
- Screenshots / per-channel credential docs to follow.
<img width="1338" height="1290" alt="Image"
src="https://github.com/user-attachments/assets/042cb2f9-0dad-4e6a-bcf7-43ced4bbd704"
/>
<img width="1344" height="738" alt="Image"
src="https://github.com/user-attachments/assets/373cd08e-ec40-4c67-9c51-4d948b1ba617"
/>
<img width="672" height="887" alt="Image"
src="https://github.com/user-attachments/assets/5a34953f-a9a3-4c1e-869e-5eff0dc64c84"
/>
---------
2026-06-12 18:21:30 +08:00
|
|
|
"simple-icons": "^16.23.0",
|
2025-09-04 17:03:36 +08:00
|
|
|
"storybook": "^9.1.4",
|
2024-11-06 11:13:04 +08:00
|
|
|
"tailwindcss": "^3",
|
2025-02-08 18:09:13 +08:00
|
|
|
"terser-webpack-plugin": "^5.3.11",
|
2024-05-27 19:35:14 +08:00
|
|
|
"ts-node": "^10.9.2",
|
2026-01-04 19:14:20 +08:00
|
|
|
"typescript": "^5.9.3",
|
|
|
|
|
"vite": "^7.2.7",
|
|
|
|
|
"vite-plugin-html": "^3.2.2",
|
|
|
|
|
"vite-plugin-static-copy": "^3.1.4",
|
|
|
|
|
"vite-svg-loader": "^5.1.0"
|
2024-11-21 18:14:22 +08:00
|
|
|
},
|
|
|
|
|
"engines": {
|
|
|
|
|
"node": ">=18.20.4"
|
2024-01-29 15:02:27 +08:00
|
|
|
}
|
|
|
|
|
}
|