From 6d102ccef8677a76e35ef43a89128a89cff0e858 Mon Sep 17 00:00:00 2001 From: co63oc Date: Sun, 24 Aug 2025 17:15:35 +0800 Subject: [PATCH] chore: fix typos (#9477) --- src/main/services/ShortcutService.ts | 2 +- src/main/services/WindowService.ts | 4 ++-- src/renderer/src/config/prompts.ts | 6 +++--- src/renderer/src/databases/index.ts | 6 +++--- src/renderer/src/utils/mcp-tools.ts | 2 +- src/renderer/src/utils/translate.ts | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/services/ShortcutService.ts b/src/main/services/ShortcutService.ts index 12f786d797..97216e6a65 100644 --- a/src/main/services/ShortcutService.ts +++ b/src/main/services/ShortcutService.ts @@ -204,7 +204,7 @@ export function registerShortcuts(window: BrowserWindow) { selectionAssistantSelectTextAccelerator = formatShortcutKey(shortcut.shortcut) break - //the following ZOOMs will register shortcuts seperately, so will return + //the following ZOOMs will register shortcuts separately, so will return case 'zoom_in': globalShortcut.register('CommandOrControl+=', () => handler(window)) globalShortcut.register('CommandOrControl+numadd', () => handler(window)) diff --git a/src/main/services/WindowService.ts b/src/main/services/WindowService.ts index e2c2dc4866..66b4b8d955 100644 --- a/src/main/services/WindowService.ts +++ b/src/main/services/WindowService.ts @@ -555,9 +555,9 @@ export class WindowService { // [Windows] hacky fix // the window is minimized only when in Windows platform - // because it's a workround for Windows, see `hideMiniWindow()` + // because it's a workaround for Windows, see `hideMiniWindow()` if (this.miniWindow?.isMinimized()) { - // don't let the window being seen before we finish adusting the position across screens + // don't let the window being seen before we finish adjusting the position across screens this.miniWindow?.setOpacity(0) // DO NOT use `restore()` here, Electron has the bug with screens of different scale factor // We have to use `show()` here, then set the position and bounds diff --git a/src/renderer/src/config/prompts.ts b/src/renderer/src/config/prompts.ts index 8d52857553..a42b2452ca 100644 --- a/src/renderer/src/config/prompts.ts +++ b/src/renderer/src/config/prompts.ts @@ -166,7 +166,7 @@ export const SEARCH_SUMMARY_PROMPT = ` \` - 7. Follow up question: Based on knowledge, Fomula of Scaled Dot-Product Attention and Multi-Head Attention? + 7. Follow up question: Based on knowledge, Formula of Scaled Dot-Product Attention and Multi-Head Attention? Rephrased question: \` @@ -279,7 +279,7 @@ export const SEARCH_SUMMARY_PROMPT_WEB_ONLY = ` \` - 7. Follow up question: Based on knowledge, Fomula of Scaled Dot-Product Attention and Multi-Head Attention? + 7. Follow up question: Based on knowledge, Formula of Scaled Dot-Product Attention and Multi-Head Attention? Rephrased question: \` @@ -374,7 +374,7 @@ export const SEARCH_SUMMARY_PROMPT_KNOWLEDGE_ONLY = ` \` - 7. Follow up question: Based on knowledge, Fomula of Scaled Dot-Product Attention and Multi-Head Attention? + 7. Follow up question: Based on knowledge, Formula of Scaled Dot-Product Attention and Multi-Head Attention? Rephrased question: \` diff --git a/src/renderer/src/databases/index.ts b/src/renderer/src/databases/index.ts index fe0a5f5b5b..169988f4bf 100644 --- a/src/renderer/src/databases/index.ts +++ b/src/renderer/src/databases/index.ts @@ -66,7 +66,7 @@ db.version(6).stores({ // --- NEW VERSION 7 --- db.version(7) .stores({ - // Re-declare all tables for the new version + // Redeclare all tables for the new version files: 'id, name, origin_name, path, size, ext, type, created_at, count', topics: '&id', // Correct index for topics settings: '&id, value', @@ -79,7 +79,7 @@ db.version(7) db.version(8) .stores({ - // Re-declare all tables for the new version + // Redeclare all tables for the new version files: 'id, name, origin_name, path, size, ext, type, created_at, count', topics: '&id', // Correct index for topics settings: '&id, value', @@ -91,7 +91,7 @@ db.version(8) .upgrade((tx) => upgradeToV8(tx)) db.version(9).stores({ - // Re-declare all tables for the new version + // Redeclare all tables for the new version files: 'id, name, origin_name, path, size, ext, type, created_at, count', topics: '&id', // Correct index for topics settings: '&id, value', diff --git a/src/renderer/src/utils/mcp-tools.ts b/src/renderer/src/utils/mcp-tools.ts index a1f1a2b095..6534c2e103 100644 --- a/src/renderer/src/utils/mcp-tools.ts +++ b/src/renderer/src/utils/mcp-tools.ts @@ -185,7 +185,7 @@ export function mcpToolsToAnthropicTools(mcpTools: MCPTool[]): Array const t: ToolUnion = { name: tool.id, description: tool.description, - // @ts-ignore ignore type as it it unknow + // @ts-ignore ignore type as it it unknown input_schema: tool.inputSchema } return t diff --git a/src/renderer/src/utils/translate.ts b/src/renderer/src/utils/translate.ts index 9e7e48590b..979f38dc83 100644 --- a/src/renderer/src/utils/translate.ts +++ b/src/renderer/src/utils/translate.ts @@ -53,7 +53,7 @@ export const detectLanguage = async (inputText: string): Promise => { - logger.info('Detect langugage by llm') + logger.info('Detect language by llm') let detectedLang = '' await fetchLanguageDetection({ text: sliceByTokens(inputText, 0, 100), @@ -65,7 +65,7 @@ const detectLanguageByLLM = async (inputText: string): Promise { - logger.info('Detect langugage by franc') + logger.info('Detect language by franc') const iso3 = franc(inputText) const isoMap: Record = {