diff --git a/client/electron/src/components/AccountPage.tsx b/client/electron/src/components/AccountPage.tsx index c5bdb2d..7e64442 100644 --- a/client/electron/src/components/AccountPage.tsx +++ b/client/electron/src/components/AccountPage.tsx @@ -145,7 +145,7 @@ export default function AccountPage() {
- +
- +
- + - {mismatch &&

两次密码不一致

} + {mismatch &&

两次密码不一致

}
{error && ( diff --git a/client/electron/src/components/AddressInput.tsx b/client/electron/src/components/AddressInput.tsx index dc2ea71..fc0eca2 100644 --- a/client/electron/src/components/AddressInput.tsx +++ b/client/electron/src/components/AddressInput.tsx @@ -181,12 +181,12 @@ export default function AddressInput({ {open && items.length > 0 && (
-
+
{hint}
{items.map((s, i) => { @@ -216,23 +216,23 @@ export default function AddressInput({ 一条已经在跑的会话,而不是继续一条已有的邮件往来 */} {c?.source === 'platform' && ( 平台 )} {c?.source === 'new' && ( - 新建会话 + 新建会话 )} {(c?.unread ?? 0) > 0 && ( - + {c!.unread} )}
{c?.title && c.source !== 'new' && ( -

{c.title}

+

{c.title}

)} ); diff --git a/client/electron/src/components/AdminUsersPage.tsx b/client/electron/src/components/AdminUsersPage.tsx index c0901c5..b54946e 100644 --- a/client/electron/src/components/AdminUsersPage.tsx +++ b/client/electron/src/components/AdminUsersPage.tsx @@ -194,18 +194,18 @@ function UserCard({ user, scopes, expanded, onToggle, onSaved, onReload, setErro {user.username} - {user.display_name} - + {user.display_name} + {user.role === 'admin' ? '管理员' : '用户'} - + {user.status === 'active' ? '启用' : '禁用'} {user.role !== 'admin' && (user.allowed_agents.length > 0 || user.allowed_paths.length > 0) && ( - 受限 + 受限 )}
- {user.last_login || '从未登录'} + {user.last_login || '从未登录'}
{expanded && }
@@ -258,12 +258,12 @@ function UserEditor({ user, scopes, onSaved, onReload, setError }: {
- + setDisplayName(e.target.value)} className="w-full text-sm border border-gray-300 rounded-md px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-blue-100 focus:border-blue-400" />
- +
- + {user.status === 'active' ? ( ) : ( @@ -283,7 +283,7 @@ function UserEditor({ user, scopes, onSaved, onReload, setError }: { {user.role !== 'admin' && ( <>
-
-
@@ -402,7 +402,7 @@ function ScopePick({ label, items, selected, onToggle, color }: { const active = color === 'blue' ? 'bg-blue-50 border-blue-300 text-blue-700' : 'bg-green-50 border-green-300 text-green-700'; return (
- ); } diff --git a/client/electron/src/components/CalendarView.tsx b/client/electron/src/components/CalendarView.tsx index feac3e8..98c7aba 100644 --- a/client/electron/src/components/CalendarView.tsx +++ b/client/electron/src/components/CalendarView.tsx @@ -465,7 +465,7 @@ function MonthGrid({ {/* 农历日必须显示:农历重复规则的公历日期每次都在变, 不显示农历人无法确认「每月十五」到底落在哪一格 */} @@ -535,7 +535,7 @@ function WeekGrid({ > {d.getMonth() + 1}.{d.getDate()}
-
{cellLunarLabel(d)}
+
{cellLunarLabel(d)}
{list.length === 0 ? ( diff --git a/client/electron/src/components/ComposePage.tsx b/client/electron/src/components/ComposePage.tsx index 1e6c547..f57e37e 100644 --- a/client/electron/src/components/ComposePage.tsx +++ b/client/electron/src/components/ComposePage.tsx @@ -189,7 +189,7 @@ export default function ComposePage() { placeholder="refactor-auth" className="w-full text-sm border border-gray-300 rounded-md px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-blue-100 focus:border-blue-400" /> - {aliasError && {aliasError}} + {aliasError && {aliasError}} )} @@ -227,11 +227,11 @@ export default function ComposePage() { placeholder={defaultRoundsHint} className="w-24 text-sm border border-gray-300 rounded-md px-2.5 py-1.5 focus:outline-none focus:ring-2 focus:ring-blue-100 focus:border-blue-400" /> - + 个来回后 Agent 停止主动发信(自动转发的总结与权限询问不占预算)
- {roundsError && {roundsError}} + {roundsError && {roundsError}} )} @@ -251,7 +251,7 @@ export default function ComposePage() {
- 正文(Markdown) + 正文(Markdown)
setPreview(false)}> 编辑 @@ -319,8 +319,8 @@ function Field({ return (
- - {hint && {hint}} + + {hint && {hint}}
{children}
@@ -339,7 +339,7 @@ function Toggle({ return (
- + {contact.session_alias || '(未命名会话)'}
-

+

{contact.mail_count} 封 · {time}

@@ -257,7 +257,7 @@ function ContactRow({
- + {token} ))}
@@ -142,7 +142,7 @@ function CreateForm({ variant, busy, onSubmit }: CreateFormProps) { onChange={e => setHours(Math.max(1, Number(e.target.value) || 1))} className="w-20 text-xs border border-gray-300 rounded px-2 py-1.5 focus:outline-none focus:ring-2 focus:ring-blue-100" /> - 小时后过期 + 小时后过期
)}
@@ -220,7 +220,7 @@ export default function KeyPanel({ -

+

{variant === 'agent' ? 'Agent 用该密钥注册、收发邮件与订阅通知。插件首次安装会在本地生成一把密钥并打印出来,把它填到「登记」框即可。' : '第三方客户端用该密钥访问自己的邮箱(Authorization: Bearer)。它不能用于注册 Agent。'} @@ -238,21 +238,21 @@ export default function KeyPanel({ const agentKey = variant === 'agent' ? (k as api.AgentKey) : null; return (

- + {k.token_hint}
{k.label || (无备注)}
-
+
{KEY_TYPE_LABEL[k.key_type]} {k.expires_at && ` · ${new Date(k.expires_at).toLocaleString()} 过期`} {agentKey && (agentKey.agent_name ? ` · ${agentKey.agent_name}` : ' · 待绑定')}
- {st.text} + {st.text} {agentKey && onBind && bindingID === k.key_id ? (
@@ -260,7 +260,7 @@ export default function KeyPanel({ value={bindName} onChange={e => setBindName(e.target.value)} placeholder="Agent 名" - className="w-28 text-[11px] border border-gray-300 rounded px-1.5 py-1" + className="w-28 text-2xs border border-gray-300 rounded px-1.5 py-1" /> @@ -287,7 +287,7 @@ export default function KeyPanel({ setBindingID(k.key_id); setBindName(agentKey.agent_name ?? ''); }} - className="text-[11px] text-gray-500 hover:text-gray-900 shrink-0" + className="text-2xs text-gray-500 hover:text-gray-900 shrink-0" > 绑定 diff --git a/client/electron/src/components/LoginPage.tsx b/client/electron/src/components/LoginPage.tsx index 981501c..cc09e4f 100644 --- a/client/electron/src/components/LoginPage.tsx +++ b/client/electron/src/components/LoginPage.tsx @@ -53,7 +53,7 @@ export default function LoginPage() { // auto margin 在空间不足时自动退化为 0,于是矮屏变成正常的顶对齐可滚布局。 return (
-
+
@@ -64,7 +64,7 @@ export default function LoginPage() {
- +
- + -
+
+

{isSent ? '发件箱' : '收件箱'}

{/* 显示「会话数 · 邮件数」而不是只显示邮件数:分组之后前者才是 「有几件事」,后者只是流量 */} @@ -75,7 +75,7 @@ export default function MailList() {
-
+
{groups.map(g => isFlatGroup(g) ? ( @@ -276,14 +276,14 @@ function MailItem({ )} - {time} + {time}
{!compact && (
{isUnread && } {isPermission && ( - + 权限 @@ -303,7 +303,7 @@ function MailItem({ 发件箱里仍可能出现权限邮件(理论上人发不出,但不假设数据一定干净) */} {compact && isPermission && ( @@ -312,11 +312,11 @@ function MailItem({ )} {!compact && mail.session_alias && ( - .{mail.session_alias} + .{mail.session_alias} )} - {ccCount > 0 && 抄送 {ccCount}} + {ccCount > 0 && 抄送 {ccCount}} {attachCount > 0 && ( - + {attachCount} diff --git a/client/electron/src/components/MailView.tsx b/client/electron/src/components/MailView.tsx index 5243b2d..327d24c 100644 --- a/client/electron/src/components/MailView.tsx +++ b/client/electron/src/components/MailView.tsx @@ -175,7 +175,7 @@ function PermissionEditor() { setEditing(false); }} title={o.desc} - className={`px-1.5 py-0.5 rounded text-[10px] font-medium border transition-colors disabled:opacity-40 ${ + className={`px-1.5 py-0.5 rounded text-3xs font-medium border transition-colors disabled:opacity-40 ${ mode === o.value ? 'border-blue-500 bg-blue-50 text-blue-700' : 'border-gray-200 text-gray-500 hover:bg-gray-50' @@ -184,7 +184,7 @@ function PermissionEditor() { {o.label} ))} -
@@ -226,7 +226,7 @@ function BudgetEditor() { @@ -266,13 +266,13 @@ function BudgetEditor() { disabled={busy || budget.used_rounds === 0} onClick={() => commit({ reset: true })} title="已用次数归零,上限不变" - className="text-[11px] text-gray-500 hover:text-gray-900 disabled:opacity-30" + className="text-2xs text-gray-500 hover:text-gray-900 disabled:opacity-30" > 重置 @@ -308,9 +308,9 @@ function RenameProposalBar() { .{proposal.alias}

{proposal.reason && ( -

{proposal.reason}

+

{proposal.reason}

)} -

+

改名后需用 name@path.{proposal.alias} 寻址;旧别名立即失效。 接受后此别名不再被 Agent 平台的自动命名覆盖

@@ -376,13 +376,13 @@ function ForwardBar({ mail, onClose }: { mail: Mail; onClose: () => void }) {
- + 转发「{mail.subject}」
@@ -468,19 +468,19 @@ function Header({

{mail.subject}

{mail.status === 'unread' && ( - + 未读 )} {mail.mail_type === 'permission_request' && ( - + 权限请求 )}
{mail.status === 'unread' && ( - )} @@ -553,20 +553,20 @@ function ThreadCard({ mail, onForward }: { mail: Mail; onForward?: () => void }) 都渲染成 human 就分不清谁说的话 */} {mail.from_name} {isPermission && ( - + 权限请求 )} {mail.cc_list?.length > 0 && ( c.raw || `${c.name}@${c.path || ''}`).join(', ')} > 抄送 {mail.cc_list.length} )}
- {time} + {time} {onForward && ( {blank && ( - 请先选择或填写回答 + 请先选择或填写回答 )}
@@ -852,19 +852,19 @@ function ReplyBar({ return (
-

回复 {target}

+

回复 {target}

{(replyTo.cc_list?.length ?? 0) > 0 && ( )} @@ -898,7 +898,7 @@ function ReplyBar({ setBudgetEditing(true); }} title="本任务往返预算:Agent 主动发信上限(自动转发与权限询问不占)" - className={`tap inline-flex items-center gap-1 text-[10px] px-2 py-1 rounded border ${ + className={`tap inline-flex items-center gap-1 text-3xs px-2 py-1 rounded border ${ budget.unlimited ? 'border-gray-200 text-gray-500 hover:border-blue-300' : budget.remaining === 0 @@ -914,7 +914,7 @@ function ReplyBar({ )} {budget && budgetEditing && ( - 预算 + 预算 setMaxRoundsDraft(e.target.value)} @@ -931,13 +931,13 @@ function ReplyBar({ setBudgetBusy(false); setBudgetEditing(false); }} - className="tap px-2 py-0.5 text-[10px] rounded bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-40" + className="tap px-2 py-0.5 text-3xs rounded bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-40" > 保存 @@ -972,5 +972,5 @@ function StatusBadge({ status }: { status: string }) { archived: { label: '已归档', cls: 'bg-gray-200 text-gray-600' } }; const b = map[status] || map.active; - return {b.label}; + return {b.label}; } diff --git a/client/electron/src/components/ModelScopePanel.tsx b/client/electron/src/components/ModelScopePanel.tsx index 7866648..8a8ee5c 100644 --- a/client/electron/src/components/ModelScopePanel.tsx +++ b/client/electron/src/components/ModelScopePanel.tsx @@ -50,7 +50,7 @@ function PanelHeader({ count }: { count: number }) {

Agent 模型范围

{count > 0 && {count}}
-

+

划定每个平台在邮件场景下可用的模型。勾选顺序即尝试顺序 —— 插件按序降级, 全部失败才回一封说明失败原因的邮件。
@@ -152,12 +152,12 @@ function AgentModelRow({ className={`w-3 h-3 text-gray-400 shrink-0 transition-transform ${expanded ? 'rotate-90' : ''}`} /> {agentName} - + {saved.length === 0 ? '不限定(用平台默认模型)' : `${saved.length} 个模型,按序尝试`} {staleKeys.length > 0 && ( {staleKeys.length} 个已失效 @@ -176,7 +176,7 @@ function AgentModelRow({ {err &&

{err}

} {!loading && catalog.length === 0 && staleKeys.length === 0 && ( -

+

该平台还没有上报模型清单。插件会在心跳时上报(约 30 秒一次)—— 若长时间为空,检查插件是否在运行、以及它能否读到平台的 provider 配置。

@@ -184,7 +184,7 @@ function AgentModelRow({ {picks.length > 0 && (
-

+

尝试顺序(自上而下)

@@ -198,11 +198,11 @@ function AgentModelRow({ isStale ? 'border-amber-200' : 'border-gray-200' }`} > - {i + 1} + {i + 1} {key} {isStale && ( 已失效 @@ -241,7 +241,7 @@ function AgentModelRow({ {catalog.length > 0 && (
-

+

平台上报的模型({catalog.length})

@@ -253,7 +253,7 @@ function AgentModelRow({ key={key} onClick={() => toggle(key)} title={m.display_name || key} - className={`tap px-2 py-1 text-[11px] font-mono rounded border transition-colors ${ + className={`tap px-2 py-1 text-2xs font-mono rounded border transition-colors ${ on ? 'bg-blue-50 border-blue-300 text-blue-700' : 'bg-white border-gray-200 text-gray-600 hover:border-gray-300' @@ -270,7 +270,7 @@ function AgentModelRow({ {(catalog.length > 0 || picks.length > 0) && (
{picks.length === 0 && ( - + 未选 = 不限定,用平台默认模型 )} @@ -278,7 +278,7 @@ function AgentModelRow({ {dirty && ( @@ -286,7 +286,7 @@ function AgentModelRow({
- 我的 + 我的 ); diff --git a/client/electron/src/components/NarrowStack.tsx b/client/electron/src/components/NarrowStack.tsx index 75cbbb1..99c7f30 100644 --- a/client/electron/src/components/NarrowStack.tsx +++ b/client/electron/src/components/NarrowStack.tsx @@ -74,7 +74,7 @@ export default function NarrowStack({ {mounted && (
diff --git a/client/electron/src/components/PermissionChip.tsx b/client/electron/src/components/PermissionChip.tsx index 0076c8c..b9a2152 100644 --- a/client/electron/src/components/PermissionChip.tsx +++ b/client/electron/src/components/PermissionChip.tsx @@ -87,7 +87,7 @@ export default function PermissionChip({ mode, enforcement, compact }: Permissio {label} diff --git a/client/electron/src/components/PermissionList.tsx b/client/electron/src/components/PermissionList.tsx index 9fbfcb4..46928d4 100644 --- a/client/electron/src/components/PermissionList.tsx +++ b/client/electron/src/components/PermissionList.tsx @@ -58,7 +58,7 @@ export default function PermissionList() {

授权

{pendingTotal > 0 ? ( - + {pendingTotal} 待决策 @@ -85,7 +85,7 @@ export default function PermissionList() {

没有授权请求

-

+

Agent 执行敏感操作(bash、写文件)时会在这里请求你批准

@@ -135,28 +135,28 @@ function PermissionSessionGroup({ {g.agentName}{g.path ? `@${g.path}` : ''}{g.alias ? `.${g.alias}` : ''} - {time} + {time}
{hasPending ? ( - + {g.pending.length} 待决策 ) : ( - + 已全部处理 )} {g.settled.length > 0 && ( - 历史 {g.settled.length} + 历史 {g.settled.length} )}
{!g.alias && ( -

+

(未命名会话)

)} @@ -177,7 +177,7 @@ function PermissionSessionGroup({ <> @@ -248,12 +248,12 @@ function PermissionRow({ > {mail.subject}
- {time} + {time}
{settled ? ( @@ -262,7 +262,7 @@ function PermissionRow({ ) : expired ? ( ) : ( - + 等待你决策 diff --git a/client/electron/src/components/QuotaPanel.tsx b/client/electron/src/components/QuotaPanel.tsx index 4536dac..ff944ff 100644 --- a/client/electron/src/components/QuotaPanel.tsx +++ b/client/electron/src/components/QuotaPanel.tsx @@ -103,7 +103,7 @@ export default function QuotaPanel() { ? 'bg-red-50 text-red-600' : 'bg-gray-50 text-gray-500'; const label = st === 'online' ? '在线' : st === 'disabled' ? '已停用' : '离线'; - return {label}; + return {label}; }; return ( @@ -114,7 +114,7 @@ export default function QuotaPanel() { {stats.length}
-

+

默认预算:派给某个 Agent 的新任务默认多少个来回(填 0 = 不限)。 这只是默认值 —— 写信时可以单独指定,之后在对话页里还能随时调整。 插件自动转发的最终总结与权限询问不占用预算。 @@ -127,8 +127,8 @@ export default function QuotaPanel() { 邮件与会话保留(历史是审计凭据),此名字今后不可再注册。

- {error &&
{error}
} - {notice &&
{notice}
} + {error &&
{error}
} + {notice &&
{notice}
} {stats.length === 0 ? (
暂无已注册的 Agent
@@ -149,7 +149,7 @@ export default function QuotaPanel() { {statusBadge(s)} -
+
{s.default_rounds === 0 ? '默认不限来回' : `默认 ${s.default_rounds} 个来回`} {' · '}进行中 {s.active_sessions} 个任务 · 累计发信 {s.sent_total} @@ -177,19 +177,19 @@ export default function QuotaPanel() { {/* 停用/恢复/删除 按钮 */} {isConfirming ? (
- 确认{confirmAction === 'delete' ? '删除' : ''}? + 确认{confirmAction === 'delete' ? '删除' : ''}? @@ -202,7 +202,7 @@ export default function QuotaPanel() { title={isDisabled ? '恢复此 Agent(恢复为离线;停用时撤销的密钥不会自动回来,必须重新签发)' : '停用此 Agent(撤销全部密钥并从补全里隐藏;邮件与会话保留,可恢复)'} - className={`tap shrink-0 inline-flex items-center gap-1 text-[11px] px-1.5 py-0.5 rounded border ${ + className={`tap shrink-0 inline-flex items-center gap-1 text-2xs px-1.5 py-0.5 rounded border ${ isDisabled ? 'border-green-200 text-green-700 hover:bg-green-50' : 'border-gray-200 text-gray-500 hover:text-red-600 hover:border-red-200' @@ -215,7 +215,7 @@ export default function QuotaPanel() { onClick={() => { setConfirming(s.agent_name); setConfirmAction('delete'); }} disabled={busy === s.agent_name} title="彻底删除此 Agent(清除密钥与运行态;邮件保留但此名今后不可再用)" - className="tap shrink-0 text-[10px] px-1.5 py-0.5 rounded border border-red-200 text-red-400 hover:text-red-600 hover:border-red-300 disabled:opacity-30" + className="tap shrink-0 text-3xs px-1.5 py-0.5 rounded border border-red-200 text-red-400 hover:text-red-600 hover:border-red-300 disabled:opacity-30" > 删除 diff --git a/client/electron/src/components/SetupPage.tsx b/client/electron/src/components/SetupPage.tsx index b2ac59d..3a2b2c1 100644 --- a/client/electron/src/components/SetupPage.tsx +++ b/client/electron/src/components/SetupPage.tsx @@ -53,7 +53,7 @@ export default function SetupPage({ onDone }: { onDone: () => void }) { // auto margin 在空间不足时自动退化为 0,于是矮屏变成正常的顶对齐可滚布局。 return (
-
+
@@ -66,7 +66,7 @@ export default function SetupPage({ onDone }: { onDone: () => void }) {
-
- + setDisplayName(e.target.value)} @@ -93,7 +93,7 @@ export default function SetupPage({ onDone }: { onDone: () => void }) {
-
- + void }) { mismatch ? 'border-red-300' : 'border-gray-300 focus:border-blue-400' }`} /> - {mismatch &&

两次输入的密码不一致

} + {mismatch &&

两次输入的密码不一致

}
{error && ( diff --git a/client/electron/src/components/Sidebar.tsx b/client/electron/src/components/Sidebar.tsx index 010a51d..a27b412 100644 --- a/client/electron/src/components/Sidebar.tsx +++ b/client/electron/src/components/Sidebar.tsx @@ -80,10 +80,10 @@ export default function Sidebar() { }`} > - {short} + {short} {badge > 0 && ( - 新建 + 新建
diff --git a/client/electron/src/components/WorkCard.tsx b/client/electron/src/components/WorkCard.tsx index 164fad4..17a677b 100644 --- a/client/electron/src/components/WorkCard.tsx +++ b/client/electron/src/components/WorkCard.tsx @@ -53,9 +53,9 @@ export function WorkCard({