2024-06-06 19:29:36 +08:00
|
|
|
.messageItem {
|
|
|
|
|
padding: 24px 0;
|
|
|
|
|
.messageItemSection {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
}
|
|
|
|
|
.messageItemSectionLeft {
|
2024-07-04 19:18:02 +08:00
|
|
|
width: 80%;
|
2024-06-06 19:29:36 +08:00
|
|
|
}
|
|
|
|
|
.messageItemContent {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
gap: 20px;
|
2026-02-05 13:28:55 +05:30
|
|
|
width: 100%;
|
|
|
|
|
min-width: 0;
|
2024-06-06 19:29:36 +08:00
|
|
|
}
|
|
|
|
|
.messageItemContentReverse {
|
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
|
}
|
2025-02-13 15:59:42 +08:00
|
|
|
|
2024-07-17 14:49:11 +08:00
|
|
|
.messageTextBase() {
|
|
|
|
|
padding: 6px 10px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
& > p {
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.messageText {
|
|
|
|
|
.chunkText();
|
|
|
|
|
.messageTextBase();
|
2025-08-19 09:40:01 +08:00
|
|
|
// background-color: #e6f4ff;
|
2025-02-07 09:35:49 +07:00
|
|
|
word-break: break-word;
|
2024-07-17 14:49:11 +08:00
|
|
|
}
|
2024-12-10 10:42:04 +07:00
|
|
|
.messageTextDark {
|
|
|
|
|
.chunkText();
|
|
|
|
|
.messageTextBase();
|
2026-02-27 22:26:19 +08:00
|
|
|
padding: 0;
|
2025-02-07 09:35:49 +07:00
|
|
|
word-break: break-word;
|
Fix: collapsible thinking display and separate deep research retrieval tag (#14613)
## Summary
- **Collapsible thinking**: Replace `<section>` with `<details>` for
`<think>` content, so model thinking output is collapsed by default
(click to expand). Works for all models that output `<think>` tags
(Qwen3, DeepSeek, Gemini, Claude, etc.).
- **Fix double thinking tags**: When reasoning/deep research mode is
enabled in knowledge base chat, both the retrieval progress and model
thinking were wrapped in `<think>` tags, producing two "Thinking..."
blocks. Now retrieval progress uses a dedicated `<retrieving>` tag
rendered as a separate "Retrieving..." collapsible with a distinct green
accent.
### Before
- Thinking content displayed as flat gray-bordered `<section>`,
occupying significant screen space
- Deep research + model thinking both use `<think>` → two identical
"Thinking..." blocks
### After
- Thinking content collapsed by default in a `<details>` element, click
"Thinking..." to expand
- Deep research shows "Retrieving..." (green border), model thinking
shows "Thinking..." (gray border)
## Changes
**Backend (`api/db/services/dialog_service.py`)**
- Deep research callback: replace `start_to_think`/`end_to_think` marker
flags with direct `<retrieving>`/`</retrieving>` answer text
**Frontend**
- `web/src/utils/chat.ts`: `replaceThinkToSection()` now uses
`<details>` instead of `<section>`; add new
`replaceRetrievingToSection()`
- 4 tsx files: import and pipe `replaceRetrievingToSection`, whitelist
`details`, `summary`, `retrieving` in DOMPurify `ADD_TAGS`
- 4 less files: `section.think` → `details.think` with `<summary>`
styles; add `details.retrieving` with green accent; dark mode and RTL
variants
## Test plan
- [ ] Open a chat WITHOUT knowledge base, ask a question to a model with
thinking (e.g. Qwen3) → thinking content should be collapsed by default,
click "Thinking..." to expand
- [ ] Open a chat WITH knowledge base and reasoning enabled, ask a
question → "Retrieving..." (green) shows retrieval progress,
"Thinking..." (gray) shows model thinking, each independently
collapsible
- [ ] Verify dark mode renders correctly for both collapsible blocks
- [ ] Verify RTL layout renders correctly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: wanghualoong <wanghualoong@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-08 14:40:00 +08:00
|
|
|
:global(details.think) {
|
2025-02-13 15:59:42 +08:00
|
|
|
color: rgb(166, 166, 166);
|
Feat/arabic language support (#13516)
### What problem does this PR solve?
This PR implements comprehensive Arabic language support for the RAGFlow
application. The changes include:
- Complete Arabic translation of all UI text elements in the web
interface
- RTL (right-to-left) layout support for Arabic content
- Localization updates for all supported languages (ar, bg, de, en, es,
fr, id, it, ja, pt-br, ru, vi, zh-traditional, zh)
- UI component adjustments to properly display Arabic text and support
RTL layout
The implementation ensures that Arabic-speaking users can fully interact
with the application in their native language with proper text rendering
and layout direction.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
<img width="2866" height="1617" alt="image"
src="https://github.com/user-attachments/assets/f2751b34-1b65-4867-b81d-a1068c17b9b7"
/>
---------
Co-authored-by: Yingfeng <yingfeng.zhang@gmail.com>
2026-03-11 10:06:07 +03:00
|
|
|
border-inline-start-color: rgb(78, 78, 86);
|
Fix: collapsible thinking display and separate deep research retrieval tag (#14613)
## Summary
- **Collapsible thinking**: Replace `<section>` with `<details>` for
`<think>` content, so model thinking output is collapsed by default
(click to expand). Works for all models that output `<think>` tags
(Qwen3, DeepSeek, Gemini, Claude, etc.).
- **Fix double thinking tags**: When reasoning/deep research mode is
enabled in knowledge base chat, both the retrieval progress and model
thinking were wrapped in `<think>` tags, producing two "Thinking..."
blocks. Now retrieval progress uses a dedicated `<retrieving>` tag
rendered as a separate "Retrieving..." collapsible with a distinct green
accent.
### Before
- Thinking content displayed as flat gray-bordered `<section>`,
occupying significant screen space
- Deep research + model thinking both use `<think>` → two identical
"Thinking..." blocks
### After
- Thinking content collapsed by default in a `<details>` element, click
"Thinking..." to expand
- Deep research shows "Retrieving..." (green border), model thinking
shows "Thinking..." (gray border)
## Changes
**Backend (`api/db/services/dialog_service.py`)**
- Deep research callback: replace `start_to_think`/`end_to_think` marker
flags with direct `<retrieving>`/`</retrieving>` answer text
**Frontend**
- `web/src/utils/chat.ts`: `replaceThinkToSection()` now uses
`<details>` instead of `<section>`; add new
`replaceRetrievingToSection()`
- 4 tsx files: import and pipe `replaceRetrievingToSection`, whitelist
`details`, `summary`, `retrieving` in DOMPurify `ADD_TAGS`
- 4 less files: `section.think` → `details.think` with `<summary>`
styles; add `details.retrieving` with green accent; dark mode and RTL
variants
## Test plan
- [ ] Open a chat WITHOUT knowledge base, ask a question to a model with
thinking (e.g. Qwen3) → thinking content should be collapsed by default,
click "Thinking..." to expand
- [ ] Open a chat WITH knowledge base and reasoning enabled, ask a
question → "Retrieving..." (green) shows retrieval progress,
"Thinking..." (gray) shows model thinking, each independently
collapsible
- [ ] Verify dark mode renders correctly for both collapsible blocks
- [ ] Verify RTL layout renders correctly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: wanghualoong <wanghualoong@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-08 14:40:00 +08:00
|
|
|
|
|
|
|
|
summary {
|
|
|
|
|
color: rgb(140, 140, 140);
|
|
|
|
|
&:hover {
|
|
|
|
|
color: rgb(180, 180, 180);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
:global(details.retrieving) {
|
|
|
|
|
color: rgb(166, 166, 166);
|
|
|
|
|
border-inline-start-color: rgb(60, 100, 90);
|
|
|
|
|
|
|
|
|
|
summary {
|
|
|
|
|
color: rgb(120, 170, 155);
|
|
|
|
|
&:hover {
|
|
|
|
|
color: rgb(150, 200, 185);
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-02-13 15:59:42 +08:00
|
|
|
}
|
2024-12-10 10:42:04 +07:00
|
|
|
}
|
|
|
|
|
|
2024-07-17 14:49:11 +08:00
|
|
|
.messageUserText {
|
|
|
|
|
.chunkText();
|
|
|
|
|
.messageTextBase();
|
2024-12-10 10:42:04 +07:00
|
|
|
background-color: rgba(255, 255, 255, 0.3);
|
2025-02-07 09:35:49 +07:00
|
|
|
word-break: break-word;
|
2024-07-17 14:49:11 +08:00
|
|
|
text-align: justify;
|
|
|
|
|
}
|
2024-06-06 19:29:36 +08:00
|
|
|
.messageEmpty {
|
|
|
|
|
width: 300px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.thumbnailImg {
|
|
|
|
|
max-width: 20px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.messageItemLeft {
|
Feat/arabic language support (#13516)
### What problem does this PR solve?
This PR implements comprehensive Arabic language support for the RAGFlow
application. The changes include:
- Complete Arabic translation of all UI text elements in the web
interface
- RTL (right-to-left) layout support for Arabic content
- Localization updates for all supported languages (ar, bg, de, en, es,
fr, id, it, ja, pt-br, ru, vi, zh-traditional, zh)
- UI component adjustments to properly display Arabic text and support
RTL layout
The implementation ensures that Arabic-speaking users can fully interact
with the application in their native language with proper text rendering
and layout direction.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
<img width="2866" height="1617" alt="image"
src="https://github.com/user-attachments/assets/f2751b34-1b65-4867-b81d-a1068c17b9b7"
/>
---------
Co-authored-by: Yingfeng <yingfeng.zhang@gmail.com>
2026-03-11 10:06:07 +03:00
|
|
|
text-align: start;
|
2024-06-06 19:29:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.messageItemRight {
|
Feat/arabic language support (#13516)
### What problem does this PR solve?
This PR implements comprehensive Arabic language support for the RAGFlow
application. The changes include:
- Complete Arabic translation of all UI text elements in the web
interface
- RTL (right-to-left) layout support for Arabic content
- Localization updates for all supported languages (ar, bg, de, en, es,
fr, id, it, ja, pt-br, ru, vi, zh-traditional, zh)
- UI component adjustments to properly display Arabic text and support
RTL layout
The implementation ensures that Arabic-speaking users can fully interact
with the application in their native language with proper text rendering
and layout direction.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
<img width="2866" height="1617" alt="image"
src="https://github.com/user-attachments/assets/f2751b34-1b65-4867-b81d-a1068c17b9b7"
/>
---------
Co-authored-by: Yingfeng <yingfeng.zhang@gmail.com>
2026-03-11 10:06:07 +03:00
|
|
|
text-align: end;
|
2024-06-06 19:29:36 +08:00
|
|
|
}
|