ValyroUI English version

Diff Review

Ревью правок ИИ по фрагментам. Pro · ИИ: чат и агенты › Ответы и артефакты

Установка

npx valyro-cli@latest login
npx valyro-cli@latest add diff-review
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { DiffReview } from 'valyro-ui-pro';

Пропсы

PropTypeDefault
original *stringThe current text.
modified *stringThe text with the proposed edits.
languagestringSyntax highlighting, as in CodeBlock: ts, tsx, css, json, python…
filenamestringShown in the header.
view'unified' | 'split'Controlled view; use with onViewChange.
defaultView'unified' | 'split''unified'Default unified.
onViewChange(view: DiffView) => voidCalled with the new view when it changes.
decisionsHunkDecisionsOne entry per change, in order: accepted, rejected or null while undecided. Uncontrolled decisions reset when original or modified change; controlled ones are reset by the parent.
defaultDecisionsHunkDecisionsInitial decisions when uncontrolled.
onDecisionsChange(decisions: HunkDecisions) => voidCalled with the new decisions when it changes.
onResolve(text: string, decisions: HunkDecision[]) => voidCalled whenever the last undecided change gets a decision, with the resulting text.
contextnumber3Unchanged lines shown around each change; longer unchanged runs collapse. Default 3.
localestringBCP 47 locale for counts; defaults to the ThemeProvider's.
labelsPartial<DiffReviewLabels>Overrides for the built-in English text; keys left out keep their defaults.

Похожие компоненты

  • Sources — Источники и цитаты в ответе
  • Answer Card — Ответ с источниками в стиле Perplexity
  • Artifact Panel — Панель артефакта рядом с чатом
  • AI Chat Window — Окно AI-чата
  • Chat Message — Сообщения с потоковым выводом
  • Message Branches — Версии сообщения и дерево веток диалога
  • Streaming Text — Плавный вывод потока токенов
  • Markdown Preview — Отображение Markdown
  • Response Feedback — Оценка ответа и рубрика для асессоров
  • Prompt Composer — Поле промпта с вложениями
  • Inline Suggestion — Подсказка-автодополнение в поле ввода
  • Model Selector — Выбор модели ИИ

Назад: Artifact Panel · Далее: Voice Orb · Весь раздел «ИИ: чат и агенты»