Commit Graph

7619 Commits

Author SHA1 Message Date
euvre
418d3c8cef fix: fetch all knowledge bases via pagination in link-to-dataset dialog (#17170) 2026-07-23 16:48:05 +08:00
Lynn
6467df3437 Fix: Xinference asr model call (#17283) 2026-07-23 15:57:45 +08:00
buua436
e3e2d0a3ec fix: optimize knowledge compilation LLM behavior and PageIndex ordering (#17270) 2026-07-23 14:30:43 +08:00
balibabu
c48a59db96 Feat: Add page rank to ParserForm (#17267) 2026-07-23 14:23:07 +08:00
Lynn
4a2564c7da Feat: OpenAI-API-Compatible (#17276) 2026-07-23 13:39:57 +08:00
Yurii214
64be8585aa fix(deepdoc): keep pipe tables inside markdown code fences (#17201) 2026-07-23 13:31:35 +08:00
Andrew Chen
8af2467112 fix(html_parser): keep text before the first block element (#17073) 2026-07-23 12:43:16 +08:00
Jin Hai
5478f955ab Go: add context to DAO (#17269)
### Summary

DAO layer doesn't use context, this PR is to fix it.

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-23 12:15:58 +08:00
euvre
7b29fc10ca fix(agent): wire memory persistence in Message component (Go runtime) (#17256) 2026-07-23 11:37:59 +08:00
euvre
b095a5511a fix: make qwen3-vl-plus usable as chat/vision model in Go mode (#17254) 2026-07-23 11:14:08 +08:00
balibabu
1e445fbd68 Feat: Alter "Compilation" to "Operator" (#17273)
### Summary

[Feat: Alter "Compilation" to
"Operator"](f52684dc23)
2026-07-23 11:09:12 +08:00
rayhan
3bc39f94e8 fix: remediate CVE-2026-53533 by upgrading aiosmtplib to >=5.1.1 (#17264)
## Summary
  
Bumps `aiosmtplib` from `>=5.0.0` to `>=5.1.1,<6.0.0` in
`pyproject.toml`.
  
  | CVE | Severity | Package | Installed | Fixed in |
  |---|---|---|---|---|
  | CVE-2026-53533 | MEDIUM | aiosmtplib | 5.0.0 | 5.1.1 |
  
This is a direct dependency upgrade, no override or constraint needed.
2026-07-23 10:42:41 +08:00
buua436
d0a48816bb fix: improve page index descriptions (#17268) 2026-07-23 10:34:45 +08:00
euvre
a5aa9489f2 fix(chunker): glue delimiter to preceding segment instead of emitting it as a standalone chunk (#17168) 2026-07-23 10:13:46 +08:00
Jack
f7446cae7b Feat: upgrade office_oxide from 0.1.2 to 0.1.8 (#17262) 2026-07-23 09:59:34 +08:00
euvre
3733da2773 fix: count distinct chunk IDs so doc.chunk_num matches actual indexed chunks (#17182) 2026-07-23 09:58:43 +08:00
chanx
e3975b58eb fix: improve model merging logic in useModelsDerived for better instance-specific values (#17250) 2026-07-23 09:58:41 +08:00
euvre
db1559f71b fix: prevent thinking content from leaking into visible answer in shared chat (Go mode) (#17225) 2026-07-23 09:58:24 +08:00
buua436
285f3e4c7e refa: optimize wiki compilation concurrency (#17192) 2026-07-23 09:56:51 +08:00
Jin Hai
d19a036cda Go: add context to lots of interface (#17253)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
dev-20260723
2026-07-22 22:30:57 +08:00
balibabu
b3d394954d Feat: Support pipeline-related configuration at the document level. (#17212)
### Summary

Feat: Support pipeline-related configuration at the document level.
2026-07-22 22:24:50 +08:00
deadtrickster
dccc0a4bee docs: fix markdownlint and command issues across READMEs (#17261)
Fixes markdownlint findings and two carried-over command bugs that exist
identically across `README.md` and all translations (markdownlint just
never ran on them):

- **MD045** — alt text on documentation images.
- **MD014** — drop `$ ` prompts from command blocks with no output.
- **MD040** — language on the `/etc/hosts` fenced block; remove a stray
empty code block in `README_tzh.md`.
- `sudo brew install jemalloc` → `brew install jemalloc` (brew rejects
sudo).
- Infinity migration: the `up` command now uses
`docker/docker-compose.yml`, matching its `down`.

MD028 is intentionally left: its only fix folds a note into the
preceding `[!CAUTION]`/`[!WARNING]` admonition.

Split out of #17240 to keep that PR scoped to the Russian translation.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 21:47:58 +08:00
maoyifeng
92c1a232a3 fix CI add gitee token temporarily (#17263)
### Summary

fix CI add gitee token temporarily
2026-07-22 21:35:57 +08:00
Hz_
2487d4b8f7 feat(go-models): expand providers (SiliconFlow, Qiniu, Huawei Cloud, Jina) tool call support (#17241)
## Summary

- Add tool call support for SiliconFlow, Qiniu, Huawei Cloud, and Jina
while consolidating shared OpenAI-compatible helpers used by Aliyun
- Handle streaming tool call deltas and advertise tool support for
eligible provider models
- Add cross-provider tool call tests and enable Qiniu connection
verification through the models endpoint

#16990
2026-07-22 21:27:58 +08:00
Haruko386
29292e9622 fix: can get duplicate agent-name when update agent (#17232)
### Summary

As title
2026-07-22 21:27:25 +08:00
Haruko386
1d165c7315 fix: unable to get owner in chat and search (#17244)
### Summary

As title
2026-07-22 21:27:08 +08:00
Haruko386
48b63ab6b0 fix: cannot not show embed ID in listMemories (#17211)
### Summary

As title
2026-07-22 21:26:44 +08:00
deadtrickster
2539d11daf docs: add Russian translation of README (README_ru.md) (#17240)
Adds a Russian README (`README_ru.md`) and the `Русский`
language-switcher badge to all existing READMEs, following the structure
of the other translations.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 20:15:26 +08:00
euvre
28b6926831 Fix: search input cannot expand to show long queries (#17166) 2026-07-22 19:39:39 +08:00
euvre
11c08fe62e fix(go): resolve tenant model IDs in memory create/update without hard failure (#17176) 2026-07-22 19:34:41 +08:00
euvre
d757303fa4 fix(web): show completed label for think block after streaming ends (#17149) 2026-07-22 19:30:09 +08:00
euvre
5bc28d4d15 fix: exclude TTS models from agent component model selector (#17231) 2026-07-22 19:27:12 +08:00
euvre
cfaef879fe fix: MinerU.Net and PaddleOCR.Net missing icons (#17229) 2026-07-22 19:24:23 +08:00
euvre
f4a61efbb4 fix: keep memory card position stable after rename or config update (#17234) 2026-07-22 19:22:29 +08:00
euvre
2f7dc60337 fix: restore download button when file type is selected in agent message (#17184) 2026-07-22 19:21:17 +08:00
euvre
1aaa200471 fix: use FormLabel required prop for consistent asterisk color in search settings (#17223) 2026-07-22 19:20:59 +08:00
euvre
c1aff8c710 fix: prevent empty-state flash on knowledge-base and chat list loading (#17221) 2026-07-22 19:20:48 +08:00
euvre
769bd50363 fix: restore empty model warning in dataset creating dialog (#17220) 2026-07-22 19:20:33 +08:00
euvre
e411f91938 fix: Go backend builtin chunk method list not showing (#17180) 2026-07-22 19:14:51 +08:00
Jack
8669c469d5 fix(ingestion): align laws DSL with Python — heading fallback, colon-title, short-line filter, remove_toc, and image extension mapping (#17200)
## Summary

This PR aligns the Go ingestion pipeline's **Laws** DSL template with
the Python implementation by fixing heading-detection gaps, adds
image-extension support, refactors the **Extractor** component's LLM
resolution, hardens heading detection for CJK text, and makes the
Extractor accept the Python DSL prompt key names
(`sys_prompt`/`prompts`) alongside the Go names.

## Changes

### 1. Picture file-type detection (`internal/utility/file.go`)

Adds explicit mapping for common image extensions (png, jpg, jpeg, gif,
bmp, tiff, tif, webp, svg, ico, avif, heic, apng) → `FileTypeVISUAL`,
with regression tests.

### 2. Laws DSL heading-detection alignment
(`internal/ingestion/component/chunker/`)

Four fixes to `resolveTitleLevels`:

| Fix | What changed | Why |
|-----|-------------|-----|
| **DOCX `ck_type` fallback** | `ckType` field on `lineRecord`,
propagated from `ChunkDoc.CKType` in `recordsFromStructured`. When
`ck_type=="heading"`, assign `fallbackLevel`. | office_oxide extracts
DOCX heading metadata, but the info was lost before reaching the heading
detector. Word headings whose text doesn't match any regex (e.g.
"Introduction") were treated as body. |
| **`make_colon_as_title` promotion** | `isColonTitle()`: promotes lines
ending with `:`/`:` that have sentence-ending punctuation before the
colon and ≥32 runes between them. | Mirrors Python's
`make_colon_as_title` in `rag/nlp/__init__.py`. Triple guard prevents
false positives. |
| **Short/numeric line filter** | Lines with ≤1 rune or purely numeric
are pinned to body level. | Mirrors Python `tree_merge`'s filter of
`sections` where `len(...) <= 1` or `re.match(r"[0-9]+$", ...)`. |
| **PDF `remove_toc`** | `"remove_toc": true` added to the PDF parser
setup in `ingestion_pipeline_laws.json`. | The Go PDF parser already
supports TOC removal; the Book template already enables it. |

### 3. Extractor llm_id resolution
(`internal/ingestion/component/extractor.go`)

Refactored to handle both **bare tenant_model UUIDs** and **composite
model@provider** strings via the shared `resolveModelConfig`
(`dispatch_model.go`):

- **`resolveExtractorChatConfig`** — UUID path calls
`resolveModelConfigByID` directly (one DB hit); composite path goes
through `resolveModelConfig`. Added `isBareTenantModelID` pre-check for
clear errors when a UUID doesn't exist.
- **`resolveExtractorChatTarget`** — propagates resolution errors
instead of silently returning empty driver.
- **`Chat()`** — removed `driver = "dummy"` fallback. Missing driver is
now an explicit error.
- **Removed dead code**: `splitExtractorLLID`,
`findExtractorSoleActiveInstance`.

### 4. `InjectExtractorLLMID` — fallback when no user config
(`internal/common/parser_config.go`)

Injects the tenant's global default LLM into extractor components **only
when their `llm_id` is empty**. Preserves user-selected UUID or
model@provider values.

Priority: user-configured llm_id > tenant global default > error (no
silent dummy fallback).

### 5. `ResponseHeaderTimeout` increase
(`internal/entity/models/base_model.go`)

`ResponseHeaderTimeout` 60s → 120s in `NewDriverHTTPClient`. Reasoning
models with large extraction prompts can take longer than 60s to produce
the first response token.

### 6. CJK rune-aware heading detection
(`internal/ingestion/component/chunker/title.go`)

Two byte-vs-rune bugs that only manifest on CJK text:

| Fix | What changed | Why |
|-----|-------------|-----|
| **`isColonTitle` byte offset** | `body[lastPunct+1:]` →
`body[lastPunct+runeLen:]` via `utf8.DecodeRuneInString` |
`strings.LastIndexAny` returns a byte index; `+1` skips only 1 byte,
corrupting multi-byte CJK punctuation (e.g. `。` = 3 bytes) and inflating
the rune count past the 32-rune threshold → false-positive heading
promotion. |
| **Short-line filter byte count** | `len(text) <= 1` →
`utf8.RuneCountInString(text) <= 1` | Go `len` is UTF-8 bytes; a single
CJK char (3 bytes) passed the filter, but Python's `len` returns 1 →
mismatch. |

### 7. `extractor_tag.go` — log error when llm fails

When `resolveExtractorChatTarget` returned an error, `runAutoTags` will
log error.

### 8. Python DSL prompt-key compatibility
(`internal/ingestion/component/extractor.go`)

The Resume DSL template uses Python-side key names (`sys_prompt`,
`prompts`). `NewExtractorComponent` now accepts them as fallbacks
alongside the Go names:

- `system_prompt` (Go) ← `sys_prompt` (Python) as fallback
- `prompt` (Go string) ← `prompts` (Python array `[{"role","content"}]`,
takes `[0].content`) as fallback

Mirrors the alias pattern already in `internal/agent/component/llm.go`.
`resolveInputs` accepts per-call `sys_prompt` override too.

## Remaining gaps vs Python

| Gap | Scope | Impact |
|-----|-------|--------|
| **TOC removal for TXT/MD/HTML** | Python's `remove_contents_table`
works on all text formats; Go's `remove_toc` is PDF-only. | Low —
plain-text documents rarely contain structured TOCs. |
| **Regex pattern details** | Minor differences in quantifiers, missing
H5/H6 markdown patterns, missing 4-level numbering pattern. | Low — Go's
variants are stricter; DOCX headings are covered by `ck_type` fallback.
|

## Testing

- `TestHierarchyTitleChunker_CKTypeHeadingFallback` — DOCX `ck_type`
heading promotion
- `TestHierarchyTitleChunker_ColonTitlePromotion` /
`_ColonTitleShortLine_Negative` — colon-title promotion + guard
- `TestIsColonTitle_CJKEdgeCase` / `TestIsColonTitle_ASCII_NoRegression`
— CJK byte-offset fix + ASCII regression
- `TestHierarchyTitleChunker_ColonTitlePromotion_CJK_EdgeCase` — CJK
colon edge case through full pipeline
- `TestHierarchyTitleChunker_ShortSingleCJKLineFilter` — single CJK char
filtered to body
- `TestHierarchyTitleChunker_ShortNumericLineFilter` — purely numeric
lines filtered
- `TestGetFileType_ImageExtensions` / `_ExistingFormats_NoRegression` —
image extension mapping
- `TestInjectExtractorLLMID_SkipWhenUUID` / `_SkipWhenComposite` /
`_InjectWhenEmpty` — llm_id injection guard
- `TestIsBareTenantModelID` — UUID detection
- `TestResolveExtractorChatTarget_AtSplitFallback` / `_NoDriver` — @
split fallback without DB
- `TestNewExtractorComponent_SysPromptAlias` / `_PromptsArray` /
`_PromptsArray_PromptWins` / `_SystemPromptWinsOverSysPrompt` — Python
key compatibility
- `TestBuildDOCXJSONSections_List` / `_TextBox` / `_MixedWithList` —
DOCX list/text_box parsing
- Full ingestion test suite passes (chunker, pipeline, task, service,
component packages)
2026-07-22 19:14:32 +08:00
euvre
a40d5f841b fix: eliminate one-frame flash of title without form content in data source pages (#17214) 2026-07-22 19:06:38 +08:00
Lynn
32ddf59ac6 Fix: go restful api tests (#17247) 2026-07-22 19:06:08 +08:00
Wang Qi
4d772a9365 Fix update 'Child chunk are used for retrieval' does not take effect (#900) (#17251) 2026-07-22 19:05:32 +08:00
Haruko386
db18766027 fix: unable use agent as a tool in agent component (#17228)
### Summary

As title

<img width="3774" height="2128" alt="image"
src="https://github.com/user-attachments/assets/b1ce69b0-2298-4c0c-92de-8d840938e4f0"
/>
2026-07-22 19:04:55 +08:00
Hz_
45ca5f9a3d fix(go-agent): route graph step errors through exception outputs (#17167)
## Summary

- Route ReAct graph step-limit errors through the Agent `_ERROR` output.
- Align the Go Agent default max rounds with Python by using five
rounds.
- Preserve cancellation, timeout, and configuration errors as real
failures.

## Testing

- `bash build.sh --test ./internal/agent/component/...`

<img width="2050" height="1409" alt="image"
src="https://github.com/user-attachments/assets/108e2d27-e115-4595-91a2-21f90c2531ae"
/>
2026-07-22 19:00:53 +08:00
euvre
ffccf0b0fa fix(web): preserve MCP authorization token across edits (#17177) 2026-07-22 17:25:18 +08:00
Jin Hai
df963cf4a1 Doc: fix typo and format (#17249)
### Summary

As title.

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-22 17:14:32 +08:00
Muhammad Zuhaib Zahid
d5ff75746c docs: point begin/message component links at .md, not .mdx (#17237)
### Summary

Most files in `docs/guides/agent/agent_component_reference/` are `.mdx`,
but `begin` and
`message` are `.md`. Four links use the `.mdx` extension for those two,
so Docusaurus cannot
resolve the reference and they render as broken links.

Co-authored-by: Muhammad Zuhaib Zahid <288755265+muhzuhaib@users.noreply.github.com>
2026-07-22 17:08:42 +08:00
Muhammad Zuhaib Zahid
de978c5302 docs: fix invalid chunk_method value and NameError in Python SDK reference (#17238)
### Summary

Docs-only, two single-line changes.

Co-authored-by: Muhammad Zuhaib Zahid <288755265+muhzuhaib@users.noreply.github.com>
2026-07-22 17:07:16 +08:00
euvre
53d0613bb2 fix: Make MCP bulk-manage select-all checkbox reflect selection state (#17174) 2026-07-22 17:06:36 +08:00