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 { URI } from '../../../../base/common/uri.js';
import { ILogService } from '../../../log/common/log.js';
import { ISessionDataService } from '../../common/sessionDataService.js';
import type { AgentSelection } from '../../common/state/protocol/state.js';
import { AH_META_WORKSPACELESS_DB_KEY } from '../../common/state/sessionState.js';
/**
* Per-session bookkeeping codex needs to persist across agent host
* restarts. The fundamental tension this store resolves: codex's
* `thread/start` mints the canonical thread id server-side, but the
* workbench owns the chat session URI and refuses to accept a different
* one back from `createSession`. We therefore keep a stable mapping
* `workbench session URI ↔ codex thread id` here so restored sessions
* can be resumed without leaking duplicate sidebar entries.
*
* Layout (per-session SQLite DB, opened via {@link ISessionDataService}):
* `codex.threadId` — the codex app-server thread id assigned at
* materialize time.
* `codex.cwd` — absolute path to the working directory the
* session was created against (URI string).
* Multi-root sessions store a JSON object in this same
* field so single-root reads retain their original shape.
* This is the session's *current* working directory —
* it may be a managed temp folder or a host/user-picked
* one, and can change over the session's lifetime (see
* `_adoptWorkingDirectoryBeforeSend`) — so it must never
* be used to *locate* a managed folder for cleanup.
* `codex.model` — serialized ModelSelection.id string,
* remembered for restore so resumed sessions reuse
* the model picked during the prior process.
* `codex.managedWorkingDirectory` — the absolute path (URI string) of the
* managed temp folder this agent itself created for the
* session, when it currently owns one; the *only* value
* a destructive teardown may delete. Deliberately
* separate from `codex.cwd`, which the session's own
* working directory always occupies regardless of who
* picked it — folding the two together is what let a
* stale `codex.ownsManagedWorkingDirectory` flag infer a
* user-adopted `cwd` was safe to `rm -rf`. Written
* alongside `codex.ownsManagedWorkingDirectory` (kept for
* backward compatibility with overlays predating this
* field) but never read for a destructive decision: an
* overlay carrying only the legacy flag, with no
* explicit path recorded here, is left untouched.
*/
threadId
cwd
modelId
agent AgentSelection
workingDirectories
ownsManagedWorkingDirectory
managedWorkingDirectory
threadId
cwd
modelId
agent AgentSelection
workingDirectories
ownsManagedWorkingDirectory
managedWorkingDirectory
_sessionDataService ISessionDataService
_logService ILogService
session
ref _sessionDataServicesession
ref
metadata refobject
CodexSessionMetadataStore
CodexSessionMetadataStore
CodexSessionMetadataStore
CodexSessionMetadataStore
CodexSessionMetadataStore
CodexSessionMetadataStore
Objectmetadatavalue value
ref
session fields ICodexSessionOverlayUpdate
ref _sessionDataServicesession
db refobject
work
fieldsthreadId
workdbCodexSessionMetadataStore fieldsthreadId
fieldscwd
workdb
CodexSessionMetadataStore
fieldscwd fieldsworkingDirectories
fieldsmodelId
workdbCodexSessionMetadataStore fieldsmodelId
fieldsagent
workdb
CodexSessionMetadataStore
fieldsagent uri fieldsagenturi
fieldsownsManagedWorkingDirectory
workdb
CodexSessionMetadataStore
fieldsownsManagedWorkingDirectory
fieldsmanagedWorkingDirectory
workdb
CodexSessionMetadataStore
fieldsmanagedWorkingDirectory fieldsmanagedWorkingDirectory
work
ref
err
_logService
session ICodexSessionOverlay
ref _sessionDataServicesession
ref
threadId cwdRaw modelId agentRaw ownsManagedWorkingDirectoryRaw managedWorkingDirectoryRaw
refobjectCodexSessionMetadataStore
refobjectCodexSessionMetadataStore
refobjectCodexSessionMetadataStore
refobjectCodexSessionMetadataStore
refobjectCodexSessionMetadataStore
refobjectCodexSessionMetadataStore
cwd cwdRaw
threadId threadId
cwd cwdcwd
modelId modelId
agent agentRaw
workingDirectories cwdworkingDirectories
ownsManagedWorkingDirectoryRaw ownsManagedWorkingDirectory
managedWorkingDirectoryRaw managedWorkingDirectory managedWorkingDirectoryRaw
ref
err
_logService
raw AgentSelection
raw
value uri raw
valueuri uri valueuri
cwd workingDirectories
workingDirectories workingDirectorieslength
cwd
cwd cwd
workingDirectories workingDirectoriesdirectory directory
raw cwd workingDirectories
raw
raw
cwd raw
value cwd workingDirectories raw
valuecwd
workingDirectories valueworkingDirectories
valueworkingDirectories
directory directory directory
directory directory
cwd valuecwd
workingDirectories workingDirectories workingDirectorieslength workingDirectories