Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Train fix (#7963, #7880): usage beside the model as bars or one ring, and an order for the composer's buttons
milind-soni556b878554a3
diff --git a/packages/phone-protocol/src/app-settings.ts b/packages/phone-protocol/src/app-settings.tsindex 1c7f5a5f9f..16f27b2f54 100644--- a/packages/phone-protocol/src/app-settings.ts+++ b/packages/phone-protocol/src/app-settings.ts@@ -49,6 +49,9 @@ export const CHAT_WIDTH_IDS = ["standard", "wide", "full"] as const;export const SEND_KEYS = ["enter", "shift-enter", "mod-enter"] as const;export const PLACE_SWATCHES = ["blue", "green", "amber", "rose", "violet", "slate"] as const;export const TALK_KEYS = ["ctrl-opt-space", "ctrl-shift-space", "opt-shift-space"] as const;+/** The composer's end buttons, by name, in the order Advanced mode may draw them; today's order is the default. */+export const COMPOSER_BUTTONS = ["stop", "context", "mic", "call", "send"] as const;+export const USAGE_INDICATORS = ["bars", "ring"] as const;const pinnedPage = z.object({ name: z.string().trim().min(1).max(40), url: z.string().trim().max(2048).regex(/^https?:\/\/\S+$/, "an http(s) address") }).strict();/** Preferences kept in the window or behind the desktop app's own bridge, by setting id; the renderer applies a frame with@@ -66,6 +69,8 @@ export const WINDOW_PREFS = {"appearance.pinnedCircles": z.boolean(),"appearance.universalPins": z.boolean(),"appearance.pinnedPages": z.array(pinnedPage).max(6),+ "appearance.usageIndicator": z.enum(USAGE_INDICATORS),+ "appearance.composerOrder": z.array(z.enum(COMPOSER_BUTTONS)).max(COMPOSER_BUTTONS.length).refine((order) => new Set(order).size === order.length, "each button once"),"appearance.showComputers": z.boolean(),"appearance.windowFrame": z.boolean(),"appearance.sidebarColor": z.enum([...PLACE_SWATCHES, "none"]),diff --git a/screenshots/issue-5889/after-1440-daylight-focus.png b/screenshots/issue-5889/after-1440-daylight-focus.pngdeleted file mode 100644index 0e7bbc4046..0000000000Binary files a/screenshots/issue-5889/after-1440-daylight-focus.png and /dev/null differdiff --git a/screenshots/issue-5889/after-1440-daylight.png b/screenshots/issue-5889/after-1440-daylight.pngdeleted file mode 100644index 4e840fc194..0000000000Binary files a/screenshots/issue-5889/after-1440-daylight.png and /dev/null differdiff --git a/screenshots/issue-5889/after-1440-midnight.png b/screenshots/issue-5889/after-1440-midnight.pngdeleted file mode 100644index b7e9b63cae..0000000000Binary files a/screenshots/issue-5889/after-1440-midnight.png and /dev/null differdiff --git a/screenshots/issue-5889/after-390-daylight.png b/screenshots/issue-5889/after-390-daylight.pngdeleted file mode 100644index aee0e7dcb3..0000000000Binary files a/screenshots/issue-5889/after-390-daylight.png and /dev/null differdiff --git a/screenshots/issue-5889/before-1440-daylight.png b/screenshots/issue-5889/before-1440-daylight.pngdeleted file mode 100644index ee69397db6..0000000000Binary files a/screenshots/issue-5889/before-1440-daylight.png and /dev/null differdiff --git a/screenshots/issue-5889/before-1440-midnight.png b/screenshots/issue-5889/before-1440-midnight.pngdeleted file mode 100644index 23a5f6fb45..0000000000Binary files a/screenshots/issue-5889/before-1440-midnight.png and /dev/null differdiff --git a/screenshots/issue-5889/before-390-daylight.png b/screenshots/issue-5889/before-390-daylight.pngdeleted file mode 100644index 15d0a4e95c..0000000000Binary files a/screenshots/issue-5889/before-390-daylight.png and /dev/null differdiff --git a/screenshots/issue-6471/after-1440-daylight.png b/screenshots/issue-6471/after-1440-daylight.pngdeleted file mode 100644index c670ae578b..0000000000Binary files a/screenshots/issue-6471/after-1440-daylight.png and /dev/null differdiff --git a/screenshots/issue-6471/after-1440-midnight.png b/screenshots/issue-6471/after-1440-midnight.pngdeleted file mode 100644index 39b6fabdbc..0000000000Binary files a/screenshots/issue-6471/after-1440-midnight.png and /dev/null differdiff --git a/screenshots/issue-6471/after-390-daylight.png b/screenshots/issue-6471/after-390-daylight.pngdeleted file mode 100644index 7417b77299..0000000000Binary files a/screenshots/issue-6471/after-390-daylight.png and /dev/null differdiff --git a/screenshots/issue-6471/after-390-midnight.png b/screenshots/issue-6471/after-390-midnight.pngdeleted file mode 100644index cf0a01ed22..0000000000Binary files a/screenshots/issue-6471/after-390-midnight.png and /dev/null differdiff --git a/screenshots/issue-6471/after-768-daylight.png b/screenshots/issue-6471/after-768-daylight.pngdeleted file mode 100644index 25da1af558..0000000000Binary files a/screenshots/issue-6471/after-768-daylight.png and /dev/null differdiff --git a/screenshots/issue-6471/after-768-midnight.png b/screenshots/issue-6471/after-768-midnight.pngdeleted file mode 100644index 5536c89bc1..0000000000Binary files a/screenshots/issue-6471/after-768-midnight.png and /dev/null differdiff --git a/screenshots/issue-6471/before-1440-daylight.png b/screenshots/issue-6471/before-1440-daylight.pngdeleted file mode 100644index e3fe21f2ae..0000000000Binary files a/screenshots/issue-6471/before-1440-daylight.png and /dev/null differdiff --git a/screenshots/issue-6471/before-1440-midnight.png b/screenshots/issue-6471/before-1440-midnight.pngdeleted file mode 100644index 32beb90586..0000000000Binary files a/screenshots/issue-6471/before-1440-midnight.png and /dev/null differdiff --git a/screenshots/issue-6471/before-390-daylight.png b/screenshots/issue-6471/before-390-daylight.pngdeleted file mode 100644index ab1fdf0591..0000000000Binary files a/screenshots/issue-6471/before-390-daylight.png and /dev/null differdiff --git a/screenshots/issue-6471/before-390-midnight.png b/screenshots/issue-6471/before-390-midnight.pngdeleted file mode 100644index 770fd0a156..0000000000Binary files a/screenshots/issue-6471/before-390-midnight.png and /dev/null differdiff --git a/screenshots/issue-6471/before-768-daylight.png b/screenshots/issue-6471/before-768-daylight.pngdeleted file mode 100644index 30e88c9f17..0000000000Binary files a/screenshots/issue-6471/before-768-daylight.png and /dev/null differdiff --git a/screenshots/issue-6471/before-768-midnight.png b/screenshots/issue-6471/before-768-midnight.pngdeleted file mode 100644index 9d324f05a5..0000000000Binary files a/screenshots/issue-6471/before-768-midnight.png and /dev/null differdiff --git a/server/app-settings/registry.ts b/server/app-settings/registry.tsindex 548b6e67a6..a373ec3468 100644--- a/server/app-settings/registry.ts+++ b/server/app-settings/registry.ts@@ -1,7 +1,7 @@import { z } from "zod";import { credentialIsConfigured, CREDENTIAL_TARGETS, PROVIDER_CREDENTIAL_TARGETS, type CredentialConfig, type CredentialTargetId } from "../../shared/credential-request.ts";-import { WINDOW_PREFS, type WindowPrefId } from "../../shared/app-settings.ts";+import { COMPOSER_BUTTONS, WINDOW_PREFS, type WindowPrefId } from "../../shared/app-settings.ts";import { defaultBotThreads, MAX_CONCURRENT_BOT_THREADS } from "../bot-thread-limits.ts";import { isClaudeBedrock } from "../claude-bedrock.ts";import { isClaudeEndpoint } from "../claude-endpoints.ts";@@ -168,6 +168,11 @@ export function createSettingsRegistry(deps: RegistryDeps): SettingEntry[] {windowPref("appearance.advanced", "Advanced mode", "Advanced shows every setting and tool; Simple keeps the everyday ones. Change it only when the person asks for Simple or Advanced mode by name, never to reach another setting: those change in either mode.", "advanced-mode", ["simple mode", "advanced mode", "interface mode"], "true or false"),windowPref("appearance.font", "Font", "The app's typeface.", "tool-calls", ["typeface", "typography"], enumOf(WINDOW_PREFS["appearance.font"].options)),windowPref("appearance.chatWidth", "Chat width", "How wide the chat column is.", "tool-calls", ["layout", "column", "wide"], enumOf(WINDOW_PREFS["appearance.chatWidth"].options)),+ windowPref("appearance.usageIndicator", "Usage beside the model", "How a plan's usage shows beside the model: bars, or one ring for the chat's AI.", "layout", ["usage", "ring", "bars", "quota", "limits"], "bars or ring",+ { says: (choice: "bars" | "ring") => (choice === "ring" ? "Show usage beside the model as one ring" : "Show usage beside the model as bars") }),+ windowPref("appearance.composerOrder", "Message box buttons order", "The order of the buttons at the end of the message box. List the ones to put first; the rest keep their order. An empty list is the usual order.", "layout",+ ["composer", "message box", "buttons", "mic", "send button", "order"], `a list of ${COMPOSER_BUTTONS.map((name) => `"${name}"`).join(", ")}, each once`,+ { says: (order: string[]) => (order.length ? `Put the message box's ${order.join(", ")} button${order.length === 1 ? "" : "s"} first, in that order` : "Put the message box's buttons back in their usual order") }),windowPref("general.sendKey", "Send key", "Which key sends a message in the composer.", "send-key", ["enter", "typing", "keyboard", "shortcut"], enumOf(WINDOW_PREFS["general.sendKey"].options)),windowPref("general.notificationSounds", "Notification sounds", "Play a sound when a bot needs you or finishes.", "notifications", ["sound", "sounds", "mute", "alerts", "notifications"], "true or false"),writable({diff --git a/src/components/AppearanceSelectRows.tsx b/src/components/AppearanceSelectRows.tsxindex 6955f909a6..6601220fe9 100644--- a/src/components/AppearanceSelectRows.tsx+++ b/src/components/AppearanceSelectRows.tsx@@ -2,6 +2,8 @@ import { useState } from "react";import { t } from "@/lib/i18n";import { CHAT_WIDTH_IDS, applyChatWidth, readChatWidth, type ChatWidthId } from "@/lib/chat-width";import { FONT_IDS, applyFont, readFont, type FontId } from "@/lib/fonts";+import { setUsageIndicator, useComposerLayout } from "@/lib/composer-layout";+import { USAGE_INDICATORS } from "../../shared/app-settings";import { parseSidebarToolsLayout, setSidebarToolsLayout, SIDEBAR_TOOLS_LAYOUTS, useSidebarToolsLayout } from "@/lib/sidebar-preferences";import { SettingRow } from "./SettingsPrimitives";import { Select } from "./Select";@@ -66,3 +68,24 @@ export function SidebarToolsLayoutRow() {</SettingRow>);}++/** How a plan's usage shows beside the model: today's bars, or one ring for the chat's AI. */+export function UsageIndicatorRow() {+ const { usage } = useComposerLayout();+ return (+ <SettingRow title={t("settings.usageIndicator.title")} subtitle={t("settings.usageIndicator.line")}>+ <Select size="sm" className="w-full max-w-[240px]"+ value={usage}+ aria-label={t("settings.usageIndicator.aria")}+ onChange={(event) => {+ const choice = USAGE_INDICATORS.find((option) => option === event.target.value);+ if (choice) setUsageIndicator(choice);+ }}+ >+ {USAGE_INDICATORS.map((option) => (+ <option key={option} value={option}>{t(`settings.usageIndicator.${option}`)}</option>+ ))}+ </Select>+ </SettingRow>+ );+}diff --git a/src/components/BotRole.tsx b/src/components/BotRole.tsxindex a3bf69d7f4..675dcf0b0b 100644--- a/src/components/BotRole.tsx+++ b/src/components/BotRole.tsx@@ -12,12 +12,22 @@ export function SidebarBotRole({ role }: { role: string }) {);}+export function ChatHeadRole({ bot }: { bot: Pick<Bot, "title" | "chiefOfStaff"> }) {+ const role = bot.title.trim();+ const repeatsChiefBadge = bot.chiefOfStaff && role.toLocaleLowerCase() === t("chat.chiefOfStaff").toLocaleLowerCase();+ if (!role || repeatsChiefBadge) return null;+ return (+ <span data-chathead-role className="flex min-w-0 max-w-fit grow basis-0">+ <span title={role} className="max-w-[16rem] truncate text-[13px] text-ink-secondary">{role}</span>+ </span>+ );+}+export function chiefOfStaffBadge(bot: Bot) {if (!bot.chiefOfStaff) return null;- const label = t("chat.chiefOfStaff");return (- <span role="img" aria-label={label} title={label} className="flex shrink-0 items-center rounded-full bg-accent/12 p-1.5 text-accent">- <Crown size={11} aria-hidden="true" />+ <span title={t("chat.chiefOfStaff")} className="flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full bg-accent/12 px-2 py-0.5 text-[11px] font-medium text-accent @max-4xl/chathead:px-1.5">+ <Crown size={11} aria-hidden="true" /> <span className="@max-4xl/chathead:sr-only">{t("chat.chiefOfStaff")}</span></span>);}diff --git a/src/components/CallView.tsx b/src/components/CallView.tsxindex b4dbb3c3ef..61e0517c24 100644--- a/src/components/CallView.tsx+++ b/src/components/CallView.tsx@@ -258,7 +258,7 @@ export function CallTargetButton({if (lineHeldElsewhere) return null;return (- <div ref={rootRef} className="relative flex items-center gap-0.5">+ <div ref={rootRef} data-call-root={placement} className="relative flex items-center gap-0.5"><buttonref={buttonRef}disabled={liveElsewhere || (onLiveCall && media.phase === "ending")}diff --git a/src/components/ChatActivity.tsx b/src/components/ChatActivity.tsxindex ea109b82d8..d9e0a3d666 100644--- a/src/components/ChatActivity.tsx+++ b/src/components/ChatActivity.tsx@@ -1,7 +1,6 @@import { useMemo, useState, type CSSProperties } from "react";import { List } from "lucide-react";import { Switch } from "./SettingsPrimitives";-import { ChatHeaderUsage } from "./EngineUsage";import { t } from "@/lib/i18n";import type { Message } from "@/state/store";import { useStoreDispatch } from "@/state/store-select";@@ -51,7 +50,7 @@ export function chatActivityMessages(messages: Message[], advanced: boolean, act}/** The chat header's Chat activity button and, once opened, its two switches and the way to the bot's run history. */-export function ChatActivityControls({ activity, botId, style, showUsage }: { activity: ChatActivity; botId: string; style?: CSSProperties; showUsage: boolean }) {+export function ChatActivityControls({ activity, botId, style }: { activity: ChatActivity; botId: string; style?: CSSProperties }) {const dispatch = useStoreDispatch();const [open, setOpen] = useState(false);return (@@ -62,7 +61,6 @@ export function ChatActivityControls({ activity, botId, style, showUsage }: { aconClick={() => setOpen((was) => !was)}className="ui-pill shrink-0"><List size={14} aria-hidden="true" />{t("chat.automation.activity")}</button>- {showUsage && <ChatHeaderUsage />}{open && (<section className="chat-run-log-actions flex min-w-0 flex-wrap items-center gap-1.5"><label className="ui-pill shrink-0">diff --git a/src/components/ChatView.controls.test.ts b/src/components/ChatView.controls.test.tsindex 43db7c04b6..4ceaafd152 100644--- a/src/components/ChatView.controls.test.ts+++ b/src/components/ChatView.controls.test.ts@@ -179,7 +179,7 @@ describe("the Simple header", () => {expect(advanced).not.toContain("data-chathead-elsewhere");expect(advanced).toContain("data-background-activity");expect(advanced).toContain("data-chathead-back");- expect(advanced).toContain('aria-description="Research"');+ expect(advanced).toContain("data-chathead-role");fixture.showThreads = true;});@@ -217,15 +217,28 @@ describe("header name", () => {expect(pill).toContain("Rename Pepper");});- it("keeps the role on the profile control and shows an icon-only Chief of Staff badge", () => {- const markup = renderToStaticMarkup(createElement(ChatView, { bot: { ...bot, chiefOfStaff: true, title: " Research " } }));- const identity = markup.slice(markup.indexOf("data-chathead-identity"), markup.indexOf("data-chathead-controls"));- expect(identity).toContain('title="Research"');- expect(identity).toContain('aria-description="Research"');- expect(identity).toContain('role="img" aria-label="Chief of Staff"');- expect(identity).not.toContain(">Research<");- expect(identity).not.toContain(">Chief of Staff<");- expect(identity).toContain("Rename Pepper");+ it("shows the bot's role beside the pill in Advanced mode, taking only the room the name leaves, and leaves it to the bot panel in Simple", () => {+ fixture.advanced = false;+ expect(renderToStaticMarkup(createElement(ChatView, { bot: { ...bot, title: " Research " } }))).not.toContain("data-chathead-role");+ for (const advanced of [true]) {+ fixture.advanced = advanced;+ const markup = renderToStaticMarkup(createElement(ChatView, { bot: { ...bot, title: " Research " } }));+ const identity = markup.slice(markup.indexOf("data-chathead-identity"), markup.indexOf("data-chathead-controls"));+ const role = identity.match(/<span data-chathead-role="true" class="([^"]*)"><span title="Research" class="([^"]*)">Research<\/span><\/span>/);+ expect(role, `advanced ${advanced}`).toBeTruthy();+ expect(role![1].split(" ")).toEqual(expect.arrayContaining(["min-w-0", "max-w-fit", "grow", "basis-0"]));+ expect(role![2].split(" ")).toEqual(expect.arrayContaining(["truncate", "text-[13px]", "text-ink-secondary"]));+ expect(identity.indexOf("data-chathead-role")).toBeGreaterThan(identity.indexOf("Rename Pepper"));+ expect(renderToStaticMarkup(createElement(ChatView, { bot }))).not.toContain("data-chathead-role");+ }+ fixture.advanced = true;+ });++ it("leaves a Chief's role out of the header when it only repeats the Chief of Staff badge", () => {+ const header = (title: string) => renderToStaticMarkup(createElement(ChatView, { bot: { ...bot, chiefOfStaff: true, title } }));+ expect(header("chief of staff ")).not.toContain("data-chathead-role");+ expect(header("Operations lead")).toContain('<span title="Operations lead"');+ expect(renderToStaticMarkup(createElement(ChatView, { bot: { ...bot, title: "Chief of Staff" } }))).toContain("data-chathead-role");});it("draws no working dots in the header pill, keeping one width, while a status still tells a screen reader", () => {@@ -637,9 +650,9 @@ describe("thread control placement", () => {it("keeps the Chief of Staff badge on one line instead of stacking a word per line", () => {const markup = renderToStaticMarkup(createElement(ChatView, { bot: { ...bot, busy: false, chiefOfStaff: true } }));- const badge = /<span role="img" aria-label="Chief of Staff" title="Chief of Staff" class="([^"]*)"><svg[^>]*lucide-crown[^]*?<\/svg><\/span>/.exec(markup)!;- expect(badge[1].split(" ")).toEqual(expect.arrayContaining(["shrink-0", "items-center", "rounded-full"]));- expect(badge[0]).not.toContain("whitespace-nowrap");+ const badge = /<span title="Chief of Staff" class="([^"]*)"><svg[^>]*lucide-crown[^]*?<\/svg> <span class="([^"]*)">Chief of Staff<\/span>/.exec(markup)!;+ expect(badge[1].split(" ")).toEqual(expect.arrayContaining(["shrink-0", "whitespace-nowrap"]));+ expect(badge[2].split(" ")).toContain("@max-4xl/chathead:sr-only");});it("shows the selected thread's model and its level under the composer's field in Advanced", () => {diff --git a/src/components/ChatView.tsx b/src/components/ChatView.tsxindex 5310a60c1f..08e7587d09 100644--- a/src/components/ChatView.tsx+++ b/src/components/ChatView.tsx@@ -87,7 +87,7 @@ import { CallRecordRow } from "./CallRecordRow";import { AttachmentGallery, collectMessageFiles, replyAttachmentGroup, splitMessageAttachments } from "./AttachmentGallery";import { ScreenFrame } from "./ScreenFrame";import { CompactionChip, DigestChip } from "./DigestChip";-import { RenameTitle } from "./RenameTitle"; import { chiefOfStaffBadge } from "./BotRole";+import { RenameTitle } from "./RenameTitle"; import { ChatHeadRole, chiefOfStaffBadge } from "./BotRole";import { BotActivityPicker } from "./TaskPicker"; import { ChatHeadPill } from "./ChatHeadPill"; import { HeaderShare } from "./bot-access/HeaderShare"; import { isPlaceId } from "@/lib/place-chat"; import { PlacedModelPill } from "./PlacedBotMenu"; import { ThreadPresenceFaces } from "./TeamPresence"; import { useStoreRef } from "@/state/store-ref"; import { sameFields, useStoreDispatch, useStoreSelector } from "@/state/store-select"; import { sameDrawnBots } from "@/lib/drawn-bots"; import { ChatActivityControls, chatActivityMessages, useChatActivity } from "./ChatActivity";import { ELEVATED_FLOAT, ELEVATED_HOVER } from "./elevated"; import { NewThreadHeaderButton } from "./NewThreadHeaderButton"; import { HeaderThreadTabs, useThreadTabsShown } from "./HeaderThreadTabs";import { ModelPicker } from "./ModelPicker"; import { useFailedTurnFix } from "./FailedTurnFix";@@ -912,7 +912,7 @@ export const ChatView = memo(function ChatView({ bot: profile, inForkPanel = falsimpleHead ? "px-5 pt-2.5 pb-2.5 max-md:pl-14 max-md:pr-3" : "px-5 py-3 pl-11 md:pl-5 max-md:pl-14 max-md:pr-3",)}>- <div data-chathead-row className={cn("flex items-center justify-between", phone ? "gap-2" : "@max-[30rem]/chathead:flex-wrap @max-[30rem]/chathead:gap-y-1 @min-[30rem]/chathead:grid @min-[30rem]/chathead:grid-cols-[minmax(0,1fr)_minmax(0,auto)_minmax(max-content,1fr)]")}>{advanced && !inForkPanel && <ChatActivityControls key={bot.threadId} activity={activity} botId={bot.id} style={headerNoDragStyle} showUsage={!phone && !remoteClient} />}+ <div data-chathead-row className={cn("flex items-center justify-between", phone ? "gap-2" : "@max-[30rem]/chathead:flex-wrap @max-[30rem]/chathead:gap-y-1 @min-[30rem]/chathead:grid @min-[30rem]/chathead:grid-cols-[minmax(0,1fr)_minmax(0,auto)_minmax(max-content,1fr)]")}>{advanced && !inForkPanel && <ChatActivityControls key={bot.threadId} activity={activity} botId={bot.id} style={headerNoDragStyle} />}<div data-chathead-identity className={cn("flex min-w-0 items-center gap-2", phone ? "flex-1" : "@max-[30rem]/chathead:basis-full @min-[30rem]/chathead:col-start-2 @min-[30rem]/chathead:justify-self-center", simpleHead && phone && "justify-center")} style={headerNoDragStyle}>{headTabs && <HeaderThreadTabs bot={bot} />}{simpleHead ? (<ChatHeadPill@@ -927,7 +927,7 @@ export const ChatView = memo(function ChatView({ bot: profile, inForkPanel = faltype="button"onClick={() => dispatch({ type: "toggleSettings", open: true })}className="flex shrink-0 items-center justify-center rounded-full"- title={bot.title.trim() || t("chat.openProfile")} aria-description={bot.title.trim() || undefined}+ title={t("chat.openProfile")}aria-label={t("chat.openProfileAria", { name: bot.name })}><BotAvatar@@ -963,7 +963,7 @@ export const ChatView = memo(function ChatView({ bot: profile, inForkPanel = faltype="button"data-chathead-pill data-tour="bot-pill"onClick={() => dispatch({ type: "toggleSettings", open: true })}- title={bot.title.trim() || t("chat.openProfile")} aria-description={bot.title.trim() || undefined}+ title={t("chat.openProfile")}aria-label={t("chat.openProfileAria", { name: bot.name })}className={cn("group flex h-9 min-w-0 items-center gap-2.5 rounded-full py-0.5 pl-2 pr-3.5 text-ink", ELEVATED_FLOAT, ELEVATED_HOVER)}>@@ -974,7 +974,7 @@ export const ChatView = memo(function ChatView({ bot: profile, inForkPanel = fal<ChevronRight size={14} aria-hidden="true" className="-ml-2.5 w-0 shrink-0 text-ink-secondary opacity-0 transition-[width,margin,opacity] duration-150 group-hover:ml-0 group-hover:w-3.5 group-hover:opacity-100 group-focus-visible:ml-0 group-focus-visible:w-3.5 group-focus-visible:opacity-100" /></button>)}- <span role="status" className="sr-only" data-chathead-status>{bot.busy ? t("sidebar.preview.working") : ""}</span>{!simpleHead && privateChat && <TeamPrivateHeader />}{!simpleHead && ownHelper && <TeamOwnHelperHeader />}{!simpleHead && sharedChat && team && <TeamSharedHeader team={team} onlyPeopleAdded={bot.onlyPeopleAdded} sharedWith={currentTask?.sharedWith?.name} />}+ {!phone && !simpleHead && <ChatHeadRole bot={bot} />}<span role="status" className="sr-only" data-chathead-status>{bot.busy ? t("sidebar.preview.working") : ""}</span>{!simpleHead && privateChat && <TeamPrivateHeader />}{!simpleHead && ownHelper && <TeamOwnHelperHeader />}{!simpleHead && sharedChat && team && <TeamSharedHeader team={team} onlyPeopleAdded={bot.onlyPeopleAdded} sharedWith={currentTask?.sharedWith?.name} />}{!simpleHead && !bot.busy && bot.waitingForTeammates && <span className="truncate text-[12px] text-ink-secondary" role="status">{t("chat.teammatesWorking")}</span>}{(advanced || remoteClient) && awayFromMainThread(profile, showThreads) && (<button@@ -1044,7 +1044,7 @@ export const ChatView = memo(function ChatView({ bot: profile, inForkPanel = fal<ChatNotice notice={state.notice} /><UnreadContextOverlay messages={chatMessages} windowedMessages={windowedMessages} unreadMessageId={unreadDivider.messageId} scrollRef={scrollRef} visitKey={`${bot.id}:${bot.threadId}:${openedAt}`} onJump={(messageId) => dispatch({ type: "focusMessage", threadId: bot.threadId, messageId })} /><PinnedSignInSlot cards={pinnedSignIns} />- <ThreadGoals key={bot.threadId} thread={bot} botId={bot.id} canSwitchVersion={canWrite === true} inForkPanel={inForkPanel} />+ {advanced && <ThreadGoals key={bot.threadId} thread={bot} botId={bot.id} canSwitchVersion={canWrite === true} inForkPanel={inForkPanel} />}</GlassBar><divdiff --git a/src/components/Composer.tsx b/src/components/Composer.tsxindex de6781e952..fe377a9ee6 100644--- a/src/components/Composer.tsx+++ b/src/components/Composer.tsx@@ -1,6 +1,6 @@import { directMessageSent, roomMessageSent } from "@/lib/product-events";import { TeamAudienceLabel } from "./TeamSideSwitch";-import { useComposerDictation } from "@/lib/use-composer-dictation"; import { DismissWarning } from "./DismissWarning"; import { isPlaceId } from "@/lib/place-chat";+import { useComposerDictation } from "@/lib/use-composer-dictation"; import { DismissWarning } from "./DismissWarning"; import { composerOrderStyle, useComposerLayout } from "@/lib/composer-layout"; import { isPlaceId } from "@/lib/place-chat";import { ComposerForkError, useComposerFork } from "./ComposerFork";import { isNewChatThread } from "@/state/new-chat";import { useCallback, useEffect, useMemo, useRef, useState, type SetStateAction } from "react";@@ -234,7 +234,7 @@ export function Composer({},[text, editText, editAttachments],);- const { recording, ready: micReady, speechError, dismissSpeechError, toggle: toggleMic, stop: stopDictation } = useComposerDictation({ draftId, text, onText: editText });+ const composerLayout = useComposerLayout(), { recording, ready: micReady, speechError, dismissSpeechError, toggle: toggleMic, stop: stopDictation } = useComposerDictation({ draftId, text, onText: editText });const fork = useComposerFork({ ownerId: forkOwnerId, kind: group ? "group" : "bot", threadId,branchLeafId: group ? undefined : bot?.activeLeafId ?? undefined, draftId, text, editText, stopDictation });const micShown = !locked && !busy && micReady;@@ -939,10 +939,10 @@ export function Composer({callBotId={callShown && bot && !group && !placed ? bot.id : undefined}onPin={pinPlace} />)}- <div data-composer-actions className={cn("flex items-center", simpleDock ? "gap-2" : "gap-1", stacked && "ms-auto")}>+ <div data-composer-actions style={composerOrderStyle(composerLayout.order)} className={cn("flex items-center", simpleDock ? "gap-2" : "gap-1", stacked && "ms-auto")}>{(simpleDock ? stoppable : busy && mayStop) && !locked && (<button- onClick={interruptTurn}+ onClick={interruptTurn} data-composer-end="stop"aria-label={t("chat.stopTurn")}data-composer-stop={simpleDock ? (stopInSlot ? "slot" : "beside") : undefined}className={cn(@@ -960,7 +960,7 @@ export function Composer({{!locked && <ComposerContextMenu bot={bot} group={group} members={members} handle={contextMenu} className={cn(simpleDock ? "size-7" : "size-8", advanced || singleRow ? "text-ink-secondary hover:bg-raised hover:text-ink" : SIMPLE_CONTROL)} />}{micShown && (<button- onClick={toggleMic}+ onClick={toggleMic} data-composer-end="mic"aria-label={recording ? t("composer.dictation.stop") : t("composer.dictation.start")}className={cn("flex shrink-0 items-center justify-center rounded-full",diff --git a/src/components/ComposerSendButton.tsx b/src/components/ComposerSendButton.tsxindex 15fdf28996..024789907f 100644--- a/src/components/ComposerSendButton.tsx+++ b/src/components/ComposerSendButton.tsx@@ -33,7 +33,7 @@ export function ComposerSendButton({ compact, waits, label, title, look, disableconst alternate = menu?.choices[1] !== "restart" ? menu?.choices[1] : undefined;const button = (<button- onClick={(event) => onSend(event.metaKey || event.ctrlKey)}+ onClick={(event) => onSend(event.metaKey || event.ctrlKey)} data-composer-send=""disabled={disabled}aria-label={label}title={menu && alternate ? t("composer.followUp.buttonTitle", { title, key: menu.alternateKey, alternate: t(`composer.followUp.${alternate}`) }) : title}diff --git a/src/components/EngineUsage.tsx b/src/components/EngineUsage.tsxindex c900bd7e42..277500a7d4 100644--- a/src/components/EngineUsage.tsx+++ b/src/components/EngineUsage.tsx@@ -2,9 +2,9 @@ import { useEffect, useRef, useState, type CSSProperties, type PointerEvent as Rimport { createPortal } from "react-dom";import { cn } from "@/lib/cn";+import { useComposerLayout } from "@/lib/composer-layout";+import { useStoreDispatch } from "@/state/store-select";import { t } from "@/lib/i18n";-import { useOwnerOrAdmin } from "@/lib/use-owner-or-admin";-import { sameItems, useStoreDispatch, useStoreSelector } from "@/state/store-select";import {limitLine, limitsCheckedAt, loadLimits, releaseLimit, reportsUsage, resetTime, usageBars, usageRows, usageTone, useEngineLimits, USAGE_BARS, windowLabel,type EngineLimit, type UsageTone,@@ -109,13 +109,13 @@ const RING_LENGTH = 2 * Math.PI * RING_RADIUS;const RING_INK: Record<UsageTone, string> = { fine: "text-success", near: "text-warning", out: "text-danger" };/** A ring drawn clockwise from the top for the usage left; at the limit it is empty and struck through. */-export function UsageRing({ limit, className }: { limit?: EngineLimit; className?: string }) {- const tone = reportsUsage(limit) ? usageTone(limit) : null;- const left = !tone || tone === "out" ? 0 : Math.max(0, 100 - (limit?.usedPercent ?? 0));+export function UsageRing({ limit, className }: { limit: EngineLimit; className?: string }) {+ const tone = usageTone(limit);+ const left = tone === "out" ? 0 : Math.max(0, 100 - (limit.usedPercent ?? 0));const middle = RING / 2;return (- <svg aria-hidden="true" data-usage-ring={tone ?? "unknown"} width={RING} height={RING} viewBox={`0 0 ${RING} ${RING}`} className={cn("shrink-0", tone ? RING_INK[tone] : "text-ink-secondary", className)}>- <circle cx={middle} cy={middle} r={RING_RADIUS} fill="none" stroke="currentColor" strokeWidth={RING_STROKE} strokeDasharray={tone ? undefined : "2 2"} opacity={tone ? 0.3 : 0.65} />+ <svg aria-hidden="true" data-usage-ring={tone} width={RING} height={RING} viewBox={`0 0 ${RING} ${RING}`} className={cn("shrink-0", RING_INK[tone], className)}>+ <circle cx={middle} cy={middle} r={RING_RADIUS} fill="none" stroke="currentColor" strokeWidth={RING_STROKE} opacity={0.3} />{left > 0 && <circle cx={middle} cy={middle} r={RING_RADIUS} fill="none" stroke="currentColor" strokeWidth={RING_STROKE} strokeLinecap="round"strokeDasharray={`${(RING_LENGTH * left) / 100} ${RING_LENGTH}`} transform={`rotate(-90 ${middle} ${middle})`} />}{tone === "out" && <path d={`M3 ${RING - 3}L${RING - 3} 3`} stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" />}@@ -123,51 +123,6 @@ export function UsageRing({ limit, className }: { limit?: EngineLimit; className);}-const QUOTA_DRIVERS = new Set(["claudeAgent", "codex", "grokAgent", "opencodeGo", "antigravityAgent"]);--export function ChatHeaderUsage() {- const team = useStoreSelector((state) => Boolean(state.config?.team));- const admin = useOwnerOrAdmin();- return !team || admin ? <ChatHeaderUsageRings /> : null;-}--function ChatHeaderUsageRings() {- const limits = useEngineLimits();- const dispatch = useStoreDispatch();- const instances = useStoreSelector((state) => state.instances.filter((instance) =>- QUOTA_DRIVERS.has(instance.driverKind) && instance.snapshot?.billing === "subscription" && instance.snapshot.authenticated === true), sameItems);- const accounts = new Map<string, { name: string; limit?: EngineLimit }>(limits.map((limit) =>- [limit.engine, { name: limit.name, limit }]));- for (const instance of instances) {- if (!accounts.has(instance.instanceId)) accounts.set(instance.instanceId, { name: instance.displayName });- }- if (!accounts.size) return null;- const now = Date.now();- return (- <div data-chathead-usage role="group" aria-label={t("limits.title")} className="hidden min-w-0 flex-wrap items-center gap-0.5 @min-[48rem]/chathead:flex">- {[...accounts].map(([engine, { name, limit }]) => {- const windows = limit ? usageRows(limit) : [];- const details = windows.length ? windows.map((row) => [- windowLabel(row.window, limit?.meter),- t("planUsage.left", { remaining: row.left }),- row.resetsAt !== null && row.resetsAt > now ? t("limits.resets", { time: resetTime(row.resetsAt, now) }) : null,- ].filter(Boolean).join(" · ")) : [t("planUsage.notReported")];- return (- <button key={engine} type="button" data-usage-engine={engine} aria-label={[name, ...details].join(", ")}- onClick={() => dispatch({ type: "toggleAppSettings", open: true, section: "usage" })}- className="group/quota relative flex size-6 shrink-0 items-center justify-center rounded-full hover:bg-ink/[0.06] focus-visible:bg-ink/[0.06]">- <UsageRing limit={limit} className="size-5" />- <span aria-hidden="true" className="menu-surface pointer-events-none absolute start-0 top-full z-50 mt-1 hidden w-max max-w-64 px-2.5 py-1.5 text-start text-[12px] text-ink group-hover/quota:block group-focus-visible/quota:block">- <span className="block font-medium">{name}</span>- {details.map((text) => <span key={text} className="block text-ink-secondary">{text}</span>)}- </span>- </button>- );- })}- </div>- );-}-/** When the usage was last read, each window's share left with its reset and a track filled by use; at the limit, how it* clears and a fresh check. */export function UsageRows({ limit }: { limit: EngineLimit }) {@@ -275,6 +230,8 @@ function UsageCard({ limit, anchor, onEnter, onLeave }: { limit: EngineLimit; an* same rows open at the top of the model menu for keyboard and touch. */export function UsageBars({ engine, compact = false, hover = true, className }: { engine: string | undefined; compact?: boolean; hover?: boolean; className?: string }) {const limit = useEngineUsage(engine);+ // The person may ask a bot for one ring instead (src/lib/composer-layout.ts); a click on it opens Spending.+ const ring = useComposerLayout().usage === "ring", dispatch = useStoreDispatch();const [anchor, setAnchor] = useState<DOMRect | null>(null);const spot = useRef<HTMLSpanElement>(null);const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);@@ -293,8 +250,10 @@ export function UsageBars({ engine, compact = false, hover = true, className }:return (// An empty title keeps the button's own tooltip from opening over the card.<span ref={spot} title="" data-usage-bars={tone} data-usage-warn={tone === "fine" ? undefined : ""} className={cn("flex shrink-0 items-center", className)}- onPointerEnter={enter} onPointerLeave={leave} onPointerDown={() => later(() => setAnchor(null), 0)}>- <UsageGlyph limit={limit} className={compact && tone === "fine" ? "@max-4xl/chathead:hidden" : undefined} />+ onPointerEnter={enter} onPointerLeave={leave} onPointerDown={() => later(() => setAnchor(null), 0)}+ onClick={ring ? (event) => { event.preventDefault(); event.stopPropagation(); dispatch({ type: "toggleAppSettings", open: true, section: "usage" }); } : undefined}>+ {ring ? <UsageRing limit={limit} className={compact && tone === "fine" ? "@max-4xl/chathead:hidden" : undefined} />+ : <UsageGlyph limit={limit} className={compact && tone === "fine" ? "@max-4xl/chathead:hidden" : undefined} />}<span className="sr-only">{limitLine(limit, Date.now(), ", ")}</span>{anchor && createPortal(<UsageCard limit={limit} anchor={anchor} onEnter={() => enter()} onLeave={leave} />, document.body)}</span>diff --git a/src/components/limit-resets.test.ts b/src/components/limit-resets.test.tsindex fcfca7ab3c..c00ae51a2d 100644--- a/src/components/limit-resets.test.ts+++ b/src/components/limit-resets.test.ts@@ -33,7 +33,7 @@ const { setLocale } = await import("@/lib/i18n");const limits = await import("@/lib/limit-resets");const { automationSentence, isDone, statusLine } = await import("@/lib/automations");const { LimitWarnings } = await import("./automations/LimitWarnings");-const { ChatHeaderUsage, UsageAlert, UsageBars, UsageRows } = await import("./EngineUsage");+const { UsageAlert, UsageBars, UsageRows } = await import("./EngineUsage");const { FailedTurnRow } = await import("./ChatView");const { CalendarGrid } = await import("./RoutineCalendarPage");@@ -155,22 +155,6 @@ describe("the bars", () => {windows: [{ window: "5-hour", usedPercent: fiveHour, resetsAt: RESET }, { window: "weekly", usedPercent: weekly, resetsAt: MONDAY }], ...extra,});- it("shows known and unknown quotas in the header, with window details and a Spending shortcut", () => {- serve([windows(35, 82)]);- fixture.state.instances = [{ instanceId: "gemini", driverKind: "antigravityAgent", displayName: "Gemini", models: { default: "gemini", options: [] },- snapshot: { state: "available", authenticated: true, billing: "subscription" } } satisfies InstanceInfo];- const header = mount(createElement(ChatHeaderUsage));- const known = header.querySelector<HTMLButtonElement>('[data-usage-engine="claude"]')!;- const unknown = header.querySelector<HTMLButtonElement>('[data-usage-engine="gemini"]')!;- expect(known.getAttribute("aria-label")).toContain("5-hour · 65% left · resets 3:40 PM");- expect(known.getAttribute("aria-label")).toContain("Weekly · 18% left");- expect(known.querySelector('[aria-hidden="true"].menu-surface')?.className).toContain("group-focus-visible/quota:block");- expect(unknown.getAttribute("aria-label")).toBe("Gemini, Not reported by this plan");- expect(unknown.querySelector('[data-usage-ring="unknown"] circle')?.getAttribute("stroke-dasharray")).toBe("2 2");- known.click();- expect(fixture.dispatch).toHaveBeenCalledWith({ type: "toggleAppSettings", open: true, section: "usage" });- });-it("fill for the usage left, with one bar exactly while near the limit and none at it", () => {const bars = (used: number, blocked = false) => limits.usageBars({ usedPercent: used, blocked });expect([0, 29, 30, 31, 59, 60, 61, 89, 89.9, 90, 99, 100].map((used) => bars(used))).toEqual([4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1, 0]);diff --git a/src/components/settings/pages/AppPages.tsx b/src/components/settings/pages/AppPages.tsxindex 5f6dd984ed..6f7a57f96e 100644--- a/src/components/settings/pages/AppPages.tsx+++ b/src/components/settings/pages/AppPages.tsx@@ -6,7 +6,7 @@ import { t } from "@/lib/i18n";import { useStoreDispatch } from "@/state/store-select";import { AboutDialog } from "../../AboutDialog";import { AnalyticsRow } from "../../AnalyticsRow";-import { ChatWidthRow, FontRow, SidebarToolsLayoutRow } from "../../AppearanceSelectRows";+import { ChatWidthRow, FontRow, SidebarToolsLayoutRow, UsageIndicatorRow } from "../../AppearanceSelectRows";import {ColorUserBubblesRow, FollowUpRow, LanguageRow, PinnedCirclesRow, ReplayTourRow, SendKeyRow, ShowThreadsRow,ToolCallsRow, UniversalPinsRow, UpdatesRow,@@ -176,6 +176,7 @@ export function AppearancePage() {{!ctx.client && <ToolCallsRow />}{ctx.advanced && <ChatWidthRow />}{ctx.advanced && <FontRow />}+ {ctx.advanced && <UsageIndicatorRow />}</SettingsRows></SettingsGroup>{/* Simple keeps the Look card and Tool calls; the window's layout is Advanced. */}diff --git a/src/lib/composer-layout.ts b/src/lib/composer-layout.tsnew file mode 100644index 0000000000..2b9a3df692--- /dev/null+++ b/src/lib/composer-layout.ts@@ -0,0 +1,99 @@+// Two looks a bot can change for the person through app_settings, in either mode, with no row of their own beyond the+// usage one: how a plan's usage shows beside the model (today's bars, or one ring), and the order of the composer's end+// buttons. Both default to what the app always drew; only the usage row is shown, and only in Advanced mode.+import { useSyncExternalStore, type CSSProperties } from "react";+import { COMPOSER_BUTTONS, USAGE_INDICATORS } from "../../shared/app-settings";+import { windowPrefChanged } from "./window-pref-changes";++export type UsageIndicator = (typeof USAGE_INDICATORS)[number];+export type ComposerButton = (typeof COMPOSER_BUTTONS)[number];++const USAGE_KEY = "omb-usage-indicator";+const ORDER_KEY = "omb-composer-order";+const listeners = new Set<() => void>();++function storage(): Storage | undefined {+ try {+ return typeof localStorage === "undefined" ? undefined : localStorage;+ } catch {+ return undefined;+ }+}++function read(key: string): string | null {+ try {+ return storage()?.getItem(key) ?? null;+ } catch {+ return null;+ }+}++function write(key: string, value: string | null): void {+ try {+ if (value === null) storage()?.removeItem(key);+ else storage()?.setItem(key, value);+ } catch {+ // Storage can be full or blocked; the choice still holds until the window reloads.+ }+ cache = undefined;+ for (const listener of listeners) listener();+ windowPrefChanged();+}++export function readUsageIndicator(): UsageIndicator {+ const stored = read(USAGE_KEY);+ return (USAGE_INDICATORS as readonly string[]).includes(stored ?? "") ? stored as UsageIndicator : "bars";+}++export function setUsageIndicator(choice: UsageIndicator): void {+ write(USAGE_KEY, choice === "bars" ? null : choice);+}++/** The order a bot set, each known button once; anything else reads as today's order (an empty list). */+export function readComposerOrder(): ComposerButton[] {+ try {+ const stored: unknown = JSON.parse(read(ORDER_KEY) ?? "[]");+ if (!Array.isArray(stored)) return [];+ const known = stored.filter((name): name is ComposerButton => (COMPOSER_BUTTONS as readonly unknown[]).includes(name));+ return new Set(known).size === known.length ? known : [];+ } catch {+ return [];+ }+}++export function setComposerOrder(order: readonly ComposerButton[]): void {+ write(ORDER_KEY, order.length ? JSON.stringify(order) : null);+}++/** CSS `order` for each end button, read by the stylesheet (`[data-composer-actions]`): the named buttons first, in the+ * order given, then the rest in today's order. Undefined for today's order. */+export function composerOrderStyle(order: readonly ComposerButton[]): CSSProperties | undefined {+ if (!order.length) return undefined;+ const ranked = [...order, ...COMPOSER_BUTTONS.filter((name) => !order.includes(name))];+ return Object.fromEntries(ranked.map((name, index) => [`--composer-order-${name}`, index])) as CSSProperties;+}++let cache: { usage: UsageIndicator; order: ComposerButton[] } | undefined;+function snapshot() {+ cache ??= { usage: readUsageIndicator(), order: readComposerOrder() };+ return cache;+}+const DEFAULTS = { usage: "bars" as UsageIndicator, order: [] as ComposerButton[] };++function subscribe(listener: () => void): () => void {+ listeners.add(listener);+ const onStorage = (event: StorageEvent) => {+ if (event.key !== USAGE_KEY && event.key !== ORDER_KEY) return;+ cache = undefined;+ listener();+ };+ window.addEventListener("storage", onStorage);+ return () => {+ listeners.delete(listener);+ window.removeEventListener("storage", onStorage);+ };+}++export function useComposerLayout(): { usage: UsageIndicator; order: ComposerButton[] } {+ return useSyncExternalStore(subscribe, snapshot, () => DEFAULTS);+}diff --git a/src/lib/window-prefs.ts b/src/lib/window-prefs.tsindex 7e5eb59508..c25280f050 100644--- a/src/lib/window-prefs.ts+++ b/src/lib/window-prefs.ts@@ -4,6 +4,7 @@import { WINDOW_PREFS, type WindowPrefFrame, type WindowPrefId, type WindowPrefValue } from "../../shared/app-settings";import { analyticsEnabled, setAnalyticsEnabled } from "./analytics";import { applyChatWidth, readChatWidth } from "./chat-width";+import { readComposerOrder, readUsageIndicator, setComposerOrder, setUsageIndicator } from "./composer-layout";import { companionBridge, pageIsThisComputer } from "./companion-bridge";import type { CompanionRoute } from "./companion-types";import { applyFont, readFont } from "./fonts";@@ -47,6 +48,8 @@ const PREFS: { [I in WindowPrefId]: Pref<I> } = {"appearance.showThreads": { read: () => showThreads(), write: (on) => setShowThreads(on) },"appearance.toolsLayout": { read: () => loadSidebarToolsLayout(), write: (layout) => setSidebarToolsLayout(layout) },"appearance.pinnedCircles": { read: () => loadPinnedCircles(), write: (on) => setPinnedCircles(on) },+ "appearance.usageIndicator": { read: () => readUsageIndicator(), write: (choice) => setUsageIndicator(choice) },+ "appearance.composerOrder": { read: () => readComposerOrder(), write: (order) => setComposerOrder(order) },"appearance.universalPins": { read: () => loadUniversalPins(), write: (on) => setUniversalPins(on) },"appearance.pinnedPages": {read: () => latestWebPanels().flatMap((panel) => (panel.url === undefined ? [] : [{ name: panel.name, url: panel.url }])),diff --git a/src/locales/en.json b/src/locales/en.jsonindex 1bff7e4a03..6cedf4cb7e 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -2046,6 +2046,11 @@"settings.chatWidth.title": "Chat width","settings.chatWidth.subtitle": "How wide message bubbles can grow on this machine. Wide and Full width use more of a large window.","settings.chatWidth.aria": "Chat width",+ "settings.usageIndicator.title": "Usage",+ "settings.usageIndicator.line": "How your plan's usage shows beside the model.",+ "settings.usageIndicator.aria": "Usage beside the model",+ "settings.usageIndicator.bars": "Bars",+ "settings.usageIndicator.ring": "Ring","settings.chatWidth.standard": "Standard","settings.chatWidth.wide": "Wide","settings.chatWidth.full": "Full width",@@ -7958,6 +7963,10 @@"skills.import.leftOutItem": "{path} ({reason})","skills.import.leftOutMore": "{count} more","skills.import.reviewBelow": "Review each one and turn it on below.",+ "skills.import.folder.missing": "Choose a folder that has a SKILL.md file.",+ "skills.import.folder.tooLarge": "SKILL.md is too large to import.",+ "skills.import.folder.tooMany": "This folder has too many files. Choose the folder that has SKILL.md.",+ "skills.import.folder.unreadable": "Couldn't read that folder. Try again.","skills.import.reason.link": "a link","skills.import.reason.submodule": "another repository","skills.import.reason.hidden": "hidden",@@ -8274,8 +8283,7 @@"chat.preview.updated": "Updated","chat.preview.point": "Point","chat.preview.pointHint": "Click the part of the page you want changed. Press Esc to stop.",- "chat.preview.pointSelectionHint": "Click a part to point at it, or select text and choose Highlight selection. Press Esc to stop.",- "chat.preview.highlightSelection": "Highlight selection",+ "chat.preview.pointSelectionHint": "Click a part of the page, or select text, to point at it. Press Esc to stop.","chat.preview.pointSelectionTooLong": "This selection is too long. Select a shorter passage.","chat.preview.share": "Share","chat.preview.pin": "Pin to sidebar",@@ -8298,9 +8306,6 @@"chat.preview.closePage": "Close page","chat.preview.kind": "Page","chat.preview.pointedPart": "a part of the page",- "chat.preview.onePoint": "1 point",- "chat.preview.pointCount": "{count} points",- "chat.preview.clearPoints": "Clear all","chat.preview.removePoint": "Remove {label}","chat.preview.notePoint": "Write a note on {label}","chat.preview.pointNote": "Note on {label} for the bot (optional)",diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex 43a431895a..c31d624b66 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -1848,6 +1848,11 @@"settings.chatWidth.title": "Largura do chat","settings.chatWidth.subtitle": "Largura máxima dos balões de mensagem nesta máquina. “Larga” e “Largura total” aproveitam mais o espaço de uma janela grande.","settings.chatWidth.aria": "Largura do chat",+ "settings.usageIndicator.title": "Uso",+ "settings.usageIndicator.line": "Como o uso do seu plano aparece ao lado do modelo.",+ "settings.usageIndicator.aria": "Uso ao lado do modelo",+ "settings.usageIndicator.bars": "Barras",+ "settings.usageIndicator.ring": "Anel","settings.chatWidth.standard": "Padrão","settings.chatWidth.wide": "Larga","settings.chatWidth.full": "Largura total",@@ -7569,6 +7574,10 @@"skills.import.leftOutItem": "{path} ({reason})","skills.import.leftOutMore": "mais {count}","skills.import.reviewBelow": "Revise cada habilidade e ative-a abaixo.",+ "skills.import.folder.missing": "Escolha uma pasta que tenha um arquivo SKILL.md.",+ "skills.import.folder.tooLarge": "O SKILL.md é grande demais para importar.",+ "skills.import.folder.tooMany": "Esta pasta tem arquivos demais. Escolha a pasta que tem o SKILL.md.",+ "skills.import.folder.unreadable": "Não foi possível ler essa pasta. Tente novamente.","skills.import.reason.link": "um link","skills.import.reason.submodule": "outro repositório","skills.import.reason.hidden": "oculto",@@ -8054,8 +8063,7 @@"chat.preview.updated": "Atualizada","chat.preview.point": "Apontar","chat.preview.pointHint": "Clique na parte da página que você quer mudar. Aperte Esc para parar.",- "chat.preview.pointSelectionHint": "Clique em uma parte da página para marcá-la ou selecione um texto e escolha “Realçar seleção”. Aperte Esc para parar.",- "chat.preview.highlightSelection": "Realçar seleção",+ "chat.preview.pointSelectionHint": "Clique em uma parte da página ou selecione um texto para marcá-lo. Aperte Esc para parar.","chat.preview.pointSelectionTooLong": "A seleção é longa demais. Selecione um trecho mais curto.","chat.preview.share": "Compartilhar","chat.preview.pin": "Fixar na barra lateral",@@ -8078,9 +8086,6 @@"chat.preview.closePage": "Fechar página","chat.preview.kind": "Página","chat.preview.pointedPart": "uma parte da página",- "chat.preview.onePoint": "1 ponto",- "chat.preview.pointCount": "Pontos: {count}",- "chat.preview.clearPoints": "Limpar tudo","chat.preview.removePoint": "Remover {label}","chat.preview.notePoint": "Escrever uma nota sobre {label}","chat.preview.pointNote": "Nota sobre {label} para o bot (opcional)",diff --git a/src/styles.css b/src/styles.cssindex 811eb5364c..b207d38f2d 100644--- a/src/styles.css+++ b/src/styles.css@@ -3988,3 +3988,11 @@ button:disabled.bg-danger {:root[data-reduced-motion="true"] .thread-tab,:root[data-reduced-motion="true"] .thread-tab::before,:root[data-reduced-motion="true"] .thread-tab-indicator { animation: none !important; transition: none !important; }++/* The composer's end buttons in the order a bot set for the person (Advanced mode; src/lib/composer-layout.ts). With no+ order set the variables are unset, every button is 0, and the buttons keep their order in the markup. */+[data-composer-actions] > [data-composer-end="stop"] { order: var(--composer-order-stop, 0); }+[data-composer-actions] > [data-composer-context] { order: var(--composer-order-context, 0); }+[data-composer-actions] > [data-composer-end="mic"] { order: var(--composer-order-mic, 0); }+[data-composer-actions] > [data-call-root] { order: var(--composer-order-call, 0); }+[data-composer-actions] > :is([data-composer-send], [data-composer-follow-up]) { order: var(--composer-order-send, 0); }