Skip to content

Conversation

@zhichli
Copy link
Member

@zhichli zhichli commented Aug 19, 2025

Add a new feature to allow exporting logs of individual chat prompt node or all nodes in the copilot debug view in JSON.

Usage:

  • offline evaluation and trajectory transformation
  • dependency of WIP chat replay feature
@zhichli zhichli marked this pull request as ready for review August 19, 2025 23:07
@zhichli zhichli requested review from amunger and connor4312 August 19, 2025 23:11
connor4312
connor4312 previously approved these changes Aug 20, 2025
Copy link
Member

@connor4312 connor4312 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane overall, some suggestions

Comment on lines +396 to +400
const result = await vscode.window.showInformationMessage(
`Successfully exported prompt with ${promptObject.logCount} log entries to ${saveUri.fsPath}`,
revealAction,
openAction
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This notification is extraneous since we show the file after we save it anyway, I would avoid the extra noise

Suggested change
const result = await vscode.window.showInformationMessage(
`Successfully exported prompt with ${promptObject.logCount} log entries to ${saveUri.fsPath}`,
revealAction,
openAction
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure which code you mean that does the "show the file after we save". Without this notification, there is no feedback in ui whether the file is saved or where to find it. I also think real action is useful besides openaction.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I suppose only if result === revealAction or openAction. We could display the notification only if it's not one of those

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you assuming the file is auto-opened after the vscode.workspace.fs.writeFile call ? As tested, the current ux is when the user clicks the export as json button, it will write/save the file under the scene and won't open the file saved, then the notification comes in as the only way to render those 2 actions user can subsequently take (including open and see the file). So I'm still confused here in what scenarios we don't need to show notification 🥲 - pardon me if I misunderstood anything.

Comment on lines +483 to +487
const result = await vscode.window.showInformationMessage(
`Successfully exported ${allPromptsContent.length} prompts with ${totalLogEntries} log entries to ${saveUri.fsPath}`,
revealAction,
openAction
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly here

Suggested change
const result = await vscode.window.showInformationMessage(
`Successfully exported ${allPromptsContent.length} prompts with ${totalLogEntries} log entries to ${saveUri.fsPath}`,
revealAction,
openAction
);
@vs-code-engineering vs-code-engineering bot added this to the August 2025 milestone Aug 20, 2025
DonJayamanne
DonJayamanne previously approved these changes Aug 20, 2025
@zhichli zhichli dismissed stale reviews from DonJayamanne and connor4312 via 577a18c August 20, 2025 22:56
@zhichli zhichli added this pull request to the merge queue Aug 21, 2025
Merged via the queue into main with commit d783184 Aug 21, 2025
6 checks passed
@zhichli zhichli deleted the zhichli/logs branch August 21, 2025 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

6 participants