Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

feat(web): word the asks on TeamHub's cards from their kind and fields

yunhe60541c9c3af3
diff --git a/apps/web/src/features/rooms/cards/card-prompts.messages.ts b/apps/web/src/features/rooms/cards/card-prompts.messages.ts
new file mode 100644
index 00000000..fcd7e8a2
--- /dev/null
+++ b/apps/web/src/features/rooms/cards/card-prompts.messages.ts
@@ -0,0 +1,32 @@
+import { defineMessages } from "@/i18n/messages";
+
+/**
+ * The asks TeamHub writes on the cards it posts for an Agent, worded on the
+ * client from the card's kind and fields.
+ */
+export const cardPromptsMessages = defineMessages("cardPrompts", {
+ profileSetupApps:
+ "Before I help with replies and follow-ups, I'd like to get to know you. The quickest way is to let me see where you talk about work — one account is enough.",
+ profileSetupSources:
+ "Do you have a personal website or portfolio? Paste a link, or upload your resume and work samples.",
+ connectionAuth:
+ "Please connect and authorize your {app} account so I can continue.",
+ connectionAuthAccount:
+ "Please connect and authorize the {app} account {account} so I can continue.",
+ providerKey: "Please add a Composio API key so I can use connected apps.",
+ providerKeyApp:
+ "Please add a Composio API key so I can connect {app}. Every connected app needs it.",
+ searchKeyMissing: "Please add a {backend} API key so I can search the web.",
+ searchKeyRejected:
+ "{backend} refused the saved API key. Please add a new key so I can search the web.",
+ searchKeyFreeLimit:
+ "The free {backend} trial is used up. Please add a {backend} API key so I can keep searching.",
+ searchKeyFreeLimitSuggested:
+ "The free web search trial is used up. Please add a web search API key so I can keep searching; {backend} is suggested.",
+ browserConnection:
+ "Please connect your everyday Chrome so I can continue the browser task. The extension token goes only to your Computer.",
+ computerPermission: "System permission needed on your Mac",
+ roomCreation: "Request to create a collaboration Room: {name}",
+ agentCreate: "Create Agent “{name}”",
+ agentChange: "Change Agent “{name}”",
+});
diff --git a/apps/web/src/features/rooms/cards/card-prompts.test.ts b/apps/web/src/features/rooms/cards/card-prompts.test.ts
new file mode 100644
index 00000000..da937a50
--- /dev/null
+++ b/apps/web/src/features/rooms/cards/card-prompts.test.ts
@@ -0,0 +1,109 @@
+import { afterEach, describe, expect, it } from "vitest";
+
+import { resetLanguageForTest, setLanguage, translate } from "@/i18n/language";
+import zhCN from "@/i18n/locales/zh-CN.json";
+
+import { decisionCardHeading } from "./card-prompts";
+import type { DecisionMessageCard } from "./decision-card";
+
+afterEach(() => resetLanguageForTest());
+
+const base = {
+ card_type: "personal_notice",
+ intent: "decision_requested",
+ version: 1,
+ decision_id: "decision-1",
+ status: "pending",
+ decision_owner: { id: "alice", display_name: "Alice", kind: "human" },
+ requester: { id: "writer", display_name: "Writer", kind: "agent" },
+} as const;
+
+function card(fields: Partial<DecisionMessageCard>): DecisionMessageCard {
+ return { ...base, kind: "question", title: "TeamHub title", ...fields };
+}
+
+describe("decisionCardHeading", () => {
+ it("words TeamHub's asks from the card's kind and fields", () => {
+ expect(
+ decisionCardHeading(
+ card({
+ kind: "connection_auth",
+ connection_auth: { app_key: "notion", account: "[email protected]" },
+ }),
+ translate,
+ ),
+ ).toBe(
+ "Please connect and authorize the Notion account [email protected] so I can continue.",
+ );
+ expect(
+ decisionCardHeading(
+ card({
+ kind: "search_key",
+ search_key: {
+ backend: "brave",
+ origin: "suggested",
+ reason: "free_limit",
+ },
+ }),
+ translate,
+ ),
+ ).toBe(
+ "The free web search trial is used up. Please add a web search API key so I can keep searching; Brave Search is suggested.",
+ );
+ });
+
+ it("follows the interface language", async () => {
+ await setLanguage("zh-CN");
+ expect(
+ decisionCardHeading(card({ kind: "browser_connection" }), translate),
+ ).toBe(zhCN.cardPrompts.browserConnection);
+ expect(
+ decisionCardHeading(
+ card({
+ kind: "provider_key",
+ provider_key: { app_key: "gmail" },
+ }),
+ translate,
+ { app: "Gmail" },
+ ),
+ ).toBe(zhCN.cardPrompts.providerKeyApp.replace("{app}", "Gmail"));
+ expect(
+ decisionCardHeading(
+ card({
+ kind: "agent_change",
+ agent_change: {
+ action: "create",
+ agent_name: "Nova",
+ changes: [],
+ } as unknown as DecisionMessageCard["agent_change"],
+ }),
+ translate,
+ ),
+ ).toBe(zhCN.cardPrompts.agentCreate.replace("{name}", "Nova"));
+ });
+
+ it("keeps the title TeamHub sent for anything it does not word", async () => {
+ await setLanguage("zh-CN");
+ // An Agent's own question, in the Agent's words.
+ expect(
+ decisionCardHeading(
+ card({ title: "Which draft do you prefer?" }),
+ translate,
+ ),
+ ).toBe("Which draft do you prefer?");
+ // A kind added to TeamHub after this client was built.
+ expect(
+ decisionCardHeading(
+ card({ kind: "calendar_hold" as never, title: "Hold Friday 3pm?" }),
+ translate,
+ ),
+ ).toBe("Hold Friday 3pm?");
+ // A card without the fields its wording needs.
+ expect(
+ decisionCardHeading(
+ card({ kind: "connection_auth", title: "Please connect an app." }),
+ translate,
+ ),
+ ).toBe("Please connect an app.");
+ });
+});
diff --git a/apps/web/src/features/rooms/cards/card-prompts.ts b/apps/web/src/features/rooms/cards/card-prompts.ts
new file mode 100644
index 00000000..45a725d2
--- /dev/null
+++ b/apps/web/src/features/rooms/cards/card-prompts.ts
@@ -0,0 +1,74 @@
+import { webSearchBackendName } from "@/features/web-search/web-search-backends";
+import type { Translate } from "@/i18n/language";
+
+import { cardPromptsMessages as m } from "./card-prompts.messages";
+import { connectedAppDisplayName } from "./connected-app-names";
+import type { DecisionMessageCard } from "./decision-card";
+
+/**
+ * The heading of a card TeamHub posted for an Agent, worded from its kind and
+ * fields so it follows the interface language. A kind this client does not
+ * word, or a card without the fields it needs, keeps the title TeamHub sent.
+ * `app` is the app's name from the catalog, when the view has loaded it.
+ */
+export function decisionCardHeading(
+ card: DecisionMessageCard,
+ t: Translate,
+ names: { readonly app?: string } = {},
+): string {
+ switch (card.kind) {
+ case "profile_setup_apps":
+ return t(m.profileSetupApps);
+ case "profile_setup_sources":
+ return t(m.profileSetupSources);
+ case "connection_auth": {
+ const view = card.connection_auth;
+ if (!view?.app_key) break;
+ const app = names.app ?? connectedAppDisplayName(view.app_key);
+ return view.account
+ ? t(m.connectionAuthAccount, { account: view.account, app })
+ : t(m.connectionAuth, { app });
+ }
+ case "provider_key": {
+ const appKey = card.provider_key?.app_key;
+ return appKey
+ ? t(m.providerKeyApp, {
+ app: names.app ?? connectedAppDisplayName(appKey),
+ })
+ : t(m.providerKey);
+ }
+ case "search_key": {
+ const view = card.search_key;
+ if (!view) break;
+ const backend = webSearchBackendName(view.backend);
+ if (!backend) break;
+ switch (view.reason) {
+ case "missing":
+ return t(m.searchKeyMissing, { backend });
+ case "rejected":
+ return t(m.searchKeyRejected, { backend });
+ case "free_limit":
+ return view.origin === "suggested"
+ ? t(m.searchKeyFreeLimitSuggested, { backend })
+ : t(m.searchKeyFreeLimit, { backend });
+ }
+ break;
+ }
+ case "browser_connection":
+ return t(m.browserConnection);
+ case "computer_permission":
+ return t(m.computerPermission);
+ case "room_creation":
+ if (card.room_creation?.name)
+ return t(m.roomCreation, { name: card.room_creation.name });
+ break;
+ case "agent_change":
+ if (card.agent_change)
+ return t(
+ card.agent_change.action === "create" ? m.agentCreate : m.agentChange,
+ { name: card.agent_change.agent_name },
+ );
+ break;
+ }
+ return card.title;
+}
diff --git a/apps/web/src/features/rooms/cards/decision-browser-connection-view.test.tsx b/apps/web/src/features/rooms/cards/decision-browser-connection-view.test.tsx
index 72b14b25..6d92e7a0 100644
--- a/apps/web/src/features/rooms/cards/decision-browser-connection-view.test.tsx
+++ b/apps/web/src/features/rooms/cards/decision-browser-connection-view.test.tsx
@@ -22,7 +22,8 @@ const card: Card = {
decision_id: "browser-1",
kind: "browser_connection",
status: "pending",
- title: "Please connect your everyday Chrome.",
+ title:
+ "Please connect your everyday Chrome so I can continue the browser task. The extension token goes only to your Computer.",
browser_connection: { computer_id: "computer-mac" },
decision_owner: { id: "alice", display_name: "Alice", kind: "human" },
requester: { id: "writer", display_name: "Writer", kind: "agent" },
@@ -99,11 +100,13 @@ describe("Browser connection card", () => {
expect(
within(box).getByRole("heading", {
level: 3,
- name: "Please connect your everyday Chrome.",
+ name: "Please connect your everyday Chrome so I can continue the browser task. The extension token goes only to your Computer.",
}),
).toBeVisible();
expect(
- screen.getAllByText("Please connect your everyday Chrome."),
+ screen.getAllByText(
+ "Please connect your everyday Chrome so I can continue the browser task. The extension token goes only to your Computer.",
+ ),
).toHaveLength(1);
expect(document.querySelector(".card-prompt")).toBeNull();
expect(box).toHaveTextContent("Everyday Chrome");
diff --git a/apps/web/src/features/rooms/cards/decision-browser-connection-view.tsx b/apps/web/src/features/rooms/cards/decision-browser-connection-view.tsx
index 8299c9ec..e78d17ea 100644
--- a/apps/web/src/features/rooms/cards/decision-browser-connection-view.tsx
+++ b/apps/web/src/features/rooms/cards/decision-browser-connection-view.tsx
@@ -13,6 +13,7 @@ import { translate } from "@/i18n/language";
import type { Message } from "@/i18n/messages";
import { useT } from "@/i18n/use-translation";
+import { decisionCardHeading } from "./card-prompts";
import { CardActions, CardError, CardRow } from "./approval-card-parts";
import { CardBox, CardDone, type ReceiptTone } from "./card-shell";
import { cardsMessages } from "./cards.messages";
@@ -76,7 +77,7 @@ export function BrowserConnectionDecision({
return (
<>
<CardBox
- heading={card.title}
+ heading={decisionCardHeading(card, t)}
label={t(cardsMessages.labelBrowserConnection)}
>
<CardRow
diff --git a/apps/web/src/features/rooms/cards/decision-card.tsx b/apps/web/src/features/rooms/cards/decision-card.tsx
index fb009a77..8b864c98 100644
--- a/apps/web/src/features/rooms/cards/decision-card.tsx
+++ b/apps/web/src/features/rooms/cards/decision-card.tsx
@@ -34,6 +34,7 @@ import {
CardRowDetails,
DecisionActions,
} from "./approval-card-parts";
+import { decisionCardHeading } from "./card-prompts";
import { CardBox, CardDone, type ReceiptTone } from "./card-shell";
import { cardsMessages } from "./cards.messages";
import { ConnectedAppIcon } from "./connected-app-identity";
@@ -249,7 +250,10 @@ function ApprovalDecision({
return (
<>
- <CardBox heading={email ? undefined : card.title} label={label}>
+ <CardBox
+ heading={email ? undefined : decisionCardHeading(card, t)}
+ label={label}
+ >
{email ? (
<EmailDecisionView account={write?.account ?? ""} message={email} />
) : (
diff --git a/apps/web/src/features/rooms/cards/decision-computer-permission-view.test.tsx b/apps/web/src/features/rooms/cards/decision-computer-permission-view.test.tsx
index 2093d636..e98dd1f2 100644
--- a/apps/web/src/features/rooms/cards/decision-computer-permission-view.test.tsx
+++ b/apps/web/src/features/rooms/cards/decision-computer-permission-view.test.tsx
@@ -28,7 +28,7 @@ const card: Card = {
decision_id: "permission-1",
kind: "computer_permission",
status: "pending",
- title: "Grant macOS permissions.",
+ title: "System permission needed on your Mac",
computer_permission: {
computer_id: "computer-mac",
subject: "linger",
@@ -167,10 +167,12 @@ describe("Computer permission card", () => {
expect(
within(box).getByRole("heading", {
level: 3,
- name: "Grant macOS permissions.",
+ name: "System permission needed on your Mac",
}),
).toBeVisible();
- expect(screen.getAllByText("Grant macOS permissions.")).toHaveLength(1);
+ expect(
+ screen.getAllByText("System permission needed on your Mac"),
+ ).toHaveLength(1);
expect(document.querySelector(".card-prompt")).toBeNull();
expect(screen.queryByText(/Asks you|wants to use/)).not.toBeInTheDocument();
expect(screen.getByText("Linger · Screen Recording")).toBeVisible();
@@ -221,10 +223,12 @@ describe("Computer permission card", () => {
expect(
within(box).getByRole("heading", {
level: 3,
- name: "Grant macOS permissions.",
+ name: "System permission needed on your Mac",
}),
).toBeVisible();
- expect(screen.getAllByText("Grant macOS permissions.")).toHaveLength(1);
+ expect(
+ screen.getAllByText("System permission needed on your Mac"),
+ ).toHaveLength(1);
expect(document.querySelector(".card-prompt")).toBeNull();
});
@@ -409,7 +413,7 @@ describe("Computer permission card", () => {
expect(
screen.getByRole("heading", {
level: 3,
- name: "Grant macOS permissions.",
+ name: "System permission needed on your Mac",
}),
).toBeVisible();
expect(screen.queryByRole("button")).not.toBeInTheDocument();
diff --git a/apps/web/src/features/rooms/cards/decision-computer-permission-view.tsx b/apps/web/src/features/rooms/cards/decision-computer-permission-view.tsx
index 75802e00..995fa08f 100644
--- a/apps/web/src/features/rooms/cards/decision-computer-permission-view.tsx
+++ b/apps/web/src/features/rooms/cards/decision-computer-permission-view.tsx
@@ -27,6 +27,7 @@ import { translate } from "@/i18n/language";
import type { Message } from "@/i18n/messages";
import { useT } from "@/i18n/use-translation";
+import { decisionCardHeading } from "./card-prompts";
import { CardActions, CardError } from "./approval-card-parts";
import { CardBox, CardDone, type ReceiptTone } from "./card-shell";
import { cardsMessages } from "./cards.messages";
@@ -247,7 +248,7 @@ export function ComputerPermissionDecision({
return (
<>
<CardBox
- heading={card.title}
+ heading={decisionCardHeading(card, t)}
label={t(cardsMessages.labelSystemPermission)}
>
<ul className="flex flex-col">
diff --git a/apps/web/src/features/rooms/cards/decision-connection-auth-view.test.tsx b/apps/web/src/features/rooms/cards/decision-connection-auth-view.test.tsx
index c63bec12..ddb73a44 100644
--- a/apps/web/src/features/rooms/cards/decision-connection-auth-view.test.tsx
+++ b/apps/web/src/features/rooms/cards/decision-connection-auth-view.test.tsx
@@ -15,7 +15,7 @@ const card: Card = {
decision_id: "auth-1",
kind: "connection_auth",
status: "pending",
- title: "Create a Notion page for this plan.",
+ title: "Please connect and authorize your Notion account so I can continue.",
connection_auth: { app_key: "notion" },
expires_at: "2999-01-01T00:00:00Z",
decision_owner: { id: "alice", display_name: "Alice", kind: "human" },
@@ -108,11 +108,13 @@ describe("Chat connection authorization", () => {
expect(
screen.getByRole("heading", {
level: 3,
- name: "Create a Notion page for this plan.",
+ name: "Please connect and authorize your Notion account so I can continue.",
}),
).toBeVisible();
expect(
- screen.getAllByText("Create a Notion page for this plan."),
+ screen.getAllByText(
+ "Please connect and authorize your Notion account so I can continue.",
+ ),
).toHaveLength(1);
expect(document.querySelector(".card-prompt")).toBeNull();
expect(screen.queryByText(/Asks you|Authorizing/)).not.toBeInTheDocument();
@@ -129,9 +131,9 @@ describe("Chat connection authorization", () => {
);
});
- it("shows a long agent prompt as the heading, never on a button", async () => {
+ it("shows the long ask as the heading, never on a button", async () => {
const prompt =
- "If you like, please authorize your Notion connection. Once authorized, I can read or act on only the pages or databases you name.";
+ "Please connect and authorize your Notion account so I can continue.";
await setup({
...card,
title: prompt,
diff --git a/apps/web/src/features/rooms/cards/decision-connection-auth-view.tsx b/apps/web/src/features/rooms/cards/decision-connection-auth-view.tsx
index dff0d0dd..c4760e48 100644
--- a/apps/web/src/features/rooms/cards/decision-connection-auth-view.tsx
+++ b/apps/web/src/features/rooms/cards/decision-connection-auth-view.tsx
@@ -33,6 +33,7 @@ import { translate } from "@/i18n/language";
import type { Message } from "@/i18n/messages";
import { useT } from "@/i18n/use-translation";
+import { decisionCardHeading } from "./card-prompts";
import { CardActions, CardError, CardRow } from "./approval-card-parts";
import { CardBox, CardDone, type ReceiptTone } from "./card-shell";
import { cardsMessages } from "./cards.messages";
@@ -122,7 +123,7 @@ function ConnectionAuthCard({
return (
<>
<CardBox
- heading={card.title}
+ heading={decisionCardHeading(card, t, { app: appName })}
label={t(cardsMessages.labelAppAuthorization)}
>
<CardRow
diff --git a/apps/web/src/features/rooms/cards/decision-profile-setup-view.test.tsx b/apps/web/src/features/rooms/cards/decision-profile-setup-view.test.tsx
index 277fd9ab..459ddf23 100644
--- a/apps/web/src/features/rooms/cards/decision-profile-setup-view.test.tsx
+++ b/apps/web/src/features/rooms/cards/decision-profile-setup-view.test.tsx
@@ -114,29 +114,35 @@ function upload(id: string, filename: string): TeamHubMessageAttachmentUpload {
}
describe("AnotherMe setup card prompt", () => {
- it.each([[appsForm], [sourcesForm]])(
- "shows the %j prompt as the box heading",
- async (form) => {
- renderCard(setupCard(form));
+ const appsPrompt =
+ "Before I help with replies and follow-ups, I'd like to get to know you. The quickest way is to let me see where you talk about work — one account is enough.";
+ const sourcesPrompt =
+ "Do you have a personal website or portfolio? Paste a link, or upload your resume and work samples.";
- const card = await screen.findByRole("region", {
- name: "AnotherMe setup",
- });
- expect(
- within(card).getByRole("heading", {
- level: 3,
- name: "Connect one account.",
- }),
- ).toBeVisible();
- expect(screen.getAllByText("Connect one account.")).toHaveLength(1);
- expect(document.querySelector(".card-prompt")).toBeNull();
- expect(screen.queryByText(/Asks you/)).toBeNull();
- },
- );
+ it.each([
+ [appsForm, appsPrompt],
+ [sourcesForm, sourcesPrompt],
+ ])("shows the %j prompt as the box heading", async (form, prompt) => {
+ renderCard(setupCard(form));
+
+ const card = await screen.findByRole("region", {
+ name: "AnotherMe setup",
+ });
+ expect(
+ within(card).getByRole("heading", { level: 3, name: prompt }),
+ ).toBeVisible();
+ expect(screen.getAllByText(prompt)).toHaveLength(1);
+ expect(document.querySelector(".card-prompt")).toBeNull();
+ expect(screen.queryByText(/Asks you/)).toBeNull();
+ });
it("shows anyone else no actions or copy", async () => {
renderCard(setupCard(sourcesForm), { currentActorId: "actor-maya" });
- expect(await screen.findByText("Connect one account.")).toBeVisible();
+ expect(
+ await screen.findByText(
+ "Do you have a personal website or portfolio? Paste a link, or upload your resume and work samples.",
+ ),
+ ).toBeVisible();
expect(screen.queryByText(/Waiting for Jenny Bin/)).toBeNull();
expect(screen.queryByRole("textbox")).toBeNull();
expect(screen.queryByRole("button")).toBeNull();
diff --git a/apps/web/src/features/rooms/cards/decision-profile-setup-view.tsx b/apps/web/src/features/rooms/cards/decision-profile-setup-view.tsx
index 05659c37..585dbec0 100644
--- a/apps/web/src/features/rooms/cards/decision-profile-setup-view.tsx
+++ b/apps/web/src/features/rooms/cards/decision-profile-setup-view.tsx
@@ -40,6 +40,7 @@ import type {
TeamHubMessageAttachmentUpload,
} from "@/features/teamhub/teamhub-types";
+import { decisionCardHeading } from "./card-prompts";
import { CardActions, CardError } from "./approval-card-parts";
import { CardBox, CardDone } from "./card-shell";
import { cardsMessages } from "./cards.messages";
@@ -94,7 +95,7 @@ function SetupCard({
return (
<>
<CardBox
- heading={card.title}
+ heading={decisionCardHeading(card, t)}
label={t(cardsMessages.labelAnotherMeSetup)}
>
{children}
diff --git a/apps/web/src/features/rooms/cards/decision-provider-key-view.tsx b/apps/web/src/features/rooms/cards/decision-provider-key-view.tsx
index c0c2ffe6..be9fcf8c 100644
--- a/apps/web/src/features/rooms/cards/decision-provider-key-view.tsx
+++ b/apps/web/src/features/rooms/cards/decision-provider-key-view.tsx
@@ -19,6 +19,7 @@ import { translate } from "@/i18n/language";
import type { Message } from "@/i18n/messages";
import { useT } from "@/i18n/use-translation";
+import { decisionCardHeading } from "./card-prompts";
import { CardActions, CardError, CardRow } from "./approval-card-parts";
import { CardBox, CardDone, type ReceiptTone } from "./card-shell";
import { cardsMessages } from "./cards.messages";
@@ -51,6 +52,9 @@ export function ProviderKeyDecision({
const [error, setError] = useState("");
const owner = currentActorId === card.decision_owner.id;
const appKey = card.provider_key?.app_key;
+ const appName = appKey
+ ? catalog.data?.apps.find((app) => app.key === appKey)?.display_name
+ : undefined;
async function decline() {
setBusy(true);
@@ -76,7 +80,10 @@ export function ProviderKeyDecision({
const result = card.status === "pending" ? null : keyResult(card);
return (
<>
- <CardBox heading={card.title} label={t(cardsMessages.labelComposioKey)}>
+ <CardBox
+ heading={decisionCardHeading(card, t, { app: appName })}
+ label={t(cardsMessages.labelComposioKey)}
+ >
<CardRow
detail={
appKey
diff --git a/apps/web/src/features/rooms/cards/decision-search-key-view.test.tsx b/apps/web/src/features/rooms/cards/decision-search-key-view.test.tsx
index 20d86238..0e3b2114 100644
--- a/apps/web/src/features/rooms/cards/decision-search-key-view.test.tsx
+++ b/apps/web/src/features/rooms/cards/decision-search-key-view.test.tsx
@@ -23,7 +23,7 @@ const card: DecisionMessageCard = {
decision_id: "search-1",
kind: "search_key",
status: "pending",
- title: "Add a Tavily API key so I can search the web.",
+ title: "Please add a Tavily API key so I can search the web.",
search_key: { backend: "tavily", origin: "requested", reason: "missing" },
decision_owner: { id: "alice", display_name: "Alice", kind: "human" },
requester: { id: "writer", display_name: "Writer", kind: "agent" },
@@ -73,7 +73,7 @@ describe("Web search key card", () => {
const { decision, runtime, saved } = setup();
const box = await findBox();
expect(box).toHaveTextContent(
- "Add a Tavily API key so I can search the web.",
+ "Please add a Tavily API key so I can search the web.",
);
expect(within(box).getByText("Requested")).toBeVisible();
expect(
diff --git a/apps/web/src/features/rooms/cards/decision-search-key-view.tsx b/apps/web/src/features/rooms/cards/decision-search-key-view.tsx
index c5fd4168..5307598a 100644
--- a/apps/web/src/features/rooms/cards/decision-search-key-view.tsx
+++ b/apps/web/src/features/rooms/cards/decision-search-key-view.tsx
@@ -37,6 +37,7 @@ import {
CardRow,
CardRowDetails,
} from "./approval-card-parts";
+import { decisionCardHeading } from "./card-prompts";
import { CardBox, CardDone, type ReceiptTone } from "./card-shell";
import { cardsMessages as m } from "./cards.messages";
import type { DecisionMessageCard } from "./decision-card";
@@ -103,7 +104,7 @@ export function SearchKeyDecision({
const result = pending ? null : keyResult(card, view.backend, t);
const canSave = list.data?.can_save_keys !== false;
return (
- <CardBox heading={card.title} label={t(m.labelSearchKey)}>
+ <CardBox heading={decisionCardHeading(card, t)} label={t(m.labelSearchKey)}>
<CardRow
detail={shown?.description}
icon={
diff --git a/apps/web/src/features/rooms/cards/room-message-card.test.tsx b/apps/web/src/features/rooms/cards/room-message-card.test.tsx
index 9c81f1ef..4b4b1a23 100644
--- a/apps/web/src/features/rooms/cards/room-message-card.test.tsx
+++ b/apps/web/src/features/rooms/cards/room-message-card.test.tsx
@@ -40,7 +40,7 @@ describe("Room Message card renderer", () => {
expect(
within(card).getByRole("heading", {
level: 3,
- name: "Request to create a collaboration room: Interview coordination",
+ name: "Request to create a collaboration Room: Interview coordination",
}),
).toBeVisible();
expect(document.querySelector(".card-prompt")).toBeNull();
@@ -300,7 +300,7 @@ describe("Room Message card renderer", () => {
expect(
within(card).getByRole("heading", {
level: 3,
- name: `Request to create a collaboration room: ${name}`,
+ name: `Request to create a collaboration Room: ${name}`,
}),
).toHaveClass("[overflow-wrap:anywhere]");
expect(document.querySelector(".card-prompt")).toBeNull();
diff --git a/apps/web/src/i18n/locales/zh-CN.json b/apps/web/src/i18n/locales/zh-CN.json
index 6256c708..c2329591 100644
--- a/apps/web/src/i18n/locales/zh-CN.json
+++ b/apps/web/src/i18n/locales/zh-CN.json
@@ -2778,5 +2778,22 @@
"signInRequired": "需要在 {computer} 上登录 {app}。",
"needsUpdate": "{computer} 需要更新后才能运行 {app}。",
"computerOffline": "{computer} 已离线。"
+ },
+ "cardPrompts": {
+ "profileSetupApps": "在帮你处理回复和后续跟进之前,我想先了解你。最快的方式是让我看看你平时在哪里沟通工作——一个账号就够了。",
+ "profileSetupSources": "你有个人网站或作品集吗?可以粘贴链接,或上传你的简历和作品。",
+ "connectionAuth": "请连接并授权你的 {app} 账号,以便我继续。",
+ "connectionAuthAccount": "请连接并授权 {app} 账号 {account},以便我继续。",
+ "providerKey": "请添加 Composio API 密钥,以便我使用已连接的应用。",
+ "providerKeyApp": "请添加 Composio API 密钥,以便我连接 {app}。连接任何应用都需要它。",
+ "searchKeyMissing": "请添加 {backend} API 密钥,以便我搜索网页。",
+ "searchKeyRejected": "{backend} 拒绝了已保存的 API 密钥。请添加新的密钥,以便我搜索网页。",
+ "searchKeyFreeLimit": "{backend} 的免费试用已用完。请添加 {backend} API 密钥,以便我继续搜索。",
+ "searchKeyFreeLimitSuggested": "免费网页搜索试用已用完。请添加网页搜索 API 密钥,以便我继续搜索;推荐使用 {backend}。",
+ "browserConnection": "请连接你日常使用的 Chrome,以便我继续浏览器任务。扩展令牌只会发送到你的电脑。",
+ "computerPermission": "需要在你的 Mac 上授予系统权限",
+ "roomCreation": "请求创建协作 Room:{name}",
+ "agentCreate": "创建 Agent“{name}”",
+ "agentChange": "修改 Agent“{name}”"
}
}