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.
*--------------------------------------------------------------------------------------------*/
/**
* Pure decision helpers for the Codex `thread/fork` path, extracted so they can
* be unit-tested without standing up the whole {@link CodexAgent} (mirrors the
* `codexShellCommand.ts` extraction). No protocol or service imports.
*/
/**
* Outcome of locating where a fork should branch within the source thread.
* `resolved: false` means neither the mapped codex turn id nor the caller's
* fallback index identified a turn, and the caller must reject the fork instead
* of silently branching from the tip.
*/
export type ForkBoundaryResolution =
| { readonly resolved: true; readonly keepThroughIndex: number; readonly numTurnsToDrop: number }
| { readonly resolved: false };
/**
* Resolve the fork boundary from the source thread's ordered turn ids.
*
* `thread/fork` copies the full source history; the returned `numTurnsToDrop`
* is how many trailing turns must be rolled back so the fork ends at (and
* includes) the requested turn.
*
* @param sourceTurnIds Codex turn ids of the source thread, in order.
* @param The resolved codex turn id of the requested fork point.
* Zero-based index used when `codexTurnId` isn't found.
*/
sourceTurnIds codexTurnId fallbackTurnIndex ForkBoundaryResolution
total sourceTurnIdslength
keepThroughIndex sourceTurnIdsid id codexTurnId
keepThroughIndex
keepThroughIndex fallbackTurnIndex
total keepThroughIndex keepThroughIndex total
resolved
numTurnsToDrop total Math total keepThroughIndex
resolved keepThroughIndex numTurnsToDrop
hostTurnId codexTurnId
sourceTurnIds
forkedTurnIds
keepThroughIndex
hostTurnIdBySourceCodexId ReadonlyMap
turnIdMapping ReadonlyMap
ForkedTurnIdMapEntry
turnIdMapping turnIdMappingsize
keptCount MathkeepThroughIndex sourceTurnIdslength forkedTurnIdslength
entries ForkedTurnIdMapEntry
i i keptCount i
sourceCodexId sourceTurnIdsi
oldHostId hostTurnIdBySourceCodexIdsourceCodexId sourceCodexId
newHostId turnIdMappingoldHostId oldHostId
entriesnewHostId forkedTurnIdsi
entries