Commit Graph

8180 Commits

Author SHA1 Message Date
xugangqiang
33549d90e9 refactor(parser): drop unreachable fallback in walkHTMLLeaf table case
renderTableHTML only fails on unsupported node kinds, which a parsed
<table> never triggers, so the degenerate flatten-children branch in
walkHTMLLeaf is unreachable. Remove it so the nested-table path matches
the top-level walkHTMLBlocks case (both skip silently when the markup is
empty).

Also tighten the inaccurate 'mirrors Python's HtmlParser' inline comment
in the same block (the two-item split is the markdown_parser.go model;
Python keeps the table once, outside the inline flow).
2026-08-11 17:31:05 +08:00
xugangqiang
b3f9bed8a0 refactor(parser): preserve HTML <table> structure (inline + structured item)
Stop flattening <table> into a single text blob. A <table> now emits:
1. an inlined doc_type_kwd:"text" item keeping the <table>...</table> markup
   (row/column structure survives for embedding/retrieval/LLM rendering), and
2. a structured doc_type_kwd:"table" / ck_type:"table" item appended after
   the walk, consumed by the downstream chunker.

Covers both top-level tables (walkHTMLBlocks) and tables nested in
div/section/article (via walkHTMLLeaf). Mirrors markdown_parser.go table
handling and Python's RAGFlowHtmlParser.

Tests:
- TestHTMLParser_TableProducesStructuredItems
- TestHTMLParser_NestedTableProducesStructuredItems
- TestHTMLParser_NestedListItemsPreserved
- TestHTMLParser_PrePreservesVerbatim
- TestHTMLParser_AlignmentGolden (compares vs html.python.golden.json, ignores
  "table" via meta.accepted_divergences)

Depends on #18014 and the foundation helpers PR (align_test.go).

Files:
  internal/parser/parser/html_parser.go
  internal/parser/parser/html_parser_align_test.go (new)
  internal/parser/parser/testdata/html.python.golden.json (new)
  internal/parser/parser/testdata/html.sample.html (new)
2026-08-11 17:21:21 +08:00
xugangqiang
1e39d24540 refactor(parser): move default delimiter consts to non-test delimiter.go
DefaultTextCodeDelimiter and DefaultMarkdownDelimiter are shared by both
the production parsers and the alignment tests. They previously lived in
align_test.go (a _test.go file), so production text_parser.go had to keep
a private duplicate that could drift silently. Move them to a non-test
delimiter.go as the single source of truth.
2026-08-11 17:17:26 +08:00
xugangqiang
5cfadd16b1 test(parser): add TestParseGolden unit test for golden format tolerance 2026-08-11 17:12:59 +08:00
xugangqiang
7c19bb074a test(parser): add shared golden-doc + alignment helpers
Extract the alignment scaffolding so the format-specific PRs (text&code,
markdown golden, HTML) don't conflict on align_test.go.

Adds (test-only, no production behavior change):
- GoldenDoc{Meta,Items} and parseGolden: tolerant of both the legacy bare
  array and the new {meta, items} golden format.
- LoadGoldenDoc, AcceptedDivergences(meta), FilterOutDocTypes(items, drop):
  meta-driven divergence handling, no hardcoded divergence lists.
- TextCodeAlignOptions / DefaultTextCodeDelimiter, HTMLAlignOptions /
  StripHTMLHeadingMarker: normalizer presets reused by the alignment tests.
- LoadGolden now tolerates the {meta, items} format.

