fix(knowledge): polish chunking-settings debug trigger and strategy hint

The chunking-settings debug trigger and strategy picker had two UX
issues reported by real usage:

- The test button used theme=primary + variant=outline, a combo that
  appears nowhere else in the project. A green-bordered green-text
  pill in the corner of the section header read as a misplaced
  promotional element rather than a secondary action.
- The strategy select's placeholder was "选择策略(默认使用经典递归分块)"
  / "Select strategy (defaults to classic recursive splitting)". Naming
  the fallback strategy inside the placeholder made the empty select
  look as if the user had already picked "classic recursive" — even
  though the value is actually empty.

- Move the debug trigger from the section header into the strategy
  row's right column, stacked below the select. Users meet the test
  action exactly when they're deciding which strategy to use.
- Switch the trigger to a text-style button and override TDesign's
  default hover/focus/active surfaces so the button reads as an inline
  link (text colour shift only, no filled background block).
- Rename the trigger to "测试分块效果" / "Preview chunking" so it
  describes what will be inspected rather than the input source.
- Drop the reference to the fallback strategy inside the placeholder.
  "不填则按长度切分" / "splits by length if left empty" preserves the
  original information about empty-value behaviour without looking
  like a selected option.
- Remove the now-unused 80px right padding the section header reserved
  to keep the old inline trigger clear of the modal close button.
This commit is contained in:
wizardchen
2026-05-07 11:07:00 +08:00
committed by lyingbug
parent d7478094a2
commit c577d0e474
6 changed files with 57 additions and 24 deletions
+2 -2
View File
@@ -2133,7 +2133,7 @@ export default {
childChunkSizeDescription: 'Размер встроенного блока для векторного матчинга (64–2048). По умолчанию 384 ≈ 80 токенов — оптимум для эмбеддеров уровня sentence-transformer / BGE.',
strategyLabel: 'Стратегия разбиения',
strategyDescription: 'Выберите способ разбиения документов на блоки. Автоматический режим анализирует каждый документ и выбирает оптимальную стратегию.',
strategyPlaceholder: 'Выберите стратегию (по умолчанию классическое рекурсивное разбиение)',
strategyPlaceholder: 'Выберите стратегию разбиения (по длине, если не указано)',
strategies: {
auto: {
label: 'Автоматически',
@@ -2165,7 +2165,7 @@ export default {
zh: 'Китайский'
},
debug: {
toggle: 'Проверить на примере текста',
toggle: 'Проверить разбиение',
toggleHint: 'Запустить разбиение для примера текста без повторной загрузки',
sampleLabel: 'Пример текста',
samplePlaceholder: 'Вставьте фрагмент Markdown / простого текста, чтобы увидеть, как его разобьет текущая конфигурация…',