-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Feature: add JSON export of chat prompt logs in chat debug view #672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
connor4312
left a comment
There was a problem hiding this 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
| const result = await vscode.window.showInformationMessage( | ||
| `Successfully exported prompt with ${promptObject.logCount} log entries to ${saveUri.fsPath}`, | ||
| revealAction, | ||
| openAction | ||
| ); |
There was a problem hiding this comment.
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
| const result = await vscode.window.showInformationMessage( | |
| `Successfully exported prompt with ${promptObject.logCount} log entries to ${saveUri.fsPath}`, | |
| revealAction, | |
| openAction | |
| ); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
| const result = await vscode.window.showInformationMessage( | ||
| `Successfully exported ${allPromptsContent.length} prompts with ${totalLogEntries} log entries to ${saveUri.fsPath}`, | ||
| revealAction, | ||
| openAction | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly here
| const result = await vscode.window.showInformationMessage( | |
| `Successfully exported ${allPromptsContent.length} prompts with ${totalLogEntries} log entries to ${saveUri.fsPath}`, | |
| revealAction, | |
| openAction | |
| ); |
…at into zhichli/logs
Add a new feature to allow exporting logs of individual chat prompt node or all nodes in the copilot debug view in JSON.
Usage: