Skip to content

Commit

Permalink
chore(ai-help): include question number in metrics (#10096)
Browse files Browse the repository at this point in the history
Allows distinguishing initial from follow-up questions.

Co-authored-by: Leo McArdle <[email protected]>
  • Loading branch information
caugner and LeoMcA authored Nov 29, 2023
1 parent b77edeb commit 9657ea9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/src/plus/ai-help/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,13 @@ export function AIHelpInner() {
className="ai-help-input-form"
onSubmit={(event) => {
event.preventDefault();
const questionNumber =
1 +
messages.filter((m) => m.role === MessageRole.User).length;
gleanClick(
`${AI_HELP}: submit ${isExample ? "example" : "question"}`
`${AI_HELP}: submit ${
isExample ? "example" : "question"
} ${questionNumber}`
);
if (query.trim()) {
submit(query.trim());
Expand Down

0 comments on commit 9657ea9

Please sign in to comment.