ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/**
* Parser for detecting file writes from `sed` commands using in-place editing.
*
* Handles:
* - `sed -i 's/foo/bar/' file.txt` (GNU)
* - `sed -i.bak 's/foo/bar/' file.txt` (GNU with backup suffix)
* - `sed -i '' 's/foo/bar/' file.txt` (macOS/BSD with empty backup suffix)
* - `sed --in-place 's/foo/bar/' file.txt` (GNU long form)
* - `sed --in-place=.bak 's/foo/bar/' file.txt` (GNU long form with backup)
* - `sed -I 's/foo/bar/' file.txt` (BSD case-insensitive variant)
*/
export class SedFileWriteParser {
readonly commandName = 'sed';
canHandle(commandText: string): boolean {
// Check if this is a sed command
if (!commandText.match(/^sed\s+/)) {
return false;
}
// Check for -i, -I, or --in-place flag
const inPlaceRegex
inPlaceRegexcommandText
commandText
tokens commandText
tokens
commandText
tokens
current
inSingleQuote
inDoubleQuote
escaped
i i commandTextlength i
char commandTexti
escaped
current char
escaped
char inSingleQuote
escaped
current char
char inDoubleQuote
inSingleQuote inSingleQuote
current char
char inSingleQuote
inDoubleQuote inDoubleQuote
current char
char inSingleQuote inDoubleQuote
current
tokenscurrent
current
current char
current
tokenscurrent
tokens
tokens
tokenslength tokens
files
i
foundScript
i tokenslength
token tokensi
token
token token
i
token token
i
foundScript
token token
i
foundScript
i
token tokenlength token
flags token
iIndex flags
IIndex flags
inPlaceIndex iIndex iIndex IIndex
inPlaceIndex inPlaceIndex flagslength
i
flags flags i tokenslength
nextToken tokensi
nextToken nextToken
i
nextToken nextToken nextToken nextToken
unquoted nextToken
unquoted unquotedlength unquoted
i
flags flags
eIndex flags
fIndex flags
optIndex eIndex eIndex fIndex
optIndex flagslength
foundScript
i
foundScript
i
i
foundScript
foundScript
i
file token
file file file file
file file
filesfile
i
files