Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
feat(chat): show session response timing
vastsab0410458b2f7
diff --git a/apps/desktop/src/components/ContextUsageInspector.tsx b/apps/desktop/src/components/ContextUsageInspector.tsxindex fea0f5672..6b0b75e8d 100644--- a/apps/desktop/src/components/ContextUsageInspector.tsx+++ b/apps/desktop/src/components/ContextUsageInspector.tsx@@ -14,6 +14,7 @@ import {type UiMessage,} from "@pi-desktop/shared";import { useAppStore } from "../stores/app-store";+import { formatToolDuration } from "../lib/tool-display";import { TooltipButton } from "./ui";import {aggregateToolTokenUsage,@@ -28,6 +29,7 @@ import {placeContextInspector,type ContextInspectorPlacement,} from "../lib/context-inspector-position";+import { useSessionTiming } from "../features/chat/composer/useSessionTiming";const CONTEXT_RING_RADIUS = 9;const CONTEXT_RING_CIRCUMFERENCE = 2 * Math.PI * CONTEXT_RING_RADIUS;@@ -63,6 +65,35 @@ export function ContextUsageInspector({const [open, setOpen] = useState(false);const [popoverPosition, setPopoverPosition] =useState<ContextInspectorPlacement | null>(null);+ const sessionId = useAppStore((state) => state.activeSessionId);+ const session = useAppStore((state) =>+ state.sessions.find((candidate) => candidate.id === state.activeSessionId),+ );+ const sessionMessages = useAppStore((state) => state.messages);+ const sessionHistory = useAppStore((state) =>+ state.activeSessionId+ ? state.sessionHistory[state.activeSessionId]+ : undefined,+ );+ const isSessionRunning = useAppStore((state) =>+ state.activeSessionId+ ? state.runningSessions[state.activeSessionId] ?? state.isRunning+ : false,+ );+ const modelRequestActivity = useAppStore((state) =>+ state.activeSessionId+ ? state.agentStatuses[state.activeSessionId]?.activity+ : undefined,+ );+ const sessionTiming = useSessionTiming({+ enabled: open,+ session,+ sessionId,+ messages: sessionMessages,+ history: sessionHistory,+ isRunning: isSessionRunning,+ modelRequestActivity,+ });const context = calculateContextUsage(usage, contextWindow);// The display preference flips the leading figure only; capacity colors// still follow remaining space so the warning state keeps one meaning.@@ -82,6 +113,20 @@ export function ContextUsageInspector({usage.inputTokens,usage.cacheReadTokens,);+ const modelResponseDuration = formatToolDuration(+ (sessionTiming.timing?.modelResponseMs ?? 0) / 1_000,+ );+ const modelResponsePercent = sessionTiming.timing?.modelResponsePercent;+ const modelResponseValue =+ sessionTiming.historyStatus === "loading"+ ? "…"+ : sessionTiming.historyStatus === "error"+ ? t("chat.usageTimingUnavailable")+ : `${modelResponseDuration}${+ modelResponsePercent === undefined+ ? ""+ : ` · ${modelResponsePercent}%`+ }`;const toolRows = aggregateToolTokenUsage(tools);const toolTotal = toolRows.reduce((total, row) => total + row.totalTokens,@@ -304,6 +349,23 @@ export function ContextUsageInspector({</strong></div></div>+ {sessionTiming.timing ? (+ <div+ className="context-inspector-kpis"+ aria-busy={sessionTiming.historyStatus === "loading"}+ >+ <div>+ <span>{t("chat.usageSessionTime")}</span>+ <strong>+ {formatToolDuration(sessionTiming.timing.elapsedMs / 1_000)}+ </strong>+ </div>+ <div>+ <span>{t("chat.usageModelResponse")}</span>+ <strong>{modelResponseValue}</strong>+ </div>+ </div>+ ) : null}<div className="context-inspector-summary"><div className="context-inspector-summary-row"><strong>{t("chat.usageProviderUsage")}</strong>diff --git a/apps/desktop/src/features/chat/composer/useSessionTiming.ts b/apps/desktop/src/features/chat/composer/useSessionTiming.tsnew file mode 100644index 000000000..62f3ec530--- /dev/null+++ b/apps/desktop/src/features/chat/composer/useSessionTiming.ts@@ -0,0 +1,177 @@+import { useEffect, useRef, useState } from "react";+import type {+ AgentActivity,+ SessionSummary,+ UiMessage,+} from "@pi-desktop/shared";+import { api } from "../../../lib/api";+import {+ calculateSessionTiming,+ loadEarlierModelResponseDuration,+ type SessionTiming,+} from "../../../lib/session-timing";+import type { SessionHistoryWindow } from "../../../stores/app-state";++type HistoryLoadState = {+ key: string;+ status: "loading" | "ready" | "error";+ durationMs: number;+};++type CachedSessionTiming = {+ key: string;+ durationMs: number;+};++const MAX_CACHED_SESSION_TIMINGS = 16;++export type SessionTimingView = {+ timing?: SessionTiming;+ historyStatus: "loading" | "ready" | "error";+};++export function useSessionTiming({+ enabled,+ session,+ sessionId,+ messages,+ history,+ isRunning,+ modelRequestActivity,+}: {+ enabled: boolean;+ session?: Pick<SessionSummary, "createdAt" | "updatedAt">;+ sessionId?: string;+ messages: UiMessage[];+ history?: SessionHistoryWindow;+ isRunning: boolean;+ modelRequestActivity?: AgentActivity;+}): SessionTimingView {+ const messageStart = history?.messageStart ?? 0;+ const hasMoreBefore = history?.hasMoreBefore === true;+ const historyKey = `${sessionId ?? ""}:${messageStart}:${session?.updatedAt ?? ""}`;+ const historyCache = useRef(new Map<string, CachedSessionTiming>());+ const [retainedRequest, setRetainedRequest] = useState<+ { sessionId: string; startedAt: number } | undefined+ >();+ const [historyLoad, setHistoryLoad] = useState<HistoryLoadState>();+ const [now, setNow] = useState(() => Date.now());++ const streamingMessageStartedAt = [...messages]+ .reverse()+ .find(+ (message) =>+ message.role === "assistant" &&+ !message.parentToolCallId &&+ !message.nestedParentToolCallId &&+ message.status === "streaming",+ )?.createdAt;+ const waitingRequestStartedAt =+ modelRequestActivity?.phase === "waiting-model"+ ? modelRequestActivity.since+ : undefined;+ useEffect(() => {+ if (!isRunning || !sessionId) {+ setRetainedRequest(undefined);+ } else if (+ typeof waitingRequestStartedAt === "number" &&+ Number.isFinite(waitingRequestStartedAt)+ ) {+ setRetainedRequest({ sessionId, startedAt: waitingRequestStartedAt });+ }+ }, [isRunning, sessionId, waitingRequestStartedAt]);++ const retainedRequestStartedAt =+ sessionId && retainedRequest?.sessionId === sessionId+ ? retainedRequest.startedAt+ : undefined;+ const currentRequestStartedAt =+ waitingRequestStartedAt ??+ (modelRequestActivity?.phase === "retrying"+ ? retainedRequestStartedAt ?? modelRequestActivity.since+ : undefined) ??+ (streamingMessageStartedAt+ ? retainedRequestStartedAt ?? Date.parse(streamingMessageStartedAt)+ : undefined);++ useEffect(() => {+ if (!enabled) return;+ setNow(Date.now());+ const interval = window.setInterval(() => setNow(Date.now()), 1_000);+ return () => window.clearInterval(interval);+ }, [enabled]);++ useEffect(() => {+ if (!enabled || !sessionId || !hasMoreBefore || messageStart <= 0) return;++ const cachedTiming = historyCache.current.get(sessionId);+ if (cachedTiming?.key === historyKey) {+ historyCache.current.delete(sessionId);+ historyCache.current.set(sessionId, cachedTiming);+ setHistoryLoad({+ key: historyKey,+ status: "ready",+ durationMs: cachedTiming.durationMs,+ });+ return;+ }++ const controller = new AbortController();+ setHistoryLoad({ key: historyKey, status: "loading", durationMs: 0 });+ void loadEarlierModelResponseDuration(+ messageStart,+ async (options) => {+ const result = await api.getSession(sessionId, options);+ return result.session+ ? {+ messages: result.session.messages,+ messageStart: result.session.messageStart,+ hasMoreBefore: result.session.hasMoreBefore,+ }+ : null;+ },+ controller.signal,+ ).then(+ (durationMs) => {+ if (controller.signal.aborted) return;+ if (+ !historyCache.current.has(sessionId) &&+ historyCache.current.size >= MAX_CACHED_SESSION_TIMINGS+ ) {+ const oldestSessionId = historyCache.current.keys().next().value;+ if (oldestSessionId) historyCache.current.delete(oldestSessionId);+ }+ historyCache.current.set(sessionId, { key: historyKey, durationMs });+ setHistoryLoad({ key: historyKey, status: "ready", durationMs });+ },+ () => {+ if (controller.signal.aborted) return;+ setHistoryLoad({ key: historyKey, status: "error", durationMs: 0 });+ },+ );++ return () => controller.abort();+ }, [enabled, hasMoreBefore, historyKey, messageStart, sessionId]);++ const historyStatus = !hasMoreBefore+ ? "ready"+ : historyLoad?.key === historyKey+ ? historyLoad.status+ : "loading";+ const timing = enabled && session+ ? calculateSessionTiming({+ createdAt: session.createdAt,+ updatedAt: session.updatedAt,+ isRunning,+ messages,+ now,+ earlierModelResponseMs:+ historyStatus === "ready" && historyLoad?.key === historyKey+ ? historyLoad.durationMs+ : 0,+ activeModelRequestStartedAt: currentRequestStartedAt,+ })+ : undefined;++ return { timing, historyStatus };+}diff --git a/apps/desktop/src/lib/session-timing.ts b/apps/desktop/src/lib/session-timing.tsnew file mode 100644index 000000000..6dc5c40eb--- /dev/null+++ b/apps/desktop/src/lib/session-timing.ts@@ -0,0 +1,142 @@+import type { UiMessage } from "@pi-desktop/shared";++export type SessionTimingMessage = Pick<+ UiMessage,+ "role" | "responseDurationMs" | "parentToolCallId" | "nestedParentToolCallId" | "status" | "createdAt"+>;++export type SessionTimingPage = {+ messages?: SessionTimingMessage[];+ messageStart?: number;+ hasMoreBefore?: boolean;+};++export type SessionTiming = {+ elapsedMs: number;+ modelResponseMs: number;+ modelResponsePercent?: number;+};++const SESSION_TIMING_PAGE_SIZE = 1_000;+const SESSION_TIMING_CONTENT_LIMIT = 256;++/** Sum completed top-level model responses. Delegate calls can overlap. */+export function sumModelResponseDuration(+ messages: readonly SessionTimingMessage[],+): number {+ return messages.reduce((total, message) => {+ if (+ message.role !== "assistant" ||+ message.parentToolCallId ||+ message.nestedParentToolCallId+ ) {+ return total;+ }+ const duration = message.responseDurationMs;+ return typeof duration === "number" && Number.isFinite(duration) && duration > 0+ ? total + duration+ : total;+ }, 0);+}++/**+ * Read earlier transcript pages for the response durations omitted from the+ * renderer's bounded transcript window. The callback keeps this helper+ * independent of the IPC transport and easy to test.+ */+export async function loadEarlierModelResponseDuration(+ messageBefore: number,+ readPage: (options: {+ messageBefore: number;+ messageLimit: number;+ contentLimit: number;+ }) => Promise<SessionTimingPage | null>,+ signal?: AbortSignal,+): Promise<number> {+ let before = messageBefore;+ let total = 0;++ while (before > 0) {+ if (signal?.aborted) return total;+ const page = await readPage({+ messageBefore: before,+ messageLimit: SESSION_TIMING_PAGE_SIZE,+ contentLimit: SESSION_TIMING_CONTENT_LIMIT,+ });+ if (signal?.aborted) return total;+ if (!page) throw new Error("Session timing history is unavailable");++ total += sumModelResponseDuration(page.messages ?? []);+ if (page.hasMoreBefore !== true) return total;++ const nextBefore = page.messageStart;+ if (+ typeof nextBefore !== "number" ||+ !Number.isInteger(nextBefore) ||+ nextBefore < 0 ||+ nextBefore >= before+ ) {+ throw new Error("Session timing history did not advance");+ }+ before = nextBefore;+ }++ return total;+}++export function calculateSessionTiming({+ createdAt,+ updatedAt,+ isRunning,+ messages,+ now,+ earlierModelResponseMs = 0,+ activeModelRequestStartedAt,+}: {+ createdAt: string;+ updatedAt: string;+ isRunning: boolean;+ messages: readonly SessionTimingMessage[];+ now: number;+ earlierModelResponseMs?: number;+ activeModelRequestStartedAt?: number;+}): SessionTiming | undefined {+ const startedAt = Date.parse(createdAt);+ if (!Number.isFinite(startedAt)) return undefined;++ const updatedAtMs = Date.parse(updatedAt);+ const endedAt = isRunning || !Number.isFinite(updatedAtMs) ? now : updatedAtMs;+ const elapsedMs = Math.max(0, endedAt - startedAt);+ const streamingMessageStartedAt = [...messages]+ .reverse()+ .find(+ (message) =>+ message.role === "assistant" &&+ !message.parentToolCallId &&+ !message.nestedParentToolCallId &&+ message.status === "streaming",+ )?.createdAt;+ const streamingStartedAt = streamingMessageStartedAt+ ? Date.parse(streamingMessageStartedAt)+ : Number.NaN;+ const activeStartedAt = Number.isFinite(activeModelRequestStartedAt)+ ? activeModelRequestStartedAt+ : streamingStartedAt;+ const activeModelResponseMs =+ isRunning &&+ typeof activeStartedAt === "number" &&+ Number.isFinite(activeStartedAt)+ ? Math.max(0, now - activeStartedAt)+ : 0;+ const modelResponseMs =+ Math.max(0, earlierModelResponseMs) ++ sumModelResponseDuration(messages) ++ activeModelResponseMs;++ return {+ elapsedMs,+ modelResponseMs,+ modelResponsePercent:+ elapsedMs > 0 ? Math.round((modelResponseMs / elapsedMs) * 100) : undefined,+ };+}diff --git a/apps/desktop/test/session-timing.test.mjs b/apps/desktop/test/session-timing.test.mjsnew file mode 100644index 000000000..8c4c231b5--- /dev/null+++ b/apps/desktop/test/session-timing.test.mjs@@ -0,0 +1,113 @@+import assert from "node:assert/strict";+import test from "node:test";+import {+ calculateSessionTiming,+ loadEarlierModelResponseDuration,+ sumModelResponseDuration,+} from "../src/lib/session-timing.ts";++test("session response duration sums top-level model responses only", () => {+ assert.equal(+ sumModelResponseDuration([+ { role: "assistant", responseDurationMs: 1_250 },+ { role: "assistant", responseDurationMs: 2_000, parentToolCallId: "task-1" },+ { role: "assistant", responseDurationMs: 3_000, nestedParentToolCallId: "call-1" },+ { role: "tool", responseDurationMs: 4_000 },+ { role: "assistant", responseDurationMs: Number.NaN },+ { role: "assistant", responseDurationMs: -50 },+ ]),+ 1_250,+ );+});++test("session timing uses elapsed wall time and includes the live model request", () => {+ const messages = [+ { role: "assistant", responseDurationMs: 2_500 },+ { role: "assistant", responseDurationMs: 1_500 },+ ];+ const idle = calculateSessionTiming({+ createdAt: "2026-10-01T00:00:00.000Z",+ updatedAt: "2026-10-01T00:00:10.000Z",+ isRunning: false,+ messages,+ now: Date.parse("2026-10-01T00:00:12.000Z"),+ });+ assert.deepEqual(idle, {+ elapsedMs: 10_000,+ modelResponseMs: 4_000,+ modelResponsePercent: 40,+ });++ const running = calculateSessionTiming({+ createdAt: "2026-10-01T00:00:00.000Z",+ updatedAt: "2026-10-01T00:00:10.000Z",+ isRunning: true,+ messages,+ now: Date.parse("2026-10-01T00:00:12.000Z"),+ activeModelRequestStartedAt: Date.parse("2026-10-01T00:00:09.000Z"),+ });+ assert.deepEqual(running, {+ elapsedMs: 12_000,+ modelResponseMs: 7_000,+ modelResponsePercent: 58,+ });++ const streaming = calculateSessionTiming({+ createdAt: "2026-10-01T00:00:00.000Z",+ updatedAt: "2026-10-01T00:00:10.000Z",+ isRunning: true,+ messages: [+ ...messages,+ {+ role: "assistant",+ status: "streaming",+ createdAt: "2026-10-01T00:00:10.000Z",+ },+ ],+ now: Date.parse("2026-10-01T00:00:12.000Z"),+ });+ assert.equal(streaming?.modelResponseMs, 6_000);+ assert.equal(streaming?.modelResponsePercent, 50);+});++test("earlier response durations load through bounded transcript pages", async () => {+ const pages = new Map([+ [2_500, {+ messages: [{ role: "assistant", responseDurationMs: 1_000 }],+ messageStart: 1_500,+ hasMoreBefore: true,+ }],+ [1_500, {+ messages: [{ role: "assistant", responseDurationMs: 2_000 }],+ messageStart: 500,+ hasMoreBefore: true,+ }],+ [500, {+ messages: [{ role: "assistant", responseDurationMs: 3_000 }],+ messageStart: 0,+ hasMoreBefore: false,+ }],+ ]);+ const reads = [];++ const durationMs = await loadEarlierModelResponseDuration(2_500, async (options) => {+ reads.push(options);+ return pages.get(options.messageBefore) ?? null;+ });++ assert.equal(durationMs, 6_000);+ assert.deepEqual(reads.map((read) => read.messageBefore), [2_500, 1_500, 500]);+ assert.ok(reads.every((read) => read.messageLimit === 1_000));+ assert.ok(reads.every((read) => read.contentLimit === 256));+});++test("earlier timing pages fail visibly when their cursor does not advance", async () => {+ await assert.rejects(+ loadEarlierModelResponseDuration(250, async () => ({+ messages: [],+ messageStart: 250,+ hasMoreBefore: true,+ })),+ /did not advance/,+ );+});diff --git a/apps/desktop/test/transcript-style.test.mjs b/apps/desktop/test/transcript-style.test.mjsindex b9c78eb54..0c97e1482 100644--- a/apps/desktop/test/transcript-style.test.mjs+++ b/apps/desktop/test/transcript-style.test.mjs@@ -472,6 +472,10 @@ test("assistant context inspector keeps a compact summary and retry action wiredassert.match(inspectorSource, /context-inspector-summary-row/);assert.match(inspectorSource, /chat\.usageToolsSummary/);assert.match(inspectorSource, /context-inspector-kpis/);+ assert.match(inspectorSource, /useSessionTiming/);+ assert.match(inspectorSource, /chat\.usageSessionTime/);+ assert.match(inspectorSource, /chat\.usageModelResponse/);+ assert.match(inspectorSource, /modelResponsePercent/);assert.match(inspectorSource, /context-inspector-window-percent/);assert.match(inspectorSource, /chat\.usageContextLeft/);assert.match(inspectorSource, /chat\.usageThroughput/);diff --git a/docs/spec/04-ux/09-interaction-patterns.md b/docs/spec/04-ux/09-interaction-patterns.mdindex 41e3d7769..fe3d6aa2d 100644--- a/docs/spec/04-ux/09-interaction-patterns.md+++ b/docs/spec/04-ux/09-interaction-patterns.md@@ -857,6 +857,12 @@ may be retained while exactly one workspace supplies the visible shell context.- The context usage inspector keeps one muted line for the newest checkpoint,shown while its panel is open — the count and summary cost sit below thecompact model/tool usage summaries without adding explanatory copy.+- The open context usage inspector also shows the session's elapsed wall time+ and the cumulative duration of its top-level model responses. The response+ percentage compares those recorded request-to-completion durations with the+ session span; nested delegate responses are excluded because they may overlap.+ Long transcripts load earlier response timings in bounded pages only while+ the inspector is open.## 4. Long content collapse / expanddiff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.mdindex 85847e370..07dc85b07 100644--- a/docs/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/spec/06-delivery/04-e2e-test-plan.md@@ -4804,9 +4804,12 @@ must keep splitting are covered by `markdown-blocks.test.mjs`.badge and no context inspector under the answer. 3) Hover the composertoolbar inspector trigger, confirm the panel stays closed, then click it.4) Inspect the remaining-token-plus-percentage heading, used/window counts,- unboxed turn/speed values, one inline provider-usage summary, and one- aggregate tool-usage summary, with no doubled heading rule and no inner- section hairlines. 5) Scroll the transcript and resize the window while the+ unboxed turn/speed values, session duration, cumulative model response time+ with its share of session duration, one inline provider-usage summary, and+ one aggregate tool-usage summary, with no doubled heading rule and no inner+ section hairlines. For a transcript with more than one loaded page, wait for+ the earlier response timings to finish loading and confirm the cumulative+ value includes them. 5) Scroll the transcript and resize the window while thepanel is open. Toggle and resize the sidebar and work panel while the panelremains open. 6) Move the pointer away from the panel, then dismiss it byclicking the trigger again, clicking outside it, and pressing Escape from@@ -4824,7 +4827,11 @@ must keep splitting are covered by `markdown-blocks.test.mjs`.warning/error states; click or keyboard activation toggles the same compactsummary while pointer hover alone never opens or closes it. An open panelsurvives the pointer leaving it and closes on a second trigger activation,- an outside click, or Escape, which returns focus to the trigger. Provider+ an outside click, or Escape, which returns focus to the trigger. Session+ duration runs from session creation to the latest activity (or to now while+ running); cumulative model response time sums recorded top-level model+ request durations and its percentage is relative to that wall-time span.+ Earlier transcript pages load only while the inspector is open. Providervalues remain exact, tool values remain visibly approximate through the `~`aggregate total, and no per-tool list, source badge, progress bar, orexplanatory estimate paragraph is rendered. Occupancy, turn total, anddiff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.tsindex 5d26b50d2..2174073fd 100644--- a/packages/i18n/src/locales/de/index.ts+++ b/packages/i18n/src/locales/de/index.ts@@ -377,6 +377,9 @@ export const de = {"usageThroughput": "{{count}} Tokens/s","usageThroughputEstimated": "≈ {{count}} Tokens/s","usageThroughputUnavailable": "–",+ "usageSessionTime": "Gesamtdauer der Sitzung",+ "usageModelResponse": "Modellantwortzeit",+ "usageTimingUnavailable": "Nicht verfügbar","usageProviderUsage": "Anbieternutzung","usageInput": "Eingabe","usageOutput": "Ausgabe",diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.tsindex b1bf321d2..5a68c8f89 100644--- a/packages/i18n/src/locales/en/index.ts+++ b/packages/i18n/src/locales/en/index.ts@@ -392,6 +392,9 @@ export const en = {usageThroughput: "{{count}} tokens/s",usageThroughputEstimated: "≈ {{count}} tokens/s",usageThroughputUnavailable: "—",+ usageSessionTime: "Total session time",+ usageModelResponse: "Model response time",+ usageTimingUnavailable: "Unavailable",usageProviderUsage: "Provider usage",usageInput: "Input",usageOutput: "Output",diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.tsindex 2326d6271..89920d384 100644--- a/packages/i18n/src/locales/es/index.ts+++ b/packages/i18n/src/locales/es/index.ts@@ -377,6 +377,9 @@ export const es = {"usageThroughput": "{{count}} tokens/s","usageThroughputEstimated": "≈ {{count}} tokens/s","usageThroughputUnavailable": "—",+ "usageSessionTime": "Tiempo total de sesión",+ "usageModelResponse": "Tiempo de respuesta del modelo",+ "usageTimingUnavailable": "No disponible","usageProviderUsage": "Uso del proveedor","usageInput": "Entrada","usageOutput": "Salida",diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.tsindex e4ea64575..66a2b095e 100644--- a/packages/i18n/src/locales/fr/index.ts+++ b/packages/i18n/src/locales/fr/index.ts@@ -377,6 +377,9 @@ export const fr = {"usageThroughput": "{{count}} jetons/s","usageThroughputEstimated": "≈ {{count}} jetons/s","usageThroughputUnavailable": "—",+ "usageSessionTime": "Durée totale de la session",+ "usageModelResponse": "Temps de réponse du modèle",+ "usageTimingUnavailable": "Indisponible","usageProviderUsage": "Utilisation du fournisseur","usageInput": "Entrée","usageOutput": "Sortie",diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.tsindex 61ac89478..6cdcd6784 100644--- a/packages/i18n/src/locales/ko/index.ts+++ b/packages/i18n/src/locales/ko/index.ts@@ -389,6 +389,9 @@ export const ko = {usageThroughput: "{{count}} tokens/s",usageThroughputEstimated: "≈ {{count}} tokens/s",usageThroughputUnavailable: "—",+ usageSessionTime: "총 세션 시간",+ usageModelResponse: "모델 응답 시간",+ usageTimingUnavailable: "사용할 수 없음",usageProviderUsage: "프로바이더 사용량",usageInput: "입력",usageOutput: "출력",diff --git a/packages/i18n/src/locales/pt-BR/index.ts b/packages/i18n/src/locales/pt-BR/index.tsindex 40756dc9e..5d34132c9 100644--- a/packages/i18n/src/locales/pt-BR/index.ts+++ b/packages/i18n/src/locales/pt-BR/index.ts@@ -379,6 +379,9 @@ export const ptBR = {usageThroughput: "{{count}} tokens/s",usageThroughputEstimated: "≈ {{count}} tokens/s",usageThroughputUnavailable: "—",+ usageSessionTime: "Tempo total da sessão",+ usageModelResponse: "Tempo de resposta do modelo",+ usageTimingUnavailable: "Indisponível",usageProviderUsage: "Uso do provedor",usageInput: "Entrada",usageOutput: "Saída",diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.tsindex 52ea12aba..8518d5c01 100644--- a/packages/i18n/src/locales/tr/index.ts+++ b/packages/i18n/src/locales/tr/index.ts@@ -389,6 +389,9 @@ export const tr = {usageThroughput: "{{count}} token/sn",usageThroughputEstimated: "≈ {{count}} token/sn",usageThroughputUnavailable: "—",+ usageSessionTime: "Toplam oturum süresi",+ usageModelResponse: "Model yanıt süresi",+ usageTimingUnavailable: "Kullanılamıyor",usageProviderUsage: "Servis kullanımı",usageInput: "Girdi",usageOutput: "Çıktı",diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.tsindex 4534ac5b5..2cb5ffd44 100644--- a/packages/i18n/src/locales/zh-CN/index.ts+++ b/packages/i18n/src/locales/zh-CN/index.ts@@ -382,6 +382,9 @@ export const zhCN = {usageThroughput: "{{count}} tokens/s",usageThroughputEstimated: "约 {{count}} tokens/s",usageThroughputUnavailable: "—",+ usageSessionTime: "会话总耗时",+ usageModelResponse: "模型响应耗时",+ usageTimingUnavailable: "暂不可用",usageProviderUsage: "模型用量",usageInput: "输入",usageOutput: "输出",diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.tsindex 7a368322b..f8fdffe61 100644--- a/packages/i18n/src/locales/zh-TW/index.ts+++ b/packages/i18n/src/locales/zh-TW/index.ts@@ -382,6 +382,9 @@ export const zhTW = {usageThroughput: "{{count}} tokens/s",usageThroughputEstimated: "約 {{count}} tokens/s",usageThroughputUnavailable: "—",+ usageSessionTime: "工作階段總耗時",+ usageModelResponse: "模型回應耗時",+ usageTimingUnavailable: "暫時無法使用",usageProviderUsage: "模型用量",usageInput: "輸入",usageOutput: "輸出",diff --git a/packages/shared/src/changelog-de.ts b/packages/shared/src/changelog-de.tsindex 90870f3e9..8899a6ed9 100644--- a/packages/shared/src/changelog-de.ts+++ b/packages/shared/src/changelog-de.ts@@ -14,6 +14,7 @@ export const deEntries: ChangelogEntry[] = ["Die Modellliste im Composer zeigt jetzt konfigurierte Kontextfensterlimits.","Plugins können Netzwerkweiterleitungen prüfen oder ablehnen; bestehende Fetch-Aufrufe folgen Weiterleitungen weiterhin standardmäßig.","Stoppen Sie einen laufenden Unteragenten direkt über seine Karte oder Detailansicht oder alle Unteragenten der aktuellen Sitzung, ohne den Hauptagenten zu stoppen.",+ "Sehen Sie die gesamte Sitzungsdauer, die kumulierte Modellantwortzeit und deren Anteil an der Sitzung im Kontextverbrauchsfenster.",],},{diff --git a/packages/shared/src/changelog-en.ts b/packages/shared/src/changelog-en.tsindex 3e17b036f..edb426786 100644--- a/packages/shared/src/changelog-en.ts+++ b/packages/shared/src/changelog-en.ts@@ -14,6 +14,7 @@ export const enEntries: ChangelogEntry[] = ["Show configured context-window limits in the Composer's model list.","Plugins can inspect or refuse network redirects; existing fetch calls still follow redirects by default.","Stop a running subagent directly from its card or detail panel, or stop all subagents in the current session without stopping the coordinator.",+ "See total session time beside cumulative model response time and its share of the session.",],},{diff --git a/packages/shared/src/changelog-es.ts b/packages/shared/src/changelog-es.tsindex 799b6568c..9f3237132 100644--- a/packages/shared/src/changelog-es.ts+++ b/packages/shared/src/changelog-es.ts@@ -14,6 +14,7 @@ export const esEntries: ChangelogEntry[] = ["La lista de modelos del Composer ahora muestra los límites de contexto configurados.","Los plugins pueden inspeccionar o rechazar redirecciones de red; las llamadas fetch existentes siguen las redirecciones de forma predeterminada.","Detén un subagente en ejecución desde su tarjeta o panel de detalles, o todos los de la sesión actual, sin detener al coordinador.",+ "Consulta la duración total de la sesión, el tiempo acumulado de respuesta del modelo y su proporción en el panel de uso del contexto.",],},{diff --git a/packages/shared/src/changelog-fr.ts b/packages/shared/src/changelog-fr.tsindex 260114fbd..d213fa08a 100644--- a/packages/shared/src/changelog-fr.ts+++ b/packages/shared/src/changelog-fr.ts@@ -14,6 +14,7 @@ export const frEntries: ChangelogEntry[] = ["La liste des modèles du Composer affiche maintenant les limites de contexte configurées.","Les plugins peuvent inspecter ou refuser les redirections réseau ; les appels fetch existants continuent de les suivre par défaut.","Arrêtez un sous-agent en cours depuis sa carte ou ses détails, ou tous ceux de la session en cours, sans arrêter le coordinateur.",+ "Consultez la durée totale de la session, le temps de réponse cumulé du modèle et sa part dans le panneau d'utilisation du contexte.",],},{diff --git a/packages/shared/src/changelog-ko.ts b/packages/shared/src/changelog-ko.tsindex 6aca878a1..605a500ef 100644--- a/packages/shared/src/changelog-ko.ts+++ b/packages/shared/src/changelog-ko.ts@@ -14,6 +14,7 @@ export const koEntries: ChangelogEntry[] = ["Composer의 모델 목록에 설정된 컨텍스트 창 한도가 표시됩니다.","플러그인은 네트워크 리디렉션을 검사하거나 거부할 수 있으며, 기존 fetch 호출은 기본적으로 계속 리디렉션을 따릅니다.","카드나 상세 패널에서 실행 중인 하위 에이전트를 개별적으로 또는 현재 세션의 모든 하위 에이전트를 중지해도 주 에이전트는 계속 실행됩니다.",+ "컨텍스트 사용량 패널에서 총 세션 시간, 누적 모델 응답 시간과 세션 내 비율을 확인하세요.",],},{diff --git a/packages/shared/src/changelog-pt-BR.ts b/packages/shared/src/changelog-pt-BR.tsindex 6a4b562d0..7155ef991 100644--- a/packages/shared/src/changelog-pt-BR.ts+++ b/packages/shared/src/changelog-pt-BR.ts@@ -14,6 +14,7 @@ export const ptBREntries: ChangelogEntry[] = ["A lista de modelos do Composer agora mostra os limites de contexto configurados.","Plugins podem inspecionar ou recusar redirecionamentos de rede; chamadas fetch existentes continuam seguindo redirecionamentos por padrão.","Pare um subagente em execução pelo cartão ou painel de detalhes, ou todos os subagentes da sessão atual, sem parar o coordenador.",+ "Veja o tempo total da sessão, o tempo acumulado de resposta do modelo e sua proporção no painel de uso de contexto.",],},{diff --git a/packages/shared/src/changelog-tr.ts b/packages/shared/src/changelog-tr.tsindex 455804840..7608e50f7 100644--- a/packages/shared/src/changelog-tr.ts+++ b/packages/shared/src/changelog-tr.ts@@ -14,6 +14,7 @@ export const trEntries: ChangelogEntry[] = ["Composer'ın model listesi artık yapılandırılmış bağlam penceresi sınırlarını gösterir.","Eklentiler ağ yönlendirmelerini inceleyebilir veya reddedebilir; mevcut fetch çağrıları varsayılan olarak yönlendirmeleri izlemeyi sürdürür.","Çalışan bir alt ajanı kartından veya ayrıntı panelinden ya da geçerli oturumdaki tüm alt ajanları koordinatörü durdurmadan durdurabilirsiniz.",+ "Bağlam kullanımı panelinde toplam oturum süresini, birikimli model yanıt süresini ve oturum içindeki payını görün.",],},{diff --git a/packages/shared/src/changelog-zh-CN.ts b/packages/shared/src/changelog-zh-CN.tsindex bca2f9d98..8c999ddca 100644--- a/packages/shared/src/changelog-zh-CN.ts+++ b/packages/shared/src/changelog-zh-CN.ts@@ -14,6 +14,7 @@ export const zhCNEntries: ChangelogEntry[] = ["Composer 的模型列表现在会显示已配置的上下文窗口上限。","插件可查询支持的重定向模式,并选择检查或拒绝网络重定向;现有请求默认仍会跟随重定向。","可从卡片或详情停止正在运行的子智能体,也可停止当前会话中的全部子智能体,主智能体会继续运行。",+ "在上下文用量面板查看会话总耗时、模型响应累计耗时及其占比。",],},{diff --git a/packages/shared/src/changelog-zh-TW.ts b/packages/shared/src/changelog-zh-TW.tsindex cae3a21ea..a069eef34 100644--- a/packages/shared/src/changelog-zh-TW.ts+++ b/packages/shared/src/changelog-zh-TW.ts@@ -14,6 +14,7 @@ export const zhTWEntries: ChangelogEntry[] = ["Composer 的模型清單現在會顯示已設定的上下文視窗上限。","外掛可查詢支援的重新導向模式,並選擇檢查或拒絕網路重新導向;現有請求預設仍會跟隨重新導向。","可從卡片或詳情停止執行中的子智能體,也可停止目前工作階段的全部子智能體,主智能體會繼續執行。",+ "在上下文用量面板查看工作階段總耗時、模型回應累計耗時及其占比。",],},{