-
Notifications
You must be signed in to change notification settings - Fork 76
Wire QA intent detection in daemon routing + fix epoch units #6941
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /** | ||
| * Detect whether a user's task text indicates a QA/test workflow. | ||
| * Uses keyword/pattern matching for v1 — can be upgraded to semantic detection later. | ||
| */ | ||
| export function detectQaIntent(taskText: string): boolean { | ||
| const lower = taskText.toLowerCase().trim(); | ||
|
|
||
| // Direct QA/test commands | ||
| if (/^(qa|test|verify|check)\b/.test(lower)) return true; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The direct matcher marks any task beginning with Useful? React with 👍 / 👎. |
||
|
|
||
| // Natural language QA patterns | ||
| const qaPatterns = [ | ||
| /\b(run|do|perform|execute)\s+(a\s+)?(qa|test|check|verification)\b/, | ||
| /\b(test|qa|verify|check)\s+(this|the|that|my)\b/, | ||
| /\bhelp\s+me\s+(test|qa|verify|check)\b/, | ||
| /\b(can you|could you|please)\s+(test|qa|verify|check)\b/, | ||
| /\btesting\s+(the|this|that|my)\b/, | ||
| ]; | ||
|
|
||
| return qaPatterns.some(p => p.test(lower)); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting
reportToSessionIdon every escalation stores CU metadata for every escalated run, but the macOS client only sendscu_session_finalizedwhenqaModeis true (ComputerUseSession.run), so non-QA escalations never trigger the metadata cleanup path inhandleCuSessionFinalized. In long-lived desktop sessions this accumulates stalecuSessionMetadataentries and leaves the new report-linking path effectively incomplete unless QA mode is also enabled.Useful? React with 👍 / 👎.