@fatagnus/convex-feedback 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +168 -1
- package/dist/index.d.ts +57 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -0
- package/dist/index.js.map +1 -1
- package/dist/react/BugReportButton.d.ts +16 -1
- package/dist/react/BugReportButton.d.ts.map +1 -1
- package/dist/react/BugReportButton.js +271 -5
- package/dist/react/BugReportButton.js.map +1 -1
- package/dist/react/InterviewChat.d.ts +89 -0
- package/dist/react/InterviewChat.d.ts.map +1 -0
- package/dist/react/InterviewChat.js +127 -0
- package/dist/react/InterviewChat.js.map +1 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -0
- package/dist/react/index.js.map +1 -1
- package/dist/types.d.ts +142 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -2
- package/src/convex/agents/feedbackInterviewAgent.ts +951 -0
- package/src/convex/agents/index.ts +13 -0
- package/src/convex/index.ts +2 -0
- package/src/convex/inputRequests.ts +161 -0
- package/src/convex/schema.ts +96 -0
- package/src/index.ts +71 -0
- package/src/react/BugReportButton.tsx +424 -3
- package/src/react/InterviewChat.tsx +655 -0
- package/src/react/index.ts +11 -0
- package/src/types.ts +162 -0
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@ Bug reports and feedback collection component for Convex applications with AI an
|
|
|
7
7
|
- 🐛 **Bug Reports** - Capture bug reports with browser diagnostics, console errors, and screenshots
|
|
8
8
|
- 💬 **Feedback** - Collect feature requests, change requests, and general feedback
|
|
9
9
|
- 🤖 **AI Analysis** - Automatic analysis of submissions using OpenRouter/Claude
|
|
10
|
+
- 💬 **AI Interview Mode** - Conversational AI interviews to help users articulate detailed bug reports and feedback
|
|
10
11
|
- 📧 **Email Notifications** - Send notifications to reporters and support teams via Resend
|
|
11
12
|
- 👥 **Support Teams** - Route notifications to the right teams based on type/severity
|
|
12
13
|
- 📸 **Screenshots** - Capture or upload screenshots with reports
|
|
@@ -32,9 +33,10 @@ npm install @fatagnus/convex-feedback
|
|
|
32
33
|
- `@tabler/icons-react` (>=3.0.0)
|
|
33
34
|
- `html2canvas` (>=1.4.0)
|
|
34
35
|
|
|
35
|
-
**Optional (for AI analysis):**
|
|
36
|
+
**Optional (for AI analysis and interview mode):**
|
|
36
37
|
- `@convex-dev/agent` (>=0.1.0)
|
|
37
38
|
- `@ai-sdk/openai-compatible` (>=0.1.0)
|
|
39
|
+
- `zod` (>=3.0.0)
|
|
38
40
|
|
|
39
41
|
**Optional (for email notifications):**
|
|
40
42
|
- `resend` (>=4.0.0)
|
|
@@ -299,6 +301,24 @@ import { BugReportButton } from '@fatagnus/convex-feedback/react';
|
|
|
299
301
|
showFeedback={true}
|
|
300
302
|
onSuccess={(type) => console.log(`${type} submitted`)}
|
|
301
303
|
onError={(error, type) => console.error(`${type} failed:`, error)}
|
|
304
|
+
// AI Interview Mode (optional)
|
|
305
|
+
enableInterview={true}
|
|
306
|
+
defaultMode="interview"
|
|
307
|
+
interviewApi={{
|
|
308
|
+
startBugInterview: api.feedback.agents.feedbackInterviewAgent.startBugInterview,
|
|
309
|
+
startFeedbackInterview: api.feedback.agents.feedbackInterviewAgent.startFeedbackInterview,
|
|
310
|
+
continueInterview: api.feedback.agents.feedbackInterviewAgent.continueInterview,
|
|
311
|
+
getPendingForThread: api.feedback.inputRequests.getPendingForThread,
|
|
312
|
+
getSessionByThread: api.feedback.agents.feedbackInterviewAgent.getSessionByThread,
|
|
313
|
+
}}
|
|
314
|
+
interviewContext={{
|
|
315
|
+
appName: 'My App',
|
|
316
|
+
appDescription: 'A productivity tool for teams',
|
|
317
|
+
featureAreas: [
|
|
318
|
+
{ name: 'Dashboard', description: 'Main overview page' },
|
|
319
|
+
{ name: 'Reports', description: 'Analytics and reporting' },
|
|
320
|
+
],
|
|
321
|
+
}}
|
|
302
322
|
/>
|
|
303
323
|
```
|
|
304
324
|
|
|
@@ -317,6 +337,10 @@ import { BugReportButton } from '@fatagnus/convex-feedback/react';
|
|
|
317
337
|
| `showFeedback` | `boolean` | `true` | Show feedback tab |
|
|
318
338
|
| `onSuccess` | `function` | - | Success callback |
|
|
319
339
|
| `onError` | `function` | - | Error callback |
|
|
340
|
+
| `enableInterview` | `boolean` | `false` | Enable AI interview mode |
|
|
341
|
+
| `defaultMode` | `'form' \| 'interview'` | `'form'` | Default input mode when interview is enabled |
|
|
342
|
+
| `interviewContext` | `InterviewContext` | - | Context to help AI ask better questions |
|
|
343
|
+
| `interviewApi` | `object` | - | Convex API references for interview actions (required if `enableInterview` is true) |
|
|
320
344
|
|
|
321
345
|
### ErrorBugReportButton
|
|
322
346
|
|
|
@@ -383,6 +407,147 @@ function MyComponent() {
|
|
|
383
407
|
}
|
|
384
408
|
```
|
|
385
409
|
|
|
410
|
+
## AI Interview Mode
|
|
411
|
+
|
|
412
|
+
The AI Interview Mode provides a conversational experience to help users articulate their bug reports and feedback more effectively. Instead of filling out a form, users chat with an AI that asks clarifying questions and generates a well-structured report.
|
|
413
|
+
|
|
414
|
+
### Enabling Interview Mode
|
|
415
|
+
|
|
416
|
+
To enable AI interviews, you need:
|
|
417
|
+
|
|
418
|
+
1. `OPENROUTER_API_KEY` environment variable set in your Convex dashboard
|
|
419
|
+
2. The `@convex-dev/agent` and `zod` packages installed
|
|
420
|
+
3. The `enableInterview` and `interviewApi` props configured
|
|
421
|
+
|
|
422
|
+
```tsx
|
|
423
|
+
import { BugReportButton } from '@fatagnus/convex-feedback/react';
|
|
424
|
+
import { api } from './convex/_generated/api';
|
|
425
|
+
|
|
426
|
+
<BugReportButton
|
|
427
|
+
reporterType="staff"
|
|
428
|
+
reporterId={user.id}
|
|
429
|
+
reporterEmail={user.email}
|
|
430
|
+
reporterName={user.name}
|
|
431
|
+
bugReportApi={{
|
|
432
|
+
create: api.feedback.bugReports.create,
|
|
433
|
+
generateUploadUrl: api.feedback.bugReports.generateUploadUrl,
|
|
434
|
+
}}
|
|
435
|
+
feedbackApi={{
|
|
436
|
+
create: api.feedback.feedback.create,
|
|
437
|
+
generateUploadUrl: api.feedback.feedback.generateUploadUrl,
|
|
438
|
+
}}
|
|
439
|
+
// Enable AI Interview Mode
|
|
440
|
+
enableInterview={true}
|
|
441
|
+
defaultMode="interview" // or "form" to default to manual form
|
|
442
|
+
interviewApi={{
|
|
443
|
+
startBugInterview: api.feedback.agents.feedbackInterviewAgent.startBugInterview,
|
|
444
|
+
startFeedbackInterview: api.feedback.agents.feedbackInterviewAgent.startFeedbackInterview,
|
|
445
|
+
continueInterview: api.feedback.agents.feedbackInterviewAgent.continueInterview,
|
|
446
|
+
getPendingForThread: api.feedback.inputRequests.getPendingForThread,
|
|
447
|
+
getSessionByThread: api.feedback.agents.feedbackInterviewAgent.getSessionByThread,
|
|
448
|
+
}}
|
|
449
|
+
/>
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
### Providing Context
|
|
453
|
+
|
|
454
|
+
You can provide application context to help the AI ask more relevant questions:
|
|
455
|
+
|
|
456
|
+
```tsx
|
|
457
|
+
<BugReportButton
|
|
458
|
+
// ... other props
|
|
459
|
+
interviewContext={{
|
|
460
|
+
// Application information
|
|
461
|
+
appName: 'Logsign SIEM',
|
|
462
|
+
appDescription: 'A security information and event management platform',
|
|
463
|
+
|
|
464
|
+
// Feature areas (AI will offer these as choices)
|
|
465
|
+
featureAreas: [
|
|
466
|
+
{ name: 'Dashboard', description: 'Main overview and metrics' },
|
|
467
|
+
{ name: 'Alerts', description: 'Security alert management' },
|
|
468
|
+
{ name: 'Reports', description: 'Analytics and reporting' },
|
|
469
|
+
{ name: 'Settings', description: 'User and system configuration' },
|
|
470
|
+
],
|
|
471
|
+
|
|
472
|
+
// Known issues (AI will check for duplicates)
|
|
473
|
+
knownIssues: [
|
|
474
|
+
{ title: 'Slow dashboard loading', description: 'Dashboard takes 5+ seconds on first load' },
|
|
475
|
+
{ title: 'Export timeout', description: 'Large reports fail to export' },
|
|
476
|
+
],
|
|
477
|
+
|
|
478
|
+
// Custom questions to ask during interview
|
|
479
|
+
customQuestions: {
|
|
480
|
+
bug: [
|
|
481
|
+
'Are you using any browser extensions?',
|
|
482
|
+
'Did this work before a recent update?',
|
|
483
|
+
],
|
|
484
|
+
feedback: [
|
|
485
|
+
'How urgent is this for your workflow?',
|
|
486
|
+
'Would a workaround help in the meantime?',
|
|
487
|
+
],
|
|
488
|
+
},
|
|
489
|
+
|
|
490
|
+
// Additional instructions for the AI
|
|
491
|
+
additionalInstructions: 'Our users are security professionals, so technical terms are okay.',
|
|
492
|
+
}}
|
|
493
|
+
/>
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
### InterviewContext Type
|
|
497
|
+
|
|
498
|
+
```typescript
|
|
499
|
+
interface InterviewContext {
|
|
500
|
+
/** Application/product name (e.g., "Logsign SIEM") */
|
|
501
|
+
appName?: string;
|
|
502
|
+
|
|
503
|
+
/** Brief description of what the app does */
|
|
504
|
+
appDescription?: string;
|
|
505
|
+
|
|
506
|
+
/** Feature areas/modules in the app */
|
|
507
|
+
featureAreas?: Array<{
|
|
508
|
+
name: string;
|
|
509
|
+
description?: string;
|
|
510
|
+
}>;
|
|
511
|
+
|
|
512
|
+
/** Known issues or FAQ items to help detect duplicates */
|
|
513
|
+
knownIssues?: Array<{
|
|
514
|
+
title: string;
|
|
515
|
+
description?: string;
|
|
516
|
+
}>;
|
|
517
|
+
|
|
518
|
+
/** Domain-specific questions to include in the interview */
|
|
519
|
+
customQuestions?: {
|
|
520
|
+
bug?: string[]; // Extra questions for bug reports
|
|
521
|
+
feedback?: string[]; // Extra questions for feedback
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
/** Free-form text for any other context the agent should know */
|
|
525
|
+
additionalInstructions?: string;
|
|
526
|
+
}
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
### How It Works
|
|
530
|
+
|
|
531
|
+
1. **User clicks the bug report button** - The modal opens with an "AI Interview Mode" toggle
|
|
532
|
+
2. **Interview starts** - The AI greets the user and asks what went wrong (for bugs) or what idea they have (for feedback)
|
|
533
|
+
3. **Conversational Q&A** - The AI asks 3-5 clarifying questions to understand the issue
|
|
534
|
+
4. **Report generated** - The AI generates a well-structured report with title, description, severity/priority, and reproduction steps
|
|
535
|
+
5. **Review and submit** - The user can review and edit the generated report before submitting
|
|
536
|
+
|
|
537
|
+
### Interview Input Types
|
|
538
|
+
|
|
539
|
+
The AI can ask for input in three formats:
|
|
540
|
+
|
|
541
|
+
- **Text** - Open-ended questions (single line or multiline)
|
|
542
|
+
- **Choice** - Select from predefined options (e.g., feature areas, frequency)
|
|
543
|
+
- **Form** - Multiple fields at once (rarely used)
|
|
544
|
+
|
|
545
|
+
### Fallback Behavior
|
|
546
|
+
|
|
547
|
+
- If `OPENROUTER_API_KEY` is not configured, interview mode will show an error and users can switch to the form
|
|
548
|
+
- Users can always toggle between "AI Interview" and "Quick Form" modes
|
|
549
|
+
- Screenshots and browser diagnostics are still captured automatically in interview mode
|
|
550
|
+
|
|
386
551
|
## AI Analysis
|
|
387
552
|
|
|
388
553
|
When `OPENROUTER_API_KEY` is configured, the component automatically analyzes submissions:
|
|
@@ -426,6 +591,8 @@ The component creates these tables:
|
|
|
426
591
|
- `bugReports` - Bug report submissions
|
|
427
592
|
- `feedback` - Feedback submissions
|
|
428
593
|
- `supportTeams` - Team configuration for notification routing
|
|
594
|
+
- `feedbackInputRequests` - Pending user input requests during AI interviews
|
|
595
|
+
- `interviewSessions` - Interview state and generated reports
|
|
429
596
|
|
|
430
597
|
## License
|
|
431
598
|
|
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,62 @@
|
|
|
57
57
|
* import { BugReportProvider, BugReportButton } from '@convex-dev/feedback/react';
|
|
58
58
|
* ```
|
|
59
59
|
*
|
|
60
|
+
* ### AI Interview Mode
|
|
61
|
+
*
|
|
62
|
+
* Enable AI-powered interviews to help users articulate their bug reports
|
|
63
|
+
* and feedback through a conversational experience:
|
|
64
|
+
*
|
|
65
|
+
* ```tsx
|
|
66
|
+
* import { BugReportButton } from '@convex-dev/feedback/react';
|
|
67
|
+
* import { api } from './convex/_generated/api';
|
|
68
|
+
*
|
|
69
|
+
* function App() {
|
|
70
|
+
* return (
|
|
71
|
+
* <BugReportButton
|
|
72
|
+
* reporterType="staff"
|
|
73
|
+
* reporterId={user.id}
|
|
74
|
+
* reporterEmail={user.email}
|
|
75
|
+
* reporterName={user.name}
|
|
76
|
+
* bugReportApi={{
|
|
77
|
+
* create: api.feedback.bugReports.create,
|
|
78
|
+
* generateUploadUrl: api.feedback.bugReports.generateUploadUrl,
|
|
79
|
+
* }}
|
|
80
|
+
* feedbackApi={{
|
|
81
|
+
* create: api.feedback.feedback.create,
|
|
82
|
+
* generateUploadUrl: api.feedback.feedback.generateUploadUrl,
|
|
83
|
+
* }}
|
|
84
|
+
* // Enable AI interview mode
|
|
85
|
+
* enableInterview={true}
|
|
86
|
+
* defaultMode="interview"
|
|
87
|
+
* interviewApi={{
|
|
88
|
+
* startBugInterview: api.feedback.agents.feedbackInterviewAgent.startBugInterview,
|
|
89
|
+
* startFeedbackInterview: api.feedback.agents.feedbackInterviewAgent.startFeedbackInterview,
|
|
90
|
+
* continueInterview: api.feedback.agents.feedbackInterviewAgent.continueInterview,
|
|
91
|
+
* getPendingForThread: api.feedback.inputRequests.getPendingForThread,
|
|
92
|
+
* getSessionByThread: api.feedback.agents.feedbackInterviewAgent.getSessionByThread,
|
|
93
|
+
* }}
|
|
94
|
+
* // Provide context to help the AI ask better questions
|
|
95
|
+
* interviewContext={{
|
|
96
|
+
* appName: 'My App',
|
|
97
|
+
* appDescription: 'A productivity tool for teams',
|
|
98
|
+
* featureAreas: [
|
|
99
|
+
* { name: 'Dashboard', description: 'Main overview page' },
|
|
100
|
+
* { name: 'Reports', description: 'Analytics and reporting' },
|
|
101
|
+
* { name: 'Settings', description: 'User preferences' },
|
|
102
|
+
* ],
|
|
103
|
+
* knownIssues: [
|
|
104
|
+
* { title: 'Slow loading on mobile', description: 'Dashboard takes 5+ seconds on mobile' },
|
|
105
|
+
* ],
|
|
106
|
+
* customQuestions: {
|
|
107
|
+
* bug: ['Are you using any browser extensions?'],
|
|
108
|
+
* feedback: ['How urgent is this for your workflow?'],
|
|
109
|
+
* },
|
|
110
|
+
* }}
|
|
111
|
+
* />
|
|
112
|
+
* );
|
|
113
|
+
* }
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
60
116
|
* @module
|
|
61
117
|
*/
|
|
62
118
|
export type BugSeverity = 'low' | 'medium' | 'high' | 'critical';
|
|
@@ -66,5 +122,5 @@ export type FeedbackPriority = 'nice_to_have' | 'important' | 'critical';
|
|
|
66
122
|
export type FeedbackStatus = 'open' | 'under_review' | 'planned' | 'in_progress' | 'completed' | 'declined';
|
|
67
123
|
export type ReporterType = 'staff' | 'customer';
|
|
68
124
|
export type Effort = 'low' | 'medium' | 'high';
|
|
69
|
-
export type { BugReport, Feedback, SupportTeam, } from './types';
|
|
125
|
+
export type { BugReport, Feedback, SupportTeam, InterviewContext, FeatureArea, KnownIssue, CustomQuestions, InputRequestStatus, InputType, InputOption, InputField, InputConfig, InputRequest, MessageRole, InterviewMessage, GeneratedReport, InterviewState, } from './types';
|
|
70
126
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoHG;AAGH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AACjE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAC;AACvE,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAC5E,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG,WAAW,GAAG,UAAU,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,cAAc,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC;AAC5G,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,UAAU,CAAC;AAChD,MAAM,MAAM,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAG/C,YAAY,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EAEX,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,cAAc,GACf,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -57,6 +57,62 @@
|
|
|
57
57
|
* import { BugReportProvider, BugReportButton } from '@convex-dev/feedback/react';
|
|
58
58
|
* ```
|
|
59
59
|
*
|
|
60
|
+
* ### AI Interview Mode
|
|
61
|
+
*
|
|
62
|
+
* Enable AI-powered interviews to help users articulate their bug reports
|
|
63
|
+
* and feedback through a conversational experience:
|
|
64
|
+
*
|
|
65
|
+
* ```tsx
|
|
66
|
+
* import { BugReportButton } from '@convex-dev/feedback/react';
|
|
67
|
+
* import { api } from './convex/_generated/api';
|
|
68
|
+
*
|
|
69
|
+
* function App() {
|
|
70
|
+
* return (
|
|
71
|
+
* <BugReportButton
|
|
72
|
+
* reporterType="staff"
|
|
73
|
+
* reporterId={user.id}
|
|
74
|
+
* reporterEmail={user.email}
|
|
75
|
+
* reporterName={user.name}
|
|
76
|
+
* bugReportApi={{
|
|
77
|
+
* create: api.feedback.bugReports.create,
|
|
78
|
+
* generateUploadUrl: api.feedback.bugReports.generateUploadUrl,
|
|
79
|
+
* }}
|
|
80
|
+
* feedbackApi={{
|
|
81
|
+
* create: api.feedback.feedback.create,
|
|
82
|
+
* generateUploadUrl: api.feedback.feedback.generateUploadUrl,
|
|
83
|
+
* }}
|
|
84
|
+
* // Enable AI interview mode
|
|
85
|
+
* enableInterview={true}
|
|
86
|
+
* defaultMode="interview"
|
|
87
|
+
* interviewApi={{
|
|
88
|
+
* startBugInterview: api.feedback.agents.feedbackInterviewAgent.startBugInterview,
|
|
89
|
+
* startFeedbackInterview: api.feedback.agents.feedbackInterviewAgent.startFeedbackInterview,
|
|
90
|
+
* continueInterview: api.feedback.agents.feedbackInterviewAgent.continueInterview,
|
|
91
|
+
* getPendingForThread: api.feedback.inputRequests.getPendingForThread,
|
|
92
|
+
* getSessionByThread: api.feedback.agents.feedbackInterviewAgent.getSessionByThread,
|
|
93
|
+
* }}
|
|
94
|
+
* // Provide context to help the AI ask better questions
|
|
95
|
+
* interviewContext={{
|
|
96
|
+
* appName: 'My App',
|
|
97
|
+
* appDescription: 'A productivity tool for teams',
|
|
98
|
+
* featureAreas: [
|
|
99
|
+
* { name: 'Dashboard', description: 'Main overview page' },
|
|
100
|
+
* { name: 'Reports', description: 'Analytics and reporting' },
|
|
101
|
+
* { name: 'Settings', description: 'User preferences' },
|
|
102
|
+
* ],
|
|
103
|
+
* knownIssues: [
|
|
104
|
+
* { title: 'Slow loading on mobile', description: 'Dashboard takes 5+ seconds on mobile' },
|
|
105
|
+
* ],
|
|
106
|
+
* customQuestions: {
|
|
107
|
+
* bug: ['Are you using any browser extensions?'],
|
|
108
|
+
* feedback: ['How urgent is this for your workflow?'],
|
|
109
|
+
* },
|
|
110
|
+
* }}
|
|
111
|
+
* />
|
|
112
|
+
* );
|
|
113
|
+
* }
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
60
116
|
* @module
|
|
61
117
|
*/
|
|
62
118
|
export {};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoHG"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FunctionReference } from 'convex/server';
|
|
2
|
+
import type { InterviewContext } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* Props for the BugReportButton component
|
|
4
5
|
*/
|
|
@@ -36,6 +37,20 @@ export interface BugReportButtonProps {
|
|
|
36
37
|
onSuccess?: (type: 'bug' | 'feedback') => void;
|
|
37
38
|
/** Callback when submission fails */
|
|
38
39
|
onError?: (error: Error, type: 'bug' | 'feedback') => void;
|
|
40
|
+
/** Enable AI interview mode (requires @convex-dev/agent) */
|
|
41
|
+
enableInterview?: boolean;
|
|
42
|
+
/** Default input mode when interview is enabled */
|
|
43
|
+
defaultMode?: 'form' | 'interview';
|
|
44
|
+
/** Context to help the AI interviewer ask better questions */
|
|
45
|
+
interviewContext?: InterviewContext;
|
|
46
|
+
/** Convex API reference for interview actions (required if enableInterview is true) */
|
|
47
|
+
interviewApi?: {
|
|
48
|
+
startBugInterview: FunctionReference<'action'>;
|
|
49
|
+
startFeedbackInterview: FunctionReference<'action'>;
|
|
50
|
+
continueInterview: FunctionReference<'action'>;
|
|
51
|
+
getPendingForThread: FunctionReference<'query'>;
|
|
52
|
+
getSessionByThread: FunctionReference<'query'>;
|
|
53
|
+
};
|
|
39
54
|
}
|
|
40
55
|
/**
|
|
41
56
|
* Floating action button for submitting bug reports and feedback.
|
|
@@ -66,5 +81,5 @@ export interface BugReportButtonProps {
|
|
|
66
81
|
* }
|
|
67
82
|
* ```
|
|
68
83
|
*/
|
|
69
|
-
export declare function BugReportButton({ reporterType, reporterId, reporterEmail, reporterName, bugReportApi, feedbackApi, position, buttonColor, showFeedback, onSuccess, onError, }: BugReportButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
export declare function BugReportButton({ reporterType, reporterId, reporterEmail, reporterName, bugReportApi, feedbackApi, position, buttonColor, showFeedback, onSuccess, onError, enableInterview, defaultMode, interviewContext, interviewApi, }: BugReportButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
70
85
|
//# sourceMappingURL=BugReportButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BugReportButton.d.ts","sourceRoot":"","sources":["../../src/react/BugReportButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BugReportButton.d.ts","sourceRoot":"","sources":["../../src/react/BugReportButton.tsx"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,+EAA+E;IAC/E,YAAY,EAAE,OAAO,GAAG,UAAU,CAAC;IACnC,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,YAAY,EAAE;QACZ,MAAM,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;QACtC,iBAAiB,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;KAClD,CAAC;IACF,wCAAwC;IACxC,WAAW,EAAE;QACX,MAAM,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;QACtC,iBAAiB,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;KAClD,CAAC;IACF,sCAAsC;IACtC,QAAQ,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5E,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wCAAwC;IACxC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,UAAU,KAAK,IAAI,CAAC;IAC/C,qCAAqC;IACrC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,GAAG,UAAU,KAAK,IAAI,CAAC;IAC3D,4DAA4D;IAC5D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IACnC,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,uFAAuF;IACvF,YAAY,CAAC,EAAE;QACb,iBAAiB,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAC/C,sBAAsB,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QACpD,iBAAiB,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAC/C,mBAAmB,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAChD,kBAAkB,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;KAChD,CAAC;CACH;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,UAAU,EACV,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,QAAoC,EACpC,WAAmB,EACnB,YAAmB,EACnB,SAAS,EACT,OAAO,EACP,eAAuB,EACvB,WAAoB,EACpB,gBAAgB,EAChB,YAAY,GACb,EAAE,oBAAoB,2CAggCtB"}
|