diff --git a/apps/docs/src/main/docs-main.ts b/apps/docs/src/main/docs-main.ts index 77402c96e..a9a116ef4 100644 --- a/apps/docs/src/main/docs-main.ts +++ b/apps/docs/src/main/docs-main.ts @@ -268,7 +268,7 @@ const tMain = createI18n({ menuWindow: '窗口', menuHelp: '帮助', menuShortcuts: '键盘快捷键', - menuDocsHelp: 'GenOffice Docs 帮助', + menuDocsHelp: 'HermesOffice Docs 帮助', }, en: { dlgOpenDoc: 'Open Document', @@ -368,7 +368,7 @@ const tMain = createI18n({ menuWindow: 'Window', menuHelp: 'Help', menuShortcuts: 'Keyboard Shortcuts', - menuDocsHelp: 'GenOffice Docs Help', + menuDocsHelp: 'HermesOffice Docs Help', }, ja: { dlgOpenDoc: '文書を開く', @@ -468,7 +468,7 @@ const tMain = createI18n({ menuWindow: 'ウィンドウ', menuHelp: 'ヘルプ', menuShortcuts: 'キーボードショートカット', - menuDocsHelp: 'GenOffice Docs ヘルプ', + menuDocsHelp: 'HermesOffice Docs ヘルプ', }, ko: { dlgOpenDoc: '문서 열기', @@ -569,7 +569,7 @@ const tMain = createI18n({ menuWindow: '창', menuHelp: '도움말', menuShortcuts: '키보드 바로 가기', - menuDocsHelp: 'GenOffice Docs 도움말', + menuDocsHelp: 'HermesOffice Docs 도움말', }, fr: { dlgOpenDoc: 'Ouvrir un document', @@ -672,7 +672,7 @@ const tMain = createI18n({ menuWindow: 'Fenêtre', menuHelp: 'Aide', menuShortcuts: 'Raccourcis clavier', - menuDocsHelp: 'Aide GenOffice Docs', + menuDocsHelp: 'Aide HermesOffice Docs', }, de: { dlgOpenDoc: 'Dokument öffnen', @@ -775,7 +775,7 @@ const tMain = createI18n({ menuWindow: 'Fenster', menuHelp: 'Hilfe', menuShortcuts: 'Tastenkombinationen', - menuDocsHelp: 'GenOffice Docs-Hilfe', + menuDocsHelp: 'HermesOffice Docs-Hilfe', }, es: { dlgOpenDoc: 'Abrir documento', @@ -877,7 +877,7 @@ const tMain = createI18n({ menuWindow: 'Ventana', menuHelp: 'Ayuda', menuShortcuts: 'Atajos de teclado', - menuDocsHelp: 'Ayuda de GenOffice Docs', + menuDocsHelp: 'Ayuda de HermesOffice Docs', }, th: { dlgOpenDoc: 'เปิดเอกสาร', @@ -977,7 +977,7 @@ const tMain = createI18n({ menuWindow: 'หน้าต่าง', menuHelp: 'วิธีใช้', menuShortcuts: 'แป้นพิมพ์ลัด', - menuDocsHelp: 'วิธีใช้ GenOffice Docs', + menuDocsHelp: 'วิธีใช้ HermesOffice Docs', }, id: { dlgOpenDoc: 'Buka Dokumen', @@ -1077,7 +1077,7 @@ const tMain = createI18n({ menuWindow: 'Jendela', menuHelp: 'Bantuan', menuShortcuts: 'Pintasan Papan Ketik', - menuDocsHelp: 'Bantuan GenOffice Docs', + menuDocsHelp: 'Bantuan HermesOffice Docs', }, ru: { dlgOpenDoc: 'Открыть документ', @@ -1178,7 +1178,7 @@ const tMain = createI18n({ menuWindow: 'Окно', menuHelp: 'Справка', menuShortcuts: 'Сочетания клавиш', - menuDocsHelp: 'Справка GenOffice Docs', + menuDocsHelp: 'Справка HermesOffice Docs', }, ar: { dlgOpenDoc: 'فتح مستند', @@ -1279,7 +1279,7 @@ const tMain = createI18n({ menuWindow: 'نافذة', menuHelp: 'تعليمات', menuShortcuts: 'اختصارات لوحة المفاتيح', - menuDocsHelp: 'تعليمات GenOffice Docs', + menuDocsHelp: 'تعليمات HermesOffice Docs', }, pt: { dlgOpenDoc: 'Abrir Documento', @@ -1380,7 +1380,7 @@ const tMain = createI18n({ menuWindow: 'Janela', menuHelp: 'Ajuda', menuShortcuts: 'Atalhos de Teclado', - menuDocsHelp: 'Ajuda do GenOffice Docs', + menuDocsHelp: 'Ajuda do HermesOffice Docs', }, it: { dlgOpenDoc: 'Apri documento', @@ -1481,7 +1481,7 @@ const tMain = createI18n({ menuWindow: 'Finestra', menuHelp: 'Aiuto', menuShortcuts: 'Scelte rapide da tastiera', - menuDocsHelp: 'Guida di GenOffice Docs', + menuDocsHelp: 'Guida di HermesOffice Docs', }, pl: { dlgOpenDoc: 'Otwórz dokument', @@ -1583,7 +1583,7 @@ const tMain = createI18n({ menuWindow: 'Okno', menuHelp: 'Pomoc', menuShortcuts: 'Skróty klawiaturowe', - menuDocsHelp: 'Pomoc GenOffice Docs', + menuDocsHelp: 'Pomoc HermesOffice Docs', }, cs: { dlgOpenDoc: 'Otevřít dokument', @@ -1684,7 +1684,7 @@ const tMain = createI18n({ menuWindow: 'Okno', menuHelp: 'Nápověda', menuShortcuts: 'Klávesové zkratky', - menuDocsHelp: 'Nápověda GenOffice Docs', + menuDocsHelp: 'Nápověda HermesOffice Docs', }, nl: { dlgOpenDoc: 'Document openen', @@ -1786,7 +1786,7 @@ const tMain = createI18n({ menuWindow: 'Venster', menuHelp: 'Help', menuShortcuts: 'Sneltoetsen', - menuDocsHelp: 'GenOffice Docs Help', + menuDocsHelp: 'HermesOffice Docs Help', }, ms: { dlgOpenDoc: 'Buka Dokumen', @@ -1887,7 +1887,7 @@ const tMain = createI18n({ menuWindow: 'Tetingkap', menuHelp: 'Bantuan', menuShortcuts: 'Pintasan Papan Kekunci', - menuDocsHelp: 'Bantuan GenOffice Docs', + menuDocsHelp: 'Bantuan HermesOffice Docs', }, he: { dlgOpenDoc: 'פתיחת מסמך', @@ -1986,7 +1986,7 @@ const tMain = createI18n({ menuWindow: 'חלון', menuHelp: 'עזרה', menuShortcuts: 'קיצורי מקלדת', - menuDocsHelp: 'עזרה של GenOffice Docs', + menuDocsHelp: 'עזרה של HermesOffice Docs', }, hi: { dlgOpenDoc: 'दस्तावेज़ खोलें', @@ -2087,7 +2087,7 @@ const tMain = createI18n({ menuWindow: 'विंडो', menuHelp: 'सहायता', menuShortcuts: 'कीबोर्ड शॉर्टकट', - menuDocsHelp: 'GenOffice Docs सहायता', + menuDocsHelp: 'HermesOffice Docs सहायता', }, 'zh-TW': { dlgOpenDoc: '開啟文件', @@ -2185,7 +2185,7 @@ const tMain = createI18n({ menuWindow: '視窗', menuHelp: '說明', menuShortcuts: '鍵盤快速鍵', - menuDocsHelp: 'GenOffice Docs 說明', + menuDocsHelp: 'HermesOffice Docs 說明', }, }) const tm = (key: Parameters[1], params?: Parameters[2]) => @@ -2270,7 +2270,7 @@ async function saveDialog(event: IpcMainInvokeEvent, options: SaveDialogOptions) return showSaveDialogWithMemory(dialog, dialogParent(event), options, defaultSaveDir()) } -/** default folder where new files land on their first (silent) save; shared with the other editors via shell. User-configurable (app-settings.json), falls back to /GenOffice. */ +/** default folder where new files land on their first (silent) save; shared with the other editors via shell. User-configurable (app-settings.json), falls back to /HermesOffice. */ export function defaultSaveDir(): string { return configuredDefaultSaveDir(app) } @@ -3379,7 +3379,7 @@ export function registerDocsIpc(): void { void app.whenReady().then(registerLazyMediaProtocol) // Node fetch (undici) direct connections get reset under VPN/tun setups; retry over Chromium's stack setRescueFetch((url, init) => net.fetch(url, init)) - setAiUserAgent(`GenOffice/${app.getVersion()}`) + setAiUserAgent(`HermesOffice/${app.getVersion()}`) // shared with the other editor modules — last (identical) registration wins ipcMain.removeHandler('app:get-language') @@ -4290,7 +4290,7 @@ interface DocsShellHooks { focusTab(id: string): void /** closes the calling tab instead of the whole shell window (Cmd+W / role:'close') */ closeActiveTab(): void - /** Shell router used to open exported PDFs in a new GenOffice tab. */ + /** Shell router used to open exported PDFs in a new HermesOffice tab. */ openGeneratedPath?(path: string): boolean /** Cmd/Ctrl+O opens the shell's quick switcher instead of the file dialog */ openQuickSwitcher?(): void @@ -4728,7 +4728,7 @@ export function createDocsWindow(openPath?: string): BrowserWindow { height: 900, minWidth: 720, minHeight: 550, - title: 'GenOffice Docs', + title: 'HermesOffice Docs', // Word-like custom title bar (document name centered, quick-access buttons) ...(process.platform === 'darwin' ? { titleBarStyle: 'hiddenInset' as const } @@ -5009,11 +5009,11 @@ export function startDocsStandalone(): void { installContextMenu(app, () => contextMenuLabels(getUiLang())) // dev runs must not share the packaged app's userData (recent files, AI settings) // or its single-instance lock — otherwise `npm run dev` silently quits whenever - // the installed GenOffice Docs is open and forwards its argv there instead. + // the installed HermesOffice Docs is open and forwards its argv there instead. // AI_OFFICE_USER_DATA: E2E/screenshot runs isolate userData (and the // single-instance lock) so parallel automation sessions don't evict each other if (process.env.AI_OFFICE_USER_DATA) app.setPath('userData', process.env.AI_OFFICE_USER_DATA) - else if (isDev) app.setPath('userData', join(app.getPath('appData'), 'GenOffice Docs Dev')) + else if (isDev) app.setPath('userData', join(app.getPath('appData'), 'HermesOffice Docs Dev')) const hasSingleInstanceLock = app.requestSingleInstanceLock() if (!hasSingleInstanceLock) { diff --git a/apps/html/src/main/html-main.ts b/apps/html/src/main/html-main.ts index 7d5621556..98d4f38d9 100644 --- a/apps/html/src/main/html-main.ts +++ b/apps/html/src/main/html-main.ts @@ -814,7 +814,7 @@ interface RuntimePaths { preloadPath: string rendererUrl?: string rendererFile?: string - /** Shell router used to open exported PDFs in a new GenOffice tab. */ + /** Shell router used to open exported PDFs in a new HermesOffice tab. */ openGeneratedPath?: (path: string) => boolean } diff --git a/apps/markdown/src/main/conversion-lifecycle.ts b/apps/markdown/src/main/conversion-lifecycle.ts index 0757ad6bb..09e775953 100644 --- a/apps/markdown/src/main/conversion-lifecycle.ts +++ b/apps/markdown/src/main/conversion-lifecycle.ts @@ -62,7 +62,7 @@ async function readSessionMarker(directory: string): Promise boolean } diff --git a/apps/pdf/src/main/generated-output.ts b/apps/pdf/src/main/generated-output.ts index fc471b636..eb5934c60 100644 --- a/apps/pdf/src/main/generated-output.ts +++ b/apps/pdf/src/main/generated-output.ts @@ -1,7 +1,7 @@ import { existsSync } from 'node:fs' import { basename, join } from 'node:path' -/** Pick a safe, unused PDF path inside the configured GenOffice save directory. */ +/** Pick a safe, unused PDF path inside the configured HermesOffice save directory. */ export function uniqueGeneratedPdfPath( dir: string, suggestedName: string, diff --git a/apps/pdf/src/main/pdf-main.ts b/apps/pdf/src/main/pdf-main.ts index 2123ef7b1..dba4ea179 100644 --- a/apps/pdf/src/main/pdf-main.ts +++ b/apps/pdf/src/main/pdf-main.ts @@ -474,7 +474,7 @@ interface RuntimePaths { preloadPath: string rendererUrl?: string rendererFile?: string - /** Shell router used to open generated PDFs in a new GenOffice tab. */ + /** Shell router used to open generated PDFs in a new HermesOffice tab. */ openGeneratedPath?: (path: string) => boolean /** Host-owned cross-app document creator (the shell routes DOCX into Docs). */ createDocument?: (request: CreateDocumentRequest) => Promise @@ -531,7 +531,7 @@ async function createStandaloneDocument( if (request.type === 'docx') { return { ok: false, - error: 'Creating DOCX files requires the GenOffice shell or Docs app.', + error: 'Creating DOCX files requires the HermesOffice shell or Docs app.', } } const title = sanitizeGeneratedDocumentTitle(request.title) diff --git a/apps/pdf/src/main/save-pdf.ts b/apps/pdf/src/main/save-pdf.ts index 8800fb6ca..8bb03a818 100644 --- a/apps/pdf/src/main/save-pdf.ts +++ b/apps/pdf/src/main/save-pdf.ts @@ -177,7 +177,7 @@ function addMarkup(pdfDoc: PDFDocument, page: PDFPage, m: MarkupInput): void { QuadPoints: m.quads.flat(), C: m.color, F: 4, // print - T: 'GenOffice', + T: 'HermesOffice', P: page.ref, AP: { N: apRef }, }) @@ -249,7 +249,7 @@ async function addImageStamp( P: page.ref, AP: { N: pdfDoc.context.register(ap) }, }) - annot.set(PDFName.of('T'), PDFHexString.fromText('GenOffice')) + annot.set(PDFName.of('T'), PDFHexString.fromText('HermesOffice')) setVisualSignatureMetadata(annot, d.formFieldName) appendAnnot(pdfDoc, page, pdfDoc.context.register(annot)) } @@ -333,7 +333,7 @@ function addDrawing( P: page.ref, }) annot.set(PDFName.of('Contents'), PDFHexString.fromText(d.contents)) - annot.set(PDFName.of('T'), PDFHexString.fromText(d.author || 'GenOffice')) + annot.set(PDFName.of('T'), PDFHexString.fromText(d.author || 'HermesOffice')) const when = pdfDateString(d.createdMs ?? Date.now()) annot.set(PDFName.of('CreationDate'), PDFString.of(when)) annot.set(PDFName.of('M'), PDFString.of(when)) @@ -420,7 +420,7 @@ function addDrawing( if (d.kind === 'line' || d.kind === 'arrow') { annot.set(PDFName.of('L'), pdfDoc.context.obj([...d.from, ...d.to])) } - annot.set(PDFName.of('T'), PDFHexString.fromText('GenOffice')) + annot.set(PDFName.of('T'), PDFHexString.fromText('HermesOffice')) if (d.kind === 'ink') setVisualSignatureMetadata(annot, d.formFieldName) appendAnnot(pdfDoc, page, pdfDoc.context.register(annot)) } diff --git a/apps/pdf/src/shared/ipc.ts b/apps/pdf/src/shared/ipc.ts index 7bc13e575..7fb4f0912 100644 --- a/apps/pdf/src/shared/ipc.ts +++ b/apps/pdf/src/shared/ipc.ts @@ -185,7 +185,7 @@ export type DrawingInput = color: [number, number, number] at: [number, number] contents: string - /** Annotation author (/T); omitted → 'GenOffice' */ + /** Annotation author (/T); omitted → 'HermesOffice' */ author?: string /** Creation time (ms since epoch) → /CreationDate and /M; omitted → save time */ createdMs?: number diff --git a/apps/pdf/tests/note-reply-save.test.ts b/apps/pdf/tests/note-reply-save.test.ts index b0aae5b86..51fef5623 100644 --- a/apps/pdf/tests/note-reply-save.test.ts +++ b/apps/pdf/tests/note-reply-save.test.ts @@ -96,10 +96,10 @@ describe('note reply save', () => { expect(modified instanceof PDFString && modified.decodeText()).toMatch(/^D:20\d{12}[+-]/) }) - it('falls back to the GenOffice author when none is provided', async () => { + it('falls back to the HermesOffice author when none is provided', async () => { const { bytes } = await fixtureWithComment() const { bytes: out } = await applySaveRequest(bytes, request([note({ contents: 'anon' })])) - expect((await textAnnots(out)).find((a) => a.contents === 'anon')!.author).toBe('GenOffice') + expect((await textAnnots(out)).find((a) => a.contents === 'anon')!.author).toBe('HermesOffice') }) it('links a reply to a saved comment via /IRT even with a stale object number', async () => { diff --git a/apps/sheets/src/main/sheets-main.ts b/apps/sheets/src/main/sheets-main.ts index 17953484b..cbe23e66b 100644 --- a/apps/sheets/src/main/sheets-main.ts +++ b/apps/sheets/src/main/sheets-main.ts @@ -1477,7 +1477,7 @@ interface SheetsRuntimeConfig { rendererFile: string /** absolute path to the Rust xlsx-sidecar binary */ sidecarPath?: string | undefined - /** Shell router used to open exported/AI-generated files in a new GenOffice tab. */ + /** Shell router used to open exported/AI-generated files in a new HermesOffice tab. */ openGeneratedPath?: (path: string) => boolean /** Host-owned cross-app document creator (the shell routes docx/pdf/md into Docs). */ createDocument?: (request: SheetsAiHostDocumentRequest) => Promise @@ -1527,7 +1527,7 @@ async function createStandaloneSheetsDocument( request: SheetsAiHostDocumentRequest, ): Promise { if (request.type === 'docx') { - return { ok: false, error: 'Creating DOCX files requires the GenOffice shell or Docs app.' } + return { ok: false, error: 'Creating DOCX files requires the HermesOffice shell or Docs app.' } } const title = sanitizeGeneratedFileBase(request.title) try { @@ -1978,7 +1978,7 @@ export async function createSheetsWindow( minWidth: 720, minHeight: 550, show: false, - title: 'GenOffice Sheets', + title: 'HermesOffice Sheets', // Traffic lights sit inside the toolbar row. ...(process.platform === 'darwin' ? { titleBarStyle: 'hiddenInset' as const } : {}), webPreferences: { @@ -3328,7 +3328,7 @@ export function registerSheetsAiIpc(): void { // Node fetch (undici) direct connections get reset under VPN/tun setups; retry over Chromium's stack setRescueFetch((url, init) => net.fetch(url, init)) - setAiUserAgent(`GenOffice/${app.getVersion()}`) + setAiUserAgent(`HermesOffice/${app.getVersion()}`) ipcMain.handle(IPC_CHANNELS.aiGetSettings, (event): AiSettings => { sessionFor(event) diff --git a/apps/slides/src/main/ai-ipc.ts b/apps/slides/src/main/ai-ipc.ts index 2f6fb7d76..6e310fc2f 100644 --- a/apps/slides/src/main/ai-ipc.ts +++ b/apps/slides/src/main/ai-ipc.ts @@ -105,7 +105,7 @@ export function registerAiIpc(): void { app.once('before-quit', shutdownCodexAppServers) // Node fetch (undici) direct connections get reset under VPN/tun setups; retry over Chromium's stack setRescueFetch((url, init) => net.fetch(url, init)) - setAiUserAgent(`GenOffice/${app.getVersion()}`) + setAiUserAgent(`HermesOffice/${app.getVersion()}`) ipcMain.handle('ai:get-settings', (): AiSettings => { const stored = readJson & LegacyAiSettings>(AI_SETTINGS_PATH(), {}) diff --git a/apps/slides/src/main/slides-main.ts b/apps/slides/src/main/slides-main.ts index 3cc599df2..6f64bfcf3 100644 --- a/apps/slides/src/main/slides-main.ts +++ b/apps/slides/src/main/slides-main.ts @@ -1,5 +1,5 @@ /** - * GenOffice Slides main process — pptx parsing/render-tree building/edit application/saving all live + * HermesOffice Slides main process — pptx parsing/render-tree building/edit application/saving all live * here (Node side). The renderer only gets plain-data RenderSlide; edit intents are sent back * here to apply. Structure mirrors apps/docs: exports embeddable configure/register/start for * future shell reuse. @@ -541,7 +541,7 @@ const AUTOSAVE_BACKOFF_TICKS = 10 let autosaveRunning = false /** - * Recovery drafts for never-saved decks (wcId → visible path in /GenOffice): + * Recovery drafts for never-saved decks (wcId → visible path in /HermesOffice): * the sha1-keyed recovery copy needs session.path, so before the first save a freeze or * crash used to lose everything. Removed on save, explicit discard, or clean close. */ @@ -832,7 +832,7 @@ async function openAndBuild( } } -/** Directory where AI-generated drafts are saved: the configurable default save folder (falls back to /GenOffice) */ +/** Directory where AI-generated drafts are saved: the configurable default save folder (falls back to /HermesOffice) */ function getDraftsDir(): string { return configuredDefaultSaveDir(app) } @@ -875,7 +875,7 @@ function pickDraftPath(draftsDir: string, deckName?: string): string { } /** - * Auto-save the draft to /GenOffice/.pptx after AI generation completes. + * Auto-save the draft to /HermesOffice/.pptx after AI generation completes. * Append mode reuses the session's existing draft path (overwrite); replace mode generates a * new filename. On successful write, update session.path, pushRecent, slidesOpenedHook. * On write failure, degrade silently (console.warn) without blocking the in-memory session. @@ -4515,7 +4515,7 @@ export function createSlidesWindow(openPath?: string | null): BrowserWindow { const win = new BrowserWindow({ width: 1280, height: 840, - title: 'GenOffice Slides', + title: 'HermesOffice Slides', ...(process.platform === 'darwin' ? { titleBarStyle: 'hiddenInset' as const } : { diff --git a/packages/ai-provider/src/codex-app-server.ts b/packages/ai-provider/src/codex-app-server.ts index 319fc2b37..de13cedd8 100644 --- a/packages/ai-provider/src/codex-app-server.ts +++ b/packages/ai-provider/src/codex-app-server.ts @@ -615,9 +615,9 @@ export function buildCodexAppServerPrompt( })), } return [ - 'Treat the payload below as the new GenOffice conversation events for this turn and follow its system instruction.', - 'Do not use Codex tools. GenOffice will execute only the tool calls returned in the required response schema.', - 'Put user-visible prose in text. Put requested GenOffice tool calls in toolCalls; inputJson must be a JSON-encoded object matching the listed inputSchema. Use only listed tool names. If no tool is needed, return an empty toolCalls array.', + 'Treat the payload below as the new HermesOffice conversation events for this turn and follow its system instruction.', + 'Do not use Codex tools. HermesOffice will execute only the tool calls returned in the required response schema.', + 'Put user-visible prose in text. Put requested HermesOffice tool calls in toolCalls; inputJson must be a JSON-encoded object matching the listed inputSchema. Use only listed tool names. If no tool is needed, return an empty toolCalls array.', `Keep this one-turn response within roughly ${maxTokens} output tokens.`, '', JSON.stringify(payload), diff --git a/packages/ai-provider/src/fetch.ts b/packages/ai-provider/src/fetch.ts index 970b9d1cb..da5633332 100644 --- a/packages/ai-provider/src/fetch.ts +++ b/packages/ai-provider/src/fetch.ts @@ -22,7 +22,7 @@ export function setRescueFetch(fn: FetchLike | null): void { * clients to identify themselves and flags "broad" user agents). Main * processes refine the default with the app version. */ -export const AI_DEFAULT_USER_AGENT = 'GenOffice' +export const AI_DEFAULT_USER_AGENT = 'HermesOffice' let userAgent = AI_DEFAULT_USER_AGENT diff --git a/packages/ai-provider/tests/fetch.test.ts b/packages/ai-provider/tests/fetch.test.ts index 680552021..4d6bf07a9 100644 --- a/packages/ai-provider/tests/fetch.test.ts +++ b/packages/ai-provider/tests/fetch.test.ts @@ -18,16 +18,16 @@ describe('aiFetch', () => { vi.stubGlobal('fetch', fetchMock) await aiFetch('https://x/', { headers: { Authorization: 'Bearer k' } }) const headers = sentHeaders(fetchMock) - expect(headers.get('user-agent')).toBe('GenOffice') + expect(headers.get('user-agent')).toBe('HermesOffice') expect(headers.get('authorization')).toBe('Bearer k') }) it('lets the host refine the user agent and never overrides an explicit one', async () => { const fetchMock = vi.fn().mockResolvedValue(new Response('ok')) vi.stubGlobal('fetch', fetchMock) - setAiUserAgent('GenOffice/1.2.3') + setAiUserAgent('HermesOffice/1.2.3') await aiFetch('https://x/', {}) - expect(sentHeaders(fetchMock).get('user-agent')).toBe('GenOffice/1.2.3') + expect(sentHeaders(fetchMock).get('user-agent')).toBe('HermesOffice/1.2.3') fetchMock.mockClear() await aiFetch('https://x/', { headers: { 'User-Agent': 'custom/9' } }) @@ -39,7 +39,7 @@ describe('aiFetch', () => { const rescue = vi.fn().mockResolvedValue(new Response('rescued')) setRescueFetch(rescue) await aiFetch('https://x/', {}) - expect(sentHeaders(rescue).get('user-agent')).toBe('GenOffice') + expect(sentHeaders(rescue).get('user-agent')).toBe('HermesOffice') }) it('returns the primary response without touching the rescue path', async () => { diff --git a/packages/ai-search/src/search-tools.ts b/packages/ai-search/src/search-tools.ts index e97da6943..64f72c0e8 100644 --- a/packages/ai-search/src/search-tools.ts +++ b/packages/ai-search/src/search-tools.ts @@ -43,7 +43,7 @@ export async function testSearchProvider( provider === 'tavily' ? { useGsk: false, tavilyKey: apiKey, serperKey: '', prefer: 'tavily' } : { useGsk: false, serperKey: apiKey, tavilyKey: '' } - const r = await webSearch('GenOffice', 1, options) + const r = await webSearch('HermesOffice', 1, options) if (r.method === provider) return { ok: true } return { ok: false, diff --git a/packages/electron-utils/src/app-menu.ts b/packages/electron-utils/src/app-menu.ts index 3cbf3e99b..a11590d75 100644 --- a/packages/electron-utils/src/app-menu.ts +++ b/packages/electron-utils/src/app-menu.ts @@ -45,7 +45,7 @@ const EN: Labels = { zoomOut: 'Zoom Out', fullscreen: 'Full Screen', help: 'Help', - about: 'About GenOffice', + about: 'About HermesOffice', checkUpdates: 'Check for Updates…', version: 'Version', } @@ -70,7 +70,7 @@ const LABELS: Record = { zoomOut: '缩小', fullscreen: '全屏', help: '帮助', - about: '关于 GenOffice', + about: '关于 HermesOffice', checkUpdates: '检查更新…', version: '版本', }, @@ -92,7 +92,7 @@ const LABELS: Record = { zoomOut: '縮小', fullscreen: 'フルスクリーン', help: 'ヘルプ', - about: 'GenOffice について', + about: 'HermesOffice について', checkUpdates: '更新を確認…', version: 'バージョン', }, @@ -113,7 +113,7 @@ const LABELS: Record = { zoomOut: '축소', fullscreen: '전체 화면', help: '도움말', - about: 'GenOffice 정보', + about: 'HermesOffice 정보', checkUpdates: '업데이트 확인…', version: '버전', }, @@ -134,7 +134,7 @@ const LABELS: Record = { zoomOut: 'Zoom arrière', fullscreen: 'Plein écran', help: 'Aide', - about: 'À propos de GenOffice', + about: 'À propos de HermesOffice', checkUpdates: 'Rechercher les mises à jour…', version: 'Version', }, @@ -155,7 +155,7 @@ const LABELS: Record = { zoomOut: 'Verkleinern', fullscreen: 'Vollbild', help: 'Hilfe', - about: 'Über GenOffice', + about: 'Über HermesOffice', checkUpdates: 'Nach Updates suchen…', version: 'Version', }, @@ -176,7 +176,7 @@ const LABELS: Record = { zoomOut: 'Alejar', fullscreen: 'Pantalla completa', help: 'Ayuda', - about: 'Acerca de GenOffice', + about: 'Acerca de HermesOffice', checkUpdates: 'Buscar actualizaciones…', version: 'Versión', }, @@ -197,7 +197,7 @@ const LABELS: Record = { zoomOut: 'ย่อ', fullscreen: 'เต็มหน้าจอ', help: 'วิธีใช้', - about: 'เกี่ยวกับ GenOffice', + about: 'เกี่ยวกับ HermesOffice', checkUpdates: 'ตรวจหาการอัปเดต…', version: 'เวอร์ชัน', }, @@ -218,7 +218,7 @@ const LABELS: Record = { zoomOut: 'Perkecil', fullscreen: 'Layar Penuh', help: 'Bantuan', - about: 'Tentang GenOffice', + about: 'Tentang HermesOffice', checkUpdates: 'Periksa Pembaruan…', version: 'Versi', }, @@ -239,7 +239,7 @@ const LABELS: Record = { zoomOut: 'Уменьшить', fullscreen: 'Полноэкранный режим', help: 'Справка', - about: 'О GenOffice', + about: 'О HermesOffice', checkUpdates: 'Проверить обновления…', version: 'Версия', }, @@ -260,7 +260,7 @@ const LABELS: Record = { zoomOut: 'تصغير العرض', fullscreen: 'ملء الشاشة', help: 'تعليمات', - about: 'حول GenOffice', + about: 'حول HermesOffice', checkUpdates: 'التحقق من التحديثات…', version: 'الإصدار', }, @@ -281,7 +281,7 @@ const LABELS: Record = { zoomOut: 'Reduzir', fullscreen: 'Tela Cheia', help: 'Ajuda', - about: 'Sobre o GenOffice', + about: 'Sobre o HermesOffice', checkUpdates: 'Procurar atualizações…', version: 'Versão', }, @@ -302,7 +302,7 @@ const LABELS: Record = { zoomOut: 'Riduci', fullscreen: 'Schermo intero', help: 'Aiuto', - about: 'Informazioni su GenOffice', + about: 'Informazioni su HermesOffice', checkUpdates: 'Controlla aggiornamenti…', version: 'Versione', }, @@ -323,7 +323,7 @@ const LABELS: Record = { zoomOut: 'Pomniejsz', fullscreen: 'Pełny ekran', help: 'Pomoc', - about: 'O programie GenOffice', + about: 'O programie HermesOffice', checkUpdates: 'Sprawdź aktualizacje…', version: 'Wersja', }, @@ -344,7 +344,7 @@ const LABELS: Record = { zoomOut: 'Oddálit', fullscreen: 'Celá obrazovka', help: 'Nápověda', - about: 'O aplikaci GenOffice', + about: 'O aplikaci HermesOffice', checkUpdates: 'Zkontrolovat aktualizace…', version: 'Verze', }, @@ -365,7 +365,7 @@ const LABELS: Record = { zoomOut: 'Uitzoomen', fullscreen: 'Volledig scherm', help: 'Help', - about: 'Over GenOffice', + about: 'Over HermesOffice', checkUpdates: 'Controleren op updates…', version: 'Versie', }, @@ -386,7 +386,7 @@ const LABELS: Record = { zoomOut: 'Zum Keluar', fullscreen: 'Skrin Penuh', help: 'Bantuan', - about: 'Perihal GenOffice', + about: 'Perihal HermesOffice', checkUpdates: 'Semak Kemas Kini…', version: 'Versi', }, @@ -407,7 +407,7 @@ const LABELS: Record = { zoomOut: 'הקטן', fullscreen: 'מסך מלא', help: 'עזרה', - about: 'אודות GenOffice', + about: 'אודות HermesOffice', checkUpdates: 'בדוק עדכונים…', version: 'גרסה', }, @@ -428,7 +428,7 @@ const LABELS: Record = { zoomOut: 'ज़ूम आउट', fullscreen: 'पूर्ण स्क्रीन', help: 'सहायता', - about: 'GenOffice के बारे में', + about: 'HermesOffice के बारे में', checkUpdates: 'अपडेट जांचें…', version: 'संस्करण', }, @@ -449,7 +449,7 @@ const LABELS: Record = { zoomOut: '縮小', fullscreen: '全螢幕', help: '說明', - about: '關於 GenOffice', + about: '關於 HermesOffice', checkUpdates: '檢查更新…', version: '版本', }, @@ -576,17 +576,18 @@ export function aboutMenuItem(labels: AppMenuLabels): MenuItemConstructorOptions click: async () => { const { app, dialog, clipboard } = await import('electron') const version = app.getVersion() + const appName = app.getName() const canCheck = updateCheckInvoker !== null const { response } = await dialog.showMessageBox({ type: 'info', - title: 'GenOffice', - message: 'GenOffice', + title: appName, + message: appName, detail: `${labels.version} ${version}`, buttons: ['OK', labels.copy, ...(canCheck ? [labels.checkUpdates] : [])], defaultId: 0, cancelId: 0, }) - if (response === 1) clipboard.writeText(`GenOffice ${version}`) + if (response === 1) clipboard.writeText(`${appName} ${version}`) if (response === 2) updateCheckInvoker?.() }, } diff --git a/packages/electron-utils/tests/app-menu.test.ts b/packages/electron-utils/tests/app-menu.test.ts index 898a04e0a..13a02b2d9 100644 --- a/packages/electron-utils/tests/app-menu.test.ts +++ b/packages/electron-utils/tests/app-menu.test.ts @@ -12,6 +12,7 @@ vi.mock('electron', () => ({ }, app: { getVersion: () => '1.2.3', + getName: () => 'HermesOffice', }, dialog: { showMessageBox: electronMock.showMessageBox, @@ -227,6 +228,6 @@ describe('checkUpdatesMenuItem / manual update check wiring', () => { it('About dialog copy button still copies name + version', async () => { electronMock.showMessageBox.mockResolvedValue({ response: 1 }) await (aboutMenuItem(en) as { click: () => Promise }).click() - expect(electronMock.writeText).toHaveBeenCalledWith('GenOffice 1.2.3') + expect(electronMock.writeText).toHaveBeenCalledWith('HermesOffice 1.2.3') }) })