fix(app): omit notices from Used summary (#47245)

Co-authored-by: Brendonovich <14191578+Brendonovich@users.noreply.github.com>
Co-authored-by: Brendan Allan <git@brendonovich.dev>
This commit is contained in:
opencode-agent[bot]
2026-09-04 09:13:00 +00:00
committed by GitHub
parent e8481973ce
commit b09a74591c
2 changed files with 7 additions and 6 deletions
@@ -528,12 +528,12 @@ export function CurrentContextToolGroup(props: {
.join(", "),
)
const label = createMemo(() => {
const notices = props.parts.filter((part) => part.type === "notice").length
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 thoughts = props.parts.filter((part) => part.type === "reasoning").length
if (!names() && !thoughts) {
const title = i18n.t("ui.messagePart.context.details")
return { text: title, title, before: "", after: "" }
}
const title = names() || i18n.plural("ui.messagePart.context.thought", thoughts)
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() }
+1
View File
@@ -104,6 +104,7 @@ const source = {
"ui.messagePart.review.title": "Review your answers",
"ui.messagePart.questions.dismissed": "Questions dismissed",
"ui.messagePart.compaction": "Session compacted",
"ui.messagePart.context.details": "Details",
"ui.messagePart.context.read.one": "{{count}} read",
"ui.messagePart.context.read.other": "{{count}} reads",
"ui.messagePart.context.search.one": "{{count}} search",