fmt(js): npm run fix on merge (#92089)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a7cd15eefc
commit
fce30d818e
@@ -32,7 +32,16 @@ import { CopyButton } from '@/components/ui/copy-button'
|
||||
import { useI18n } from '@/i18n'
|
||||
import { type ErrorSurface, formatErrorDiagnostics } from '@/lib/error-surface'
|
||||
import { triggerHaptic } from '@/lib/haptics'
|
||||
import { AudioLines, GitForkIcon, Loader2Icon, RefreshCwIcon, SmilePlusIcon, Upload, VolumeXIcon, XIcon } from '@/lib/icons'
|
||||
import {
|
||||
AudioLines,
|
||||
GitForkIcon,
|
||||
Loader2Icon,
|
||||
RefreshCwIcon,
|
||||
SmilePlusIcon,
|
||||
Upload,
|
||||
VolumeXIcon,
|
||||
XIcon
|
||||
} from '@/lib/icons'
|
||||
import { extractPreviewTargets } from '@/lib/preview-targets'
|
||||
import { markAssistantIdSpoken } from '@/lib/spoken-reply'
|
||||
import { useEnterAnimation } from '@/lib/use-enter-animation'
|
||||
@@ -555,11 +564,7 @@ const ErrorRecoveryActions: FC = () => {
|
||||
{remoteConnection ? copy.errorOpenDesktopLogs : copy.errorOpenLogs}
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
className="aui-error-action"
|
||||
onClick={() => requestSendDiagnostics(diagnosticsText())}
|
||||
type="button"
|
||||
>
|
||||
<button className="aui-error-action" onClick={() => requestSendDiagnostics(diagnosticsText())} type="button">
|
||||
<Upload className="size-3" />
|
||||
{copy.errorSendDiagnostics}
|
||||
</button>
|
||||
|
||||
@@ -23,11 +23,7 @@ import {
|
||||
import { useI18n } from '@/i18n'
|
||||
import { openExternalLink } from '@/lib/external-link'
|
||||
import { ExternalLink, Loader2Icon, Lock } from '@/lib/icons'
|
||||
import {
|
||||
$sendDiagnostics,
|
||||
confirmSendDiagnostics,
|
||||
dismissSendDiagnostics
|
||||
} from '@/store/send-diagnostics'
|
||||
import { $sendDiagnostics, confirmSendDiagnostics, dismissSendDiagnostics } from '@/store/send-diagnostics'
|
||||
|
||||
const SUPPORT_LINKS = [
|
||||
{ key: 'github', url: 'https://github.com/NousResearch/hermes-agent/issues' },
|
||||
@@ -60,9 +56,7 @@ export function SendDiagnosticsHost() {
|
||||
<Lock className="size-4 text-(--ui-text-tertiary)" />
|
||||
{copy.title}
|
||||
</DialogTitle>
|
||||
<DialogDescription className="whitespace-pre-line text-left">
|
||||
{copy.privacyNotice}
|
||||
</DialogDescription>
|
||||
<DialogDescription className="whitespace-pre-line text-left">{copy.privacyNotice}</DialogDescription>
|
||||
</DialogHeader>
|
||||
<DialogFooter>
|
||||
<Button onClick={dismissSendDiagnostics} variant="ghost">
|
||||
@@ -117,12 +111,7 @@ export function SendDiagnosticsHost() {
|
||||
<div className="text-[0.8rem] text-(--ui-text-secondary)">{copy.handoffLead}</div>
|
||||
<div className="flex flex-wrap gap-1.5">
|
||||
{SUPPORT_LINKS.map(link => (
|
||||
<Button
|
||||
key={link.key}
|
||||
onClick={() => openExternalLink(link.url)}
|
||||
size="sm"
|
||||
variant="outline"
|
||||
>
|
||||
<Button key={link.key} onClick={() => openExternalLink(link.url)} size="sm" variant="outline">
|
||||
<ExternalLink className="size-3" />
|
||||
{copy.links[link.key]}
|
||||
</Button>
|
||||
|
||||
@@ -14,7 +14,8 @@ export const ar = defineLocale({
|
||||
doneTitle: 'تم إرسال التشخيصات',
|
||||
doneDescription: 'تم رفع الحزمة بشكل خاص. شارك الرابط أدناه في محادثة الدعم لكي يتمكن الفريق من رؤية سجلاتك.',
|
||||
failedTitle: 'فشل الرفع',
|
||||
failedHint: 'يمكنك أيضاً تشغيل `hermes debug share --nous` من الطرفية، أو `hermes debug share --local` لعرض التقرير دون رفعه.',
|
||||
failedHint:
|
||||
'يمكنك أيضاً تشغيل `hermes debug share --nous` من الطرفية، أو `hermes debug share --local` لعرض التقرير دون رفعه.',
|
||||
handoffLead: 'تابع النقاش في:',
|
||||
links: {
|
||||
github: 'GitHub Issues',
|
||||
|
||||
@@ -221,9 +221,11 @@ export const en: Translations = {
|
||||
copyLink: 'Copy link',
|
||||
uploadIdFallback: id => `No view link returned — quote upload ID ${id} to support`,
|
||||
doneTitle: 'Diagnostics sent',
|
||||
doneDescription: 'Your bundle was uploaded privately. Share the link below in your support thread so the team can see your logs.',
|
||||
doneDescription:
|
||||
'Your bundle was uploaded privately. Share the link below in your support thread so the team can see your logs.',
|
||||
failedTitle: 'Upload failed',
|
||||
failedHint: 'You can also run `hermes debug share --nous` from a terminal, or `hermes debug share --local` to print the report without uploading.',
|
||||
failedHint:
|
||||
'You can also run `hermes debug share --nous` from a terminal, or `hermes debug share --local` to print the report without uploading.',
|
||||
handoffLead: 'Pick up the discussion in:',
|
||||
links: {
|
||||
github: 'GitHub Issues',
|
||||
|
||||
@@ -222,9 +222,11 @@ export const ja = defineLocale({
|
||||
copyLink: 'リンクをコピー',
|
||||
uploadIdFallback: id => `表示リンクが返されませんでした — サポートにアップロード ID ${id} をお伝えください`,
|
||||
doneTitle: '診断情報を送信しました',
|
||||
doneDescription: 'バンドルは非公開でアップロードされました。サポートスレッドで以下のリンクを共有すると、チームがログを確認できます。',
|
||||
doneDescription:
|
||||
'バンドルは非公開でアップロードされました。サポートスレッドで以下のリンクを共有すると、チームがログを確認できます。',
|
||||
failedTitle: 'アップロードに失敗しました',
|
||||
failedHint: 'ターミナルから `hermes debug share --nous` を実行するか、`hermes debug share --local` でアップロードせずにレポートを表示することもできます。',
|
||||
failedHint:
|
||||
'ターミナルから `hermes debug share --nous` を実行するか、`hermes debug share --local` でアップロードせずにレポートを表示することもできます。',
|
||||
handoffLead: '続きは次の場所で:',
|
||||
links: {
|
||||
github: 'GitHub Issues',
|
||||
|
||||
@@ -217,7 +217,8 @@ export const zhHant = defineLocale({
|
||||
doneTitle: '診斷資訊已傳送',
|
||||
doneDescription: '偵錯套件已私密上傳。在您的支援討論串中分享以下連結,團隊即可檢視您的日誌。',
|
||||
failedTitle: '上傳失敗',
|
||||
failedHint: '您也可以在終端機執行 `hermes debug share --nous`,或執行 `hermes debug share --local` 在不上傳的情況下檢視報告。',
|
||||
failedHint:
|
||||
'您也可以在終端機執行 `hermes debug share --nous`,或執行 `hermes debug share --local` 在不上傳的情況下檢視報告。',
|
||||
handoffLead: '在以下位置繼續討論:',
|
||||
links: {
|
||||
github: 'GitHub Issues',
|
||||
|
||||
@@ -217,7 +217,8 @@ export const zh: Translations = {
|
||||
doneTitle: '诊断信息已发送',
|
||||
doneDescription: '调试包已私密上传。在您的支持会话中分享以下链接,团队即可查看您的日志。',
|
||||
failedTitle: '上传失败',
|
||||
failedHint: '您也可以在终端运行 `hermes debug share --nous`,或运行 `hermes debug share --local` 在不上传的情况下查看报告。',
|
||||
failedHint:
|
||||
'您也可以在终端运行 `hermes debug share --nous`,或运行 `hermes debug share --local` 在不上传的情况下查看报告。',
|
||||
handoffLead: '在以下位置继续讨论:',
|
||||
links: {
|
||||
github: 'GitHub Issues',
|
||||
|
||||
@@ -8,7 +8,9 @@ import {
|
||||
requestSendDiagnostics
|
||||
} from '@/store/send-diagnostics'
|
||||
|
||||
function stubGateway(request: (method: string, params?: Record<string, unknown>, timeout?: number) => Promise<unknown>) {
|
||||
function stubGateway(
|
||||
request: (method: string, params?: Record<string, unknown>, timeout?: number) => Promise<unknown>
|
||||
) {
|
||||
const original = $gateway.get()
|
||||
|
||||
$gateway.set({ request } as never)
|
||||
@@ -145,9 +147,7 @@ describe('send-diagnostics store', () => {
|
||||
it('dismissal mid-upload is immediate and a stale completion cannot resurrect the dialog', async () => {
|
||||
let resolveRequest: (value: unknown) => void = () => {}
|
||||
|
||||
const request = vi.fn().mockImplementation(
|
||||
() => new Promise(resolve => (resolveRequest = resolve))
|
||||
)
|
||||
const request = vi.fn().mockImplementation(() => new Promise(resolve => (resolveRequest = resolve)))
|
||||
|
||||
const restoreGateway = stubGateway(request as never)
|
||||
const restoreDesktop = stubDesktopLogs(null)
|
||||
|
||||
Reference in New Issue
Block a user