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 l10n from '@vscode/l10n';
import { Raw } from '@vscode/prompt-tsx';
/**
* Model-facing placeholder substituted for dropped history images.
* Intentionally not localized — this text is sent to the model, not the user.
*/
const IMAGE_PLACEHOLDER_TEXT = '[Image omitted from conversation history due to model limit.]';
/**
* Silently drops the oldest images from history when the total number of images
* in the conversation exceeds `maxImages`. Images belonging to the current turn
* (the last user message and anything after it, e.g. recent tool results) are
* always preserved.
*
* If the current turn alone exceeds the limit, throws a localized error rather
* than sending a request we know will be rejected with an opaque server error.
*
* @returns A (possibly filtered) copy of messages. The original array is never mutated.
*/
export function filterHistoryImages(messages: Raw.ChatMessage[], maxImages: number): Raw.ChatMessage[]
lastUserIdx
i messageslength i i
messagesirole RawChatRoleUser
lastUserIdx i
lastUserIdx messageslength
lastUserIdx messageslength
currentTurnImages
i MathlastUserIdx i messageslength i
content messagesicontent
content
part content
parttype RawChatCompletionContentPartKindImage
currentTurnImages
totalImages
message messages
messagecontent
part messagecontent
parttype RawChatCompletionContentPartKindImage
totalImages
totalImages maxImages
messages
currentTurnImages maxImages
l10n currentTurnImages maxImages
historyBudget maxImages currentTurnImages
historyImageDecisions
i lastUserIdx i i
messagesicontent
j messagesicontentlength j j
messagesicontentjtype RawChatCompletionContentPartKindImage
key
historyBudget
historyImageDecisionskey
historyBudget
historyImageDecisionskey
messagesmessage msgIdx
msgIdx lastUserIdx
message
messagecontent
message
messagecontentp ptype RawChatCompletionContentPartKindImage
message
message
content messagecontentpart partIdx
parttype RawChatCompletionContentPartKindImage
part
historyImageDecisions
part
type RawChatCompletionContentPartKindText text