Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix(integrations): clarify setup and simplify draft preferences (#2589)

Joshua7417702e4311
diff --git a/CLAUDE.md b/CLAUDE.md
index b58a23816..b0c5c23ba 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -179,7 +179,7 @@ OpenWhispr is an Electron-based desktop dictation application that uses whisper.
- Registration is by list: `createConnectors.js` (`CONNECTOR_FACTORIES`, one `build<Name>Connector(deps)` per provider module) in main, `connectorToolModules.ts` (`CONNECTOR_TOOL_MODULES`, registered by `readyConnectorIds()`) for tools, and `connectorRows.tsx` (`CONNECTOR_ROWS`) for Settings rows. Each tool carries its own `promptInstruction` and `connectorId`; the connector rules join the prompt when any connector tool is offered
- `runApprovalAction` caps a turn at 5 approval cards across connectors (`approval_card` turn slot, given back when no card appears) and holds every approval action's turn off the caret (`onHoldDelivery`), whatever the outcome; a turn's scope passes one hold per tool call on to the chat surface, plus a later one that newly keeps the clipboard. Cards lay out fields by `verbKey`: `email`, `issue` (title and description) and `comment`; a sent commit may name what it created (`resultLabel`, shown as "Created ENG-124")
- `pendingActions.js`: pending → committing → sent/failed/unknown; actions are bound to the connection (account, workspace, `generation`) they were prepared on and to the OpenWhispr account that prepared them (another account's commit is withdrawn as `account_changed`)
- - `connector_actions` (SQLite) is the durable receipt: destination labels, states and links only, never content. Each row is stamped with the account bound to the credential the action ran under (`accountScopeBinding`, read before and after the policy wait; with no account, `prepare` and `runDirect` refuse as `receipt_unavailable`; a `commit` under a changed or missing account is withdrawn as `not_sent`/`account_changed`), so Recent actions lists only that account's rows and account deletion removes them. Interrupted rows are reconciled on launch (committing → unknown; rows with no account are deleted), expired pending actions are recorded as `expired`, a direct run the connector stopped (`not_sent`) is `cancelled`, and a direct run that throws or returns a malformed result is `unknown` (it may have happened), never `failed`. Every connector result is whitelisted and type-checked per state before it is recorded or reaches the renderer. A cancel (Esc) reaches a direct run until its side effect through `runtime.signal`, checked right before the compose window opens
+ - `connector_actions` (SQLite) is the durable receipt: destination labels, states and links only, never content. Each row is stamped with the account bound to the credential the action ran under (`accountScopeBinding`, read before and after the policy wait; with no account, `prepare` and `runDirect` refuse as `receipt_unavailable`; a `commit` under a changed or missing account is withdrawn as `not_sent`/`account_changed`), so the `connector-recent-actions` history IPC lists only that account's rows and account deletion removes them. Interrupted rows are reconciled on launch (committing → unknown; rows with no account are deleted), expired pending actions are recorded as `expired`, a direct run the connector stopped (`not_sent`) is `cancelled`, and a direct run that throws or returns a malformed result is `unknown` (it may have happened), never `failed`. Every connector result is whitelisted and type-checked per state before it is recorded or reaches the renderer. A cancel (Esc) reaches a direct run until its side effect through `runtime.signal`, checked right before the compose window opens
- Policy fails closed (`connectorPolicy.js`'s `connectorPolicyState` classifies the snapshot; `connectorIpc.js`'s `createConnectorPolicyResolver` enforces the 1.5s deadline): only a successful, well-formed snapshot allows; unresolvable, any error code, or >1.5s with no verdict already held for the account (`workspacePolicyManager.peekPolicy`) → unavailable; org switch `features.connectorsEnabled`, and `agentEnabled: false` turns connectors off too
- `emailConnector.js` opens Gmail/Outlook/mailto compose windows (`emailCompose.js`, shared ESM); a body that won't fit the compose URL (2,000 chars; 6,000 for Gmail on macOS/Linux, since Windows caps opened URLs near 2,081) goes to the clipboard after the OS accepts the link (on Linux a `mailto` is refused first when `xdg-mime` reports no default — empty output with exit 0, or exit 4 on KDE 5 — except under Flatpak, where the portal picks the handler), then the subject too if it's still too long; a recipient list that alone doesn't fit is refused. `email_draft` opens at most 3 drafts per turn, and only one of them may use the clipboard (`ToolExecutionContext.claimTurnSlot`; a draft that didn't open gives its slots back, and the compose preview is built before any slot is claimed). Subject and body go through `toWellFormed()`, the renderer NFC-normalises addresses (`bareEmailAddress`), and a recipient with a non-ASCII domain is shown with its punycode form (`recipientLabel`) to the model, in the tool step and in receipts. Automatic picks Send from chat (Gmail) when the Gmail connector is connected (including one that needs reconnecting), then the Gmail compose link when a Google calendar is connected, otherwise the Microsoft tenant rule as today: Outlook work vs Outlook.com from the Microsoft account's tenant id (`tid`, consumer tenant `9188040d-…`), falling back to the email domain for accounts connected before it was stored (`resolveEmailDraftTarget` in `src/utils/emailDraftTarget.ts`)
- Gmail send (`gmailMime.js`, `gmailApi.js`, `gmailAuth.js`, `gmailConnector.js`) is an approval connector: with Gmail connected (Settings → Integrations → Connectors), `email_draft` shows an editable card and `commit` sends through the Gmail API. The only Gmail scope is `gmail.send` (plus `openid email`); a grant without it, or without a verified Google address (`email_verified`), is revoked, and a refresh is bound to the card's login (single-flight per OpenWhispr account and login). A login records the OAuth client that issued it (`clientId`). A refresh Google refuses is never reported as a network error: `invalid_grant`, another OAuth refusal (not `invalid_client`/`unauthorized_client`/`deleted_client`, build faults that are `gmail_unavailable`), or a login issued to a client this build no longer uses flags the login for reconnecting, and a Workspace admin block (`admin_policy_enforced`, `org_internal`) is `domain_policy`. Google's `/revoke` ends the user's whole grant to a Cloud project, so Disconnect (and a refused grant) skips it when a connected Google Calendar account with the same address is on the same project as the login's own client (`sharesCalendarGrant`, by the client id's project number) and only deletes the local tokens; the disconnect result then carries `grantKept` and the Settings row says Google still lists the app until the calendar is disconnected too. The shared-grant check reads the calendar accounts only once the projects match. A revoke is skipped the same way when another OpenWhispr account on the device has a Gmail login for the same Google address on the same project (`readAllAccounts`), since it holds the same grant. Connecting a different Google (or Slack) account over an existing login revokes the replaced one (`loginKey`); reconnecting the same account doesn't, since Google's revoke would end the new login's grant too. The Google client is `GMAIL_CLIENT_ID`/`GMAIL_CLIENT_SECRET` when both are set, else the calendar pair (`GOOGLE_CALENDAR_CLIENT_ID`/`_SECRET`); with neither, Gmail reports `configured: false` and its row hides. The card blocks Send on an empty To, a bad address, more than 50 recipients, a subject over 250 characters or a body over 512 KB as sent (UTF-8, CRLF; `MAX_EMAIL_BODY_BYTES`, `emailBodyBytes`), a size that with the largest headers the other limits allow stays under the 1 MB raw cap (`src/utils/emailApprovalFields.ts`, limits shared from `emailCompose.js`; To/Cc accept `,` `;` and the Arabic and CJK commas, and a pasted `Name <address>` — including Outlook's `Last, First <address>` — becomes its bare address, with the resolved addresses shown under the field); main re-validates the same limits at Send (addresses as dot-atoms of at most 64 bytes without `=?`, ≤ 50 recipients, subject ≤ 250 characters without line breaks, body ≤ 512 KB, raw message ≤ 1 MB — all checked before any token refresh) and refuses CR/LF in every header. 5xx, a timeout after writing, and a 200 without a message id are `unknown` (link to the Sent folder; no retry); a 401 is refreshed and retried once under the same login; a 429 asking for ≤ 5 s is retried once; a 413 is `too_long`. A connector card whose preview shows a field the action doesn't declare editable is refused as malformed, so a typo in a declaration can't silently drop the user's edit. Release rule: a release build falls back to the calendar's Google client, so `gmail.send` must pass Google verification before a release ships it; develop against a separate Testing project with only `gmail.send` (`GMAIL_CLIENT_ID`/`_SECRET`), never the production calendar project
@@ -203,7 +203,7 @@ OpenWhispr is an Electron-based desktop dictation application that uses whisper.
- **PostMigrationOnboarding.tsx**: One-time modal for users returning from the pre-Gizmo bundle ID; reuses `PermissionsSection` to walk through re-granting Microphone, Accessibility, and System Audio. Triggered by `postMigrationDetector.js` (see Helper Modules)
- **SettingsPage.tsx**: Comprehensive settings interface
- **WhisperModelPicker.tsx**: Model selection and download UI
-- **ConnectorsSection.tsx**: Integrations → Connectors: the "Draft emails in" picker (Automatic shows what it resolved to; Send from chat (Gmail) says to connect Gmail until it can send, and the card's description follows where drafts actually go), a paid-plan upsell, "turned off by your organization" for a resolved org block and "not available right now" while the policy is loading, failed or requires a newer app, and Recent actions (refetched when main's account scope changes)
+- **ConnectorsSection.tsx**: Integrations → Connectors: the "Draft emails in" picker (Automatic shows what it resolved to; Send from chat (Gmail) says to connect Gmail until it can send, and the card's description follows where drafts actually go), a paid-plan upsell, "turned off by your organization" for a resolved org block and "not available right now" while the policy is loading, failed or requires a newer app
- **ui/**: Reusable UI components (buttons, cards, inputs, etc.)
- **ui/RichTextEditor.tsx**: Tiptap note editor. Note bodies (`content`, `enhanced_content`) are stored as Markdown via tiptap-markdown (`html: false`)
- `RichTextEditorExtensions.ts` holds the extension list (`RichTextEditor` adds the mention extension in front of it); order matters: at equal priority, later extensions' keymaps and clipboard props run first
diff --git a/docs/integrations-compatibility.md b/docs/integrations-compatibility.md
new file mode 100644
index 000000000..3195256cf
--- /dev/null
+++ b/docs/integrations-compatibility.md
@@ -0,0 +1,47 @@
+# Integrations compatibility and acceptance
+
+Evidence checked on 2026-10-08 (America/Los_Angeles). This matrix separates provider documentation, local fixtures and actual opened-draft acceptance. Provider browser support does not certify OpenWhispr's compose links.
+
+## Email drafts
+
+| Target | macOS | Windows | Linux | OpenWhispr evidence |
+| ----------------------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
+| Gmail web | Chrome, Firefox, Safari, Edge documented by Google | Chrome, Firefox, Edge documented by Google | Chrome, Firefox documented by Google | Recipient, Cc, subject and body URL fixtures; platform-dependent overflow fixtures. Actual signed-in draft untested in this change. |
+| Outlook work/school and Outlook.com | Edge, Safari 16+, Firefox, Chrome documented by Microsoft | Windows 11: Edge, Firefox, Chrome documented by Microsoft | Firefox, Chrome documented, with some feature limits | Separate work/personal URL fixtures and Microsoft tenant/domain selection fixtures. Actual signed-in draft untested in this change. |
+| Yahoo Mail through System mail app | Requires a configured mailto handler; Yahoo documents Chrome/Firefox setup. macOS configuration untested. | Yahoo documents Windows default-email and Chrome/Firefox setup. Untested. | Browser/desktop handler configuration untested. | Generic mailto encoding and launch fixtures only. No dedicated Yahoo web target or Yahoo-specific draft verification. |
+| System mail app | OS-selected email handler; webmail needs additional configuration | OS-selected email handler | Configured desktop/portal handler | Mocked successful/failed launches; Linux missing-handler and Flatpak fallback fixtures. Actual app/browser acceptance untested in this change. |
+
+Google's browser guidance is for the current and previous version and requires JavaScript and cookies. Microsoft and Yahoo browser requirements can change; consult the linked sources before expanding supported combinations. Mobile browsers and operating systems are outside this desktop check.
+
+### Behavior retained
+
+- A fresh preference is Automatic. It selects Gmail's approval card when Gmail is connected (including a login needing reconnect), then Gmail web for a connected Google Calendar, then Outlook work/personal for connected Microsoft accounts, then the system mail handler.
+- An explicit Gmail web, Outlook work/personal or System mail app preference stays explicit when accounts change. A saved Send from chat preference falls back to Automatic when its Gmail login is removed. No preference migration is performed here.
+- Web targets select a provider, not an account. The browser's signed-in session determines the sending account; review the sender before sending.
+- Opening a draft never establishes delivery. The separate OAuth-connected Gmail approval card sends only after the user approves Send. This change does not alter that path.
+- Draft links are capped at 2,000 characters, except Gmail on macOS/Linux at the existing 6,000-character cap. Overflow copies the body, then the subject if needed, only after an accepted launch; recipients that cannot fit are refused. Windows' external-open API documents a 2,081-character limit.
+- The Recent actions view is removed. Receipt creation, account scoping, database records, reconciliation and history IPC remain intact.
+
+### Acceptance still needed
+
+For each applicable provider/browser/OS cell above, use an isolated test account and inspect the actual opened composer: To/Cc (including plus addressing), subject (Unicode, ampersands and percent signs), multiline body, active sender, signed-out redirect, long-body clipboard fallback and missing/default handler. Close without sending. None of these provider/native checks was performed by this change; URL decoding tests do not substitute for them.
+
+Sources: [Gmail browser requirements](https://support.google.com/mail/answer/6557?co=GENIE.Platform%3DDesktop&hl=en), [Outlook browser support](https://support.microsoft.com/en-us/outlook/supported-browsers-for-outlook-on-the-web-and-outlook-com), [Yahoo default email setup](https://help.yahoo.com/kb/new-yahoo-mail/make-yahoo-mail-default-email-windows-web-browser-sln24051.html), [Yahoo browser support](https://help.yahoo.com/kb/mail/browser-supported-sln4556.html), [Apple default email setup](https://support.apple.com/en-us/102362), [Electron external opening](https://www.electronjs.org/docs/latest/api/shell#shellopenexternalurl-options).
+
+## MCP authentication
+
+The MCP URL is `https://mcp.openwhispr.com/mcp`. OAuth and API keys are alternatives; an API key is not a prerequisite for OAuth.
+
+| Client | OAuth | Personal API key |
+| ----------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
+| Claude Connectors | OpenWhispr's guide documents adding a custom connector and signing in | Claude documents custom request headers; OpenWhispr uses a Bearer header |
+| Claude Code | Client documents OAuth for remote servers | OpenWhispr documents Bearer-header configuration |
+| Cursor | Client documents OAuth | OpenWhispr documents Bearer-header configuration |
+| VS Code | No OAuth acceptance verified for OpenWhispr in this change | OpenWhispr documents header configuration with a password input |
+| ChatGPT | Official developer-mode guide documents OAuth; availability depends on plan/workspace settings | No static API-key setup verified here; do not direct users to a generic header field |
+
+For OAuth, add the server URL in a supporting client, sign in to OpenWhispr and approve access. For a client accepting request headers, create a personal key with the needed permissions and configure `Authorization: Bearer YOUR_API_KEY`.
+
+Unauthenticated metadata was checked live: [protected resource](https://mcp.openwhispr.com/.well-known/oauth-protected-resource) points to `auth.openwhispr.com`; [authorization metadata](https://auth.openwhispr.com/.well-known/oauth-authorization-server) advertises dynamic registration, authorization-code and refresh-token grants, and PKCE S256. This verifies advertised configuration only. No credentials were created, accounts linked, client sign-ins completed, or authenticated MCP tools executed.
+
+Sources: [OpenWhispr MCP setup](https://docs.openwhispr.com/integrations/mcp), [Claude custom connectors](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp), [Claude Code MCP](https://code.claude.com/docs/en/mcp), [Cursor MCP](https://cursor.com/docs/mcp), [ChatGPT developer mode](https://help.openai.com/en/articles/12584461-developer-mode-and-full-mcp-connectors-in-chatgpt).
diff --git a/src/components/ApiKeysSection.tsx b/src/components/ApiKeysSection.tsx
index b0168249c..e63a0c738 100644
--- a/src/components/ApiKeysSection.tsx
+++ b/src/components/ApiKeysSection.tsx
@@ -1,6 +1,6 @@
import { useState, useEffect, useCallback, useRef } from "react";
import { useTranslation } from "react-i18next";
-import { Key, Copy, Check, Trash2, Plus, Shield, AlertTriangle } from "./icons";
+import { Key, Copy, Check, Trash2, Shield, AlertTriangle } from "./icons";
import { Button } from "./ui/button";
import { Input } from "./ui/input";
import { Badge } from "./ui/badge";
@@ -47,9 +47,13 @@ function formatRelativeTime(dateString: string): string {
interface ApiKeysSectionProps {
/** Bumped by a "Create API key" elsewhere; opens the create dialog once keys load. */
createRequest?: number;
+ onCanCreateChange: (canCreate: boolean) => void;
}
-export default function ApiKeysSection({ createRequest = 0 }: ApiKeysSectionProps) {
+export default function ApiKeysSection({
+ createRequest = 0,
+ onCanCreateChange,
+}: ApiKeysSectionProps) {
const { t } = useTranslation();
const { toast } = useToast();
@@ -74,6 +78,11 @@ export default function ApiKeysSection({ createRequest = 0 }: ApiKeysSectionProp
fetchKeys();
}, [fetchKeys]);
+ useEffect(() => {
+ onCanCreateChange(!isLoading && keys.length < MAX_API_KEYS);
+ return () => onCanCreateChange(false);
+ }, [isLoading, keys.length, onCanCreateChange]);
+
// At the key limit there's nothing to create; the list says so instead.
useEffect(() => {
if (isLoading || createRequest === handledCreateRequest.current) return;
@@ -101,15 +110,6 @@ export default function ApiKeysSection({ createRequest = 0 }: ApiKeysSectionProp
return (
<div className="space-y-3">
- {!isLoading && keys.length > 0 && keys.length < MAX_API_KEYS && (
- <div className="flex justify-end">
- <Button variant="outline" size="sm" onClick={() => setCreateOpen(true)}>
- <Plus className="h-3.5 w-3.5 me-1.5" />
- {t("apiKeysSection.createButton")}
- </Button>
- </div>
- )}
-
{isLoading ? (
<SettingsPanel>
{[0, 1].map((i) => (
@@ -129,11 +129,7 @@ export default function ApiKeysSection({ createRequest = 0 }: ApiKeysSectionProp
<SettingsPanelRow>
<div className="flex flex-col items-center py-4 text-center">
<Key className="h-5 w-5 text-muted-foreground/70 mb-2" />
- <p className="text-xs text-muted-foreground mb-3">{t("apiKeysSection.empty")}</p>
- <Button variant="outline" size="sm" onClick={() => setCreateOpen(true)}>
- <Plus className="h-3.5 w-3.5 me-1.5" />
- {t("apiKeysSection.createButton")}
- </Button>
+ <p className="text-xs text-muted-foreground">{t("apiKeysSection.empty")}</p>
</div>
</SettingsPanelRow>
</SettingsPanel>
diff --git a/src/components/ConnectorsSection.tsx b/src/components/ConnectorsSection.tsx
index 87a4451e7..677f15c05 100644
--- a/src/components/ConnectorsSection.tsx
+++ b/src/components/ConnectorsSection.tsx
@@ -3,7 +3,6 @@ import { useTranslation } from "react-i18next";
import { Lock, Mail } from "./icons";
import { SettingsPanel, SettingsPanelRow } from "./ui/SettingsSection";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./ui/select";
-import { RecentActions } from "./connectors/RecentActions";
import { ConnectorLoginRow } from "./connectors/ConnectorLoginRow";
import { BetaBadge } from "./connectors/BetaBadge";
import { CONNECTOR_ROWS } from "./connectors/connectorRows";
@@ -33,12 +32,6 @@ export function ConnectorsSection({ onUpgrade }: ConnectorsSectionProps): ReactE
const gmailStatus = gmailSendStatus(gmail);
const showActions = isPaid && connectorsAllowed;
- const automaticTarget = resolveEmailDraftTarget({
- emailDraftTarget: "auto",
- gcalConnected,
- mcalAccounts,
- gmailStatus,
- });
// Sending from chat needs a working Gmail login; a build without a Google
// client never offers it.
const targetOptions = EMAIL_DRAFT_TARGET_SETTINGS.filter(
@@ -58,11 +51,6 @@ export function ConnectorsSection({ onUpgrade }: ConnectorsSectionProps): ReactE
// Send from chat needs a connected Gmail; until then it says where to connect.
const gmailSendUnavailable = gmailStatus !== "connected";
const optionLabel = (option: EmailDraftTargetSetting): string => {
- if (option === "auto") {
- return t("connectors.email.autoResolved", {
- target: t(`connectors.email.targets.${automaticTarget}`),
- });
- }
if (option === "gmailSend" && gmailSendUnavailable) {
return t("connectors.email.targets.gmailSendConnectFirst");
}
@@ -84,11 +72,11 @@ export function ConnectorsSection({ onUpgrade }: ConnectorsSectionProps): ReactE
{locked && <UpsellBar message={t("connectors.upsell")} onUpgrade={onUpgrade} />}
<SettingsPanel>
<SettingsPanelRow>
- <div className={`flex items-center gap-3 ${locked ? "opacity-60" : ""}`}>
+ <div className={`flex flex-wrap items-center gap-3 ${locked ? "opacity-60" : ""}`}>
<div className="w-9 h-9 rounded-lg bg-primary/5 dark:bg-primary/10 flex items-center justify-center shrink-0">
<Mail className="h-4 w-4 text-primary/80" strokeWidth={2} aria-hidden="true" />
</div>
- <div className="flex-1 min-w-0">
+ <div className="flex-1 basis-52 min-w-0">
<div className="flex items-center gap-1.5">
<p className="text-xs font-semibold text-foreground">
{t("connectors.email.title")}
@@ -98,6 +86,15 @@ export function ConnectorsSection({ onUpgrade }: ConnectorsSectionProps): ReactE
<p className="text-xs text-muted-foreground/70 mt-0.5 leading-relaxed">
{description}
</p>
+ {showActions && (shownTarget === "auto" || shownTarget === "mailto") && (
+ <p className="text-xs text-muted-foreground/70 mt-1 leading-relaxed">
+ {shownTarget === "auto"
+ ? t("connectors.email.automaticHint", {
+ target: t(`connectors.email.targets.${currentTarget}`),
+ })
+ : t("connectors.email.systemMailHint")}
+ </p>
+ )}
</div>
{showActions && (
<Select
@@ -132,8 +129,6 @@ export function ConnectorsSection({ onUpgrade }: ConnectorsSectionProps): ReactE
/>
)}
</div>
-
- {showActions && <RecentActions connectorId="email" />}
</SettingsPanelRow>
{CONNECTOR_ROWS.map((row) => (
<ConnectorLoginRow key={row.id} row={row} isPaid={isPaid} blockedByOrg={blockedByOrg} />
diff --git a/src/components/IntegrationsView.tsx b/src/components/IntegrationsView.tsx
index 4a77056aa..e99e0b051 100644
--- a/src/components/IntegrationsView.tsx
+++ b/src/components/IntegrationsView.tsx
@@ -1,6 +1,6 @@
import { useEffect, useRef, useState, type ReactElement, type ReactNode } from "react";
import { useTranslation } from "react-i18next";
-import { ExternalLink } from "./icons";
+import { Plus } from "./icons";
import { Button } from "./ui/button";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./ui/select";
import { useSettingsStore } from "../stores/settingsStore";
@@ -64,6 +64,7 @@ export default function IntegrationsView({
);
if (!mounted.has(section)) setMounted(new Set(mounted).add(section));
const [createKeyRequest, setCreateKeyRequest] = useState(0);
+ const [canCreateKey, setCanCreateKey] = useState(false);
const scroller = useRef<HTMLDivElement>(null);
const paneElements = useRef<Partial<Record<IntegrationsSection, HTMLDivElement | null>>>({});
const focusOpenedSection = useRef(false);
@@ -113,21 +114,24 @@ export default function IntegrationsView({
<IntegrationsPane
title={titleOf("api")}
description={t("integrations.api.description")}
+ docsUrl={API_DOCS_URL}
actions={
- <Button
- variant="ghost"
- size="sm"
- onClick={() => window.electronAPI?.openExternal?.(API_DOCS_URL)}
- className="gap-1.5 text-muted-foreground"
- >
- {t("apiKeysSection.docsLink")}
- <ExternalLink className="h-3 w-3" />
- </Button>
+ isPaid && (
+ <Button
+ variant="outline"
+ size="sm"
+ disabled={!canCreateKey}
+ onClick={() => setCreateKeyRequest((request) => request + 1)}
+ >
+ <Plus className="h-3.5 w-3.5 me-1.5" />
+ {t("apiKeysSection.createButton")}
+ </Button>
+ )
}
>
{isPaid ? (
<>
- <ApiKeysSection createRequest={createKeyRequest} />
+ <ApiKeysSection createRequest={createKeyRequest} onCanCreateChange={setCanCreateKey} />
<div className="flex flex-wrap items-center gap-x-3 gap-y-1 ps-1 text-xs text-muted-foreground">
<span>{t("integrations.api.useWith")}</span>
{(
@@ -178,7 +182,7 @@ export default function IntegrationsView({
<div className="flex-1 min-w-0 flex flex-col">
{/* Outside the scroller, so it stays in view and keeps focus after a pick. */}
- <div className="px-5 pt-2 pb-2 @2xl:hidden">
+ <div className="px-5 pt-6 pb-2 @2xl:hidden">
<Select
value={section}
onValueChange={(value) => onSectionChange(value as IntegrationsSection)}
@@ -199,7 +203,7 @@ export default function IntegrationsView({
</Select>
</div>
- <div ref={scroller} className="flex-1 min-h-0 overflow-y-auto px-8 pt-2 pb-6 @max-2xl:px-5">
+ <div ref={scroller} className="flex-1 min-h-0 overflow-y-auto px-8 pt-6 pb-6 @max-2xl:px-5">
<div className="max-w-[760px]">
{INTEGRATIONS_SECTIONS.filter((id) => mounted.has(id)).map((id) => (
<div
diff --git a/src/components/connectors/ConnectorLoginRow.tsx b/src/components/connectors/ConnectorLoginRow.tsx
index c0a1ed211..dd2ec73aa 100644
--- a/src/components/connectors/ConnectorLoginRow.tsx
+++ b/src/components/connectors/ConnectorLoginRow.tsx
@@ -3,7 +3,6 @@ import { useTranslation } from "react-i18next";
import { Lock } from "../icons";
import { Button } from "../ui/button";
import { SettingsPanelRow } from "../ui/SettingsSection";
-import { RecentActions } from "./RecentActions";
import { BetaBadge } from "./BetaBadge";
import { ensureConnectorStatus, useConnectorStatusStore } from "../../stores/connectorStatusStore";
import type { ConnectorRowSpec } from "./connectorRows";
@@ -46,7 +45,7 @@ export interface ConnectorLoginRowProps {
/**
* One connector's login in Settings → Connectors: Connect, Reconnect,
- * Disconnect, the locked state on a free plan and its recent actions. Copy
+ * Disconnect and the locked state on a free plan. Copy
* lives under `connectors.<connectorId>.*`.
*/
export function ConnectorLoginRow({
@@ -285,12 +284,6 @@ export function ConnectorLoginRow({
)}
</div>
</div>
- {connected && (
- <RecentActions
- connectorId={connectorId}
- refreshKey={`${status?.accountLabel ?? ""}:${status?.workspaceLabel ?? ""}`}
- />
- )}
</SettingsPanelRow>
);
}
diff --git a/src/components/connectors/RecentActions.tsx b/src/components/connectors/RecentActions.tsx
deleted file mode 100644
index 8c60c60bd..000000000
--- a/src/components/connectors/RecentActions.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-import { useEffect, useState, type ReactElement } from "react";
-import { useTranslation } from "react-i18next";
-import { Button } from "../ui/button";
-import { SectionLabel } from "../ui/SettingsSection";
-import { normalizeDbDate } from "../../utils/dateFormatting";
-import type { ConnectorActionRecord } from "../../types/connectors";
-
-function formatWhen(createdAt: string, locale: string): string {
- const date = normalizeDbDate(createdAt);
- return Number.isNaN(date.getTime())
- ? createdAt
- : date.toLocaleString(locale, { dateStyle: "short", timeStyle: "short" });
-}
-
-function isWebUrl(value: string | null): value is string {
- return typeof value === "string" && value.startsWith("https://");
-}
-
-/** The last ten receipts for one connector: labels, times and states, never content. */
-export function RecentActions({
- connectorId,
- refreshKey = "",
-}: {
- connectorId: string;
- refreshKey?: string;
-}): ReactElement | null {
- const { t, i18n } = useTranslation();
- const [recent, setRecent] = useState<ConnectorActionRecord[]>([]);
- const [accountScopeChanges, setAccountScopeChanges] = useState(0);
-
- // Main lists the receipts of its active account scope, which settles after
- // the renderer's own sign-in state; refetch once it has moved.
- useEffect(
- () =>
- window.electronAPI?.onActiveAccountScopeChanged?.(() =>
- setAccountScopeChanges((count) => count + 1)
- ),
- []
- );
-
- useEffect(() => {
- setRecent([]);
- let active = true;
- void window.electronAPI
- ?.connectorRecentActions?.(connectorId, 10)
- .then((rows) => {
- if (active) setRecent(rows ?? []);
- })
- .catch(() => {
- if (active) setRecent([]);
- });
- return () => {
- active = false;
- };
- }, [connectorId, refreshKey, accountScopeChanges]);
-
- if (recent.length === 0) return null;
- return (
- <div className="mt-3">
- <SectionLabel>{t("connectors.recent.title")}</SectionLabel>
- <ul className="space-y-1">
- {recent.map((row) => (
- <li
- key={row.id}
- className="flex items-center justify-between gap-2 text-xs text-muted-foreground"
- >
- <span className="truncate" dir="auto">
- {row.destinationLabel
- ? t(`connectors.recent.actions.${row.connector}_${row.action}`, {
- destination: row.destinationLabel,
- })
- : // A run interrupted by a quit never learned its destination.
- t(`connectors.recent.unlabeledActions.${row.connector}_${row.action}`)}
- </span>
- <span className="shrink-0">
- {formatWhen(row.createdAt, i18n.language)} ·{" "}
- {t(`connectors.recent.states.${row.state}`)}
- {isWebUrl(row.resultUrl) && (
- <Button
- size="sm"
- variant="link"
- className="h-auto p-0 ms-1"
- onClick={() => void window.electronAPI?.openExternal?.(row.resultUrl as string)}
- >
- {t("connectors.approval.open")}
- </Button>
- )}
- </span>
- </li>
- ))}
- </ul>
- </div>
- );
-}
diff --git a/src/components/integrations/CliPane.tsx b/src/components/integrations/CliPane.tsx
index a8eb5951d..d8b85181d 100644
--- a/src/components/integrations/CliPane.tsx
+++ b/src/components/integrations/CliPane.tsx
@@ -1,11 +1,9 @@
-import { useState, type ReactElement } from "react";
+import type { ReactElement } from "react";
import { useTranslation } from "react-i18next";
-import { Check, Copy, ExternalLink } from "../icons";
import { Badge } from "../ui/badge";
import { Button } from "../ui/button";
import { CopyableCommand } from "../ui/CopyableCommand";
import { SectionLabel, SettingsPanel, SettingsPanelRow } from "../ui/SettingsSection";
-import { useToast } from "../ui/useToast";
import { IntegrationsPane } from "./IntegrationsPane";
const CLI_DOCS_URL = "https://docs.openwhispr.com/cli/install";
@@ -21,54 +19,12 @@ interface CliPaneProps {
export function CliPane({ title, isPaid, onUpgrade }: CliPaneProps): ReactElement {
const { t } = useTranslation();
- const { toast } = useToast();
- const [docsLinkCopied, setDocsLinkCopied] = useState(false);
-
- const handleCopyDocsLink = async () => {
- try {
- await navigator.clipboard.writeText(CLI_DOCS_URL);
- setDocsLinkCopied(true);
- toast({
- title: t("integrations.cli.docsLinkCopied"),
- variant: "success",
- duration: 2000,
- });
- setTimeout(() => setDocsLinkCopied(false), 2000);
- } catch {
- /* noop */
- }
- };
return (
<IntegrationsPane
title={title}
description={t("integrations.cli.description")}
- actions={
- <>
- <Button
- variant="ghost"
- size="sm"
- onClick={handleCopyDocsLink}
- className="gap-1.5 text-muted-foreground"
- >
- {docsLinkCopied ? (
- <Check className="h-3 w-3 text-success" />
- ) : (
- <Copy className="h-3 w-3" />
- )}
- {t("integrations.cli.copyDocsLink")}
- </Button>
- <Button
- variant="outline"
- size="sm"
- onClick={() => window.electronAPI?.openExternal?.(CLI_DOCS_URL)}
- className="gap-1.5"
- >
- {t("integrations.cli.learnMore")}
- <ExternalLink className="h-3 w-3" />
- </Button>
- </>
- }
+ docsUrl={CLI_DOCS_URL}
>
<div>
<SectionLabel>{t("integrations.cli.installLabel")}</SectionLabel>
diff --git a/src/components/integrations/IntegrationsPane.tsx b/src/components/integrations/IntegrationsPane.tsx
index 649593cb1..df1deb9de 100644
--- a/src/components/integrations/IntegrationsPane.tsx
+++ b/src/components/integrations/IntegrationsPane.tsx
@@ -1,11 +1,12 @@
import type { ReactElement, ReactNode } from "react";
import { useTranslation } from "react-i18next";
-import { Sparkles } from "../icons";
+import { ExternalLink, Sparkles } from "../icons";
import { Button } from "../ui/button";
interface IntegrationsPaneProps {
title: string;
description: ReactNode;
+ docsUrl?: string;
actions?: ReactNode;
children: ReactNode;
}
@@ -15,8 +16,10 @@ export function IntegrationsPane({
title,
description,
actions,
+ docsUrl,
children,
}: IntegrationsPaneProps): ReactElement {
+ const { t } = useTranslation();
return (
<div className="space-y-4">
{/* The actions wrap under the title when both don't fit, as with long translations. */}
@@ -28,7 +31,22 @@ export function IntegrationsPane({
</h2>
<p className="text-xs text-muted-foreground/80 mt-1 leading-relaxed">{description}</p>
</div>
- {actions && <div className="flex flex-wrap items-center gap-1.5">{actions}</div>}
+ {(docsUrl || actions) && (
+ <div className="flex flex-wrap items-center gap-1.5">
+ {docsUrl && (
+ <Button
+ variant="ghost"
+ size="sm"
+ onClick={() => window.electronAPI?.openExternal?.(docsUrl)}
+ className="gap-1.5 text-muted-foreground"
+ >
+ {t("integrations.readDocs")}
+ <ExternalLink className="h-3 w-3" />
+ </Button>
+ )}
+ {actions}
+ </div>
+ )}
</div>
{children}
</div>
diff --git a/src/components/integrations/McpPane.tsx b/src/components/integrations/McpPane.tsx
index 5c9a5bff3..48d6dee5e 100644
--- a/src/components/integrations/McpPane.tsx
+++ b/src/components/integrations/McpPane.tsx
@@ -1,6 +1,5 @@
-import type { ReactElement, ReactNode } from "react";
+import type { ReactElement } from "react";
import { useTranslation } from "react-i18next";
-import { ExternalLink } from "../icons";
import { Button } from "../ui/button";
import { CopyableCommand } from "../ui/CopyableCommand";
import { SettingsPanel, SettingsPanelRow } from "../ui/SettingsSection";
@@ -26,30 +25,6 @@ interface McpPaneProps {
onCreateKey: () => void;
}
-interface StepProps {
- number: number;
- /** Centre the number on a single-line step that sits beside a button. */
- centered?: boolean;
- children: ReactNode;
-}
-
-function Step({ number, centered = false, children }: StepProps): ReactElement {
- return (
- <SettingsPanelRow as="li">
- <div className={`flex gap-3 ${centered ? "items-center" : "items-start"}`}>
- {/* The list already gives each step its position. */}
- <span
- aria-hidden="true"
- className="flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary/10 text-[11px] font-semibold text-primary"
- >
- {number}
- </span>
- <div className="flex-1 min-w-0">{children}</div>
- </div>
- </SettingsPanelRow>
- );
-}
-
export function McpPane({ title, isPaid, onUpgrade, onCreateKey }: McpPaneProps): ReactElement {
const { t } = useTranslation();
const { toast } = useToast();
@@ -58,17 +33,7 @@ export function McpPane({ title, isPaid, onUpgrade, onCreateKey }: McpPaneProps)
<IntegrationsPane
title={title}
description={t("integrations.mcp.description")}
- actions={
- <Button
- variant="ghost"
- size="sm"
- onClick={() => window.electronAPI?.openExternal?.(MCP_DOCS_URL)}
- className="gap-1.5 text-muted-foreground"
- >
- {t("integrations.mcp.learnMore")}
- <ExternalLink className="h-3 w-3" />
- </Button>
- }
+ docsUrl={MCP_DOCS_URL}
>
<div className="flex flex-wrap items-center gap-x-4 gap-y-1.5 ps-1 text-xs">
<span className="text-muted-foreground/80">{t("integrations.mcp.worksWith")}</span>
@@ -91,8 +56,8 @@ export function McpPane({ title, isPaid, onUpgrade, onCreateKey }: McpPaneProps)
{!isPaid && <UpsellBar message={t("integrations.mcp.proRequired")} onUpgrade={onUpgrade} />}
- <SettingsPanel as="ol">
- <Step number={1}>
+ <SettingsPanel>
+ <SettingsPanelRow>
<p className="text-xs leading-5 font-medium text-foreground mb-2">
{t("integrations.mcp.step1")}
</p>
@@ -103,12 +68,25 @@ export function McpPane({ title, isPaid, onUpgrade, onCreateKey }: McpPaneProps)
toast({ title: t("integrations.mcp.copied"), variant: "success", duration: 2000 })
}
/>
- </Step>
- <Step number={2} centered>
- <div className="flex items-center gap-3">
- <p className="flex-1 min-w-0 text-xs font-medium text-foreground">
- {t("integrations.mcp.step2")}
- </p>
+ </SettingsPanelRow>
+ <SettingsPanelRow>
+ <h3 className="text-xs font-semibold text-foreground">
+ {t("integrations.mcp.oauthTitle")}
+ </h3>
+ <p className="text-xs text-muted-foreground mt-1 leading-relaxed">
+ {t("integrations.mcp.oauthDescription")}
+ </p>
+ </SettingsPanelRow>
+ <SettingsPanelRow>
+ <div className="flex flex-wrap items-start gap-3">
+ <div className="flex-1 basis-60 min-w-0">
+ <h3 className="text-xs font-semibold text-foreground">
+ {t("integrations.mcp.apiKeyTitle")}
+ </h3>
+ <p className="text-xs text-muted-foreground mt-1 leading-relaxed">
+ {t("integrations.mcp.apiKeyDescription")}
+ </p>
+ </div>
<Button
variant="outline"
size="sm"
@@ -119,10 +97,10 @@ export function McpPane({ title, isPaid, onUpgrade, onCreateKey }: McpPaneProps)
{t("apiKeysSection.createButton")}
</Button>
</div>
- </Step>
- <Step number={3} centered>
- <p className="text-xs font-medium text-foreground">{t("integrations.mcp.step3")}</p>
- </Step>
+ <code dir="ltr" className="block text-xs text-foreground mt-2 break-all select-all">
+ Authorization: Bearer YOUR_API_KEY
+ </code>
+ </SettingsPanelRow>
</SettingsPanel>
</IntegrationsPane>
);
diff --git a/src/components/ui/SettingsSection.tsx b/src/components/ui/SettingsSection.tsx
index 0367b5e7f..188d9cf7d 100644
--- a/src/components/ui/SettingsSection.tsx
+++ b/src/components/ui/SettingsSection.tsx
@@ -91,37 +91,30 @@ export const SettingsRow: React.FC<SettingsRowProps> = ({
export function SettingsPanel({
children,
className = "",
- as: Element = "div",
}: {
children: React.ReactNode;
className?: string;
- /** "ol" for a panel of numbered steps, whose rows are then "li". */
- as?: "div" | "ol";
}) {
return (
- <Element
+ <div
className={`rounded-lg border border-border/70 dark:border-border-subtle/70 bg-card/50 dark:bg-surface-2/50 divide-y divide-border/60 dark:divide-border-subtle/50 ${className}`}
>
{children}
- </Element>
+ </div>
);
}
export function SettingsPanelRow({
children,
className = "",
- as: Element = "div",
}: {
children: React.ReactNode;
className?: string;
- as?: "div" | "li";
}) {
const { isCompact } = useSettingsLayout();
return (
- <Element className={`${isCompact ? "px-3 py-2.5" : "px-4 py-3"} ${className}`}>
- {children}
- </Element>
+ <div className={`${isCompact ? "px-3 py-2.5" : "px-4 py-3"} ${className}`}>{children}</div>
);
}
diff --git a/src/locales/ar/translation.json b/src/locales/ar/translation.json
index 1443933e4..2ac557206 100644
--- a/src/locales/ar/translation.json
+++ b/src/locales/ar/translation.json
@@ -671,20 +671,18 @@
"mcp": {
"description": "الدردشة والبحث والعمل مع ملاحظاتك داخل Claude وChatGPT وCursor.",
"step1": "في أداة الذكاء الاصطناعي الخاصة بك، أضف OpenWhispr MCP باستخدام عنوان URL العام",
- "step2": "أنشئ مفتاح API بالنطاقات (scopes) التي تحتاجها.",
- "step3": "الصق المفتاح في ترويسة Authorization للاتصال.",
- "learnMore": "اعرف المزيد",
"proRequired": "قم بالترقية إلى خطة مدفوعة لتوصيل OpenWhispr بـ Claude وChatGPT وCursor.",
"worksWith": "يعمل مع",
"copyUrl": "نسخ عنوان URL لـ MCP",
- "copied": "تم النسخ"
+ "copied": "تم النسخ",
+ "oauthTitle": "تسجيل الدخول باستخدام OAuth",
+ "oauthDescription": "في عميل يدعم OAuth، أضف عنوان URL للخادم، ثم سجّل الدخول إلى OpenWhispr واسمح بالوصول. لا تحتاج إلى مفتاح API.",
+ "apiKeyTitle": "استخدام مفتاح API",
+ "apiKeyDescription": "للعملاء الذين يقبلون ترويسات الطلبات، أنشئ مفتاح API شخصيًا بالأذونات التي تحتاجها واستخدم الترويسة أدناه."
},
"cli": {
"description": "امنح مساعدك حق الوصول إلى ملاحظاتك من الجهاز الطرفي (terminal).",
"installLabel": "تثبيت",
- "learnMore": "اقرأ الوثائق",
- "copyDocsLink": "نسخ رابط الوثائق",
- "docsLinkCopied": "تم نسخ رابط الوثائق",
"viewPlans": "عرض الخطط",
"local": {
"label": "محلي (Local)",
@@ -729,7 +727,8 @@
},
"connectors": {
"description": "دع المساعد يستخدم أدواتك. توافق على كل بريد ورسالة ومهمة قبل إرسالها."
- }
+ },
+ "readDocs": "اقرأ الوثائق"
},
"connectors": {
"approval": {
@@ -896,15 +895,17 @@
"descriptionSend": "يعرض المساعد بطاقة بريد إلكتروني في الدردشة، ولا يُرسل البريد من Gmail الخاص بك إلا عندما تضغط إرسال.",
"unavailable": "مسودات البريد الإلكتروني غير متاحة حاليًا.",
"targetLabel": "صياغة رسائل البريد الإلكتروني في",
- "autoResolved": "تلقائي · {{target}}",
"targets": {
"gmail": "Gmail",
"outlookWork": "Outlook (العمل أو المدرسة)",
"outlookPersonal": "Outlook.com",
- "mailto": "تطبيق البريد الافتراضي",
+ "mailto": "تطبيق بريد النظام",
"gmailSend": "الإرسال من الدردشة (Gmail)",
- "gmailSendConnectFirst": "الإرسال من الدردشة (Gmail) · اربط Gmail أدناه"
- }
+ "gmailSendConnectFirst": "الإرسال من الدردشة (Gmail) · اربط Gmail أدناه",
+ "auto": "تلقائي"
+ },
+ "automaticHint": "حاليًا: {{target}}. يتبع حساباتك المتصلة.",
+ "systemMailHint": "يستخدم معالج البريد الإلكتروني الذي أعددته على جهاز الكمبيوتر."
},
"slack": {
"title": "Slack",
@@ -1527,7 +1528,6 @@
"apiKeysSection": {
"title": "مفاتيح API",
"description": "أنشئ مفاتيح للوصول إلى API الخاص بـ OpenWhispr برمجيًا.",
- "docsLink": "مستندات API",
"empty": "لا توجد مفاتيح API بعد",
"createButton": "إنشاء مفتاح API",
"create": {
diff --git a/src/locales/de/translation.json b/src/locales/de/translation.json
index de8613279..70331b159 100644
--- a/src/locales/de/translation.json
+++ b/src/locales/de/translation.json
@@ -1307,7 +1307,6 @@
"apiKeysSection": {
"title": "API-Schlüssel",
"description": "Erstellen Sie Schlüssel für den programmatischen Zugriff auf die OpenWhispr-API.",
- "docsLink": "API-Dokumentation",
"empty": "Noch keine API-Schlüssel",
"createButton": "API-Schlüssel erstellen",
"create": {
@@ -4108,20 +4107,18 @@
"mcp": {
"description": "Chatte, suche und arbeite mit deinen Notizen in Claude, ChatGPT und Cursor.",
"step1": "Füge OpenWhispr MCP in deinem KI-Tool mit der öffentlichen URL hinzu",
- "step2": "Erstelle einen API-Schlüssel mit den benötigten Berechtigungen.",
- "step3": "Füge den Schlüssel als Authorization-Header ein, um zu verbinden.",
- "learnMore": "Mehr erfahren",
"proRequired": "Upgrade auf einen kostenpflichtigen Plan, um OpenWhispr mit Claude, ChatGPT und Cursor zu verbinden.",
"worksWith": "Funktioniert mit",
"copyUrl": "MCP-URL kopieren",
- "copied": "Kopiert"
+ "copied": "Kopiert",
+ "oauthTitle": "Mit OAuth anmelden",
+ "oauthDescription": "Füge die Server-URL in einem Client mit OAuth-Unterstützung hinzu. Melde dich dann bei OpenWhispr an und erlaube den Zugriff. Kein API-Schlüssel nötig.",
+ "apiKeyTitle": "API-Schlüssel verwenden",
+ "apiKeyDescription": "Erstelle für Clients, die Anfrage-Header akzeptieren, einen persönlichen API-Schlüssel mit den benötigten Berechtigungen und verwende den folgenden Header."
},
"cli": {
"description": "Gib deinem Assistenten über das Terminal Zugriff auf deine Notizen.",
"installLabel": "Installieren",
- "learnMore": "Dokumentation lesen",
- "copyDocsLink": "Doku-Link kopieren",
- "docsLinkCopied": "Doku-Link kopiert",
"viewPlans": "Pläne ansehen",
"local": {
"label": "Lokal",
@@ -4166,7 +4163,8 @@
},
"connectors": {
"description": "Lass den Assistenten deine Tools nutzen. Du bestätigst jede E-Mail, jede Nachricht und jedes Issue, bevor es rausgeht."
- }
+ },
+ "readDocs": "Dokumentation lesen"
},
"connectors": {
"approval": {
@@ -4333,15 +4331,17 @@
"descriptionSend": "Der Assistent zeigt im Chat eine E-Mail-Karte. Sie wird erst über dein Gmail gesendet, wenn du auf Senden klickst.",
"unavailable": "E-Mail-Entwürfe sind gerade nicht verfügbar.",
"targetLabel": "E-Mails entwerfen in",
- "autoResolved": "Automatisch · {{target}}",
"targets": {
"gmail": "Gmail",
"outlookWork": "Outlook (geschäftlich oder Schule)",
"outlookPersonal": "Outlook.com",
- "mailto": "Standard-E-Mail-App",
+ "mailto": "Mail-App des Systems",
"gmailSend": "Aus dem Chat senden (Gmail)",
- "gmailSendConnectFirst": "Aus dem Chat senden (Gmail) · Gmail unten verbinden"
- }
+ "gmailSendConnectFirst": "Aus dem Chat senden (Gmail) · Gmail unten verbinden",
+ "auto": "Automatisch"
+ },
+ "automaticHint": "Aktuell: {{target}}. Richtet sich nach deinen verbundenen Konten.",
+ "systemMailHint": "Verwendet die auf deinem Computer eingerichtete E-Mail-Anwendung."
},
"slack": {
"title": "Slack",
diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json
index 9e627473f..3edc6755e 100644
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@ -1307,7 +1307,6 @@
"apiKeysSection": {
"title": "API Keys",
"description": "Create keys to access the OpenWhispr API programmatically.",
- "docsLink": "API Docs",
"empty": "No API keys yet",
"createButton": "Create API Key",
"create": {
@@ -4108,20 +4107,18 @@
"mcp": {
"description": "Chat, search, and work with your notes inside Claude, ChatGPT, and Cursor.",
"step1": "In your AI tool, add OpenWhispr MCP using the public URL",
- "step2": "Create an API key with the scopes you need.",
- "step3": "Paste the key as the Authorization header to connect.",
- "learnMore": "Learn more",
"proRequired": "Upgrade to a paid plan to connect OpenWhispr to Claude, ChatGPT, and Cursor.",
"worksWith": "Works with",
"copyUrl": "Copy MCP URL",
- "copied": "Copied"
+ "copied": "Copied",
+ "oauthTitle": "Sign in with OAuth",
+ "oauthDescription": "In a client that supports OAuth, add the server URL, then sign in to OpenWhispr and approve access. No API key needed.",
+ "apiKeyTitle": "Use an API key",
+ "apiKeyDescription": "For clients that accept request headers, create a personal API key with the permissions you need and use the header below."
},
"cli": {
"description": "Give your assistant access to your notes from the terminal.",
"installLabel": "Install",
- "learnMore": "Read the docs",
- "copyDocsLink": "Copy docs link",
- "docsLinkCopied": "Docs link copied",
"viewPlans": "View Plans",
"local": {
"label": "Local",
@@ -4166,7 +4163,8 @@
},
"connectors": {
"description": "Let the assistant use your tools. You approve every email, message and issue before it goes out."
- }
+ },
+ "readDocs": "Read the docs"
},
"connectors": {
"approval": {
@@ -4333,15 +4331,17 @@
"descriptionSend": "The assistant shows an email card in the chat. It's sent from your Gmail only when you press Send.",
"unavailable": "Email drafts aren't available right now.",
"targetLabel": "Draft emails in",
- "autoResolved": "Automatic · {{target}}",
"targets": {
"gmail": "Gmail",
"outlookWork": "Outlook (work or school)",
"outlookPersonal": "Outlook.com",
- "mailto": "Default mail app",
+ "mailto": "System mail app",
"gmailSend": "Send from chat (Gmail)",
- "gmailSendConnectFirst": "Send from chat (Gmail) · connect Gmail below"
- }
+ "gmailSendConnectFirst": "Send from chat (Gmail) · connect Gmail below",
+ "auto": "Automatic"
+ },
+ "automaticHint": "Currently: {{target}}. Follows your connected accounts.",
+ "systemMailHint": "Uses the email handler set up on your computer."
},
"slack": {
"title": "Slack",
diff --git a/src/locales/es/translation.json b/src/locales/es/translation.json
index adcc76646..02243e3b8 100644
--- a/src/locales/es/translation.json
+++ b/src/locales/es/translation.json
@@ -1265,7 +1265,6 @@
"apiKeysSection": {
"title": "Claves API",
"description": "Crea claves para acceder a la API de OpenWhispr de forma programática.",
- "docsLink": "Docs de la API",
"empty": "Aún no hay claves API",
"createButton": "Crear clave API",
"create": {
@@ -3990,20 +3989,18 @@
"mcp": {
"description": "Chatea, busca y trabaja con tus notas en Claude, ChatGPT y Cursor.",
"step1": "En tu herramienta de IA, añade OpenWhispr MCP usando la URL pública",
- "step2": "Crea una clave API con los permisos que necesites.",
- "step3": "Pega la clave como cabecera Authorization para conectar.",
- "learnMore": "Más información",
"proRequired": "Actualiza a un plan de pago para conectar OpenWhispr con Claude, ChatGPT y Cursor.",
"worksWith": "Funciona con",
"copyUrl": "Copiar URL de MCP",
- "copied": "Copiado"
+ "copied": "Copiado",
+ "oauthTitle": "Iniciar sesión con OAuth",
+ "oauthDescription": "En un cliente compatible con OAuth, añade la URL del servidor, inicia sesión en OpenWhispr y autoriza el acceso. No necesitas una clave API.",
+ "apiKeyTitle": "Usar una clave API",
+ "apiKeyDescription": "Para clientes que acepten encabezados de solicitud, crea una clave API personal con los permisos necesarios y usa el encabezado siguiente."
},
"cli": {
"description": "Dale a tu asistente acceso a tus notas desde la terminal.",
"installLabel": "Instalar",
- "learnMore": "Leer la documentación",
- "copyDocsLink": "Copiar enlace de la documentación",
- "docsLinkCopied": "Enlace de la documentación copiado",
"viewPlans": "Ver planes",
"local": {
"label": "Local",
@@ -4048,7 +4045,8 @@
},
"connectors": {
"description": "Deja que el asistente use tus herramientas. Apruebas cada correo, mensaje e incidencia antes de que se envíe."
- }
+ },
+ "readDocs": "Leer la documentación"
},
"connectors": {
"approval": {
@@ -4215,15 +4213,17 @@
"descriptionSend": "El asistente muestra una tarjeta de correo en el chat. Solo se envía desde tu Gmail cuando pulsas Enviar.",
"unavailable": "Los borradores de correo no están disponibles en este momento.",
"targetLabel": "Redactar correos en",
- "autoResolved": "Automático · {{target}}",
"targets": {
"gmail": "Gmail",
"outlookWork": "Outlook (trabajo o escuela)",
"outlookPersonal": "Outlook.com",
- "mailto": "Aplicación de correo predeterminada",
+ "mailto": "Aplicación de correo del sistema",
"gmailSend": "Enviar desde el chat (Gmail)",
- "gmailSendConnectFirst": "Enviar desde el chat (Gmail) · conecta Gmail abajo"
- }
+ "gmailSendConnectFirst": "Enviar desde el chat (Gmail) · conecta Gmail abajo",
+ "auto": "Automático"
+ },
+ "automaticHint": "Ahora: {{target}}. Sigue tus cuentas conectadas.",
+ "systemMailHint": "Usa el gestor de correo configurado en tu ordenador."
},
"slack": {
"title": "Slack",
diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.json
index f6600aceb..ec6a6d468 100644
--- a/src/locales/fr/translation.json
+++ b/src/locales/fr/translation.json
@@ -1307,7 +1307,6 @@
"apiKeysSection": {
"title": "Clés API",
"description": "Créez des clés pour accéder à l'API OpenWhispr de manière programmatique.",
- "docsLink": "Docs de l'API",
"empty": "Aucune clé API pour le moment",
"createButton": "Créer une clé API",
"create": {
@@ -4108,20 +4107,18 @@
"mcp": {
"description": "Discutez, recherchez et travaillez avec vos notes dans Claude, ChatGPT et Cursor.",
"step1": "Dans votre outil d'IA, ajoutez OpenWhispr MCP avec l'URL publique",
- "step2": "Créez une clé API avec les permissions dont vous avez besoin.",
- "step3": "Collez la clé comme en-tête Authorization pour vous connecter.",
- "learnMore": "En savoir plus",
"proRequired": "Passez à un plan payant pour connecter OpenWhispr à Claude, ChatGPT et Cursor.",
"worksWith": "Fonctionne avec",
"copyUrl": "Copier l'URL MCP",
- "copied": "Copié"
+ "copied": "Copié",
+ "oauthTitle": "Se connecter avec OAuth",
+ "oauthDescription": "Dans un client compatible OAuth, ajoutez l’URL du serveur, puis connectez-vous à OpenWhispr et autorisez l’accès. Aucune clé API requise.",
+ "apiKeyTitle": "Utiliser une clé API",
+ "apiKeyDescription": "Pour les clients acceptant les en-têtes de requête, créez une clé API personnelle avec les autorisations nécessaires et utilisez l’en-tête ci-dessous."
},
"cli": {
"description": "Donnez à votre assistant l'accès à vos notes depuis le terminal.",
"installLabel": "Installer",
- "learnMore": "Lire la documentation",
- "copyDocsLink": "Copier le lien de la documentation",
- "docsLinkCopied": "Lien de la documentation copié",
"viewPlans": "Voir les forfaits",
"local": {
"label": "Local",
@@ -4166,7 +4163,8 @@
},
"connectors": {
"description": "Laissez l'assistant utiliser vos outils. Vous approuvez chaque e-mail, message et ticket avant son envoi."
- }
+ },
+ "readDocs": "Lire la documentation"
},
"connectors": {
"approval": {
@@ -4333,15 +4331,17 @@
"descriptionSend": "L'assistant affiche une carte d'e-mail dans le chat. L'e-mail n'est envoyé depuis votre Gmail que lorsque vous appuyez sur Envoyer.",
"unavailable": "Les brouillons d'e-mails ne sont pas disponibles pour le moment.",
"targetLabel": "Rédiger les e-mails dans",
- "autoResolved": "Automatique · {{target}}",
"targets": {
"gmail": "Gmail",
"outlookWork": "Outlook (professionnel ou scolaire)",
"outlookPersonal": "Outlook.com",
- "mailto": "Application de messagerie par défaut",
+ "mailto": "Application mail du système",
"gmailSend": "Envoyer depuis le chat (Gmail)",
- "gmailSendConnectFirst": "Envoyer depuis le chat (Gmail) · connectez Gmail ci-dessous"
- }
+ "gmailSendConnectFirst": "Envoyer depuis le chat (Gmail) · connectez Gmail ci-dessous",
+ "auto": "Automatique"
+ },
+ "automaticHint": "Actuellement : {{target}}. Suit vos comptes connectés.",
+ "systemMailHint": "Utilise le gestionnaire de courrier configuré sur votre ordinateur."
},
"slack": {
"title": "Slack",
diff --git a/src/locales/it/translation.json b/src/locales/it/translation.json
index fc225e59e..3be5b98cd 100644
--- a/src/locales/it/translation.json
+++ b/src/locales/it/translation.json
@@ -3937,20 +3937,18 @@
"mcp": {
"description": "Chatta, cerca e lavora con le tue note in Claude, ChatGPT e Cursor.",
"step1": "Nel tuo strumento di IA, aggiungi OpenWhispr MCP usando l'URL pubblico",
- "step2": "Crea una chiave API con gli scope necessari.",
- "step3": "Incolla la chiave come intestazione Authorization per connetterti.",
- "learnMore": "Scopri di più",
"proRequired": "Passa a un piano a pagamento per collegare OpenWhispr a Claude, ChatGPT e Cursor.",
"worksWith": "Funziona con",
"copyUrl": "Copia URL MCP",
- "copied": "Copiato"
+ "copied": "Copiato",
+ "oauthTitle": "Accedi con OAuth",
+ "oauthDescription": "In un client che supporta OAuth, aggiungi l’URL del server, accedi a OpenWhispr e autorizza l’accesso. Non serve una chiave API.",
+ "apiKeyTitle": "Usa una chiave API",
+ "apiKeyDescription": "Per i client che accettano intestazioni di richiesta, crea una chiave API personale con le autorizzazioni necessarie e usa l’intestazione seguente."
},
"cli": {
"description": "Dai al tuo assistente l'accesso alle note dal terminale.",
"installLabel": "Installa",
- "learnMore": "Leggi la documentazione",
- "copyDocsLink": "Copia link della documentazione",
- "docsLinkCopied": "Link della documentazione copiato",
"viewPlans": "Visualizza i piani",
"local": {
"label": "Locale",
@@ -3995,7 +3993,8 @@
},
"connectors": {
"description": "Lascia che l'assistente usi i tuoi strumenti. Approvi ogni email, messaggio e issue prima dell'invio."
- }
+ },
+ "readDocs": "Leggi la documentazione"
},
"connectors": {
"approval": {
@@ -4162,15 +4161,17 @@
"descriptionSend": "L'assistente mostra una scheda email nella chat. Viene inviata dal tuo Gmail solo quando premi Invia.",
"unavailable": "Le bozze email non sono disponibili al momento.",
"targetLabel": "Crea bozze email in",
- "autoResolved": "Automatico · {{target}}",
"targets": {
"gmail": "Gmail",
"outlookWork": "Outlook (lavoro o scuola)",
"outlookPersonal": "Outlook.com",
- "mailto": "App di posta predefinita",
+ "mailto": "App di posta del sistema",
"gmailSend": "Invia dalla chat (Gmail)",
- "gmailSendConnectFirst": "Invia dalla chat (Gmail) · connetti Gmail qui sotto"
- }
+ "gmailSendConnectFirst": "Invia dalla chat (Gmail) · connetti Gmail qui sotto",
+ "auto": "Automatico"
+ },
+ "automaticHint": "Attuale: {{target}}. Segue gli account collegati.",
+ "systemMailHint": "Usa il gestore di posta configurato sul computer."
},
"slack": {
"title": "Slack",
@@ -4608,7 +4609,6 @@
"apiKeysSection": {
"title": "Chiavi API",
"description": "Crea chiavi per accedere all'API di OpenWhispr in modo programmatico.",
- "docsLink": "Docs API",
"empty": "Nessuna chiave API ancora",
"createButton": "Crea chiave API",
"create": {
diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.json
index d6a760168..267471ea3 100644
--- a/src/locales/ja/translation.json
+++ b/src/locales/ja/translation.json
@@ -3937,20 +3937,18 @@
"mcp": {
"description": "Claude、ChatGPT、Cursor内でメモを使ってチャット、検索、作業ができます。",
"step1": "AIツールで、公開URLを使用してOpenWhispr MCPを追加します",
- "step2": "必要なスコープを持つAPIキーを作成します。",
- "step3": "キーを Authorization ヘッダーとして貼り付けて接続します。",
- "learnMore": "詳細",
"proRequired": "OpenWhispr を Claude、ChatGPT、Cursor に接続するには、有料プランへのアップグレードが必要です。",
"worksWith": "対応アプリ",
"copyUrl": "MCP URLをコピー",
- "copied": "コピーしました"
+ "copied": "コピーしました",
+ "oauthTitle": "OAuth でログイン",
+ "oauthDescription": "OAuth 対応のクライアントにサーバー URL を追加し、OpenWhispr にログインしてアクセスを許可します。API キーは不要です。",
+ "apiKeyTitle": "API キーを使用",
+ "apiKeyDescription": "リクエストヘッダーに対応するクライアントでは、必要な権限を持つ個人用 API キーを作成し、以下のヘッダーを使用してください。"
},
"cli": {
"description": "ターミナルからアシスタントにメモへのアクセスを許可します。",
"installLabel": "インストール",
- "learnMore": "ドキュメントを読む",
- "copyDocsLink": "ドキュメントリンクをコピー",
- "docsLinkCopied": "ドキュメントリンクをコピーしました",
"viewPlans": "プランを表示",
"local": {
"label": "ローカル",
@@ -3995,7 +3993,8 @@
},
"connectors": {
"description": "アシスタントがあなたのツールを使えるようにします。メール、メッセージ、課題はすべて送信前にあなたが承認します。"
- }
+ },
+ "readDocs": "ドキュメントを読む"
},
"connectors": {
"approval": {
@@ -4162,15 +4161,17 @@
"descriptionSend": "アシスタントがチャットにメールのカードを表示します。送信を押したときだけ、Gmail から送信されます。",
"unavailable": "現在メール下書きを利用できません。",
"targetLabel": "メールを作成するアプリ",
- "autoResolved": "自動 · {{target}}",
"targets": {
"gmail": "Gmail",
"outlookWork": "Outlook(職場または学校)",
"outlookPersonal": "Outlook.com",
- "mailto": "既定のメールアプリ",
+ "mailto": "システムのメールアプリ",
"gmailSend": "チャットから送信(Gmail)",
- "gmailSendConnectFirst": "チャットから送信(Gmail)· 下で Gmail を接続"
- }
+ "gmailSendConnectFirst": "チャットから送信(Gmail)· 下で Gmail を接続",
+ "auto": "自動"
+ },
+ "automaticHint": "現在:{{target}}。接続済みのアカウントに応じて選択します。",
+ "systemMailHint": "コンピューターで設定したメールハンドラーを使用します。"
},
"slack": {
"title": "Slack",
@@ -4608,7 +4609,6 @@
"apiKeysSection": {
"title": "APIキー",
"description": "アカウントへのプログラムアクセス用のキーを管理",
- "docsLink": "APIドキュメント",
"empty": "APIキーはまだありません",
"createButton": "キーを作成",
"create": {
diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.json
index e7b7b4eac..f605dd3f9 100644
--- a/src/locales/pt/translation.json
+++ b/src/locales/pt/translation.json
@@ -3937,20 +3937,18 @@
"mcp": {
"description": "Converse, pesquise e trabalhe com suas notas no Claude, ChatGPT e Cursor.",
"step1": "Na sua ferramenta de IA, adicione OpenWhispr MCP usando a URL pública",
- "step2": "Crie uma chave de API com os escopos necessários.",
- "step3": "Cole a chave como cabeçalho Authorization para conectar.",
- "learnMore": "Saiba mais",
"proRequired": "Atualize para um plano pago para conectar o OpenWhispr ao Claude, ChatGPT e Cursor.",
"worksWith": "Funciona com",
"copyUrl": "Copiar URL do MCP",
- "copied": "Copiado"
+ "copied": "Copiado",
+ "oauthTitle": "Entrar com OAuth",
+ "oauthDescription": "Em um cliente compatível com OAuth, adicione a URL do servidor, entre no OpenWhispr e autorize o acesso. Não é necessária uma chave de API.",
+ "apiKeyTitle": "Usar uma chave de API",
+ "apiKeyDescription": "Para clientes que aceitam cabeçalhos de solicitação, crie uma chave de API pessoal com as permissões necessárias e use o cabeçalho abaixo."
},
"cli": {
"description": "Dê ao seu assistente acesso às suas notas pelo terminal.",
"installLabel": "Instalar",
- "learnMore": "Ler a documentação",
- "copyDocsLink": "Copiar link da documentação",
- "docsLinkCopied": "Link da documentação copiado",
"viewPlans": "Ver planos",
"local": {
"label": "Local",
@@ -3995,7 +3993,8 @@
},
"connectors": {
"description": "Deixe o assistente usar suas ferramentas. Você aprova cada e-mail, mensagem e issue antes do envio."
- }
+ },
+ "readDocs": "Ler a documentação"
},
"connectors": {
"approval": {
@@ -4162,15 +4161,17 @@
"descriptionSend": "O assistente mostra um cartão de e-mail no chat. O e-mail só é enviado pelo seu Gmail quando você aperta Enviar.",
"unavailable": "Os rascunhos de e-mail não estão disponíveis no momento.",
"targetLabel": "Criar rascunhos de e-mail em",
- "autoResolved": "Automático · {{target}}",
"targets": {
"gmail": "Gmail",
"outlookWork": "Outlook (trabalho ou escola)",
"outlookPersonal": "Outlook.com",
- "mailto": "Aplicativo de e-mail padrão",
+ "mailto": "Aplicativo de e-mail do sistema",
"gmailSend": "Enviar pelo chat (Gmail)",
- "gmailSendConnectFirst": "Enviar pelo chat (Gmail) · conecte o Gmail abaixo"
- }
+ "gmailSendConnectFirst": "Enviar pelo chat (Gmail) · conecte o Gmail abaixo",
+ "auto": "Automático"
+ },
+ "automaticHint": "Atual: {{target}}. Segue suas contas conectadas.",
+ "systemMailHint": "Usa o gerenciador de e-mail configurado no seu computador."
},
"slack": {
"title": "Slack",
@@ -4608,7 +4609,6 @@
"apiKeysSection": {
"title": "Chaves API",
"description": "Crie chaves para acessar a API do OpenWhispr programaticamente.",
- "docsLink": "Docs da API",
"empty": "Nenhuma chave API ainda",
"createButton": "Criar chave API",
"create": {
diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.json
index bb8aca2c6..99f76b0e9 100644
--- a/src/locales/ru/translation.json
+++ b/src/locales/ru/translation.json
@@ -3981,20 +3981,18 @@
"mcp": {
"description": "Общайтесь, ищите и работайте с заметками в Claude, ChatGPT и Cursor.",
"step1": "В вашем инструменте ИИ добавьте OpenWhispr MCP, используя публичный URL",
- "step2": "Создайте API-ключ с нужными разрешениями.",
- "step3": "Вставьте ключ в заголовок Authorization для подключения.",
- "learnMore": "Узнать больше",
"proRequired": "Перейдите на платный план, чтобы подключить OpenWhispr к Claude, ChatGPT и Cursor.",
"worksWith": "Работает с",
"copyUrl": "Копировать URL MCP",
- "copied": "Скопировано"
+ "copied": "Скопировано",
+ "oauthTitle": "Войти через OAuth",
+ "oauthDescription": "В клиенте с поддержкой OAuth добавьте URL сервера, затем войдите в OpenWhispr и разрешите доступ. Ключ API не нужен.",
+ "apiKeyTitle": "Использовать ключ API",
+ "apiKeyDescription": "Для клиентов, поддерживающих заголовки запросов, создайте личный ключ API с нужными разрешениями и используйте заголовок ниже."
},
"cli": {
"description": "Дайте своему помощнику доступ к заметкам из терминала.",
"installLabel": "Установить",
- "learnMore": "Открыть документацию",
- "copyDocsLink": "Скопировать ссылку на документацию",
- "docsLinkCopied": "Ссылка на документацию скопирована",
"viewPlans": "Посмотреть планы",
"local": {
"label": "Локально",
@@ -4039,7 +4037,8 @@
},
"connectors": {
"description": "Позвольте ассистенту пользоваться вашими инструментами. Вы одобряете каждое письмо, сообщение и задачу перед отправкой."
- }
+ },
+ "readDocs": "Открыть документацию"
},
"connectors": {
"approval": {
@@ -4206,15 +4205,17 @@
"descriptionSend": "Ассистент показывает в чате карточку письма. Оно отправляется из вашего Gmail, только когда вы нажимаете «Отправить».",
"unavailable": "Черновики писем сейчас недоступны.",
"targetLabel": "Создавать черновики писем в",
- "autoResolved": "Автоматически · {{target}}",
"targets": {
"gmail": "Gmail",
"outlookWork": "Outlook (рабочий или учебный)",
"outlookPersonal": "Outlook.com",
- "mailto": "Почтовое приложение по умолчанию",
+ "mailto": "Системная почтовая программа",
"gmailSend": "Отправлять из чата (Gmail)",
- "gmailSendConnectFirst": "Отправлять из чата (Gmail) · подключите Gmail ниже"
- }
+ "gmailSendConnectFirst": "Отправлять из чата (Gmail) · подключите Gmail ниже",
+ "auto": "Автоматически"
+ },
+ "automaticHint": "Сейчас: {{target}}. Зависит от подключённых аккаунтов.",
+ "systemMailHint": "Использует обработчик электронной почты, настроенный на вашем компьютере."
},
"slack": {
"title": "Slack",
@@ -4652,7 +4653,6 @@
"apiKeysSection": {
"title": "API-ключи",
"description": "Создавайте ключи для программного доступа к API OpenWhispr.",
- "docsLink": "Документация API",
"empty": "API-ключей пока нет",
"createButton": "Создать API-ключ",
"create": {
diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.json
index 6f92a47a1..213533b57 100644
--- a/src/locales/zh-CN/translation.json
+++ b/src/locales/zh-CN/translation.json
@@ -3937,20 +3937,18 @@
"mcp": {
"description": "在 Claude、ChatGPT 和 Cursor 中与你的笔记一起聊天、搜索和工作。",
"step1": "在你的 AI 工具中,使用公开 URL 添加 OpenWhispr MCP",
- "step2": "创建具有所需权限的 API 密钥。",
- "step3": "将密钥粘贴为 Authorization 标头以连接。",
- "learnMore": "了解更多",
"proRequired": "升级到付费计划,以将 OpenWhispr 连接到 Claude、ChatGPT 和 Cursor。",
"worksWith": "支持",
"copyUrl": "复制 MCP URL",
- "copied": "已复制"
+ "copied": "已复制",
+ "oauthTitle": "通过 OAuth 登录",
+ "oauthDescription": "在支持 OAuth 的客户端中添加服务器 URL,然后登录 OpenWhispr 并授权访问。无需 API 密钥。",
+ "apiKeyTitle": "使用 API 密钥",
+ "apiKeyDescription": "对于支持请求标头的客户端,请创建具有所需权限的个人 API 密钥,并使用以下标头。"
},
"cli": {
"description": "让你的助手通过终端访问你的笔记。",
"installLabel": "安装",
- "learnMore": "查看文档",
- "copyDocsLink": "复制文档链接",
- "docsLinkCopied": "已复制文档链接",
"viewPlans": "查看套餐",
"local": {
"label": "本地",
@@ -3995,7 +3993,8 @@
},
"connectors": {
"description": "让助手使用您的工具。每封邮件、每条消息和每个议题发出前都需要您批准。"
- }
+ },
+ "readDocs": "阅读文档"
},
"connectors": {
"approval": {
@@ -4162,15 +4161,17 @@
"descriptionSend": "助手会在聊天中显示一张邮件卡片,只有在您点击发送后才会通过您的 Gmail 发出。",
"unavailable": "邮件草稿暂时不可用。",
"targetLabel": "在此处起草邮件",
- "autoResolved": "自动 · {{target}}",
"targets": {
"gmail": "Gmail",
"outlookWork": "Outlook(工作或学校)",
"outlookPersonal": "Outlook.com",
- "mailto": "默认邮件应用",
+ "mailto": "系统邮件应用",
"gmailSend": "在聊天中发送(Gmail)",
- "gmailSendConnectFirst": "在聊天中发送(Gmail)· 请在下方连接 Gmail"
- }
+ "gmailSendConnectFirst": "在聊天中发送(Gmail)· 请在下方连接 Gmail",
+ "auto": "自动"
+ },
+ "automaticHint": "当前:{{target}}。根据已连接的账户选择。",
+ "systemMailHint": "使用电脑上配置的邮件处理程序。"
},
"slack": {
"title": "Slack",
@@ -4608,7 +4609,6 @@
"apiKeysSection": {
"title": "API 密钥",
"description": "创建密钥以编程方式访问 OpenWhispr API。",
- "docsLink": "API 文档",
"empty": "暂无 API 密钥",
"createButton": "创建 API 密钥",
"create": {
diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.json
index 4ed05bd34..b9f10dfe6 100644
--- a/src/locales/zh-TW/translation.json
+++ b/src/locales/zh-TW/translation.json
@@ -3937,20 +3937,18 @@
"mcp": {
"description": "在 Claude、ChatGPT 和 Cursor 中與你的筆記一起聊天、搜尋和工作。",
"step1": "在你的 AI 工具中,使用公開 URL 新增 OpenWhispr MCP",
- "step2": "建立具有所需權限的 API 金鑰。",
- "step3": "將金鑰貼上為 Authorization 標頭以連線。",
- "learnMore": "瞭解更多",
"proRequired": "升級到付費方案,以將 OpenWhispr 連接到 Claude、ChatGPT 和 Cursor。",
"worksWith": "支援",
"copyUrl": "複製 MCP URL",
- "copied": "已複製"
+ "copied": "已複製",
+ "oauthTitle": "透過 OAuth 登入",
+ "oauthDescription": "在支援 OAuth 的用戶端中新增伺服器 URL,然後登入 OpenWhispr 並授權存取。不需要 API 金鑰。",
+ "apiKeyTitle": "使用 API 金鑰",
+ "apiKeyDescription": "對於支援請求標頭的用戶端,請建立具有所需權限的個人 API 金鑰,並使用以下標頭。"
},
"cli": {
"description": "讓你的助理透過終端機存取你的筆記。",
"installLabel": "安裝",
- "learnMore": "查看文件",
- "copyDocsLink": "複製文件連結",
- "docsLinkCopied": "已複製文件連結",
"viewPlans": "查看方案",
"local": {
"label": "本機",
@@ -3995,7 +3993,8 @@
},
"connectors": {
"description": "讓助理使用您的工具。每封郵件、每則訊息和每個議題送出前都需要您核准。"
- }
+ },
+ "readDocs": "閱讀文件"
},
"connectors": {
"approval": {
@@ -4162,15 +4161,17 @@
"descriptionSend": "助理會在聊天中顯示一張郵件卡片,只有在您按下傳送後才會透過您的 Gmail 寄出。",
"unavailable": "郵件草稿暫時無法使用。",
"targetLabel": "在此撰寫郵件",
- "autoResolved": "自動 · {{target}}",
"targets": {
"gmail": "Gmail",
"outlookWork": "Outlook(公司或學校)",
"outlookPersonal": "Outlook.com",
- "mailto": "預設郵件應用程式",
+ "mailto": "系統郵件應用程式",
"gmailSend": "在聊天中傳送(Gmail)",
- "gmailSendConnectFirst": "在聊天中傳送(Gmail)· 請在下方連接 Gmail"
- }
+ "gmailSendConnectFirst": "在聊天中傳送(Gmail)· 請在下方連接 Gmail",
+ "auto": "自動"
+ },
+ "automaticHint": "目前:{{target}}。依已連線的帳戶選擇。",
+ "systemMailHint": "使用電腦上設定的郵件處理程式。"
},
"slack": {
"title": "Slack",
@@ -4608,7 +4609,6 @@
"apiKeysSection": {
"title": "API 金鑰",
"description": "建立金鑰以程式化方式存取 OpenWhispr API。",
- "docsLink": "API 文件",
"empty": "尚無 API 金鑰",
"createButton": "建立 API 金鑰",
"create": {
diff --git a/test/components/apiKeysSection.test.js b/test/components/apiKeysSection.test.js
index b594c5426..fc2c8c950 100644
--- a/test/components/apiKeysSection.test.js
+++ b/test/components/apiKeysSection.test.js
@@ -75,9 +75,13 @@ async function renderSection(t, { keyCount = 0 } = {}) {
});
const { default: ApiKeysSection } = await vite.ssrLoadModule("/components/ApiKeysSection.tsx");
root = createRoot(container);
+ const availability = [];
+ const onCanCreateChange = (canCreate) => availability.push(canCreate);
const render = (createRequest) =>
- React.act(async () => root.render(createElement(ApiKeysSection, { createRequest })));
- return { container, render, loadKeys: () => React.act(async () => resolveList()) };
+ React.act(async () =>
+ root.render(createElement(ApiKeysSection, { createRequest, onCanCreateChange }))
+ );
+ return { container, render, availability, loadKeys: () => React.act(async () => resolveList()) };
}
test("a create request opens the create dialog once the keys have loaded", async (t) => {
@@ -103,3 +107,13 @@ test("at the key limit a create request opens nothing, and the list says why", a
assert.doesNotMatch(container.textContent, /CREATE DIALOG/);
assert.match(container.textContent, /apiKeysSection\.maxKeysReached/);
});
+
+for (const keyCount of [0, 1, 5]) {
+ test(`the header creation action stays disabled while loading and respects the limit (${keyCount})`, async (t) => {
+ const { render, loadKeys, availability } = await renderSection(t, { keyCount });
+ await render(0);
+ assert.equal(availability.at(-1), false);
+ await loadKeys();
+ assert.equal(availability.at(-1), keyCount < 5);
+ });
+}
diff --git a/test/components/connectorsSection.test.js b/test/components/connectorsSection.test.js
index 39c2d17cf..b6fdd15e2 100644
--- a/test/components/connectorsSection.test.js
+++ b/test/components/connectorsSection.test.js
@@ -138,16 +138,6 @@ async function renderSection(t, plan, electronAPI = {}) {
return container;
}
-function listItems(container) {
- const items = [];
- const walk = (node) => {
- if (node.tagName === "LI") items.push(node.textContent);
- for (const child of node.childNodes ?? []) walk(child);
- };
- walk(container);
- return items;
-}
-
const receipt = (id, destinationLabel, state = "sent") => ({
id,
connector: "email",
@@ -172,7 +162,7 @@ test("automatic names the app it resolved to", async (t) => {
const { textContent } = await renderSection(t, { usageState: usage(true) });
assert.match(
textContent,
- /connectors\.email\.autoResolved\{"target":"connectors\.email\.targets\.outlookWork"\}/
+ /connectors\.email\.automaticHint\{"target":"connectors\.email\.targets\.outlookWork"\}/
);
});
@@ -233,60 +223,21 @@ test("an unresolved policy doesn't hide the upsell from a free user", async (t)
assert.match(textContent, /integrations\.api\.viewPlans/);
});
-test("a change of main's account scope clears and refetches the receipts", async (t) => {
- // The login rows listen too, as main's preload allows.
- const scopeListeners = new Set();
- let answerSecondFetch = null;
- const answers = [
- Promise.resolve([receipt("a", "[email protected]")]),
- new Promise((resolve) => {
- answerSecondFetch = resolve;
- }),
- ];
+test("Connectors shows no recent actions or receipt content and never fetches history", async (t) => {
let fetches = 0;
const container = await renderSection(
t,
- { usageState: usage(true) },
+ { isPaid: true, statuses: { slack: SLACK, gmail: { ...SLACK, id: "gmail" } } },
{
- onActiveAccountScopeChanged: (callback) => {
- scopeListeners.add(callback);
- return () => scopeListeners.delete(callback);
+ connectorRecentActions: async () => {
+ fetches++;
+ return [receipt("a", "[email protected]")];
},
- connectorRecentActions: () => answers[fetches++],
- }
- );
- assert.match(listItems(container).join(), /first@example\.com/);
-
- assert.ok(scopeListeners.size > 0);
- await React.act(async () => {
- for (const listener of [...scopeListeners])
- listener({ accountId: "acct-b", authGeneration: 2 });
- });
- assert.equal(fetches, 2);
- assert.deepEqual(listItems(container), []);
-
- await React.act(async () => answerSecondFetch([receipt("b", "[email protected]")]));
- const items = listItems(container);
- assert.equal(items.length, 1);
- assert.match(items[0], /second@example\.com/);
-});
-
-test("recent receipts name the recipient, or the action when a quit cut it short", async (t) => {
- const container = await renderSection(
- t,
- { usageState: usage(true) },
- {
- connectorRecentActions: async () => [
- receipt("a", "[email protected]", "failed"),
- receipt("b", null, "unknown"),
- ],
}
);
-
- const items = listItems(container);
- assert.equal(items.length, 2);
- assert.match(items[0], /^connectors\.recent\.actions\.email_draft/);
- assert.match(items[1], /^connectors\.recent\.unlabeledActions\.email_draft/);
+ assert.equal(fetches, 0);
+ assert.doesNotMatch(container.textContent, /connectors\.recent|hidden@example\.test/);
+ assert.ok(buttonWithText(container, "connectors.slack.disconnect"));
});
test("a connected Slack shows the account and Disconnect", async (t) => {
@@ -383,7 +334,7 @@ test("Send from chat can be picked only while Gmail is connected", async (t) =>
// Automatic sends from chat once Gmail is connected.
assert.match(
container.textContent,
- /connectors\.email\.autoResolved\{"target":"connectors\.email\.targets\.gmailSend"\}/
+ /connectors\.email\.automaticHint\{"target":"connectors\.email\.targets\.gmailSend"\}/
);
});
@@ -394,7 +345,7 @@ test("without a Gmail login, Send from chat is listed but can't be picked, and s
assert.equal(option.textContent, "connectors.email.targets.gmailSendConnectFirst");
assert.match(
container.textContent,
- /connectors\.email\.autoResolved\{"target":"connectors\.email\.targets\.outlookWork"\}/
+ /connectors\.email\.automaticHint\{"target":"connectors\.email\.targets\.outlookWork"\}/
);
});
@@ -408,7 +359,7 @@ test("a Gmail login that needs reconnecting can't be picked, but Automatic still
assert.equal(option.textContent, "connectors.email.targets.gmailSendConnectFirst");
assert.match(
container.textContent,
- /connectors\.email\.autoResolved\{"target":"connectors\.email\.targets\.gmailSend"\}/
+ /connectors\.email\.automaticHint\{"target":"connectors\.email\.targets\.gmailSend"\}/
);
assert.match(container.textContent, /connectors\.gmail\.needsReconnect/);
});
@@ -526,3 +477,9 @@ test("a free user whose org turned connectors off sees why, not an upsell", asyn
assert.doesNotMatch(textContent, /connectors\.upsell/);
assert.doesNotMatch(textContent, /integrations\.api\.viewPlans/);
});
+
+test("Automatic is initially selected and has a short label separate from its current target", async (t) => {
+ const container = await renderSection(t, { isPaid: true });
+ assert.equal(shownTarget(container), "auto");
+ assert.equal(pickerOption(container, "auto").textContent, "connectors.email.targets.auto");
+});
diff --git a/test/components/integrationsView.test.js b/test/components/integrationsView.test.js
index 6c3970ea0..2a91c967f 100644
--- a/test/components/integrationsView.test.js
+++ b/test/components/integrationsView.test.js
@@ -46,7 +46,8 @@ const MOCKS = {
`,
"/ApiKeysSection": `
import React from "react";
- export default function ApiKeysSection({ createRequest }) {
+ export default function ApiKeysSection({ createRequest, onCanCreateChange }) {
+ React.useEffect(() => { onCanCreateChange(true); }, [onCanCreateChange]);
return React.createElement("div", null, "API KEYS SECTION create:" + createRequest);
}
`,
@@ -124,8 +125,16 @@ async function renderView(
t.after(async () => {
if (root) await React.act(async () => root.unmount());
});
+ const openedUrls = [];
installBrowserGlobals(t, {
- window: { electronAPI: { getPlatform: () => "darwin", openExternal() {} } },
+ window: {
+ electronAPI: {
+ getPlatform: () => "darwin",
+ openExternal(url) {
+ openedUrls.push(url);
+ },
+ },
+ },
});
globalThis.__connectorStatuses = statuses;
globalThis.__gcalAccounts = gcalAccounts;
@@ -158,7 +167,7 @@ async function renderView(
}
root = createRoot(container);
await React.act(async () => root.render(createElement(Harness)));
- return { container, upgrades };
+ return { container, upgrades, openedUrls };
}
test("sectionMeta shows counts on a paid plan and plan badges on a free one", async (t) => {
@@ -348,3 +357,40 @@ test("a free plan still sees MCP's setup steps, with Create API key disabled", a
null
);
});
+
+test("the API header opens the existing creation dialog through its request", async (t) => {
+ const { container } = await renderView(t, { section: "api" });
+ const createButton = buttonWithText(container, "apiKeysSection.createButton");
+ assert.ok(createButton);
+ assert.equal(createButton.getAttribute("disabled") !== null, false);
+ await React.act(async () => click(createButton));
+ assert.match(shownText(container), /API KEYS SECTION create:1/);
+});
+
+test("API, MCP and CLI use one docs label and open their own documentation", async (t) => {
+ const { container, openedUrls } = await renderView(t, { section: "api" });
+ for (const [section, url] of [
+ ["api", "https://docs.openwhispr.com/api/overview"],
+ ["mcp", "https://docs.openwhispr.com/integrations/mcp"],
+ ["cli", "https://docs.openwhispr.com/cli/install"],
+ ]) {
+ await React.act(async () => click(navButton(container, section)));
+ const pane = heading(container, `integrations.nav.sections.${section}`).parentNode.parentNode;
+ await React.act(async () => click(buttonWithText(pane, "integrations.readDocs")));
+ assert.equal(openedUrls.at(-1), url);
+ }
+});
+
+test("MCP offers OAuth and API-key alternatives on free and paid plans", async (t) => {
+ for (const isPaid of [true, false])
+ await t.test(String(isPaid), async (st) => {
+ const { container } = await renderView(st, { section: "mcp", isPaid });
+ assert.match(shownText(container), /integrations\.mcp\.oauthDescription/);
+ assert.match(shownText(container), /integrations\.mcp\.apiKeyDescription/);
+ assert.match(shownText(container), /Authorization: Bearer YOUR_API_KEY/);
+ assert.equal(
+ buttonWithText(container, "apiKeysSection.createButton").getAttribute("disabled") !== null,
+ !isPaid
+ );
+ });
+});