diff --git a/packages/app/e2e/regression/session-timeline-reasoning-projection.spec.ts b/packages/app/e2e/regression/session-timeline-reasoning-projection.spec.ts index 114ae780287..82fc49a55b7 100644 --- a/packages/app/e2e/regression/session-timeline-reasoning-projection.spec.ts +++ b/packages/app/e2e/regression/session-timeline-reasoning-projection.spec.ts @@ -42,7 +42,7 @@ test("changes timeline presets and saves custom thinking details", async ({ page .toEqual({ placement: "grouped", details: "collapsed" }) await settings.getByRole("button", { name: "Back to app", exact: true }).click() await expect(settings).toBeHidden() - await page.getByRole("button", { name: "Reasoning", exact: true }).click() + await page.getByRole("button", { name: "Used 1 Thought", exact: true }).click() await expect(part.getByRole("button")).toHaveAttribute("aria-expanded", "false") await part.getByRole("button").click() await expect(part.getByText("The selected mode controls these details.", { exact: true })).toBeVisible() diff --git a/packages/session-ui/src/tools/tool-renderer.tsx b/packages/session-ui/src/tools/tool-renderer.tsx index ea6f4cd9e4f..0946d736a5d 100644 --- a/packages/session-ui/src/tools/tool-renderer.tsx +++ b/packages/session-ui/src/tools/tool-renderer.tsx @@ -529,13 +529,11 @@ export function CurrentContextToolGroup(props: { ) const label = createMemo(() => { const notices = props.parts.filter((part) => part.type === "notice").length - if (!names() && !notices) { - const title = i18n.t("ui.messagePart.context.reasoning") - return { text: title, title, before: "", after: "" } - } - const title = [names(), notices ? i18n.plural("ui.messagePart.context.notice", notices) : undefined] - .filter(Boolean) - .join(", ") + const title = + [names(), notices ? i18n.plural("ui.messagePart.context.notice", notices) : undefined] + .filter(Boolean) + .join(", ") || + i18n.plural("ui.messagePart.context.thought", props.parts.filter((part) => part.type === "reasoning").length) const text = i18n.t("ui.messagePart.tools.used", { tools: title }) const index = text.indexOf(title) return { text, title, before: text.slice(0, index).trim(), after: text.slice(index + title.length).trim() } diff --git a/packages/ui/src/i18n/en.ts b/packages/ui/src/i18n/en.ts index feee34b1aa6..f26534b52b2 100644 --- a/packages/ui/src/i18n/en.ts +++ b/packages/ui/src/i18n/en.ts @@ -110,7 +110,8 @@ const source = { "ui.messagePart.context.list.other": "{{count}} lists", "ui.messagePart.context.notice.one": "{{count}} Notice", "ui.messagePart.context.notice.other": "{{count}} Notices", - "ui.messagePart.context.reasoning": "Reasoning", + "ui.messagePart.context.thought.one": "{{count}} Thought", + "ui.messagePart.context.thought.other": "{{count}} Thoughts", "ui.messagePart.context.match.one": "({{count}} match)", "ui.messagePart.context.match.other": "({{count}} matches)", "ui.messagePart.tools.used": "Used {{tools}}",