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

add isCommand to cody.chat-question event metadata #5959

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/shared/src/telemetry-v2/events/chat-question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ export const events = [
// See https://github.com/sourcegraph/sourcegraph/pull/59524
recordsPrivateMetadataTranscript: recordTranscript ? 1 : 0,
isPublicRepo: params.repoIsPublic ? 1 : 0,
// TODO: Remove this field when the transition from commands to prompts is complete
isCommand: params.command ? 1 : 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Commands are being deprecated in favor of prompt library, so let's align the purpose, names, etc. with that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I would still love for us to collect this in the meantime, as we deprecate commands. Right now, we have no way of distinguishing if a chat-question/executed event came from a user vs command and this could impact chat submission metrics slightly.

For prompts, I noticed that it is first added to the chat box and then the user has to click submit for it to go through ... wondering if that will be the behavior going forward? Might need to add some logic/telemetry for when a user inserts a prompt but then edits it before submitting.

Similarly, for right-click "commands" (screenshot) will those go away for prompts and not be auto-submitted?
image

Happy to ask these questions elsewhere if you're not directly involved with the depreciation of commands :)

Copy link
Contributor

Choose a reason for hiding this comment

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

I would still love for us to collect this in the meantime, as we deprecate commands.

OK but I literally don't see where we set the params.command field any more.

For prompts, I noticed that it is first added to the chat box and then the user has to click submit for it to go through ... wondering if that will be the behavior going forward?

@taiyab ^^^

Similarly, for right-click "commands" (screenshot) will those go away for prompts and not be auto-submitted?

@kalanchan, @taiyab ^^^

},
privateMetadata: {
chatModel: params.chatModel,
// TODO: Remove this field when the transition from commands to prompts is complete
command: params.command,
requestID: params.requestID,
sessionID: params.sessionID,
Expand Down Expand Up @@ -139,6 +142,8 @@ export const events = [
detectedIntent: params.detectedIntent
? map.intent(params.detectedIntent)
: undefined,
// TODO: Remove this field when the transition from commands to prompts is complete
isCommand: params.command ? 1 : 0,
...metadata,
recordsPrivateMetadataTranscript: recordTranscript ? 1 : 0,
}),
Expand All @@ -153,6 +158,8 @@ export const events = [
)
: undefined,
detectedIntent: params.detectedIntent,
// TODO: Remove this field when the transition from commands to prompts is complete
command: params.command,
userSpecifiedIntent: params.userSpecifiedIntent,
traceId: spans.current.spanContext().traceId,
gitMetadata,
Expand Down
Loading