Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/platform/requestLogger/common/capturingToken.ts
13401 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
/**
7
* A token that can be used to capture and group related requests together.
8
*/
9
export class CapturingToken {
10
constructor(
11
/**
12
* A label to display for the parent tree element.
13
*/
14
public readonly label: string,
15
/**
16
* An optional icon to display alongside the label.
17
*/
18
public readonly icon: string | undefined,
19
/**
20
* Optional pre-assigned subAgentInvocationId as session id for trajectory tracking.
21
* When set, the trajectory will use this ID instead of generating a new one,
22
* enabling explicit linking between parent tool calls and subagent trajectories.
23
*/
24
public readonly subAgentInvocationId?: string,
25
/**
26
* Optional name of the subagent being invoked.
27
* Used alongside subAgentInvocationId to identify the subagent in trajectory tracking.
28
*/
29
public readonly subAgentName?: string,
30
/**
31
* Optional VS Code chat session ID for trajectory tracking.
32
* When set, this ID is used directly as the trajectory session ID for the main chat,
33
* providing a 1:1 mapping between chat sessions and trajectories.
34
*/
35
public readonly chatSessionId?: string,
36
/**
37
* Optional parent chat session ID for debug log grouping.
38
* When set, logs from this invocation are written as a child of
39
* the parent session's directory instead of creating a top-level log file.
40
*/
41
public readonly parentChatSessionId?: string,
42
/**
43
* Optional label for debug log child sessions (e.g., 'title', 'categorization').
44
* Used to name the child log file within the parent session's directory.
45
*/
46
public readonly debugLogLabel?: string,
47
) { }
48
}
49
50