Skip to content

'generate-rebase' feedback submissions have undefined "type" #4502

@sergeibbb

Description

@sergeibbb

Description

We want feedback events for generate-rebase had defined value in type field.

Also there is a following question: every action from "explain" family has explain-changes type. Also we need to know the specific feature that the user sent feedback for, such as explain-branch, explain-commit, explain-stash, explain-wip. However, we want to keep the type field as is, instead we want to add a new feautre field that would specify the exact feature.

Verification steps

probably the easiest way is to set a breakpoint to the aiFeedback.ts/sendFeedbackEvent() on the container.telemetry.sendEvent line,

or even set a conditional breakpoint right into the container.telemetry.sendEvent() method with a condition that name === 'ai/feedback'

Then click to "Thumb up" of Markdown results of different AI features.

Catch the event with the breakpoint and check that eventData contains type and feature fields:

  • generate-rebase for the rebase generation
  • type: explain-changes, for "Explain" family
  • feature field is different for different features of "Explain" family.

Explanation

aiProvider.explainChanges() sets the "type" field on result:

return result === 'cancelled'
? result
: result != null
? { ...result, type: 'explain-changes', parsed: parseSummarizeResult(result.content) }
: undefined;

While aiProvider.generateRebase() does not:

const rq = await this.sendRebaseRequestWithRetry(repo, baseRef, headRef, source, result, options);
if (rq === 'cancelled') return rq;
if (rq == null) return undefined;
return {
...rq,
...result,
};

GitLens Version

17.3.0

VS Code Version

No response

Git Version

No response

Logs, Screenshots, Screen Captures, etc

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions