chore(code): add prompt sent event to cloud tasks#2532
Merged
charlesvien merged 1 commit intoJun 9, 2026
Conversation
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/src/renderer/sagas/task/task-creation.ts:325
**`prompt_length_chars` measurement differs from local tracking**
`transport.promptText` is `buildCloudTaskDescription` output, which appends `"Attached files: file1, file2, …"` when files are present. For a file-only cloud prompt (no text body), `messageText` is `undefined` but `promptText` is a non-empty attachment summary, so `prompt_length_chars` will report a non-zero length for what is effectively an empty text prompt. The local equivalent uses only the pure text (`extractPromptText`), so the two paths are inconsistent. Using `transport.messageText?.length ?? 0` would match the local meaning; if tracking files-sent information matters, a separate `has_attachment` property on `PromptSentProperties` would be cleaner than relying on the length signal.
Reviews (1): Last reviewed commit: "chore(code): add prompt sent event to cl..." | Re-trigger Greptile |
eb59584 to
c552a27
Compare
charlesvien
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
this is not 100% accurate because we only track "prompt sent" for local tasks https://us.posthog.com/project/2/insights/9A5loOF4
Changes
adds "prompt sent" event to cloud tasks
How did you test this?
Automatic notifications