MCPcopy Create free account

hub / github.com/MaxMiksa/Gravity / functions

Functions858 in github.com/MaxMiksa/Gravity

↓ 2 callersFunctioncacheThemeMode
* 缓存主题模式到 localStorage
apps/electron/src/renderer/atoms/theme.ts:36
↓ 2 callersFunctioncheckNodeVersion
( version: string, minimum = '18.0.0', recommended = '22.0.0' )
apps/electron/src/main/lib/node-detector.ts:172
↓ 2 callersFunctioncleanupUpdater
()
apps/electron/src/main/lib/updater/auto-updater.ts:76
↓ 2 callersFunctioncopyDefaultSkills
* 将默认 Skills 模板复制到工作区 skills/ 目录 * * 从 ~/.gravity/default-skills/ 复制所有内容。 * 如果模板目录不存在或为空则跳过。
apps/electron/src/main/lib/agent-workspace-manager.ts:118
↓ 2 callersFunctiondecryptKey
* 解密 API Key * * @param encryptedKey base64 编码的加密字符串 * @returns 明文 API Key
apps/electron/src/main/lib/channel-manager.ts:114
↓ 2 callersFunctiondetectBackgroundEvents
检测后台任务/Shell 事件
packages/shared/src/agent/tool-matching.ts:269
↓ 2 callersFunctiondetectGitRuntime
()
apps/electron/src/main/lib/git-detector.ts:84
↓ 2 callersFunctiondoHighlight
()
packages/ui/src/code-block/CodeBlock.tsx:179
↓ 2 callersFunctionencryptApiKey
* 加密 API Key * * 使用 Electron safeStorage 加密,底层使用: * - macOS: Keychain * - Windows: DPAPI * - Linux: Secret Service API * * @returns base64 编码的加
apps/electron/src/main/lib/channel-manager.ts:98
↓ 2 callersFunctionenrichMessageWithDocuments
* 为单条消息提取文档附件的文本内容 * * 将非图片附件的文本内容提取后,以结构化格式追加到消息文本后面。 * 图片附件由适配器层单独处理,这里只处理文档类附件。 * * @param messageText 原始消息文本 * @param attachments 消息的附件列表 *
apps/electron/src/main/lib/chat-service.ts:63
↓ 2 callersFunctionextractIntent
从 tool_use 块的 input 中提取意图
packages/shared/src/agent/tool-matching.ts:236
↓ 2 callersFunctionextractText
递归提取 ReactNode 中的纯文本
packages/ui/src/code-block/CodeBlock.tsx:43
↓ 2 callersFunctionextractTextFromAttachment
(localPath: string)
apps/electron/src/main/lib/document-parser.ts:141
↓ 2 callersFunctionfetchTitle
( request: ProviderRequest, adapter: ProviderAdapter, )
packages/core/src/providers/sse-reader.ts:122
↓ 2 callersFunctionfileToBase64
将 File 对象转为 base64 字符串
apps/electron/src/renderer/components/agent/AgentView.tsx:49
↓ 2 callersFunctionformatElapsed
(seconds: number)
apps/electron/src/renderer/components/agent/ToolActivityItem.tsx:182
↓ 2 callersFunctiongenerateAgentTitle
(input: AgentGenerateTitleInput)
apps/electron/src/main/lib/agent-service.ts:868
↓ 2 callersFunctiongetActivityStatus
(activity: ToolActivity)
apps/electron/src/renderer/atoms/agent-atoms.ts:52
↓ 2 callersFunctiongetAgentSessionMessages
(id: string)
apps/electron/src/main/lib/agent-session-manager.ts:125
↓ 2 callersFunctiongetAgentSessionMeta
(id: string)
apps/electron/src/main/lib/agent-session-manager.ts:79
↓ 2 callersFunctiongetAgentSessionsDir
()
apps/electron/src/main/lib/config-paths.ts:157
↓ 2 callersFunctiongetAgentSessionsIndexPath
()
apps/electron/src/main/lib/config-paths.ts:146
↓ 2 callersFunctiongetAgentWorkspacesIndexPath
()
apps/electron/src/main/lib/config-paths.ts:183
↓ 2 callersFunctiongetAttachmentsDir
()
apps/electron/src/main/lib/config-paths.ts:84
↓ 2 callersFunctiongetBunBinaryName
* 获取 Bun 二进制文件名 * * @returns Windows 上返回 'bun.exe',其他平台返回 'bun'
apps/electron/src/main/lib/bun-finder.ts:47
↓ 2 callersFunctiongetChannelsPath
()
apps/electron/src/main/lib/config-paths.ts:36
↓ 2 callersFunctiongetConversationsDir
()
apps/electron/src/main/lib/config-paths.ts:56
↓ 2 callersFunctiongetConversationsIndexPath
()
apps/electron/src/main/lib/config-paths.ts:45
↓ 2 callersFunctiongetDefaultSkillsDir
()
apps/electron/src/main/lib/config-paths.ts:259
↓ 2 callersMethodgetEntry
(toolUseId: string)
packages/shared/src/agent/tool-matching.ts:47
↓ 2 callersFunctiongetRuntimeStatus
()
apps/electron/src/main/lib/runtime-init.ts:98
↓ 2 callersFunctiongetSettings
()
apps/electron/src/main/lib/settings-service.ts:18
↓ 2 callersFunctiongetSettingsPath
()
apps/electron/src/main/lib/config-paths.ts:128
↓ 2 callersFunctiongetThemeOptions
()
packages/ui/src/mermaid-block/MermaidBlock.tsx:45
↓ 2 callersFunctiongetUserProfilePath
()
apps/electron/src/main/lib/config-paths.ts:137
↓ 2 callersFunctiongetWorkspaceMcpPath
(slug: string)
apps/electron/src/main/lib/config-paths.ts:230
↓ 2 callersFunctionget_field_info
(reader: PdfReader)
apps/electron/default-skills/pdf/scripts/extract_form_field_info.py:47
↓ 2 callersFunctionget_next_slide_number
(slides_dir: Path)
apps/electron/default-skills/pptx/scripts/add_slide.py:27
↓ 2 callersFunctionget_soffice_env
()
apps/electron/default-skills/pptx/scripts/office/soffice.py:24
↓ 2 callersFunctiongroupByDate
按 updatedAt 将项目分为 今天 / 昨天 / 更早 三组
apps/electron/src/renderer/components/app-shell/LeftSidebar.tsx:105
↓ 2 callersFunctionhandleAddModel
()
apps/electron/src/renderer/components/settings/ChannelForm.tsx:142
↓ 2 callersFunctionhandleAvatarChange
(avatar: string)
apps/electron/src/renderer/components/settings/GeneralSettings.tsx:41
↓ 2 callersFunctionhandleConfigViaChat
(promptMessage: string)
apps/electron/src/renderer/components/settings/AgentSettings.tsx:174
↓ 2 callersFunctionhandleSelect
(option: ModelOption)
apps/electron/src/renderer/components/chat/ModelSelector.tsx:163
↓ 2 callersFunctionhandleSelectConversation
(id: string)
apps/electron/src/renderer/components/app-shell/LeftSidebar.tsx:248
↓ 2 callersFunctioninitializeRuntime
(options: RuntimeInitOptions = {})
apps/electron/src/main/lib/runtime-init.ts:32
↓ 2 callersFunctionisActivityGroup
(item: ActivityGroup | ToolActivity)
apps/electron/src/renderer/atoms/agent-atoms.ts:128
↓ 2 callersFunctionisDocumentAttachment
(mediaType: string)
apps/electron/src/main/lib/document-parser.ts:54
↓ 2 callersFunctionisToolResultError
(result: unknown)
packages/shared/src/agent/tool-matching.ts:257
↓ 2 callersFunctionlistConversations
()
apps/electron/src/main/lib/conversation-manager.ts:68
↓ 2 callersFunctionload_holiday_set
(holiday_file: Path)
scripts/history_rewrite/history_common.py:52
↓ 2 callersFunctionmeetsVersion
* 比较版本号 * * @param version - 当前版本 * @param target - 目标版本 * @returns 是否满足目标版本(>= target)
apps/electron/src/main/lib/node-detector.ts:108
↓ 2 callersFunctionmergeTodoWrites
* 合并同层 TodoWrite 活动:多次调用只保留最新 input,置底显示 * * TodoWrite 每次调用都包含完整的 todo 列表,只需展示最新状态。
apps/electron/src/renderer/atoms/agent-atoms.ts:64
↓ 2 callersFunctionnormalizeAnthropicBaseUrl
(baseUrl: string)
packages/core/src/providers/url-utils.ts:16
↓ 2 callersFunctionnormalizeAnthropicBaseUrl
* 规范化 Anthropic Base URL * * 处理逻辑: * - 去除尾部斜杠 * - 确保包含 /v1(如果用户没填则自动补上) * - 如果已经包含 /v1 则不重复添加 * * 最终结果类似 https://api.anthropic.com/v1
apps/electron/src/main/lib/channel-manager.ts:40
↓ 2 callersFunctionparseKeyValueText
* 解析多行文本为 key=value / key: value 的 Record * * 支持: * - KEY=VALUE(环境变量格式) * - Key: Value(HTTP 头格式)
apps/electron/src/renderer/components/settings/McpServerForm.tsx:49
↓ 2 callersFunctionparseVersion
(v: string)
apps/electron/src/main/lib/environment-checker.ts:55
↓ 2 callersFunctionparseVersion
* 解析版本号为数字数组 * * @param version - 版本号字符串(如 "22.13.1") * @returns 数字数组 [22, 13, 1]
apps/electron/src/main/lib/node-detector.ts:97
↓ 2 callersFunctionreadAttachmentAsBase64
(localPath: string)
apps/electron/src/main/lib/attachment-service.ts:143
↓ 2 callersFunctionreadDirectoryRecursive
递归读取 FileSystemDirectoryEntry 中所有文件
apps/electron/src/renderer/components/agent/AgentView.tsx:63
↓ 2 callersFunctionremoveState
(convId: string)
apps/electron/src/renderer/components/chat/ChatView.tsx:132
↓ 2 callersFunctionremoveState
(sessionId: string)
apps/electron/src/renderer/components/agent/AgentView.tsx:197
↓ 2 callersMethodrepair
(self)
apps/electron/default-skills/pptx/scripts/office/validators/docx.py:386
↓ 2 callersMethodrepair
(self)
apps/electron/default-skills/docx/scripts/office/validators/docx.py:386
↓ 2 callersMethodrepair
(self)
apps/electron/default-skills/xlsx/scripts/office/validators/docx.py:386
↓ 2 callersFunctionresolveLanguage
* 解析语言别名,返回有效的 Shiki 语言标识 * 未知语言返回 'text'
packages/core/src/highlight/shiki-service.ts:118
↓ 2 callersFunctionresolveLoadedLanguage
解析已加载的语言,未加载的 fallback 到 text
packages/core/src/highlight/shiki-service.ts:128
↓ 2 callersFunctionsaveConversationMessages
(id: string, messages: ChatMessage[])
apps/electron/src/main/lib/conversation-manager.ts:200
↓ 2 callersFunctionsaveTitle
()
apps/electron/src/renderer/components/app-shell/LeftSidebar.tsx:603
↓ 2 callersFunctionserializeKeyValueText
* 将 Record 序列化为多行 key=value / key: value 文本
apps/electron/src/renderer/components/settings/McpServerForm.tsx:66
↓ 2 callersFunctionserializeResult
(value: unknown)
packages/shared/src/agent/tool-matching.ts:246
↓ 2 callersFunctionstartEdit
()
apps/electron/src/renderer/components/app-shell/LeftSidebar.tsx:593
↓ 2 callersFunctionstopAllAgents
()
apps/electron/src/main/lib/agent-service.ts:944
↓ 2 callersFunctionstopAllGenerations
()
apps/electron/src/main/lib/chat-service.ts:371
↓ 2 callersFunctiontestAnthropic
* 测试 Anthropic API 连接
apps/electron/src/main/lib/channel-manager.ts:287
↓ 2 callersFunctiontestGoogle
* 测试 Google Generative AI API 连接
apps/electron/src/main/lib/channel-manager.ts:346
↓ 2 callersFunctiontestOpenAICompatible
* 测试 OpenAI 兼容 API 连接(OpenAI / DeepSeek / Custom)
apps/electron/src/main/lib/channel-manager.ts:321
↓ 2 callersFunctionupdateSettings
(updates: Partial<AppSettings>)
apps/electron/src/main/lib/settings-service.ts:56
↓ 2 callersFunctionupdateState
( convId: string, updater: (prev: ConversationStreamState) => ConversationStreamState )
apps/electron/src/renderer/components/chat/ChatView.tsx:118
↓ 2 callersMethodvalidate
(self)
apps/electron/default-skills/pptx/scripts/office/validators/pptx.py:25
↓ 2 callersMethodvalidate
(self)
apps/electron/default-skills/docx/scripts/office/validators/pptx.py:25
↓ 2 callersMethodvalidate
(self)
apps/electron/default-skills/xlsx/scripts/office/validators/pptx.py:25
↓ 2 callersFunctionvalidateBunBinary
* 验证 Bun 二进制文件
apps/electron/scripts/download-bun.ts:146
↓ 2 callersMethodvalidate_against_xsd
(self)
apps/electron/default-skills/pptx/scripts/office/validators/base.py:636
↓ 2 callersMethodvalidate_against_xsd
(self)
apps/electron/default-skills/docx/scripts/office/validators/base.py:636
↓ 2 callersMethodvalidate_against_xsd
(self)
apps/electron/default-skills/xlsx/scripts/office/validators/base.py:636
↓ 2 callersMethodvalidate_all_relationship_ids
(self)
apps/electron/default-skills/pptx/scripts/office/validators/base.py:385
↓ 2 callersMethodvalidate_all_relationship_ids
(self)
apps/electron/default-skills/docx/scripts/office/validators/base.py:385
↓ 2 callersMethodvalidate_all_relationship_ids
(self)
apps/electron/default-skills/xlsx/scripts/office/validators/base.py:385
↓ 2 callersMethodvalidate_content_types
(self)
apps/electron/default-skills/pptx/scripts/office/validators/base.py:492
↓ 2 callersMethodvalidate_content_types
(self)
apps/electron/default-skills/docx/scripts/office/validators/base.py:492
↓ 2 callersMethodvalidate_content_types
(self)
apps/electron/default-skills/xlsx/scripts/office/validators/base.py:492
↓ 2 callersMethodvalidate_file_references
(self)
apps/electron/default-skills/pptx/scripts/office/validators/base.py:289
↓ 2 callersMethodvalidate_file_references
(self)
apps/electron/default-skills/docx/scripts/office/validators/base.py:289
↓ 2 callersMethodvalidate_file_references
(self)
apps/electron/default-skills/xlsx/scripts/office/validators/base.py:289
↓ 2 callersMethodvalidate_namespaces
(self)
apps/electron/default-skills/pptx/scripts/office/validators/base.py:170
↓ 2 callersMethodvalidate_namespaces
(self)
apps/electron/default-skills/docx/scripts/office/validators/base.py:170
↓ 2 callersMethodvalidate_namespaces
(self)
apps/electron/default-skills/xlsx/scripts/office/validators/base.py:170
↓ 2 callersFunctionvalidate_skill
Basic validation of a skill
apps/electron/default-skills/skill-creator/scripts/quick_validate.py:12
↓ 2 callersMethodvalidate_unique_ids
(self)
apps/electron/default-skills/pptx/scripts/office/validators/base.py:199
← previousnext →101–200 of 858, ranked by callers