Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 28, 2025

Adds optional behavior to make parent NES tree entries in the Request Log Tree clickable, controlled by a new primaryClickOpensEntry flag on CapturingToken.

Changes

  • Added primaryClickOpensEntry option to CapturingToken: New optional boolean property (defaults to false for backward compatibility) that controls whether clicking the parent tree entry opens the primary entry
  • Conditional parent click behavior: When primaryClickOpensEntry is true, the parent entry becomes clickable and opens the primary LoggedInfo via vscode.open
  • Conditional duplicate removal: When primaryClickOpensEntry is true, children exclude the entry matching the parent's primaryInfo.id to avoid duplication
// CapturingToken now has primaryClickOpensEntry option
export class CapturingToken {
  constructor(
    public readonly label: string,
    public readonly icon: string | undefined,
    public readonly flattenSingleChild: boolean,
    public readonly primaryClickOpensEntry: boolean = false,
  ) { }
}

// ChatPromptItem conditionally adds click command
if (token.primaryClickOpensEntry) {
  this.command = {
    command: 'vscode.open',
    arguments: [vscode.Uri.parse(ChatRequestScheme.buildUri({ kind: 'request', id: primaryInfo.id }))]
  };
}

// getChildren() conditionally skips primary entry as child
if (lastPrompt.token.primaryClickOpensEntry && currReq.id === lastPrompt.primaryInfo.id) {
  continue;
}

Created from VS Code.

Original prompt

I would like that in Request Log Tree, there are NES tree entries.

A parent NES tree entry currently contains request entries and an entry for the NES that matches the parent's tree label.

I would like that the parent tree IS actually the main entry and that the children are only the request entries.

So if I click on the parent entry, I should get the main NES entry. If I unfold it, I should see the request tree entries.

The user has attached the following file paths as relevant context:

  • .github/copilot-instructions.md

Created from VS Code.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update NES tree structure in request log Make parent NES tree entries clickable and remove duplicate child entry Nov 28, 2025
Copilot AI requested a review from ulugbekna November 28, 2025 14:23
Copilot finished work on behalf of ulugbekna November 28, 2025 14:23
@ulugbekna
Copy link
Contributor

@copilot Nesting seems broken.

The main entry becoming the parent entry should also be optional through an option on CapturingToken.

Copy link
Contributor Author

Copilot AI commented Nov 28, 2025

@copilot Nesting seems broken.

The main entry becoming the parent entry should also be optional through an option on CapturingToken.

Fixed in a696123. Added primaryClickOpensEntry property to CapturingToken (defaults to false for backward compatibility). When enabled, the parent entry becomes clickable and the primary entry is excluded from children to avoid duplication. The original behavior is preserved by default.

Copilot AI changed the title Make parent NES tree entries clickable and remove duplicate child entry Add optional clickable parent NES tree entries via CapturingToken flag Nov 28, 2025
Copilot finished work on behalf of ulugbekna November 28, 2025 15:01
@ulugbekna ulugbekna closed this Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants