Download packages/agent-core-v2/src/app/bashParser/bashParser.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 863 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/app/bashParser/bashParser.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/agent-core-v2/src/app/bashParser/bashParser.ts
-
curl -L -o bashParser.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/app/bashParser/bashParser.ts
863 Bytes
| import { createDecorator, type ServiceIdentifier } from '#/_base/di/instantiation'; | |
| export interface BashSyntaxNode { | |
| readonly type: string; | |
| readonly text: string; | |
| readonly startIndex: number; | |
| readonly endIndex: number; | |
| readonly isNamed: boolean; | |
| readonly children: readonly BashSyntaxNode[]; | |
| } | |
| export interface BashParseOptions { | |
| readonly timeoutMs?: number; | |
| readonly maxNodes?: number; | |
| } | |
| export type BashParseResult = | |
| | { readonly ok: true; readonly hasError: boolean; readonly root: BashSyntaxNode } | |
| | { readonly ok: false; readonly reason: 'aborted' }; | |
| export interface IBashParserService { | |
| readonly _serviceBrand: undefined; | |
| parse(source: string, options?: BashParseOptions): BashParseResult; | |
| } | |
| export const IBashParserService: ServiceIdentifier<IBashParserService> = | |
| createDecorator<IBashParserService>('bashParserService'); | |