constructor(
clientId: string,
seqAllocator: () => number,
log: (msg: string) => void,
) {
super(clientId, log);
this._chatUri = chatUri;
this._seqAllocator = seqAllocator;
}
/**
Frontier kind: Joint frontier
unlabeled · c_d62b4c5346e8
1 test · 15608 LOC · 93 files · introduces 1 test · 62 LOC · 1 file
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/reducers.test|title=chatReducer – summaryStatus with tool call confirmations and input requests clamps negative terminal duration|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/agentHost/test/node/reducers.test|title=chatReducer – summaryStatus with tool call confirmations and input requests preserves turn start timestamp and duration after completion|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/lifecycle.test|title=Lifecycle Action bar has broken accessibility #100273|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/lifecycle.test|title=Lifecycle dispose disposable array|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication creates new entry when none exists|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate IDs with existing entry - fixed version reuses existing|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate status IDs - buggy version leaks entry|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication duplicate status IDs - fixed version reuses entry from current update|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication mixed unique and duplicate IDs|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/languageStatus/test/common/languageStatusDedupe.test|title=LanguageStatus - Dedicated Entry Deduplication reuses existing entry from previous update|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1Every collected test enters the hierarchy at exactly one concept.
1 test introduced at this concept.
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 62 introduced LOC across 16 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
constructor(
clientId: string,
seqAllocator: () => number,
log: (msg: string) => void,
) {
super(clientId, log);
this._chatUri = chatUri;
this._seqAllocator = seqAllocator;
}
/**
*/
applyOptimistic(action: ChatAction): number {
this._pendingActions.push({ clientSeq, action });
const base = this._optimisticState ?? this.verifiedValue;
if (base) {
this._optimisticState = chatReducer(base, action as IProtocolChatAction, this._log);
this._onDidChange.fire(this._optimisticState);
}
return clientSeq;
}
protected override _getOptimisticState(): ChatState | undefined {
}
protected override _applyReducer(state: ChatState, action: StateAction): ChatState {
}
protected override _isRelevantEnvelope(envelope: ActionEnvelope): boolean {
return isChatAction(envelope.action) && envelope.channel === this._chatUri;
agentSubscription.ts
}
protected override _onSnapshotApplied(fromSeq: number): void {
this._recomputeOptimistic();
}
protected override _reconcile(envelope: ActionEnvelope, isOwnAction: boolean): void {
// back the originating client's matching optimistic action. Guarding all
// apply branches also prevents a broadcast rejection from leaking the
// rejected action into a non-origin client's state.
if (isOwnAction && envelope.origin) {
const idx = this._pendingActions.findIndex(p => p.clientSeq === envelope.origin!.clientSeq);
if (idx !== -1) {
this._confirmedApply(envelope.action);
}
this._promotePendingTurnStartIfTerminal(envelope.action);
this._confirmedApply(envelope.action);
}
this._recomputeOptimistic();
}
private _promotePendingTurnStartIfTerminal(action: StateAction): void {
// A backend-originated terminal turn action may arrive without the clientSeq
agentSubscription.ts
// that would normally confirm our optimistic turn start. Promote that start
// first so the terminal action can close it instead of leaving it pending.
if (!isChatAction(action)) {
return;
}
if (action.type !== ActionType.ChatTurnComplete && action.type !== ActionType.ChatTurnCancelled && action.type !== ActionType.ChatError) {
agentSubscription.ts
return;
}
const index = this._pendingActions.findIndex(p => p.action.type === ActionType.ChatTurnStarted && p.action.turnId === action.turnId);
agentSubscription.ts
if (index === -1) {
return;
}
const [{ action: pendingAction }] = this._pendingActions.splice(index, 1);
agentSubscription.ts
if (this._confirmedState && (!this._confirmedState.activeTurn || this._confirmedState.activeTurn.id !== action.turnId)) {
this._confirmedState = this._applyReducer(this._confirmedState, pendingAction);
}
}
private _confirmedApply(action: StateAction): void {
this._confirmedState = this._applyReducer(this._confirmedState, action);
}
}
private _recomputeOptimistic(): void {
if (!confirmed) {
this._optimisticState = undefined;
return;
}
this._optimisticState = undefined;
this._onDidChange.fire(confirmed);
return;
}
let state = confirmed;
for (const pending of this._pendingActions) {
this._optimisticState = state;
this._onDidChange.fire(state);
clearPending(): void {