Skip to content
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

cody: cody.debug.filter setting to enable debug logging #52236

Merged
merged 6 commits into from
May 22, 2023

Conversation

beyang
Copy link
Member

@beyang beyang commented May 20, 2023

Removes the cody.debug behavior in favor of three settings:

  • cody.debug.enable
  • cody.debug.verbose
  • cody.debug.filter

Introduces a debug function that will log output to the VS Code Output channel "Cody AI by Sourcegraph", accessible in the "Output" bottom panel and then selecting "Cody AI by Sourcegraph" from the dropdown. This is intended for collecting information about client-side execution from end users reporting errors with Cody.

Test plan

Only affects logging behavior

@cla-bot cla-bot bot added the cla-signed label May 20, 2023
@sourcegraph-buildkite
Copy link
Collaborator

sourcegraph-buildkite commented May 20, 2023

Bundle size report 📦

Initial size Total size Async size Modules
0.00% (0.00 kb) 0.00% (+0.22 kb) 0.00% (+0.22 kb) 0.00% (0)

Look at the Statoscope report for a full comparison between the commits a371fa5 and 22abdcb or learn more.

Open explanation
  • Initial size is the size of the initial bundle (the one that is loaded when you open the page)
  • Total size is the size of the initial bundle + all the async loaded chunks
  • Async size is the size of all the async loaded chunks
  • Modules is the number of modules in the initial bundle

@beyang beyang force-pushed the bl/better-debug-log branch 3 times, most recently from ff75f52 to a135fb6 Compare May 20, 2023 17:42
Copy link
Member Author

Choose a reason for hiding this comment

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

Moved into the VS Code Cody directory, because we need to define a debug method that uses VS Code APIs

@@ -18,13 +18,17 @@ export function getRecipe(id: RecipeID): Recipe | undefined {
return registeredRecipes[id]
}

function nullLog(filterLabel: string, text: string, ...args: unknown[]) {
Copy link
Member Author

@beyang beyang May 20, 2023

Choose a reason for hiding this comment

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

We do not debug log anything in Cody web at this time.

@beyang beyang marked this pull request as ready for review May 20, 2023 17:50
@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented May 20, 2023

📖 Storybook live preview

Copy link
Contributor

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

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

That's much needed, thanks!

client/cody/package.json Show resolved Hide resolved
@beyang beyang merged commit db9b543 into main May 22, 2023
23 of 24 checks passed
@beyang beyang deleted the bl/better-debug-log branch May 22, 2023 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants