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.
*--------------------------------------------------------------------------------------------*/
import * as fs from 'fs';
import * as path from 'path';
function showHelp(): void {
console.log(`
cleanLog.ts - A utility script to filter log files by topic.
This script reads a log file, filters entries to only include those matching
a specified topic, strips timestamps from the output, and writes the filtered
content back to the file.
Usage:
npx ts-node script/cleanLog.ts --log=<topic> <log-file-path>
Options:
--log=<topic> The topic to filter by (case-insensitive). Required.
--help Show this help message.
Example:
npx ts-node script/cleanLog.ts --log=InlineChat /path/to/extension.log
This will filter the log file to only include entries containing [InlineChat]
and overwrite the original file with the filtered content.
`);
}
function parseArgs(args: string[]): logTopic filePath
args args
logTopic
filePath
arg args
arg
logTopic arglength
arg
filePath arg
logTopic
filePath
logTopic filePath
line
line
value
value
content topic
lines content
result
topicPattern
currentLogEntry
keepCurrentEntry
keepCurrentEntry currentLogEntrylength
currentLogEntry currentLogEntry
resultcurrentLogEntry
currentLogEntry
keepCurrentEntry
line lines
line
currentLogEntryline
keepCurrentEntry topicPatternline
currentLogEntryline
result
args processargv
parsed args
parsed
logTopic filePath parsed
absolutePath pathfilePath
filePath
pathprocess filePath
content fsabsolutePath
filtered content logTopic
fsabsolutePath filtered
error
err error NodeJSErrnoException
errcode
errcode errcode
processexitCode