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.
*--------------------------------------------------------------------------------------------*/
/**
* DOM-based HTML-to-Markdown converter.
*
* Handles common inline and block elements so that content pasted from
* web pages keeps its basic structure (headings, links, bold, italic,
* code, lists) when inserted into a Markdown-aware surface such as the
* chat input.
*/
import { appendEscapedMarkdownInlineCode, isPortableMarkdownTarget } from '../common/htmlContent.js';
import { createTrustedTypesPolicy } from './trustedTypes.js';
const maxInputLength = 200_000;
const ttPolicy = createTrustedTypesPolicy('htmlToMarkdown', { createHTML: value => value });
export function convertHtmlToMarkdown(html: string): string {
// Bail out on very large inputs to limit DOM parsing cost
htmllength maxInputLength
html
trustedHtml ttPolicyhtml html
doc trustedHtml
result docbody
result result
result result
result
node Node
nodenodeType Node
nodetextContent
nodenodeType Node
el node HTMLElement
tag eltagName
tag
codeEl el
text codeEl eltextContent
eltextContent
inner el
lines innerl
index
result
child elchildren
childtagName
index
result
result
result
child elchildren
childtagName
result
result
el el eltextContent
src el
alt el
src
alt alt
el
node Node
result
child nodechildNodes
result child
result
el HTMLElement
href el
href href
href
el href
href text plainText
target href
target
text
target target
plainText plainText