Skip to content

Latest commit

 

History

History
39 lines (34 loc) · 6.39 KB

File metadata and controls

39 lines (34 loc) · 6.39 KB

目录说明:src/utils/bash

目录定位

该目录是 src/utils 下的子模块,围绕 bash 这一主题组织实现文件。

目录快照

  • 相对路径:src/utils/bash
  • 直接文件数:15
  • 直接子目录数:1
  • 递归文件数:23
  • 主要文件类型:.ts x 15

依赖关系观察

  • 该目录最常引用的仓库内目录:src/utils (18)、src/utils/shell (2)、services/analytics (1)、src/services/analytics (1)、src/utils/bash/specs (1)、components/PromptInput (1)
  • 最常引用该目录的仓库内目录:src/tools/BashTool (24)、src/utils/bash/specs (8)、src/utils/shell (6)、src/utils (4)、src/components/permissions/BashPermissionRequest (2)、src/tools/shared (1)、src/utils/powershell (1)

直接文件说明

文件 行数 导出/关键符号 说明
ParsedCommand.ts 318 OutputRedirection, IParsedCommand, RegexParsedCommand_DEPRECATED, buildParsedCommandFromRoot, ParsedCommand 命令实现或命令适配层;导出符号以 OutputRedirection, IParsedCommand, RegexParsedCommand_DEPRECATED, buildParsedCommandFromRoot 为主,顶部注释说明:Interface for parsed command implementations. Both tree-sitter and regex fallback implementations conform to this.
ShellSnapshot.ts 582 createRipgrepShellIntegration, createFindGrepShellIntegration, createAndSaveSnapshot 基础辅助逻辑;导出符号以 createRipgrepShellIntegration, createFindGrepShellIntegration, createAndSaveSnapshot 为主,顶部注释说明:Creates a shell function that invokes binaryPath with a specific argv[0]. This uses the bun-internal ARGV0 dispatch...
ast.ts 2679 Redirect, SimpleCommand, ParseForSecurityResult, nodeTypeId, parseForSecurity, parseForSecurityFromAst 基础辅助逻辑;导出符号以 Redirect, SimpleCommand, ParseForSecurityResult, nodeTypeId 为主,顶部注释说明:AST-based bash command analysis using tree-sitter. This module replaces the shell-quote + hand-rolled char-walker app...
bashParser.ts 4436 TsNode, ensureParserInitialized, getParserModule, SHELL_KEYWORDS 解析逻辑;导出符号以 TsNode, ensureParserInitialized, getParserModule, SHELL_KEYWORDS 为主,顶部注释说明:Pure-TypeScript bash parser producing tree-sitter-bash-compatible ASTs. Downstream code in parser.ts, ast.ts, prefix....
bashPipeCommand.ts 294 rearrangePipeCommand 命令实现或命令适配层;导出符号以 rearrangePipeCommand 为主,顶部注释说明:Rearranges a command with pipes to place stdin redirect after the first command. This fixes an issue where eval treat...
commands.ts 1339 splitCommandWithOperators, filterControlOperators, splitCommand_DEPRECATED, isHelpCommand, getCommandSubcommandPrefix, clearCommandPrefixCaches 命令实现或命令适配层;导出符号以 splitCommandWithOperators, filterControlOperators, splitCommand_DEPRECATED, isHelpCommand 为主,顶部注释说明:Generates placeholder strings with random salt to prevent injection attacks. The salt prevents malicious commands fro...
heredoc.ts 733 HeredocInfo, HeredocExtractionResult, extractHeredocs, restoreHeredocs, containsHeredoc 基础辅助逻辑;导出符号以 HeredocInfo, HeredocExtractionResult, extractHeredocs, restoreHeredocs 为主,顶部注释说明:Heredoc extraction and restoration utilities. The shell-quote library parses << as two separate < redirect operat...
parser.ts 230 Node, ParsedCommandData, ensureInitialized, parseCommand, PARSE_ABORTED, parseCommandRaw 解析逻辑;导出符号以 Node, ParsedCommandData, ensureInitialized, parseCommand 为主,顶部注释说明:Awaits WASM init (Parser.init + Language.load). Must be called before parseCommand/parseCommandRaw for the parser to ...
prefix.ts 204 getCommandPrefixStatic, getCompoundCommandPrefixesStatic 基础辅助逻辑;导出符号以 getCommandPrefixStatic, getCompoundCommandPrefixesStatic 为主,结合所在目录可判断其服务于 src/utils/bash 这条功能线。
registry.ts 53 CommandSpec, Argument, Option, loadFigSpec, getCommandSpec 基础辅助逻辑;导出符号以 CommandSpec, Argument, Option, loadFigSpec 为主,结合所在目录可判断其服务于 src/utils/bash 这条功能线。
shellCompletion.ts 259 ShellCompletionType, getShellCompletions 基础辅助逻辑;导出符号以 ShellCompletionType, getShellCompletions 为主,顶部注释说明:Check if a parsed token is a command operator (
shellPrefix.ts 28 formatShellPrefixCommand 基础辅助逻辑;导出符号以 formatShellPrefixCommand 为主,顶部注释说明:Parses a shell prefix that may contain an executable path and arguments. Examples: - "bash" -> quotes as 'bash' - "/u...
shellQuote.ts 304 ShellParseResult, ShellQuoteResult, tryParseShellCommand, tryQuoteShellArgs, hasMalformedTokens, hasShellQuoteSingleQuoteBug 基础辅助逻辑;导出符号以 ShellParseResult, ShellQuoteResult, tryParseShellCommand, tryQuoteShellArgs 为主,顶部注释说明:Safe wrappers for shell-quote library functions that handle errors gracefully These are drop-in replacements for the ...
shellQuoting.ts 128 quoteShellCommand, hasStdinRedirect, shouldAddStdinRedirect, rewriteWindowsNullRedirect 基础辅助逻辑;导出符号以 quoteShellCommand, hasStdinRedirect, shouldAddStdinRedirect, rewriteWindowsNullRedirect 为主,顶部注释说明:Match heredoc patterns: << followed by optional -, then optional quotes or backslash, then word
treeSitterAnalysis.ts 506 QuoteContext, CompoundStructure, DangerousPatterns, TreeSitterAnalysis, extractQuoteContext, extractCompoundStructure 基础辅助逻辑;导出符号以 QuoteContext, CompoundStructure, DangerousPatterns, TreeSitterAnalysis 为主,顶部注释说明:Tree-sitter AST analysis utilities for bash command security validation. These functions extract security-relevant in...

直接子目录说明

子目录 直接文件数 直接子目录数 说明
src/utils/bash/specs 8 0 该目录围绕 specs 组织实现文件,通常承担同名功能域或同一类资源的聚合职责。