mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 04:14:42 +00:00
Drop the visible heading from the trace drawer
The drawer opens straight onto the trace. Its title stays as the dialog's screen-reader name, and the unused subtitle string is removed from every locale.
This commit is contained in:
1 parent
d7319928d1
commit
56e8437a83
9 files changed
+12
-26
No files matched your search
@@ -441,7 +441,6 @@
|
||||
"viewRounds_one": "Trace anzeigen ({{count}} Runde)",
|
||||
"viewRounds_other": "Trace anzeigen ({{count}} Runden)",
|
||||
"title": "Ausführungs-Trace",
|
||||
"subtitle": "Jeder Schritt hinter diesem Eintrag – Abruf, Modellaufrufe und Tool-Aufrufe – mit seiner Dauer.",
|
||||
"empty": "Für diesen Eintrag wurde kein Trace aufgezeichnet.",
|
||||
"failed": "Der Trace konnte nicht geladen werden.",
|
||||
"noSpans": "Für diese Ausführung wurde nichts aufgezeichnet.",
|
||||
|
||||
@@ -446,7 +446,6 @@
|
||||
"viewRounds_one": "View trace ({{count}} round)",
|
||||
"viewRounds_other": "View trace ({{count}} rounds)",
|
||||
"title": "Execution trace",
|
||||
"subtitle": "Every step behind this entry — retrieval, model calls and tool calls — with its timing.",
|
||||
"empty": "No trace was recorded for this entry.",
|
||||
"failed": "Could not load the trace.",
|
||||
"noSpans": "Nothing was recorded for this run.",
|
||||
|
||||
@@ -441,7 +441,6 @@
|
||||
"viewRounds_one": "Ver traza ({{count}} ronda)",
|
||||
"viewRounds_other": "Ver traza ({{count}} rondas)",
|
||||
"title": "Traza de ejecución",
|
||||
"subtitle": "Cada paso detrás de esta entrada (recuperación, llamadas al modelo y llamadas a herramientas) con su duración.",
|
||||
"empty": "No se registró ninguna traza para esta entrada.",
|
||||
"failed": "No se pudo cargar la traza.",
|
||||
"noSpans": "No se registró nada en esta ejecución.",
|
||||
|
||||
@@ -440,7 +440,6 @@
|
||||
"viewRounds_one": "トレースを表示({{count}} ラウンド)",
|
||||
"viewRounds_other": "トレースを表示({{count}} ラウンド)",
|
||||
"title": "実行トレース",
|
||||
"subtitle": "このエントリの各ステップ(検索、モデル呼び出し、ツール呼び出し)とその所要時間。",
|
||||
"empty": "このエントリのトレースは記録されていません。",
|
||||
"failed": "トレースを読み込めませんでした。",
|
||||
"noSpans": "この実行では何も記録されませんでした。",
|
||||
|
||||
@@ -455,7 +455,6 @@
|
||||
"viewRounds_many": "Открыть трассировку ({{count}} раундов)",
|
||||
"viewRounds_other": "Открыть трассировку ({{count}} раунда)",
|
||||
"title": "Трассировка выполнения",
|
||||
"subtitle": "Каждый шаг за этой записью — поиск, вызовы модели и инструментов — с длительностью.",
|
||||
"empty": "Для этой записи трассировка не сохранена.",
|
||||
"failed": "Не удалось загрузить трассировку.",
|
||||
"noSpans": "Для этого запуска ничего не записано.",
|
||||
|
||||
@@ -440,7 +440,6 @@
|
||||
"viewRounds_one": "檢視追蹤({{count}} 輪)",
|
||||
"viewRounds_other": "檢視追蹤({{count}} 輪)",
|
||||
"title": "執行追蹤",
|
||||
"subtitle": "此項目背後的每個步驟(檢索、模型呼叫和工具呼叫)及其耗時。",
|
||||
"empty": "此項目沒有記錄追蹤。",
|
||||
"failed": "無法載入追蹤。",
|
||||
"noSpans": "此次執行沒有記錄任何內容。",
|
||||
|
||||
@@ -440,7 +440,6 @@
|
||||
"viewRounds_one": "查看追踪({{count}} 轮)",
|
||||
"viewRounds_other": "查看追踪({{count}} 轮)",
|
||||
"title": "执行追踪",
|
||||
"subtitle": "此条目背后的每一步(检索、模型调用和工具调用)及其耗时。",
|
||||
"empty": "此条目没有记录追踪。",
|
||||
"failed": "无法加载追踪。",
|
||||
"noSpans": "此次运行没有记录任何内容。",
|
||||
|
||||
@@ -4,13 +4,7 @@ import { useSelector } from 'react-redux';
|
||||
|
||||
import userService from '../../api/services/userService';
|
||||
import Spinner from '../../components/Spinner';
|
||||
import {
|
||||
Sheet,
|
||||
SheetContent,
|
||||
SheetDescription,
|
||||
SheetHeader,
|
||||
SheetTitle,
|
||||
} from '../../components/ui/sheet';
|
||||
import { Sheet, SheetContent } from '../../components/ui/sheet';
|
||||
import { selectToken } from '../../preferences/preferenceSlice';
|
||||
import { formatDateTime } from '../../utils/dateTimeUtils';
|
||||
import { Trace, TraceRef } from '../types';
|
||||
@@ -76,17 +70,15 @@ export default function TraceSheet({
|
||||
|
||||
return (
|
||||
<Sheet open={traceRef !== null} onOpenChange={(open) => !open && onClose()}>
|
||||
{/* The waterfall speaks for itself: the title is for screen readers
|
||||
only, and there is no description to announce. */}
|
||||
<SheetContent
|
||||
side="right"
|
||||
title={t('settings.logs.trace.title')}
|
||||
aria-describedby={undefined}
|
||||
className="w-full overflow-y-auto sm:max-w-3xl"
|
||||
>
|
||||
<SheetHeader>
|
||||
<SheetTitle>{t('settings.logs.trace.title')}</SheetTitle>
|
||||
<SheetDescription>
|
||||
{t('settings.logs.trace.subtitle')}
|
||||
</SheetDescription>
|
||||
</SheetHeader>
|
||||
<div className="flex flex-col gap-8 px-4 pb-6">
|
||||
<div className="flex flex-col gap-8 px-4 pt-4 pb-6">
|
||||
{loading && (
|
||||
<div className="flex justify-center py-10">
|
||||
<Spinner />
|
||||
@@ -104,7 +96,8 @@ export default function TraceSheet({
|
||||
)}
|
||||
{traces.map((trace, index) => (
|
||||
<section key={trace.id} className="flex flex-col gap-3">
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
{/* Right padding keeps the first row clear of the close button. */}
|
||||
<div className="flex flex-wrap items-center gap-2 pr-8">
|
||||
{traces.length > 1 && (
|
||||
<span className="text-foreground text-sm font-medium">
|
||||
{t('settings.logs.trace.round', { n: index + 1 })}
|
||||
|
||||
@@ -106,8 +106,8 @@ test.describe('tier-a · execution traces', () => {
|
||||
await page.goto('/settings/logs');
|
||||
await page.getByText('what do you remember about me?').first().click();
|
||||
await page.getByRole('button', { name: 'View trace' }).click();
|
||||
const sheet = page.getByRole('dialog');
|
||||
await expect(sheet.getByText('Execution trace')).toBeVisible();
|
||||
const sheet = page.getByRole('dialog', { name: 'Execution trace' });
|
||||
await expect(sheet).toBeVisible();
|
||||
await expect(sheet.getByText('execute_tool memory_view').first()).toBeVisible();
|
||||
await sheet.getByText('execute_tool memory_view').first().click();
|
||||
await expect(sheet.getByText('Arguments')).toBeVisible();
|
||||
@@ -165,8 +165,8 @@ test.describe('tier-a · execution traces', () => {
|
||||
await page.goto('/settings/logs');
|
||||
await page.getByText('how do I get started?').first().click();
|
||||
await page.getByRole('button', { name: 'View trace' }).click();
|
||||
const sheet = page.getByRole('dialog');
|
||||
await expect(sheet.getByText('Execution trace')).toBeVisible();
|
||||
const sheet = page.getByRole('dialog', { name: 'Execution trace' });
|
||||
await expect(sheet).toBeVisible();
|
||||
await sheet.getByText(/^retrieval/).first().click();
|
||||
await expect(sheet.getByText('Retrieved chunks')).toBeVisible();
|
||||
if (process.env.TRACE_SCREENSHOT_RAG) {
|
||||
|
||||
Reference in new issue
Block a user