Stacks on #18014 (the align_test.go framework is already in main).
2026-08-11 17:12:59 +08:00
Wang Qi
8e04f95773 Fix to force logout user when set user as inactive (#893) (#18104) 2026-08-11 17:00:57 +08:00
Jin Hai
d7661b676d Go: fix context and warnings (#18097)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-11 16:18:49 +08:00
chanx
2409248801 fix: show filtered session count in session list header (#18094) 2026-08-11 16:14:08 +08:00
chanx
d33f87d3ca feat: rename agent log export button to export current page (#18090) 2026-08-11 16:13:56 +08:00
euvre
82d038543a fix: wrap long log messages in agent pipeline log sheet (#17782) 2026-08-11 16:08:43 +08:00
Haruko386
dd52dee600 feat[Go]: monitoring NATs and refactoring concurrency logic (#18049)
### Summary

As title
2026-08-11 14:36:11 +08:00
Jin Hai
25b579ac6c TS: more license declarations (#18081)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-11 14:21:14 +08:00
balibabu
61fa96ee06 Fix: Click the blank area to prevent UpdateLogSheet from closing. (#18085) 2026-08-11 14:09:54 +08:00
balibabu
398d81f587 Fix: Move the content of the "Token Size" tab from the token chunker operator to the "Delimiter" tab. #17888 (#17975) 2026-08-11 14:07:15 +08:00
euvre
d33b937be6 fix(web): prevent column shift in data source log table (#17940) 2026-08-11 13:59:51 +08:00
buua436
5fd66154f3 fix: improve structure keyword search (#18055) 2026-08-11 13:58:00 +08:00
Zhichang Yu
64533e5b5e Refactor splitByTokens and wire wiki incremental compile (#18083)
Port dataset-level wiki incremental compile and refactor splitByTokens
token budgeting. Includes replace-only wiki merge, KNN dedup routing,
and template/config wiring.
2026-08-11 13:46:55 +08:00
balibabu
f83c4f97c1 Fix: After creating a wiki template and deleting the model instance, the default model appears empty, but it can still be edited and saved successfully. (#18075) 2026-08-11 13:45:04 +08:00
Yingfeng
f1641228e2 Refine agentic search & orchestration loop (#18057)
## Summary

This PR improves the RAGFlow agentic-search path in three areas: it
stops the outer agent from re-looping over the same rag call, lets the
medium thinking mode discover and follow new sub-claims mid-loop, and
strengthens retrieval by having the LLM emit synonym-rich queries with
time/date/number terms boosted.

1. Avoid the outer re-loop — keep all multi-hop cycles inside agentic
RAG

2. Dynamic claims in medium mode — keep querying newly discovered
sub-questions
medium now enables allows_dynamic_claims. During orchestration, when
claim analysis discovers a new required sub-question
(discovered_claims), the loop spawns it as a new ClaimTarget and
continues searching it in subsequent cycles (bounded by the
dynamic-claim budget) instead of stopping. Also added:

3. Stronger query strategy — synonym-rich queries + time/date/number
weighting

LLM-generated synonyms: the claim-analysis prompt now instructs the
model to write each next_queries entry as a retrieval-boosted query that
actively folds in entity aliases, DATE/TIME synonyms (e.g. 1994 → 1994,
66th Academy Awards), and number/unit variants (e.g. 1.95 m → 6 ft 5
in).

Time/date/number boosting: query.py boosts numeric/date tokens to a high
weight (_NUM_DATE_TOKEN_RE).
2026-08-11 13:40:11 +08:00
chanx
f930b1c1bc Fix: New sessions will automatically carry over messages from the previous session by default. (#18078) 2026-08-11 13:38:46 +08:00
chanx
e0d199ea7b fix(floating-selection-toolbar): adjust dropdown direction based on available space (#18053) 2026-08-11 13:31:42 +08:00
chanx
11c9649a6c Fixed: Updated the text color style of the copy button. (#18062) 2026-08-11 13:30:57 +08:00
Wang Qi
bd876c796e Fix: restrict xxx_ids to limit 100 (#18074) 2026-08-11 13:28:52 +08:00
Wang Qi
d7d6bb5b6a Fix max chunk_ids = 100 (#18080) 2026-08-11 13:13:08 +08:00
Jin Hai
fc44d2fe3f Go: fix context (#18076)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
dev-20260811-2
2026-08-11 11:54:57 +08:00
jay77721
9f0663d4d0 fix(ingestion): avoid duplicate chunk text injection in Extractor prompts (#18034) 2026-08-11 11:53:34 +08:00
chanx
d199f4b867 fix(search): pass selected pageSize when retrieving chunks on document change (#18072) 2026-08-11 11:45:21 +08:00
chanx
cad2833c16 fix: Remove unused constant files (#18069)
### Summary

fix: Remove unused constant files
2026-08-11 11:16:06 +08:00
Jin Hai
cb3de6ae98 TS: add apache license (#18064)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-11 11:15:45 +08:00
Jin Hai
8379836179 Go: add context to test (#18070)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-11 11:12:34 +08:00
Jack
d6f6b6231f Fix(parser): don't collapse markdown doc into one item when a table is present (#18014) 2026-08-11 10:21:42 +08:00
Jack
dc73163908 Fix(tokenizer): pin alignment guards (#18011) 2026-08-11 10:09:07 +08:00
Jin Hai
e551167697 TS: fix comments (#18067)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-11 10:00:54 +08:00
Lynn
15ab2b3ee2 Fix: update tree when delete skill node (#18063) 2026-08-11 09:49:22 +08:00
Jin Hai
38c5d7c338 Go: fix context (#18061)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
dev-20260811
2026-08-10 20:49:32 +08:00
Wang Qi
a0438517bc Fix add agent update validation check (#18056) 2026-08-10 20:12:51 +08:00
Lynn
7ac59d1a36 Fix: set column type priority (#18054) 2026-08-10 20:08:06 +08:00
Wang Qi
b978f94fa6 Fix: restrict max_retries as non-negative integer (#18051) 2026-08-10 20:02:24 +08:00
Wang Qi
df32ffbe57 Fix: restrict keywords_similarity_weight [0,1] (#18044) 2026-08-10 20:01:45 +08:00
Jin Hai
dbd062f65e Go: fix context (#18060)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-10 19:11:43 +08:00
Jin Hai
cb649e8d56 Go: fix warning (#18058)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-10 18:50:37 +08:00
Ziyang Guo
eb184c839c chore(wiki): remove stray debug print (#18020)
### Summary

Remove a stray `print()` from the Wiki source-context fallback.
2026-08-10 18:22:44 +08:00
Jin Hai
c697fcff41 Go: fix go context (#18052)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-08-10 18:04:17 +08:00
maoyifeng
6f9d158e30 CI: Optimize per-install tools (#18039)
1.  ss already installed in runner, quit the install step
2. tiktoken is already installed in runner,  skip the install step
2026-08-10 17:55:57 +08:00
buua436
6f50e478e0 fix: exclude disabled documents from dataset structures (#18041) 2026-08-10 17:50:34 +08:00
chanx
23369586c0 fix(chat): preserve in-flight SSE stream when switching conversations (#18037) 2026-08-10 17:29:24 +08:00
chanx
6b73341827 fix(search-page): add overflow-x-auto and min-width to prevent layout issues (#18050) 2026-08-10 17:28:05 +08:00
chanx
d69d75fffb fix(token-chunker-form): set minimum value for chunk token size slider (#18047) 2026-08-10 17:27:51 +08:00
chanx
e9123ea764 fix: prevent empty-model warning modal from staying open after OK (#18046) 2026-08-10 17:27:31 +08:00
chanx
5a2cd36b45 fix(share): The language of the shared page will cause the language of the original website to change. (#18043) 2026-08-10 17:26:18 +08:00