Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/ZToolsCenter/ZTools
/ functions
Functions
1,419 in github.com/ZToolsCenter/ZTools
⨍
Functions
1,419
◇
Types & classes
332
↓ 3 callers
Method
createPluginWebContentsView
* 创建插件的 WebContentsView 实例
src/main/managers/pluginManager.ts:237
↓ 3 callers
Method
createWindow
* 创建主窗口
src/main/managers/windowManager.ts:286
↓ 3 callers
Method
deleteEngine
* 删除搜索引擎
src/main/api/renderer/webSearch.ts:171
↓ 3 callers
Method
deleteItem
(id: string)
src/main/managers/clipboardManager.ts:631
↓ 3 callers
Method
downloadDoc
* 从云端下载文档
src/main/core/sync/webdavClient.ts:137
↓ 3 callers
Method
ensureUrlProtocol
(url: string)
src/main/api/renderer/webSearch.ts:385
↓ 3 callers
Function
error
(message: string, duration = 3000)
internal-plugins/setting/src/components/common/Toast/Toast.ts:97
↓ 3 callers
Function
escapeCmdPath
* 安全转义 CMD 路径参数
tests/main/windowsExplorerCommands.test.ts:53
↓ 3 callers
Function
escapePowerShellPath
* 安全转义 PowerShell 路径参数
tests/main/windowsExplorerCommands.test.ts:45
↓ 3 callers
Method
execAppleScript
* 执行 AppleScript 命令并返回标准输出 * 使用 execFile 而非 exec,避免 shell 解释,防止潜在的命令注入风险 * @param script - AppleScript 脚本内容 * @returns 命令输出字符串
src/main/api/plugin/shell.ts:372
↓ 3 callers
Function
execCommand
* 执行系统命令(不等待进程结束,适用于 GUI 应用) * @param command 完整命令字符串(如 "rundll32 shell32.dll,Control_RunDLL")或命令名 * @param args 命令参数数组(如果提供了 command 作为命令名)
src/main/core/commandLauncher/windowsLauncher.ts:11
↓ 3 callers
Function
executeSystemCommand
( command: string, ctx: SystemCommandContext, param?: any )
src/main/api/renderer/systemCommands.ts:94
↓ 3 callers
Function
fetchContent
(url: string)
src/main/utils/lanzou.ts:228
↓ 3 callers
Method
fetchFavicon
* 获取网站 favicon * 解析目标网站 HTML,提取 <link rel="icon"> 标签获取 favicon URL, * 然后下载图标并转为 base64
src/main/api/renderer/webSearch.ts:288
↓ 3 callers
Method
forceActivateWindow
* 强制激活窗口(解决alert等弹窗后无法唤起的问题)
src/main/managers/windowManager.ts:783
↓ 3 callers
Method
getAllDeclaredToolEntries
* 汇总所有已安装插件的工具,并生成适合 MCP 暴露的唯一工具名。
src/main/api/plugin/tools.ts:122
↓ 3 callers
Method
getApps
* 获取系统应用列表,并处理图标缓存 * 优先从数据库缓存读取,没有缓存时才扫描
src/main/api/renderer/commands.ts:163
↓ 3 callers
Method
getCommands
* 获取所有指令(供 AllCommands 页面和设置页 alias 目标选择使用) * 返回处理后的 commands、regexCommands 和 plugins * 结果会被缓存,直到应用列表、插件状态或 alias 映射发生变化时清除
src/main/api/renderer/commands.ts:1053
↓ 3 callers
Method
getDeclaredToolsByPath
* 从插件目录读取并筛选合法的 tools 声明。
src/main/api/plugin/tools.ts:77
↓ 3 callers
Function
getDevToolsMode
()
src/main/utils/devToolsShortcut.ts:10
↓ 3 callers
Method
getDynamicFeaturesDocId
* 根据插件名称和来源生成动态 feature 存储键。 * 动态指令也必须按运行时命名空间隔离,避免开发版和安装版串写。
src/main/api/plugin/feature.ts:38
↓ 3 callers
Function
getEnabledPluginPaths
(plugins: any[], disabledPaths?: string[])
src/renderer/src/stores/commandDataStore.ts:210
↓ 3 callers
Method
getFileIcon
* 异步获取文件/应用的图标(PNG 格式 Buffer) * @param {string} filePath - 文件路径(可以是 .exe、.lnk、.dll 或任何文件类型) * @returns {Promise<Buffer>} Promise,resolve 为 PNG 格
src/main/core/native/index.ts:757
↓ 3 callers
Function
getLaunchableAliasEntries
(command: Command, aliasesMap: CommandAliasStore)
src/renderer/src/stores/commandDataStore.ts:365
↓ 3 callers
Method
getPluginDocKeys
* 公共方法:获取指定插件的所有文档 key
src/main/api/shared/database.ts:733
↓ 3 callers
Method
getPluginMemoryInfo
* 获取指定插件的内存使用情况 * @param pluginPath 插件路径 * @returns 内存信息(单位:MB)
src/main/managers/pluginManager.ts:2016
↓ 3 callers
Method
getPluginPathByWebContentsId
* 根据 webContentsId 获取插件路径
src/main/core/pluginWindowManager.ts:350
↓ 3 callers
Method
getPluginRuntimeContext
* 从 IPC 事件中解析当前插件的运行时上下文。
src/main/api/plugin/feature.ts:45
↓ 3 callers
Method
getPluginRuntimeNamespaceFromWebContents
* 从 WebContents 获取插件运行时命名空间。 * 开发版与安装版必须使用不同 namespace,避免请求头配置串用。
src/main/api/plugin/http.ts:112
↓ 3 callers
Method
getPlugins
获取非内置插件列表
src/main/api/renderer/pluginInstaller.ts:53
↓ 3 callers
Method
getRunningPlugins
获取当前正在运行的插件路径列表
src/main/api/renderer/pluginDevProjects.ts:49
↓ 3 callers
Method
getSearchEngineFeatures
* 获取搜索引擎对应的插件 features(用于合并到系统插件)
src/main/api/renderer/webSearch.ts:233
↓ 3 callers
Method
getStatus
()
src/main/core/translationManager.ts:114
↓ 3 callers
Method
getSystemSettings
()
src/main/api/renderer/systemSettings.ts:8
↓ 3 callers
Method
getWindowMaterial
()
src/main/api/renderer/window.ts:153
↓ 3 callers
Method
handleBallClick
* 处理悬浮球点击
src/main/core/floatingBallManager.ts:210
↓ 3 callers
Function
handleJumpZtoolsCode
()
internal-plugins/setting/src/composables/useJumpFunction.ts:12
↓ 3 callers
Function
handleWebSearch
( ctx: SystemCommandContext, param: any, urlTemplate: string, label: string )
src/main/api/renderer/systemCommands.ts:257
↓ 3 callers
Function
httpRequest
(url: string, options: HttpRequestOptions = {})
src/main/utils/httpRequest.ts:29
↓ 3 callers
Function
hue2rgb
(p: number, q: number, t: number)
src/renderer/src/stores/windowStore.ts:381
↓ 3 callers
Function
hue2rgb
(p1: number, q1: number, t: number)
internal-plugins/setting/src/utils/themeUtils.ts:125
↓ 3 callers
Method
importDevPlugin
* 导入开发插件(登记到注册表)。 * 未提供路径时弹出文件选择对话框;新项目自动置顶。 * @param pluginJsonPath - plugin.json 的路径(可选,省略时弹出文件选择器) * @returns {success: boolean, pluginNam
src/main/api/renderer/pluginDevProjects.ts:350
↓ 3 callers
Method
initializeTranslator
* 初始化翻译引擎(下载资源 + 创建 Worker + 加载模型)
src/main/core/translationManager.ts:161
↓ 3 callers
Function
insertDevProjectAtTop
( registry: DevProjectRegistry, projectName: string )
src/main/api/renderer/pluginDevelopmentRegistry.ts:454
↓ 3 callers
Method
installPluginFromMarket
* 从插件市场安装插件。 * 流程:下载 .zpx 文件(最多重试 3 次)→ 自动检测 ZPX/ZIP 格式 → 安装 → 清理临时文件。 * @param plugin - 市场插件对象,必须包含 name 和 downloadUrl 字段 * @returns {succes
src/main/api/renderer/pluginInstaller.ts:240
↓ 3 callers
Method
installPluginFromPath
* 从指定文件路径安装插件(.zpx),支持覆盖已存在的插件。 * 覆盖时会先终止运行中的插件、移除旧记录和目录,再执行全新安装。 * @param zpxPath - .zpx 文件的绝对路径 * @returns {success: boolean, plugin?: obje
src/main/api/renderer/pluginInstaller.ts:194
↓ 3 callers
Function
isDirectApp
* 指令匹配纯函数 * 提取自 commands.ts 中的匹配逻辑,便于单元测试
src/main/api/renderer/commandMatchers.ts:6
↓ 3 callers
Method
isFeatureMainHide
* 判断指定 feature 是否设置了 mainHide * 同时检查 plugin.json 静态配置和数据库中的动态指令
src/main/managers/pluginManager.ts:131
↓ 3 callers
Method
isPluginViewFocused
* 检查插件 WebContentsView 是否当前北有焦点 * 供 Linux blur 事件处理器判断是否是应用内部焦点转移
src/main/managers/pluginManager.ts:926
↓ 3 callers
Method
killPluginByName
(pluginName: string)
src/main/managers/pluginManager.ts:1101
↓ 3 callers
Function
loadHistoryData
()
src/renderer/src/stores/commandDataStore.ts:576
↓ 3 callers
Method
markDomReady
* 标记视图已完成 dom-ready
src/main/managers/pluginAssemblyCoordinator.ts:319
↓ 3 callers
Method
maybeStop
()
src/main/core/doubleTapManager.ts:147
↓ 3 callers
Function
migrateWebSearchEngineTypes
()
src/main/core/startupDataMigrations.ts:92
↓ 3 callers
Method
moveWindowToCursor
* 将窗口移动到鼠标所在显示器 * 优先恢复该显示器记忆的位置,否则居中显示
src/main/managers/windowManager.ts:827
↓ 3 callers
Function
normalizeIconPath
(iconPath: string, basePath: string)
src/main/common/iconUtils.ts:10
↓ 3 callers
Function
normalizeTimestamp
* 标准化时间戳值,无效值回退到 fallback * @param value - 待验证的时间戳 * @param fallback - 无效时使用的默认值
src/main/api/renderer/pluginDevelopmentRegistry.ts:168
↓ 3 callers
Method
notifyCommandsChanged
* 通知前端命令列表已变化
src/main/api/renderer/webSearch.ts:569
↓ 3 callers
Method
notifyThemeInfoChanged
* 通知插件主题信息变更(供外部调用)
src/main/managers/windowManager.ts:1272
↓ 3 callers
Method
openDB
(options: { name: string })
src/main/core/lmdb/types.ts:40
↓ 3 callers
Method
openPluginInstaller
* 打开插件安装页面(用于 .zpx 文件关联双击打开) * 流程:激活应用 → 启动设置插件 → 导航到 PluginInstaller 页面 → 传入文件路径 * @param zpxPath .zpx 文件路径
src/main/managers/windowManager.ts:1351
↓ 3 callers
Method
postAttachment
* 存储附件(同步) * @param id 文档 ID * @param attachment 附件数据(Buffer 或 Uint8Array) * @param type MIME 类型 * @returns 操作结果
src/main/core/lmdb/syncApi.ts:390
↓ 3 callers
Method
preloadPlugin
* 后台预加载插件(不显示在主窗口中,仅创建 WebContentsView 并缓存) * 用于"跟随主程序同时启动运行"功能
src/main/managers/pluginManager.ts:937
↓ 3 callers
Method
processPluginMode
( pluginPath: string, featureCode: string, view: WebContentsView, assembly?: AssemblySession,
src/main/managers/pluginManager.ts:1380
↓ 3 callers
Function
readClipboardFiles
()
src/main/utils/clipboardFiles.ts:56
↓ 3 callers
Method
readPluginJson
* 从插件包文件(ZPX 或 ZIP)中读取并解析 plugin.json,同时返回格式标识。 * @throws 若 plugin.json 缺失、解析失败或缺少 name 字段则抛出带描述的 Error
src/main/api/renderer/pluginInstaller.ts:664
↓ 3 callers
Function
register
(autoFocus = isFocus)
internal-plugins/setting/src/composables/useZtoolsSubInput.ts:110
↓ 3 callers
Method
registerAppShortcut
(shortcut: string, target: string)
src/main/api/renderer/settings.ts:630
↓ 3 callers
Method
registerGlobalShortcut
* 注册全局快捷键。 * 触发时会按需采集当前外部应用中的选中文本,再把上下文交给上层统一处理。
src/main/api/renderer/settings.ts:263
↓ 3 callers
Method
release
(consumer: string)
src/main/core/globalInputManager.ts:62
↓ 3 callers
Method
removeFromHistory
* 从历史记录中删除
src/main/api/renderer/commands.ts:888
↓ 3 callers
Method
removePluginUsageData
* 清理与指定插件名关联的历史、固定、自启动等持久化数据。 * 包括:command-history、pinned-commands、autoStartPlugin、outKillPlugin、autoDetachPlugin。 * @param effectiveName - 插件的实
src/main/api/renderer/pluginDevProjects.ts:233
↓ 3 callers
Method
removeRequestInterceptor
* 移除请求拦截器
src/main/api/plugin/http.ts:179
↓ 3 callers
Method
removeSubInput
(event?: Electron.IpcMainInvokeEvent | Electron.IpcMainEvent)
src/main/api/plugin/ui.ts:155
↓ 3 callers
Function
reorderProjects
( registry: DevProjectRegistry, pluginNames: string[] )
src/main/api/renderer/pluginDevelopmentRegistry.ts:426
↓ 3 callers
Method
resolveLastCopiedSequenceWaiters
(content: LastCopiedContent)
src/main/managers/clipboardManager.ts:394
↓ 3 callers
Method
resolvePluginDataTarget
* 将插件数据操作目标归一化为有效名称与前缀。
src/main/api/shared/database.ts:26
↓ 3 callers
Method
resolvePluginUrl
* 解析插件入口 URL * @returns pluginUrl(字符串)以及是否无界面插件
src/main/managers/pluginManager.ts:181
↓ 3 callers
Function
restoreWindow
()
src/main/core/screenCapture.ts:186
↓ 3 callers
Method
reuseDetachedSingletonIfExists
* 复用已存在的分离窗口单例插件。 * 必须在主窗口切换/隐藏当前插件之前调用,避免“只是聚焦已有分离窗口”却误退主窗口当前插件。
src/main/managers/pluginManager.ts:367
↓ 3 callers
Method
saveDynamicFeatures
* 保存动态 features 到数据库
src/main/api/plugin/feature.ts:187
↓ 3 callers
Method
scanAndCacheApps
* 扫描应用并缓存到数据库
src/main/api/renderer/commands.ts:220
↓ 3 callers
Function
searchTextCommands
(pastedText?: string)
src/renderer/src/stores/commandDataStore.ts:1232
↓ 3 callers
Method
sendPluginMessage
(eventName: string, data: any)
src/main/managers/pluginManager.ts:795
↓ 3 callers
Method
sendRawJson
* 发送 JSON 响应,并附带 MCP 所需的基础 CORS 头。
src/main/core/mcpServer.ts:183
↓ 3 callers
Method
sendToRunner
* 发送响应消息给 runner 子进程
src/main/core/zbrowser/zbrowserExecutor.ts:1324
↓ 3 callers
Method
sendWorkerMessage
(name: string, args: any[])
src/main/core/translationManager.ts:343
↓ 3 callers
Function
setDisabledPluginPaths
(paths: unknown)
src/renderer/src/stores/commandDataStore.ts:204
↓ 3 callers
Method
setPluginMainPushDisabled
( pluginName: string, disabled: boolean )
src/main/api/renderer/plugins.ts:529
↓ 3 callers
Method
setPreviousActiveWindow
( windowInfo: { app: string bundleId?: string pid?: number title?: string x?
src/main/managers/windowManager.ts:693
↓ 3 callers
Method
setProxy
* 设置插件 zbrowser Session 的代理 * * @param runtimeNamespace 插件运行时命名空间 * @param config Electron 代理配置对象
src/main/core/zbrowser/zbrowserManager.ts:143
↓ 3 callers
Method
setTrayIconVisible
(visible: boolean)
src/main/api/renderer/window.ts:142
↓ 3 callers
Method
setupPluginSession
* 创建并配置插件的 session(注册 preload、代理、图标协议)
src/main/managers/pluginManager.ts:215
↓ 3 callers
Function
sleep
(ms: number)
src/main/utils/common.ts:9
↓ 3 callers
Method
startMonitor
* 启动鼠标监听
src/main/core/superPanelManager.ts:148
↓ 3 callers
Method
temporaryCancelWatch
* 暂停剪贴板监听 300ms,防止 paste API 写入剪贴板时自我触发
src/main/managers/clipboardManager.ts:205
↓ 3 callers
Method
toSearchPage
()
src/main/api/plugin/redirect.ts:229
↓ 3 callers
Function
toggleInList
切换字符串列表中的某项
internal-plugins/setting/src/components/common/PluginDetail/usePluginDetail.ts:47
↓ 3 callers
Function
uniqueNonEmpty
(values: Array<string | undefined | null>)
src/main/core/commandScanner/macScanner.ts:15
↓ 3 callers
Method
unpinApp
* 取消固定
src/main/api/renderer/commands.ts:954
← previous
next →
201–300 of 1,419, ranked by callers