MCPcopy Create free account

hub / github.com/MaxMiksa/Gravity / functions

Functions858 in github.com/MaxMiksa/Gravity

↓ 1 callersFunction_run_validation
( unpacked_dir: Path, original_file: Path, suffix: str, infer_author_func=None, )
apps/electron/default-skills/docx/scripts/office/pack.py:69
↓ 1 callersFunction_run_validation
( unpacked_dir: Path, original_file: Path, suffix: str, infer_author_func=None, )
apps/electron/default-skills/xlsx/scripts/office/pack.py:69
↓ 1 callersFunction_setup_libreoffice_macro
()
apps/electron/default-skills/docx/scripts/accept_changes.py:91
↓ 1 callersFunction_strip_run_rsid_attrs
(root)
apps/electron/default-skills/pptx/scripts/office/helpers/merge_runs.py:99
↓ 1 callersFunction_strip_run_rsid_attrs
(root)
apps/electron/default-skills/docx/scripts/office/helpers/merge_runs.py:99
↓ 1 callersFunction_strip_run_rsid_attrs
(root)
apps/electron/default-skills/xlsx/scripts/office/helpers/merge_runs.py:99
↓ 1 callersFunctionaccept_changes
( input_file: str, output_file: str, )
apps/electron/default-skills/docx/scripts/accept_changes.py:36
↓ 1 callersFunctionadd_comment
( unpacked_dir: str, comment_id: int, text: str, author: str = "Claude", initials: str = "
apps/electron/default-skills/docx/scripts/comment.py:218
↓ 1 callersFunctionallocate_commit_counts
(weights: list[int], target_commit_count: int)
scripts/history_rewrite/build_blueprint.py:79
↓ 1 callersFunctionapplyAgentEvent
( prev: AgentStreamState, event: AgentEvent, )
apps/electron/src/renderer/atoms/agent-atoms.ts:202
↓ 1 callersFunctionapplyFallbackPaths
* 应用 fallback 路径
apps/electron/src/main/lib/shell-env.ts:168
↓ 1 callersFunctionapplyThemeToDOM
(resolvedTheme: 'light' | 'dark')
apps/electron/src/renderer/atoms/theme.ts:64
↓ 1 callersFunctionapply_operation
(source_commit: str, operation: dict[str, str])
scripts/history_rewrite/replay_blueprint.py:22
↓ 1 callersFunctionautoGenerateTitle
* Agent 流完成后自动生成标题 * * 在主进程侧检测:如果会话标题仍为默认值,说明是首次对话完成, * 自动调用标题生成并推送 TITLE_UPDATED 事件给渲染进程。 * 不受组件生命周期影响,解决用户切换页面后标题不生成的问题。
apps/electron/src/main/lib/agent-service.ts:909
↓ 1 callersFunctionbuildContextPrompt
* 构建带历史上下文的 prompt * * 当 resume 不可用时(cwd 迁移等),将最近消息拼接为上下文注入 prompt, * 让新 SDK 会话保留对话记忆。仅取 user/assistant 角色的文本内容。
apps/electron/src/main/lib/agent-service.ts:434
↓ 1 callersFunctionbuildDynamicContext
(ctx: DynamicContext)
apps/electron/src/main/lib/agent-prompt-builder.ts:124
↓ 1 callersFunctionbuildEntry
()
apps/electron/src/renderer/components/settings/McpServerForm.tsx:94
↓ 1 callersFunctionbuildImageBlocks
* 将图片附件转换为 OpenAI 格式的内容块
packages/core/src/providers/openai-adapter.ts:56
↓ 1 callersFunctionbuildImageBlocks
* 将单条用户消息的图片附件转换为 Anthropic 内容块
packages/core/src/providers/anthropic-adapter.ts:63
↓ 1 callersFunctionbuildImageParts
* 将图片附件转换为 Google 格式的内容部分
packages/core/src/providers/google-adapter.ts:68
↓ 1 callersFunctionbuildMcpPrompt
()
apps/electron/src/renderer/components/settings/AgentSettings.tsx:104
↓ 1 callersFunctionbuildModelOptions
从渠道列表构建扁平化的模型选项
apps/electron/src/renderer/components/chat/ModelSelector.tsx:30
↓ 1 callersFunctionbuildPreviewUrl
* 生成 API 端点预览 URL * * Anthropic 特殊处理:如果 baseUrl 已包含 /v1,则不重复添加。
apps/electron/src/renderer/components/settings/ChannelForm.tsx:83
↓ 1 callersFunctionbuildSkillPrompt
()
apps/electron/src/renderer/components/settings/AgentSettings.tsx:142
↓ 1 callersMethodbuildStreamRequest
* 构建流式请求的 HTTP 配置 * * 将通用输入转换为供应商特定的 HTTP 请求, * 包括:URL 拼接、认证头、消息格式转换、请求体构建。
packages/core/src/providers/types.ts:131
↓ 1 callersFunctionbuildSystemPromptAppend
(ctx: SystemPromptContext)
apps/electron/src/main/lib/agent-prompt-builder.ts:29
↓ 1 callersFunctionbuild_message
(entry_index: int, operation_group: list[dict[str, str]])
scripts/history_rewrite/build_blueprint.py:193
↓ 1 callersFunctionbuild_slide_list
( slide_info: list[dict], visible_images: list[Path], temp_dir: Path, )
apps/electron/default-skills/pptx/scripts/thumbnail.py:121
↓ 1 callersFunctioncalculateChecksum
* 计算文件的 SHA256 校验和
apps/electron/scripts/download-bun.ts:100
↓ 1 callersFunctioncanDelete
(ws: AgentWorkspace)
apps/electron/src/renderer/components/agent/WorkspaceSelector.tsx:175
↓ 1 callersFunctioncanSubmit
()
apps/electron/src/renderer/components/settings/McpServerForm.tsx:149
↓ 1 callersFunctioncheckEnvironment
()
apps/electron/src/renderer/components/onboarding/OnboardingView.tsx:46
↓ 1 callersFunctioncheckEnvironment
()
apps/electron/src/main/lib/environment-checker.ts:78
↓ 1 callersFunctioncheckForUpdates
()
apps/electron/src/renderer/atoms/updater.ts:66
↓ 1 callersFunctionclean_unused_files
(unpacked_dir: Path)
apps/electron/default-skills/pptx/scripts/clean.py:241
↓ 1 callersFunctioncollectFiles
(dir: string, relativeTo: string)
apps/electron/src/main/lib/agent-service.ts:995
↓ 1 callersFunctioncollect_commit_rows
(branch_name: str)
scripts/history_rewrite/verify_rewrite.py:33
↓ 1 callersMethodcompare_paragraph_counts
(self)
apps/electron/default-skills/pptx/scripts/office/validators/docx.py:243
↓ 1 callersMethodcompare_paragraph_counts
(self)
apps/electron/default-skills/docx/scripts/office/validators/docx.py:243
↓ 1 callersMethodcompare_paragraph_counts
(self)
apps/electron/default-skills/xlsx/scripts/office/validators/docx.py:243
↓ 1 callersFunctioncomputeDiffStats
(toolName: string, input: Record<string, unknown>)
apps/electron/src/renderer/components/agent/ToolActivityItem.tsx:132
↓ 1 callersFunctionconvert
(pdf_path, output_dir, max_dim=1000)
apps/electron/default-skills/pdf/scripts/convert_pdf_to_images.py:9
↓ 1 callersFunctionconvertSDKMessage
* 将 SDK 消息转换为 AgentEvent 列表
apps/electron/src/main/lib/agent-service.ts:193
↓ 1 callersFunctionconvert_to_images
(pptx_path: Path, temp_dir: Path)
apps/electron/default-skills/pptx/scripts/thumbnail.py:158
↓ 1 callersFunctioncopyFolderToSession
(input: AgentCopyFolderInput)
apps/electron/src/main/lib/agent-service.ts:981
↓ 1 callersFunctioncountEditorLines
计算编辑器内容的行数
apps/electron/src/renderer/components/ai-elements/rich-text-input.tsx:120
↓ 1 callersMethodcount_paragraphs_in_original
(self)
apps/electron/default-skills/pptx/scripts/office/validators/docx.py:179
↓ 1 callersMethodcount_paragraphs_in_original
(self)
apps/electron/default-skills/docx/scripts/office/validators/docx.py:179
↓ 1 callersMethodcount_paragraphs_in_original
(self)
apps/electron/default-skills/xlsx/scripts/office/validators/docx.py:179
↓ 1 callersMethodcount_paragraphs_in_unpacked
(self)
apps/electron/default-skills/pptx/scripts/office/validators/docx.py:163
↓ 1 callersMethodcount_paragraphs_in_unpacked
(self)
apps/electron/default-skills/docx/scripts/office/validators/docx.py:163
↓ 1 callersMethodcount_paragraphs_in_unpacked
(self)
apps/electron/default-skills/xlsx/scripts/office/validators/docx.py:163
↓ 1 callersFunctioncreateAgentSession
( title?: string, channelId?: string, workspaceId?: string, )
apps/electron/src/main/lib/agent-session-manager.ts:87
↓ 1 callersFunctioncreateAgentWorkspace
(name: string)
apps/electron/src/main/lib/agent-workspace-manager.ts:136
↓ 1 callersFunctioncreateApplicationMenu
()
apps/electron/src/main/menu.ts:3
↓ 1 callersFunctioncreateChannel
(input: ChannelCreateInput)
apps/electron/src/main/lib/channel-manager.ts:155
↓ 1 callersFunctioncreateConversation
( title?: string, modelId?: string, channelId?: string, )
apps/electron/src/main/lib/conversation-manager.ts:81
↓ 1 callersFunctioncreateTray
()
apps/electron/src/main/tray.ts:32
↓ 1 callersFunctioncreate_grid
( slides: list[tuple[Path, str]], cols: int, width: int, )
apps/electron/default-skills/pptx/scripts/thumbnail.py:225
↓ 1 callersFunctioncreate_grids
( slides: list[tuple[Path, str]], cols: int, width: int, output_path: Path, )
apps/electron/default-skills/pptx/scripts/thumbnail.py:196
↓ 1 callersFunctioncreate_hidden_placeholder
(size: tuple[int, int])
apps/electron/default-skills/pptx/scripts/thumbnail.py:149
↓ 1 callersFunctioncreate_slide_from_layout
(unpacked_dir: Path, layout_file: str)
apps/electron/default-skills/pptx/scripts/add_slide.py:33
↓ 1 callersFunctioncreate_validation_image
(page_number, fields_json_path, input_path, output_path)
apps/electron/default-skills/pdf/scripts/create_validation_image.py:9
↓ 1 callersFunctiondeleteAgentSession
(id: string)
apps/electron/src/main/lib/agent-session-manager.ts:188
↓ 1 callersFunctiondeleteAgentWorkspace
(id: string)
apps/electron/src/main/lib/agent-workspace-manager.ts:197
↓ 1 callersFunctiondeleteChannel
(id: string)
apps/electron/src/main/lib/channel-manager.ts:215
↓ 1 callersFunctiondeleteConversation
(id: string)
apps/electron/src/main/lib/conversation-manager.ts:251
↓ 1 callersFunctiondeleteConversationAttachments
(conversationId: string)
apps/electron/src/main/lib/attachment-service.ts:179
↓ 1 callersFunctiondeleteMessage
(conversationId: string, messageId: string)
apps/electron/src/main/lib/conversation-manager.ts:287
↓ 1 callersFunctiondeleteWorkspaceSkill
(workspaceSlug: string, skillSlug: string)
apps/electron/src/main/lib/agent-workspace-manager.ts:400
↓ 1 callersFunctiondestroyTray
()
apps/electron/src/main/tray.ts:90
↓ 1 callersFunctiondetectBunRuntime
()
apps/electron/src/main/lib/bun-finder.ts:173
↓ 1 callersFunctiondetectNodeRuntime
()
apps/electron/src/main/lib/node-detector.ts:128
↓ 1 callersFunctiondownloadBunForPlatform
* 下载并安装单个平台的 Bun
apps/electron/scripts/download-bun.ts:168
↓ 1 callersFunctiondownloadFile
* 下载文件到指定路径
apps/electron/scripts/download-bun.ts:70
↓ 1 callersFunctiondownloadUpdate
()
apps/electron/src/main/lib/updater/auto-updater.ts:49
↓ 1 callersFunctionduplicate_slide
(unpacked_dir: Path, source: str)
apps/electron/default-skills/pptx/scripts/add_slide.py:90
↓ 1 callersFunctionenrichHistoryWithDocuments
* 为历史消息列表注入文档附件文本 * * 遍历历史消息,对包含文档附件的用户消息进行文本增强。 * 返回新的消息数组(不修改原始消息)。
apps/electron/src/main/lib/chat-service.ts:99
↓ 1 callersFunctionensureDefaultWorkspace
()
apps/electron/src/main/lib/agent-workspace-manager.ts:217
↓ 1 callersFunctionensureRipgrepAvailable
* 确保打包环境下 ripgrep 可被 SDK CLI 找到 * * 打包时 ripgrep 从 SDK vendor/ 排除(减少体积),仅当前平台的放在 extraResources。 * SDK CLI 期望在 vendor/ripgrep/{arch}-{platform}/ 下找到
apps/electron/src/main/lib/agent-service.ts:113
↓ 1 callersFunctionensureWindowOnScreen
* 检查窗口是否在可用显示器范围内 * 处理外接显示器断开后窗口位于不可见区域的情况
apps/electron/src/main/index.ts:22
↓ 1 callersFunctionensure_clean_worktree
()
scripts/history_rewrite/history_common.py:85
↓ 1 callersFunctionevenly_spread_indices
(total_size: int, pick_count: int)
scripts/history_rewrite/history_common.py:73
↓ 1 callersFunctionextractCodeInfo
从 children 中提取语言名和代码文本
packages/ui/src/code-block/CodeBlock.tsx:55
↓ 1 callersFunctionextractDoc
* 提取旧版 Word (.doc) 文本
apps/electron/src/main/lib/document-parser.ts:113
↓ 1 callersFunctionextractFilePath
(input: Record<string, unknown>)
apps/electron/src/renderer/components/agent/ToolActivityItem.tsx:191
↓ 1 callersFunctionextractOffice
* 提取 Office/OpenDocument 文本(DOCX, XLSX, PPTX, ODT, ODP, ODS)
apps/electron/src/main/lib/document-parser.ts:125
↓ 1 callersFunctionextractPdf
* 提取 PDF 文本
apps/electron/src/main/lib/document-parser.ts:102
↓ 1 callersFunctionextractText
(node: React.ReactNode)
apps/electron/src/renderer/components/ai-elements/message.tsx:245
↓ 1 callersFunctionextractTextFromFile
(filePath: string)
apps/electron/src/main/lib/document-parser.ts:71
↓ 1 callersFunctionextractToolActivities
从持久化事件中提取工具活动列表
apps/electron/src/renderer/components/agent/AgentMessages.tsx:72
↓ 1 callersFunctionextractToolResults
( contentBlocks: ContentBlock[], sdkParentToolUseId: string | null, toolUseResultValue: unknown, toolI
packages/shared/src/agent/tool-matching.ts:167
↓ 1 callersFunctionextractZip
* 解压 zip 文件
apps/electron/scripts/download-bun.ts:111
↓ 1 callersFunctionextract_form_structure
(pdf_path)
apps/electron/default-skills/pdf/scripts/extract_form_structure.py:20
↓ 1 callersFunctionfetchAnthropicModels
* 从 Anthropic API 拉取模型列表 * * 先规范化 baseUrl 确保包含 /v1,再请求 /models。 * 文档: https://docs.anthropic.com/en/api/models-list
apps/electron/src/main/lib/channel-manager.ts:447
↓ 1 callersFunctionfetchGoogleModels
* 从 Google Generative AI API 拉取模型列表 * * API: GET /v1beta/models?key={apiKey} * 仅返回支持 generateContent 的模型(排除纯 embedding 模型)。
apps/electron/src/main/lib/channel-manager.ts:553
↓ 1 callersFunctionfetchModels
(input: FetchModelsInput)
apps/electron/src/main/lib/channel-manager.ts:406
↓ 1 callersFunctionfetchOpenAICompatibleModels
* 从 OpenAI 兼容 API 拉取模型列表(OpenAI / DeepSeek / Custom) * * API: GET {baseUrl}/models * 通用 OpenAI 兼容格式,适用于大部分第三方供应商。
apps/electron/src/main/lib/channel-manager.ts:499
↓ 1 callersFunctionfileToBase64
* 将 File 对象转为 base64 字符串
apps/electron/src/renderer/components/chat/ChatInput.tsx:51
↓ 1 callersFunctionfileToBase64
文件转 base64(模块级纯函数)
apps/electron/src/renderer/components/chat/InlineEditForm.tsx:19
← previousnext →301–400 of 858, ranked by callers